[llvm-dev] Relationship between clang, opt and llc

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Fri Jan 5 13:42:52 PST 2018

2018-01-05 22:19 GMT+01:00 toddy wang via llvm-dev <llvm-dev at lists.llvm.org>:
> 2. clang++ -O0 -Xclang -disable-llvm-passes -c -emit-llvm -o a.bc LULESH.cc;
> opt -O3 a.bc -o b.bc; llc -O3 -filetype=obj b.bc -o b.o ; clang++ b.o -o
> b.out; ./b.out 20
> Runtime: 24.15 seconds

clang -O0 adds a "optnone" attribute to each function that causes most
optimization passes to skip that function. Avoid with "-Xclang


More information about the llvm-dev mailing list