<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">It depends how you interact with LLVM, one the command line with `opt` it is the order of the arguments.<div class="">Otherwise at the C++ API level it involves creating a PassManager and adding passes to it in order. </div><div class="">Your pass is surely added to the PassManager at some point, you just have to figure out by which component (again I don't know your project).</div><div class=""><br class=""></div><div class="">-- </div><div class="">Mehdi</div><div class=""><br class=""><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Feb 11, 2016, at 10:39 AM, Stanislav Manilov <<a href="mailto:stanislav.manilov@gmail.com" class="">stanislav.manilov@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Oh, I see, that makes a lot of sense.<div class=""><br class=""></div><div class="">How do I build the pass pipeline?</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Feb 11, 2016 at 5:54 PM, Mehdi Amini <span dir="ltr" class=""><<a href="mailto:mehdi.amini@apple.com" target="_blank" class="">mehdi.amini@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> On Feb 11, 2016, at 9:49 AM, Stanislav Manilov via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class="">
><br class="">
> Hello,<br class="">
><br class="">
> I am used to specifying dependence on other LLVM passes in the `getAnalysisUsage(AnalysisUsage &)` method of my pass. However, it doesn't seem that there is a header file that exposes the `mem2reg` pass - it is implemented in `Mem2Reg.cpp` as a wrapper.<br class="">
<br class="">
</span>Usually dependencies are expressed toward *analyses* and not toward other transformations.<br class="">
<br class="">
It is the responsibility of the pass pipeline building to order transformations.<br class="">
<br class="">
(hope I haven't misunderstood your question)<br class="">
<br class="">
--<br class="">
Mehdi<br class="">
<span class=""><br class="">
<br class="">
><br class="">
> Is there an easy way to reuse this pass, or should I, in essence, duplicate `Mem2Reg.cpp` in my project?<br class="">
><br class="">
> Cheers,<br class="">
>  - Stan<br class="">
</span>> _______________________________________________<br class="">
> LLVM Developers mailing list<br class="">
> <a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="">
<br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div></body></html>