<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Feb 14, 2017 at 4:10 AM Philip Pfaffe via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Hi Andreas,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">in the new PM there is no equivalent for addRequired().</div></div></blockquote><div><br></div><div>And perhaps most significantly, you don't call "getAnalysis" at all in the new PM...</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg">To get your AA pass into the battle, just add it to the AAManager that goes into your new-PM instance.</div></div></blockquote><div><br></div><div>Yep!</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">The new PM is currently not the default in opt or clang. `opt -O3` will thus use the legacy PM. Additionally, as of yet there is no support for plugin passes in the new PM, as there was before (my patch hasn't made it through review yet).</div></div></blockquote><div><br></div><div>I'm so sorry, I have totally lost track of this. Can you ping? We should get this moving.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Best,</div><div class="gmail_msg">Philip</div></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">2017-02-14 11:51 GMT+01:00 Andreas Scherman via llvm-dev <span dir="ltr" class="gmail_msg"><<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Hi!<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I am trying to extend the native AliasAnalysis of LLVM to use an external analysis pass. Doing this with the legacy pass manager works fine through calling addRequired() in the getAnalysisUsage and getAnalysis() in function runOnFunction(). In the new pass manager, I haven't found a similar way of doing this. When running opt with -O3, I encounter the following error:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">>Assertion `ResultPass && "getAnalysis*() called on an analysis that was not " "'required' by pass!"' failed.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Changing to getAnalysisIfAvailable() makes the pass not crash, but then I assume I am not using the external analysis pass to its full extent.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">So, the question is as such: in order to use the external analysis pass, do I need to use some form of the same mechanism (addRequired() + getAnalysis()) for the new pass manager, or should it be enough to use it in the legacy using the wrapper pass?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Appreciate any help!</div><span class="m_-4379287504808917190HOEnZb gmail_msg"><font color="#888888" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Andreas</div></font></span></div>
<br class="gmail_msg">_______________________________________________<br class="gmail_msg">
LLVM Developers mailing list<br class="gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg">
<br class="gmail_msg"></blockquote></div><br class="gmail_msg"></div>
_______________________________________________<br class="gmail_msg">
LLVM Developers mailing list<br class="gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg">
</blockquote></div></div>