[LLVMdev] llc debug info

Duncan P. N. Exon Smith dexonsmith at apple.com
Sat Mar 15 16:03:29 PDT 2014


Because llvm/lib/CodeGen/RegAllocGreedy.cpp has this line:

    #define DEBUG_TYPE "regalloc"

You can also pass -debug-only=regalloc to only evaluate the DEBUG()
statements in that file.  So you may want to similarly define:

    #define DEBUG_TYPE “mypass"

If your pass is called -mypass.

On 2014 Mar 12, at 11:12, Jim Grosbach <grosbach at apple.com> wrote:

> Have you tried passing -debug?
> 
> On Mar 12, 2014, at 3:57 AM, 徐偉哲 <daniel60602 at gmail.com> wrote:
> 
>> I can generate debug info using opt like this:
>> opt < a.bc > /dev/null -mypass -debug
>> 
>> But I don't know how to do it using llc.
>> I check http://llvm.org/docs/CommandGuide/llc.html
>> there are not any information about debug flags.
>> 
>> Purpose
>> EX:
>> I want to print all the DEBUG(dbgs()......) in llvm/lib/CodeGen/RegAllocGreedy.cpp .
>> What should I do?
>> 
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list