<div dir="ltr">Hi Andreas,<div><br></div><div>in the new PM there is no equivalent for addRequired(). Because it implemented as a caching strategy, Analyses are just ran on demand if they're not available or have been invalidated.</div><div><br></div><div>To get your AA pass into the battle, just add it to the AAManager that goes into your new-PM instance.</div><div><br></div><div>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><br></div><div>Best,</div><div>Philip</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-02-14 11:51 GMT+01:00 Andreas Scherman via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi!<div><br></div><div>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><br></div><div>>Assertion `ResultPass && "getAnalysis*() called on an analysis that was not " "'required' by pass!"' failed.</div><div><br></div><div>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><br></div><div>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><br></div><div>Appreciate any help!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Andreas</div></font></span></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>