Small cleanup. NFC.

Swift SVN r13329
This commit is contained in:
Michael Gottesman
2014-02-03 02:34:01 +00:00
parent bbdfb8bcad
commit 8789bd3b51

View File

@@ -133,12 +133,10 @@ static bool canSinkInstruction(SILInstruction *Inst) {
/// we can't sink other instructions past it. /// we can't sink other instructions past it.
static bool isSinkBarrier(SILInstruction *Inst) { static bool isSinkBarrier(SILInstruction *Inst) {
// We know that some calls do not have side effects. // We know that some calls do not have side effects.
if (const ApplyInst *AI = dyn_cast<ApplyInst>(Inst)) { if (const ApplyInst *AI = dyn_cast<ApplyInst>(Inst))
if (BuiltinFunctionRefInst *FR = if (BuiltinFunctionRefInst *FR =
dyn_cast<BuiltinFunctionRefInst>(AI->getCallee().getDef())) { dyn_cast<BuiltinFunctionRefInst>(AI->getCallee().getDef()))
return !isSideEffectFree(FR); return !isSideEffectFree(FR);
}
}
if (isa<TermInst>(Inst)) if (isa<TermInst>(Inst))
return false; return false;