mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Nuke isSideEffectFree
We can now compute the same result with Inst.mayHaveSideEffects(). NFC. Swift SVN r25742
This commit is contained in:
@@ -114,10 +114,6 @@ static bool canSinkInstruction(SILInstruction *Inst) {
|
||||
/// \brief Returns true if this instruction is a skip barrier, which means that
|
||||
/// we can't sink other instructions past it.
|
||||
static bool isSinkBarrier(SILInstruction *Inst) {
|
||||
// We know that some calls do not have side effects.
|
||||
if (auto *BI = dyn_cast<BuiltinInst>(Inst))
|
||||
return !isSideEffectFree(BI);
|
||||
|
||||
if (isa<TermInst>(Inst))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user