Fix compilation after DataLayout was added to ScevExpander
authorTobias Grosser <tobias@grosser.es>
Tue, 10 Mar 2015 15:24:33 +0000 (15:24 +0000)
committerTobias Grosser <tobias@grosser.es>
Tue, 10 Mar 2015 15:24:33 +0000 (15:24 +0000)
The corresponding LLVM commit is 231740.

llvm-svn: 231793

polly/lib/CodeGen/BlockGenerators.cpp
polly/lib/CodeGen/IslCodeGeneration.cpp

index ec595d5..e35e9e0 100644 (file)
@@ -28,6 +28,7 @@
 #include "llvm/Analysis/ScalarEvolutionExpander.h"
 
 #include "llvm/IR/IntrinsicInst.h"
+#include "llvm/IR/Module.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
 
 #include "isl/aff.h"
@@ -114,7 +115,13 @@ Value *BlockGenerator::getNewValue(ScopStmt &Stmt, const Value *Old,
         VTV.insert(BBMap.begin(), BBMap.end());
         VTV.insert(GlobalMap.begin(), GlobalMap.end());
         NewScev = SCEVParameterRewriter::rewrite(NewScev, SE, VTV);
-        SCEVExpander Expander(SE, "polly");
+        SCEVExpander Expander(SE, Stmt.getParent()
+                                      ->getRegion()
+                                      .getEntry()
+                                      ->getParent()
+                                      ->getParent()
+                                      ->getDataLayout(),
+                              "polly");
         Value *Expanded = Expander.expandCodeFor(NewScev, Old->getType(),
                                                  Builder.GetInsertPoint());
 
index e030d9a..a9622a5 100644 (file)
@@ -63,7 +63,7 @@ public:
   IslNodeBuilder(PollyIRBuilder &Builder, ScopAnnotator &Annotator, Pass *P,
                  const DataLayout &DL, LoopInfo &LI, ScalarEvolution &SE,
                  DominatorTree &DT, Scop &S)
-      : S(S), Builder(Builder), Annotator(Annotator), Rewriter(SE, "polly"),
+      : S(S), Builder(Builder), Annotator(Annotator), Rewriter(SE, DL, "polly"),
         ExprBuilder(Builder, IDToValue, Rewriter, DT, LI),
         BlockGen(Builder, LI, SE, DT, &ExprBuilder), RegionGen(BlockGen), P(P),
         DL(DL), LI(LI), SE(SE), DT(DT) {}