add comments to clarify the use of a temporary variable in the map insertion

llvm-svn: 182662
This commit is contained in:
Sebastian Pop 2013-05-24 18:46:02 +00:00
parent cbeb5e821f
commit 3d94fedf0b
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}