[LLVMdev] How to use LLVM optimizations with clang
Abdul Wahid Memon
engrwahidmemon at gmail.com
Tue Jun 12 04:09:40 PDT 2012
Thanks alot. How can we view those optimization which are enabled when we do
llc -O3 comb.ll
Are these the same as the ones produced by the following command line
llvm-as < /dev/null | opt -O3 -disable-output -debug-pass=Arguments
Regards
Shahzad
On Tue, Jun 12, 2012 at 1:01 PM, Duncan Sands <baldrick at free.fr> wrote:
>> 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