[LLVMdev] How to see what's going on behind llc through clang/clang++

mats petersson mats at planetcatfish.com
Tue Apr 7 08:20:06 PDT 2015


Default optimisation levels are different for one thing. Try running
`llc -O0 ...` and see if that makes a difference.

There is an option to print the LLVM-IR code before/after each pass:
-print-after-all and -print-before-all

--
Mats


On 7 April 2015 at 15:11, Ziqiang Patrick Huang
<ziqiang.huang1001 at gmail.com> wrote:
> Hi,
>
> Is there a way to see what the default argument llc takes from clang/clang++
> ? I'm debugging my backend with a very simple c++ program. Running through
>
> clang++ -target myTarget -S simple.cpp -o simple.s  (bug does no show up)
>
> gives me different results from
>
> clang++ -target myTarget -S -emit-llvm -o simple.cpp -o simple.ll
> llc simple.ll -o simple.s (bug shows up)
>
> Just trying to understand what's the difference here
>
> Thanks,
> Patrick
>
>
>
> _______________________________________________
> 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