<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">Well, you can call function pass on demand in a module pass like <span style="color: rgb(36, 39, 41); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; font-variant-ligatures: normal; orphans: 2; white-space: pre-wrap; widows: 2; background-color: rgb(239, 240, 241);">getAnalysis<LoopInfoWrapperPass>(f). Not something for AA?</span></div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
On Jan 25, 2017, 6:32 PM -0800, Friedman, Eli <efriedma@codeaurora.org>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div class="moz-cite-prefix">On 1/25/2017 6:04 PM, Welson Sun wrote:<br /></div>
<blockquote cite="mid:7ea37030-4f14-4cef-90e0-9c760e34c7c4@Spark" type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">Thanks Eli.
<div><br /></div>
<div>Ashutosh once asked the same question, and later said:</div>
<div>
<pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2;">
'createLegacyPMAAResults' can help here.
</pre>
<pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2;">
But how should this be used to solve the assertion problem?
</pre></div>
</div>
</blockquote>
<br />
(The message in question is <a class="moz-txt-link-freetext" href="http://lists.llvm.org/pipermail/llvm-dev/2015-October/091128.html">http://lists.llvm.org/pipermail/llvm-dev/2015-October/091128.html</a>, for reference.)<br />
<br />
The problem is that you can't require a FunctionPass from a ModulePass.  The solution is not to do that.<br />
<br />
createLegacyPMAAResults is an alternative way to access alias analysis without an AAResultsWrapperPass.  See the LLVM source code for examples of how to use it.<br />
<br />
-Eli<br />
<pre class="moz-signature" cols="72">
--  
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
</pre></blockquote>
</div>
</body>
</html>