[LLVMdev] strict aliasing and LLVM

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Oct 29 19:44:06 PDT 2010


> Yes, I verified these steps work, but my head is spinning:
> 1) does -flto has the same effect as -emit-llvm ? FE emits llvm bitcode and
> exit without invoking llvm backend?

I think they are the same, but maybe -flto also affects which passes
are run. Not sure. I always used -emit-llvm...

> 2) why do you need to invoke both opt and llc -- I verified invoking just
> llc is also fine.
> 3) more general question -- is opt just a barebone llc without invoking any
> llvm passes? So why is there a need for two opt driver?

opt contains the IL -> IL optimizations. It is what you want to use
for testing that a loop is unrolled for example.
llc does the IL -> .s (or .o) transformation. It will also run low level passes.

I guess they could be merged. Never tough about the trade offs.

> Thanks,
> David
>

Cheers,
Rafael



More information about the llvm-dev mailing list