@@ -260,20 +260,27 @@ class MemorySSAUpdater {
260260 MemoryAccess *tryRemoveTrivialPhi (MemoryPhi *Phi, RangeType &Operands);
261261 void tryRemoveTrivialPhis (ArrayRef<WeakVH> UpdatedPHIs);
262262 void fixupDefs (const SmallVectorImpl<WeakVH> &);
263- // Clone all uses and defs from BB to NewBB given a 1:1 map of all
264- // instructions and blocks cloned, and a map of MemoryPhi : Definition
265- // (MemoryAccess Phi or Def). VMap maps old instructions to cloned
266- // instructions and old blocks to cloned blocks. MPhiMap, is created in the
267- // caller of this private method, and maps existing MemoryPhis to new
268- // definitions that new MemoryAccesses must point to. These definitions may
269- // not necessarily be MemoryPhis themselves, they may be MemoryDefs. As such,
270- // the map is between MemoryPhis and MemoryAccesses, where the MemoryAccesses
271- // may be MemoryPhis or MemoryDefs and not MemoryUses.
272- // If CloneWasSimplified = true, the clone was exact. Otherwise, assume that
273- // the clone involved simplifications that may have: (1) turned a MemoryUse
274- // into an instruction that MemorySSA has no representation for, or (2) turned
275- // a MemoryDef into a MemoryUse or an instruction that MemorySSA has no
276- // representation for. No other cases are supported.
263+ // / Clone all uses and defs from BB to NewBB given a 1:1 map of all
264+ // / instructions and blocks cloned, and a map of MemoryPhi : Definition
265+ // / (MemoryAccess Phi or Def).
266+ // /
267+ // / \param VMap Maps old instructions to cloned instructions and old blocks
268+ // / to cloned blocks
269+ // / \param MPhiMap, is created in the caller of this private method, and maps
270+ // / existing MemoryPhis to new definitions that new MemoryAccesses
271+ // / must point to. These definitions may not necessarily be MemoryPhis
272+ // / themselves, they may be MemoryDefs. As such, the map is between
273+ // / MemoryPhis and MemoryAccesses, where the MemoryAccesses may be
274+ // / MemoryPhis or MemoryDefs and not MemoryUses.
275+ // / \param IsInClonedRegion Determines whether a basic block was cloned.
276+ // / References to accesses outside the cloned region will not be
277+ // / remapped.
278+ // / \param CloneWasSimplified If false, the clone was exact. Otherwise,
279+ // / assume that the clone involved simplifications that may have:
280+ // / (1) turned a MemoryUse into an instruction that MemorySSA has no
281+ // / representation for, or (2) turned a MemoryDef into a MemoryUse or
282+ // / an instruction that MemorySSA has no representation for. No other
283+ // / cases are supported.
277284 void cloneUsesAndDefs (BasicBlock *BB, BasicBlock *NewBB,
278285 const ValueToValueMapTy &VMap, PhiToDefMap &MPhiMap,
279286 function_ref<bool (BasicBlock *)> IsInClonedRegion,
0 commit comments