[llvm-dev] [Inliner] Loop info in the inliner

Aditya K via llvm-dev llvm-dev at lists.llvm.org
Mon Mar 21 11:56:56 PDT 2016


Hi,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.
When I try to add LoopInfoWrapperPass to Inliner.cpp,

diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cppindex 568707d..cb51ea8 100644--- a/llvm/lib/Transforms/IPO/Inliner.cpp+++ b/llvm/lib/Transforms/IPO/Inliner.cpp@@ -14,6 +14,7 @@ //===----------------------------------------------------------------------===//
 #include "llvm/Transforms/IPO/InlinerPass.h"+#include "llvm/Analysis/LoopInfo.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AliasAnalysis.h"@@ -58,6 +59,7 @@ Inliner::Inliner(char &ID, bool InsertLifetime) void Inliner::getAnalysisUsage(AnalysisUsage &AU) const {   AU.addRequired<AssumptionCacheTracker>();   AU.addRequired<TargetLibraryInfoWrapperPass>();+  AU.addRequired<LoopInfoWrapperPass>();   getAAResultsAnalysisUsage(AU);   CallGraphSCCPass::getAnalysisUsage(AU);}
I get llvm_unreachable in `void PMDataManager::addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass)'
Thanks,-Aditya 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160321/e25708b1/attachment.html>


More information about the llvm-dev mailing list