Skip to content

Commit dbe10cc

Browse files
committed
Bail from SimplifyCFG::tailDuplicateObjCMethodCallSuccessorBlocks in OSSA
1 parent 4dd38da commit dbe10cc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/SILOptimizer/Transforms/SimplifyCFG.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2845,12 +2845,11 @@ static bool shouldTailDuplicate(SILBasicBlock &Block) {
28452845
bool SimplifyCFG::tailDuplicateObjCMethodCallSuccessorBlocks() {
28462846
SmallVector<SILBasicBlock *, 16> ObjCBlocks;
28472847

2848-
// TODO: OSSA phi support. Even if all block arguments are trivial,
2849-
// jump-threading may require creation of guaranteed phis, which may require
2850-
// creation of nested borrow scopes.
2851-
if (!EnableOSSARewriteTerminator && Fn.hasOwnership()) {
2848+
// TODO: Evaluate if tail duplication is needed for ossa arc optimizations
2849+
if (Fn.hasOwnership()) {
28522850
return false;
28532851
}
2852+
28542853
// Collect blocks to tail duplicate.
28552854
for (auto &BB : Fn) {
28562855
SILBasicBlock *DestBB;

0 commit comments

Comments
 (0)