[LLVMdev] Register Machine Pass

Justin Holewinski jholewinski at nvidia.com
Mon Jul 14 09:22:20 PDT 2014


On Mon, 2014-07-14 at 08:31 -0700, Ryan Taylor wrote:
> Where is the documentation about registering a machine pass? I'm
> unable to find it.
> 
> 
> I have built a machine function pass similar to the one found in
> HexagonHardwareLoops.cpp. So I have generated a machine pass.cpp file,
> modified 'Target'.h and 'Target'TargetMachine.cpp (to add pass via
> addPass() in the addPreRegAlloc()). All this builds/compiles fine.
> 
> 
> When running llc the pass does not get executed.
> 
> 
> I seem to be missing some steps? Potentially registration of the
> machine pass?

That should be all you need to do.    Are you running in a debugger and
making sure your added addPass() call is actually being executed?
> 
> 
> Thanks.

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------




More information about the llvm-dev mailing list