aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2013-06-06 02:48:42 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2013-06-06 02:48:42 +0000
commitcb70c6a5526ff1320791582b4b3d89d47bcabd6f (patch)
tree21340b2423f20bdfc05a476b3721ba8962d751ef
parent33a10126442b036ef21f15d47bf4d05ba0066f4d (diff)
downloadllvm-cb70c6a5526ff1320791582b4b3d89d47bcabd6f.zip
llvm-cb70c6a5526ff1320791582b4b3d89d47bcabd6f.tar.gz
llvm-cb70c6a5526ff1320791582b4b3d89d47bcabd6f.tar.bz2
add comments to clarify the use of a temporary variable in the map insertion
Merged from: https://llvm.org/svn/llvm-project/polly/trunk@182662 llvm-svn: 183381
-rw-r--r--polly/lib/CodeGen/BlockGenerators.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp
index f0931e1..7ca5d2d 100644
--- a/polly/lib/CodeGen/BlockGenerators.cpp
+++ b/polly/lib/CodeGen/BlockGenerators.cpp
@@ -356,12 +356,16 @@ void BlockGenerator::copyInstruction(const Instruction *Inst, ValueMapT &BBMap,
if (const LoadInst *Load = dyn_cast<LoadInst>(Inst)) {
Value *NewLoad = generateScalarLoad(Load, BBMap, GlobalMap, LTS);
+ // Compute NewLoad before its insertion in BBMap to make the insertion
+ // deterministic.
BBMap[Load] = NewLoad;
return;
}
if (const StoreInst *Store = dyn_cast<StoreInst>(Inst)) {
Value *NewStore = generateScalarStore(Store, BBMap, GlobalMap, LTS);
+ // Compute NewStore before its insertion in BBMap to make the insertion
+ // deterministic.
BBMap[Store] = NewStore;
return;
}