[LLVMdev] understanding the opt tool

Samuel Crow samuraileumas at yahoo.com
Sat Apr 17 10:02:23 PDT 2010


Hello Kalyan,

There is one more thing you should know:  Clang has maximum optimization turned on by default.  You need to specify -O0 to turn it off if you want to see what opt does without clang running all of the optimizations first.

--Sam



----- Original Message ----
> From: Duncan Sands <baldrick at free.fr>
> To: llvmdev at cs.uiuc.edu
> Sent: Sat, April 17, 2010 2:00:00 AM
> Subject: Re: [LLVMdev] understanding the opt tool
> 
> Hi Kalyan,

> opt -strip-dead-prototypes -f <filename.bc> 
> filename2.bc

you have to specify the list of passes to run.  
> -strip-dead-prototypes
only removes unused declarations.  If there are 
> none, it will do nothing.
Try:
   opt -std-compile-opts -f 
> <filename.bc> 
> filename2.bc

Ciao,

Duncan.
_______________________________________________
LLVM 
> Developers mailing list

> href="mailto:LLVMdev at cs.uiuc.edu">LLVMdev at cs.uiuc.edu      
>   
> http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


      



More information about the llvm-dev mailing list