Yi-Hong Lyu
2015-Feb-09 02:32 UTC
[LLVMdev] Is "clang -O1" the same as "clang -O0 + opt -O1"?
Hello, I encounter a bug that pumped during execution of "clang -O1". However the bug cannot be reproduced by using "clang -O0 + opt -O1". It seems that "clang -O1" is not the same as "clang -O0 + opt -O1". According to the generated LLVM IRs are large, I would like to use bugpoint with "clang -O1" directly instead of using "clang -O0" first and using bugpoint with "opt -O1". Could you tell me how I can do this? Any suggestion is welcomed. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150209/dfa9d5f3/attachment.html>
Hal Finkel
2015-Feb-09 02:41 UTC
[LLVMdev] Is "clang -O1" the same as "clang -O0 + opt -O1"?
Hi, No, it's not. Try: clang -O1 -mllvm -disable-llvm-optzns -S -emit-llvm to get the IR, as it would appear to the optimizer, but without running the optimizer itself as part of the clang invocation. -Hal ----- Original Message -----> From: "Yi-Hong Lyu" <b95705030 at ntu.edu.tw> > To: llvmdev at cs.uiuc.edu > Sent: Sunday, February 8, 2015 8:32:32 PM > Subject: [LLVMdev] Is "clang -O1" the same as "clang -O0 + opt -O1"? > > > > Hello, > > I encounter a bug that pumped during execution of "clang -O1". > However the bug cannot be reproduced by using "clang -O0 + opt -O1". > It seems that "clang -O1" is not the same as "clang -O0 + opt -O1". > According to the generated LLVM IRs are large, I would like to use > bugpoint with "clang -O1" directly instead of using "clang -O0" > first and using bugpoint with "opt -O1". Could you tell me how I can > do this? > > Any suggestion is welcomed. > > Thanks > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- Hal Finkel Assistant Computational Scientist Leadership Computing Facility Argonne National Laboratory
Yi-Hong Lyu
2015-Feb-09 16:36 UTC
[LLVMdev] Is "clang -O1" the same as "clang -O0 + opt -O1"?
Hello Hal, Thansk for your reply. It seems that clang -O1 -mllvm -disable-llvm-optzns is the same as "clang -O0 -mllvm -disable-llvm-optzns", right? Please tell me if I have mistake. Although I use "clang -O0 -mllvm -disable-llvm-optzns + opt -O1", the bug is still not reproduced. I use "mllvm -debug" to dump the pass manager's arguments. It seems that the LLVM passes order is different between "clang -O0 -mllvm -disable-llvm-optzns + opt -O1" and "clang -O1". The bug seems only occur when I am using "clang -O1". Is there any way to use bugpoint with clang (embedded bugpoint into clang)? Thanks a lot. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150210/2e775cd0/attachment.html>