EarlyCSE: Replace custom hash mixing with Hashing.h
[oota-llvm.git] / lib / Transforms / Scalar / LoopRotation.cpp
index 541afa53bba3e54ae2f50cd26549c4a327e6b6c9..2606805400fdce8774e022e497d9f28001000d2c 100644 (file)
@@ -101,10 +101,11 @@ bool LoopRotate::runOnLoop(Loop *L, LPPassManager &LPM) {
   // Save the loop metadata.
   MDNode *LoopMD = L->getLoopID();
 
+  Function &F = *L->getHeader()->getParent();
+
   LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
-  TTI = &getAnalysis<TargetTransformInfoWrapperPass>().getTTI();
-  AC = &getAnalysis<AssumptionCacheTracker>().getAssumptionCache(
-      *L->getHeader()->getParent());
+  TTI = &getAnalysis<TargetTransformInfoWrapperPass>().getTTI(F);
+  AC = &getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
   auto *DTWP = getAnalysisIfAvailable<DominatorTreeWrapperPass>();
   DT = DTWP ? &DTWP->getDomTree() : nullptr;