[LLVMdev] opt usage?

Lewis, Brian T brian.t.lewis at intel.com
Fri Oct 13 11:40:59 PDT 2006


I'm new to the LLVM, so please forgive what might be a silly question. 

 

I'd like to use the opt bytecode-to-bytecode optimizer, but when I try
running it to do, for example, dead code elimination (-dce) or global
common subexpression elimination (-gcse), nothing much seems to happen:

 

            opt -gcse -dce -o bar-opt.bc bar.bc

            llvm2cpp -o bar-opt.cpp bar-opt.bc

            diff bar.bc bar-opt.bc

            40c40

< Module* mod = new Module("bar.bc");

---

< Module* mod = new Module("bar-opt.bc");

 

Other optimizations seem to have similar effect. Are the optimizations
listed in the "opt -help" output only available if some library is
loaded? If so, where are these opt plugin libraries stored? If not, how
do you use opt? Thanks.

 

   Brian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20061013/2053c514/attachment.html>


More information about the llvm-dev mailing list