Skip to content

Commit a5a81c8

Browse files
committed
[NFC] Used mayWriteToMemory in mayHaveSideEffects.
Previously, the implementation of mayWriteToMemory was duplicated within mayHaveSideEffects.
1 parent 1739c23 commit a5a81c8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/SIL/IR/SILInstruction.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,10 +1102,7 @@ bool SILInstruction::mayHaveSideEffects() const {
11021102
if (mayTrap())
11031103
return true;
11041104

1105-
MemoryBehavior B = getMemoryBehavior();
1106-
return B == MemoryBehavior::MayWrite ||
1107-
B == MemoryBehavior::MayReadWrite ||
1108-
B == MemoryBehavior::MayHaveSideEffects;
1105+
return mayWriteToMemory();
11091106
}
11101107

11111108
bool SILInstruction::mayRelease() const {

0 commit comments

Comments
 (0)