mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "[sil-optimizer] Remove the opened archetypes related workarounds which are obsolete now."
This reverts commit78683186f1. It is related to8ef8bb4eb1which broke swift_tools-RA_stdlib-RD_test-no_device and some others.
This commit is contained in:
@@ -67,6 +67,19 @@ public:
|
||||
if (II->isAllocatingStack() || II->isDeallocatingStack())
|
||||
return false;
|
||||
|
||||
// We don't sink open_existential_* instructions, because
|
||||
// there may be some instructions depending on them, e.g.
|
||||
// metatype_inst, etc. But this kind of dependency
|
||||
// cannot be expressed in SIL yet.
|
||||
switch (II->getKind()) {
|
||||
default: break;
|
||||
case ValueKind::OpenExistentialBoxInst:
|
||||
case ValueKind::OpenExistentialRefInst:
|
||||
case ValueKind::OpenExistentialAddrInst:
|
||||
case ValueKind::OpenExistentialMetatypeInst:
|
||||
return false;
|
||||
}
|
||||
|
||||
SILBasicBlock *CurrentBlock = II->getParent();
|
||||
SILBasicBlock *Dest = nullptr;
|
||||
unsigned InitialLoopDepth = LoopInfo->getLoopDepth(CurrentBlock);
|
||||
|
||||
Reference in New Issue
Block a user