Ziqiang Patrick Huang
2015-Apr-07 14:11 UTC
[LLVMdev] How to see what's going on behind llc through clang/clang++
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150407/ed40cbce/attachment.html>
mats petersson
2015-Apr-07 15:20 UTC
[LLVMdev] How to see what's going on behind llc through clang/clang++
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 >
Ziqiang Patrick Huang
2015-Apr-08 05:26 UTC
[LLVMdev] How to see what's going on behind llc through clang/clang++
Thanks, Mats Is there a way to pass llc options through clang/clang++ ? Patrick 2015-04-07 11:20 GMT-04:00 mats petersson <mats at planetcatfish.com>:> 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 > > >-- *Ziqiang Huang* *Electrical and Computer Engineering* *Hudson 213c, Duke University* *Tel: 919-491-3677* *Email: ziqiang.huang at duke.edu <ziqiang.huang at duke.edu>* -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150408/0b963126/attachment.html>
Apparently Analagous Threads
- [LLVMdev] How to specify displacement range of a target instruction to llc
- [LLVMdev] Passing llc options to Clang
- [LLVMdev] Getting basic block address offset from its parent function
- [LLVMdev] Getting basic block address offset from its parent function
- [LLVMdev] Getting basic block address offset from its parent function