SIL: Use objc_method instruction for Objective-C protocol method calls

Fixes <rdar://problem/15933365>.
This commit is contained in:
Slava Pestov
2017-11-29 00:27:21 -08:00
parent 0c53bbf092
commit 1f79af7504
32 changed files with 100 additions and 111 deletions

View File

@@ -880,9 +880,6 @@ bool CSE::canHandle(SILInstruction *Inst) {
return false;
return !BI->mayReadOrWriteMemory();
}
if (auto *WMI = dyn_cast<WitnessMethodInst>(Inst)) {
return !WMI->isVolatile();
}
if (auto *EMI = dyn_cast<ExistentialMetatypeInst>(Inst)) {
return !EMI->getOperand()->getType().isAddress();
}
@@ -937,6 +934,7 @@ bool CSE::canHandle(SILInstruction *Inst) {
case SILInstructionKind::PointerToThinFunctionInst:
case SILInstructionKind::MarkDependenceInst:
case SILInstructionKind::OpenExistentialRefInst:
case SILInstructionKind::WitnessMethodInst:
return true;
default:
return false;