mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
As per my discussions with Anna, removed MayWriteAndHaveSideEffects.
The reason we decided to do this is that MayHaveSideEffects implies that a write can occur, making MayWriteAndHaveSideEffects redundent. Swift SVN r7943
This commit is contained in:
@@ -52,8 +52,7 @@ enum class SILInstructionMemoryBehavior {
|
|||||||
/// result/users represent its effect.
|
/// result/users represent its effect.
|
||||||
MayHaveSideEffects,
|
MayHaveSideEffects,
|
||||||
/// \brief The instruction may write to memory.
|
/// \brief The instruction may write to memory.
|
||||||
MayWrite,
|
MayWrite
|
||||||
MayWriteAndHaveSideEffects
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum IsTake_t { IsNotTake, IsTake };
|
enum IsTake_t { IsNotTake, IsTake };
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ ABSTRACT_VALUE(SILInstruction, ValueBase)
|
|||||||
// Protocol and Protocol Composition Types
|
// Protocol and Protocol Composition Types
|
||||||
INST(InitExistentialInst, SILInstruction, MayWrite)
|
INST(InitExistentialInst, SILInstruction, MayWrite)
|
||||||
INST(UpcastExistentialInst, SILInstruction, MayWrite)
|
INST(UpcastExistentialInst, SILInstruction, MayWrite)
|
||||||
INST(DeinitExistentialInst, SILInstruction, MayWriteAndHaveSideEffects)
|
INST(DeinitExistentialInst, SILInstruction, MayHaveSideEffects)
|
||||||
INST(ProjectExistentialInst, SILInstruction, None)
|
INST(ProjectExistentialInst, SILInstruction, None)
|
||||||
INST(InitExistentialRefInst, SILInstruction, None)
|
INST(InitExistentialRefInst, SILInstruction, None)
|
||||||
INST(UpcastExistentialRefInst, SILInstruction, None)
|
INST(UpcastExistentialRefInst, SILInstruction, None)
|
||||||
|
|||||||
@@ -201,11 +201,9 @@ SILInstructionMemoryBehavior SILInstruction::getMemoryBehavior() const {
|
|||||||
|
|
||||||
bool SILInstruction::mayHaveSideEffects() const {
|
bool SILInstruction::mayHaveSideEffects() const {
|
||||||
SILInstructionMemoryBehavior B = getMemoryBehavior();
|
SILInstructionMemoryBehavior B = getMemoryBehavior();
|
||||||
if (B == SILInstructionMemoryBehavior::MayWrite ||
|
|
||||||
B == SILInstructionMemoryBehavior::MayHaveSideEffects ||
|
return B == SILInstructionMemoryBehavior::MayWrite ||
|
||||||
B == SILInstructionMemoryBehavior::MayWriteAndHaveSideEffects)
|
B == SILInstructionMemoryBehavior::MayHaveSideEffects;
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|||||||
Reference in New Issue
Block a user