[LLVMdev] Is "clang -O1" the same as "clang -O0 + opt -O1"?
71 views
Skip to first unread message
Yi-Hong Lyu
unread,
Feb 8, 2015, 9:36:45 PM2/8/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to llv...@cs.uiuc.edu
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
Hal Finkel
unread,
Feb 8, 2015, 9:44:13 PM2/8/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Yi-Hong Lyu, llv...@cs.uiuc.edu
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.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Hal Finkel, llv...@cs.uiuc.edu
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)?