<div dir="ltr"><div>Justin,</div><div><br></div><div> Yes, I had/have this:</div><div><br>bool MyTargetPassConfig::addPreRegAlloc() {<br> outs()<<"PreRegAllocPass\n";<br> addPass(createMyPass());<br> return true;<br>
}</div><div><br></div><div>I do not see this being printed. </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 14, 2014 at 1:07 PM, Justin Holewinski <span dir="ltr"><<a href="mailto:jholewinski@nvidia.com" target="_blank">jholewinski@nvidia.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Mon, 2014-07-14 at 10:00 -0700, Ryan Taylor wrote:<br>
> It's not being executed. I'm both trying to print via outs() and add<br>
> info via STATISTIC, neither is occurring.<br>
<br>
</div>Did you try running in a debugger to make sure addPass() is called? Or<br>
if a debugger is unavailable, putting an outs() statement with the<br>
addPass() call? That would at least rule out addPass() not being<br>
called.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> On Mon, Jul 14, 2014 at 12:22 PM, Justin Holewinski<br>
> <<a href="mailto:jholewinski@nvidia.com">jholewinski@nvidia.com</a>> wrote:<br>
> On Mon, 2014-07-14 at 08:31 -0700, Ryan Taylor wrote:<br>
> > Where is the documentation about registering a machine pass?<br>
> I'm<br>
> > unable to find it.<br>
> ><br>
> ><br>
> > I have built a machine function pass similar to the one<br>
> found in<br>
> > HexagonHardwareLoops.cpp. So I have generated a machine<br>
> pass.cpp file,<br>
> > modified 'Target'.h and 'Target'TargetMachine.cpp (to add<br>
> pass via<br>
> > addPass() in the addPreRegAlloc()). All this builds/compiles<br>
> fine.<br>
> ><br>
> ><br>
> > When running llc the pass does not get executed.<br>
> ><br>
> ><br>
> > I seem to be missing some steps? Potentially registration of<br>
> the<br>
> > machine pass?<br>
><br>
><br>
> That should be all you need to do. Are you running in a<br>
> debugger and<br>
> making sure your added addPass() call is actually being<br>
> executed?<br>
> ><br>
> ><br>
> > Thanks.<br>
><br>
> -----------------------------------------------------------------------------------<br>
> This email message is for the sole use of the intended<br>
> recipient(s) and may contain<br>
> confidential information. Any unauthorized review, use,<br>
> disclosure or distribution<br>
> is prohibited. If you are not the intended recipient, please<br>
> contact the sender by<br>
> reply email and destroy all copies of the original message.<br>
> -----------------------------------------------------------------------------------<br>
><br>
><br>
</div></div></blockquote></div><br></div>