[LLVMdev] Enabling inlining

Dale Johannesen dalej at apple.com
Wed Sep 22 14:31:19 PDT 2010


On Sep 22, 2010, at 2:24 PMPDT, David Given wrote:

> On 22/09/10 18:07, Jim Grosbach wrote:
> [...]
>> Are you running 'opt' on your bitcode or otherwise manually running those passes?
> 
> Aha. After running opt I now have inlined (and much better) code.
> Previously I'd been using llc -O3 to do the optimisation.
> 
> What's the different between opt -O3 and llc -O3, then?

They are different programs.  opt transforms llvm IR to llvm IR, doing (largely) target independent optimizations along the way.  llc transforms llvm IR to a .s or, for some targets, .o file, doing (largely) target dependent optimizations.





More information about the llvm-dev mailing list