<div dir="ltr">Yeah it worked. Thank you so much! Correct command<div><br></div><div>
<span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">clang output.c -o output -Xclang -load -Xclang lib/LLVMMyPass.so -mllvm -myarguments</span>
<br><div><br><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Regards,<div>Soham Sinha</div><div>PhD Student, Department of Computer Science</div><div>Boston University</div></div></div></div></div></div></div></div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 25, 2018 at 4:21 PM Friedman, Eli <<a href="mailto:efriedma@codeaurora.org">efriedma@codeaurora.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 6/25/2018 2:03 PM, Soham Sinha wrote:<br>
> Hi Eli,<br>
><br>
> I have tried that:<br>
><br>
> static void registerMyPass(const PassManagerBuilder &,<br>
> llvm::legacy::PassManagerBase &PM) {<br>
> PM.add(new MyPass());<br>
> }<br>
><br>
> static RegisterStandardPasses<br>
> RegisterMyPass(PassManagerBuilder::EP_OptimizerLast,<br>
> registerMyPass);<br>
<br>
OptimizerLast doesn't run unless you turn on optimizations (-O2). Maybe <br>
that's the issue?<br>
<br>
-Eli<br>
<br>
-- <br>
Employee of Qualcomm Innovation Center, Inc.<br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project<br>
<br>
</blockquote></div>