Nuke isSideEffectFree

We can now compute the same result with Inst.mayHaveSideEffects(). NFC.

Swift SVN r25742
This commit is contained in:
Arnold Schwaighofer
2015-03-04 05:03:44 +00:00
parent 6bdedc769f
commit 951dc2875a
11 changed files with 17 additions and 69 deletions

View File

@@ -72,12 +72,6 @@ enum class ArrayBoundsEffect {
kMayChangeAny // Might change any array.
};
static bool mayHaveSideEffects(SILInstruction *I) {
if (auto *BI = dyn_cast<BuiltinInst>(I))
return !isSideEffectFree(BI);
return I->mayHaveSideEffects();
}
static SILValue getArrayStructPointer(ArrayCallKind K, SILValue Array) {
assert(K != ArrayCallKind::kNone);
@@ -182,7 +176,7 @@ mayChangeArraySize(SILInstruction *I, ArrayCallKind &Kind, SILValue &Array,
return ArrayBoundsEffect::kMayChangeArg;
}
if (!mayHaveSideEffects(I))
if (!I->mayHaveSideEffects())
return ArrayBoundsEffect::kNone;
// A store to an alloc_stack can't possibly store to the array size which is