<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><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></body>
</html>