<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
FYI - There is currently an architectural issue which prevents the
SCC pass manager (which runs the inliner) from relying on Function
or Loop analysis passes. This is the primary motivation of the pass
manager rewrite that Chandler Carruth has been working on for the
last two years. He's getting relatively close to that project being
done, but until then you are going to be effectively blocked on
this. <br>
<br>
Philip<br>
<br>
<div class="moz-cite-prefix">On 03/21/2016 11:56 AM, Aditya K via
llvm-dev wrote:<br>
</div>
<blockquote cite="mid:BLU179-W40CAF16B7908D9B36EFA6AB68F0@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi,
<div>It seems inliner does not take into account if a call is
inside a loop. I'm trying to figure out if loop-info can be
made available to the inliner.</div>
<div><br>
</div>
<div>When I try to add LoopInfoWrapperPass to Inliner.cpp,</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp
b/llvm/lib/Transforms/IPO/Inliner.cpp</div>
<div>index 568707d..cb51ea8 100644</div>
<div>--- a/llvm/lib/Transforms/IPO/Inliner.cpp</div>
<div>+++ b/llvm/lib/Transforms/IPO/Inliner.cpp</div>
<div>@@ -14,6 +14,7 @@</div>
<div> //===----------------------------------------------------------------------===//</div>
<div><br>
</div>
<div> #include "llvm/Transforms/IPO/InlinerPass.h"</div>
<div>+#include "llvm/Analysis/LoopInfo.h"</div>
<div> #include "llvm/ADT/SmallPtrSet.h"</div>
<div> #include "llvm/ADT/Statistic.h"</div>
<div> #include "llvm/Analysis/AliasAnalysis.h"</div>
<div>@@ -58,6 +59,7 @@ Inliner::Inliner(char &ID, bool
InsertLifetime)</div>
<div> void Inliner::getAnalysisUsage(AnalysisUsage &AU)
const {</div>
<div> AU.addRequired<AssumptionCacheTracker>();</div>
<div> AU.addRequired<TargetLibraryInfoWrapperPass>();</div>
<div>+ AU.addRequired<LoopInfoWrapperPass>();</div>
<div> getAAResultsAnalysisUsage(AU);</div>
<div> CallGraphSCCPass::getAnalysisUsage(AU);</div>
</div>
<div>}</div>
<div><br>
</div>
<div>I get llvm_unreachable in `<span style="font-size: 12pt;">void
PMDataManager::addLowerLevelRequiredPass(Pass *P, Pass
*RequiredPass)'</span></div>
<div><span style="font-size: 12pt;"><br>
</span></div>
<div><span style="font-size: 12pt;">Thanks,</span></div>
<div>-Aditya</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>