[LLVMdev] Missing some passes in llvm-ld

Duncan Sands baldrick at free.fr
Tue Mar 1 04:15:13 PST 2011


Hi Haohui,

> It seems that I can't force some passes to run in llvm-ld as what I can do with opt.
>
> $ ~/opt/bin/llvm-ld -reassociate
> llvm-ld: Unknown command line argument '-reassociate.  Try: 'opt/bin/llvm-ld -help'
>
> llvm-ld definitely linked with scalaropts, and RegisterPass<ReassociatePass>  is in the library.
>
> Running with these passes with opt definitely work, but it'll take some time as my .bc is big (~40M).
>
> I'll appreciate any ideas how to make llvm-ld run these passes.

you can always have llvm-ld output a bitcode file which you then optimize
using opt.  Alternatively you can modify createStandardLTOPasses in
StandardPasses.h, since these are the passes llvm-ld uses.

Ciao, Duncan.



More information about the llvm-dev mailing list