[LLVMdev] How to use LLVM optimizations with clang

Duncan Sands baldrick at free.fr
Tue Jun 12 04:01:32 PDT 2012


> Yes. But how exactly code generation (optimized one) be done without
> clang. Is it possible that we can specify those optimization
> (individual ones instead of standard ones like -O3) some how when
> generating code as is done by clang or llc?

llc comb.ll
gcc -o comb comb.s

Variants:
   llc -O0 comb.ll
   llc -O3 comb.ll
etc

Note that the codegen level optimizations done by llc have nothing to do with
the IR level optimizations of the kind performed by opt.

Ciao, Duncan.



More information about the llvm-dev mailing list