mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Small cleanup. NFC.
Swift SVN r13329
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user