[llvm-dev] Enabling an individual pass in llc

Alex Susu via llvm-dev llvm-dev at lists.llvm.org
Sun Jan 29 00:31:03 PST 2017

     Could you please tell me how can I enable a specific pass in llc, at the command 
line? (As far as I can see, there is the file lib/CodeGen/TargetPassConfig.cpp handling 
all llc passes, but I prefer not making some changes in that file or connected files.)
     I am interested in enabling the MachineLICM pass to optimize loops, while giving llc 
-O0. I am currently using llc -O0, since if I am using -O1 I get some strange instruction 
selection errors...

     Note that llc -help-hidden does not mention about any argument to enable the machine 
LICM pass, although there is a -disable-machine-licm flag. Also, llc -O0 
-debug-pass=Arguments shows at standard output in the "Pass Arguments:" section that -O0 
does not run LICM, while with -O1 flag it does have LICM.

   Thank you,

More information about the llvm-dev mailing list