@@ -215,26 +215,31 @@ class AliasAnalysis : public SILAnalysis {
215215 // / respect to V.
216216 MemoryBehavior computeMemoryBehaviorInner (SILInstruction *Inst, SILValue V);
217217
218- // / Returns true if \p Inst may read from memory in a manner that
219- // / affects V.
218+ // / Returns true if \p Inst may read from memory at address \p V.
219+ // /
220+ // / For details see SILInstruction::MemoryBehavior::MayRead.
220221 bool mayReadFromMemory (SILInstruction *Inst, SILValue V) {
221222 auto B = computeMemoryBehavior (Inst, V);
222223 return B == MemoryBehavior::MayRead ||
223224 B == MemoryBehavior::MayReadWrite ||
224225 B == MemoryBehavior::MayHaveSideEffects;
225226 }
226227
227- // / Returns true if \p Inst may write to memory, deinitialize memory, or have
228- // / other side effects that may affect V.
228+ // / Returns true if \p Inst may write to memory or deinitialize memory at
229+ // / address \p V.
230+ // /
231+ // / For details see SILInstruction::MemoryBehavior::MayWrite.
229232 bool mayWriteToMemory (SILInstruction *Inst, SILValue V) {
230233 auto B = computeMemoryBehavior (Inst, V);
231234 return B == MemoryBehavior::MayWrite ||
232235 B == MemoryBehavior::MayReadWrite ||
233236 B == MemoryBehavior::MayHaveSideEffects;
234237 }
235238
236- // / Returns true if \p Inst may read to memory, write to memory, deinitialize
237- // / memory, or have other side effects that may affect V.
239+ // / Returns true if \p Inst may read from memory, write to memory or
240+ // / deinitialize memory at address \p V.
241+ // /
242+ // / For details see SILInstruction::MemoryBehavior.
238243 bool mayReadOrWriteMemory (SILInstruction *Inst, SILValue V) {
239244 auto B = computeMemoryBehavior (Inst, V);
240245 return MemoryBehavior::None != B;
0 commit comments