Commit cb70c6a5 authored by Tobias Grosser's avatar Tobias Grosser
Browse files

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

parent 33a10126
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
  }