Make DataLayout Non-Optional in the Module
[oota-llvm.git] / lib / Transforms / Scalar / LoopRerollPass.cpp
index fdf7e3b1b191f9615506373cadb0ea58b9d88eca..300b168cea83b008112c89617811d3203644dcd1 100644 (file)
@@ -1477,8 +1477,7 @@ bool LoopReroll::runOnLoop(Loop *L, LPPassManager &LPM) {
   LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
   SE = &getAnalysis<ScalarEvolution>();
   TLI = &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
-  DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
-  DL = DLP ? &DLP->getDataLayout() : nullptr;
+  DL = &L->getHeader()->getModule()->getDataLayout();
   DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
 
   BasicBlock *Header = L->getHeader();