<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><div><br></div><div>Andreas</div></div>