<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;">OK, the summary question is: in 3.9, how can I use Alias Analysis in a module pass?
<div><br /></div>
<div>The background of the question is: I plan to upgrade from 3.5 to 3.9, and the biggest issue so far seems to be a module pass which requires alias analysis. </div>
<div><br /></div>
<div>The first approach I tried is using the createLegacyPMBasicAAResult followed by createLegacyPMAAResults as in lib/Transforms/IPO/Inliner.cpp. The weird problem I haven’t figured out yet is: this works fine if you just run the pass, but createLegacyPMBasicAAResult will crash with double free with gdb. I have tried using gdb on lib/Transforms/IPO/Inliner.cpp, and that worked fine. My pass is a shared library (.so) and loaded by opt, not sure if that is related. Or maybe related to how the pass is compiled? Will definitely keep digging.</div>
<div><br /></div>
<div>
<div>The second and cleaner approach should be using the new pass manager, but as I mentioned in the previous email, based on the FIXME in lib/Transforms/InstCombine/InstructionCombining.cpp code, the alias analysis seems to be not yet supported in the new pass manager. That’s why I asked the question to confirm in the first email.</div>
</div>
<div><br /></div>
<div>Thanks,</div>
<div>Welson</div>
<div><br /></div>
</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
On Jan 28, 2017, 11:59 AM -0800, Mehdi Amini <mehdi.amini@apple.com>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;"><br class="" />
<div>
<blockquote type="cite" class="" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">
<div class="">On Jan 28, 2017, at 6:41 AM, Welson Sun via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div>
<br class="Apple-interchange-newline" />
<div class="">
<div class="">
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;" class="">Looking at the InstructionCombining.cpp code:</div>
</div>
</div>
</blockquote>
<div><br class="" /></div>
<div>What is the question?</div>
<div><br class="" /></div>
<div>Please also note that the new pass manager is not in production, even in 4.0.</div>
<div><br class="" /></div>
<div>— </div>
<div>Mehdi</div>
<div><br class="" /></div>
<br class="" />
<blockquote type="cite" class="" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">
<div class="">
<div class="">
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;" class="">
<div class=""><br class="" />
PreservedAnalyses InstCombinePass::run(Function &F,<br class="" />
AnalysisManager<Function> &AM) {<br class="" />
auto &AC = AM.getResult<AssumptionAnalysis>(F);<br class="" />
auto &DT = AM.getResult<DominatorTreeAnalysis>(F);<br class="" />
auto &TLI = AM.getResult<TargetLibraryAnalysis>(F);<br class="" />
<br class="" />
auto *LI = AM.getCachedResult<LoopAnalysis>(F);<br class="" />
<br class="" />
// FIXME: The AliasAnalysis is not yet supported in the new pass manager<br class="" /></div>
<div class=""><br class="" /></div>
<div class=""><br class="" /></div>
<div class="">Thanks,</div>
<div class="">Welson</div>
</div>
</div>
_______________________________________________<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="" />
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class="" /></div>
</blockquote>
</div>
<br class="" /></blockquote>
</div>
</body>
</html>