summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polly/include/polly/CodeGen/BlockGenerators.h6
-rw-r--r--polly/lib/CodeGen/BlockGenerators.cpp17
2 files changed, 8 insertions, 15 deletions
diff --git a/polly/include/polly/CodeGen/BlockGenerators.h b/polly/include/polly/CodeGen/BlockGenerators.h
index 015e6cc3f2d..8c18f0c3eef 100644
--- a/polly/include/polly/CodeGen/BlockGenerators.h
+++ b/polly/include/polly/CodeGen/BlockGenerators.h
@@ -406,9 +406,9 @@ protected:
ValueMapT &BBMap, ValueMapT &GlobalMap,
LoopToScevMapT &LTS);
- Value *generateScalarStore(ScopStmt &Stmt, const StoreInst *store,
- ValueMapT &BBMap, ValueMapT &GlobalMap,
- LoopToScevMapT &LTS);
+ void generateScalarStore(ScopStmt &Stmt, const StoreInst *store,
+ ValueMapT &BBMap, ValueMapT &GlobalMap,
+ LoopToScevMapT &LTS);
/// @brief Copy a single PHI instruction.
///
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp
index 234d15840a8..8e8e40cddf9 100644
--- a/polly/lib/CodeGen/BlockGenerators.cpp
+++ b/polly/lib/CodeGen/BlockGenerators.cpp
@@ -230,20 +230,16 @@ Value *BlockGenerator::generateScalarLoad(ScopStmt &Stmt, const LoadInst *Load,
return ScalarLoad;
}
-Value *BlockGenerator::generateScalarStore(ScopStmt &Stmt,
- const StoreInst *Store,
- ValueMapT &BBMap,
- ValueMapT &GlobalMap,
- LoopToScevMapT &LTS) {
+void BlockGenerator::generateScalarStore(ScopStmt &Stmt, const StoreInst *Store,
+ ValueMapT &BBMap, ValueMapT &GlobalMap,
+ LoopToScevMapT &LTS) {
const Value *Pointer = Store->getPointerOperand();
Value *NewPointer =
generateLocationAccessed(Stmt, Store, Pointer, BBMap, GlobalMap, LTS);
Value *ValueOperand = getNewValue(Stmt, Store->getValueOperand(), BBMap,
GlobalMap, LTS, getLoopForInst(Store));
- Value *NewStore = Builder.CreateAlignedStore(ValueOperand, NewPointer,
- Store->getAlignment());
- return NewStore;
+ Builder.CreateAlignedStore(ValueOperand, NewPointer, Store->getAlignment());
}
void BlockGenerator::copyInstruction(ScopStmt &Stmt, const Instruction *Inst,
@@ -275,10 +271,7 @@ void BlockGenerator::copyInstruction(ScopStmt &Stmt, const Instruction *Inst,
}
if (const StoreInst *Store = dyn_cast<StoreInst>(Inst)) {
- Value *NewStore = generateScalarStore(Stmt, Store, BBMap, GlobalMap, LTS);
- // Compute NewStore before its insertion in BBMap to make the insertion
- // deterministic.
- BBMap[Store] = NewStore;
+ generateScalarStore(Stmt, Store, BBMap, GlobalMap, LTS);
return;
}
OpenPOWER on IntegriCloud