Skip to content

Commit 4371430

Browse files
committed
Bail from SimplifyCFG::tailDuplicateObjCMethodCallSuccessorBlocks in OSSA
1 parent 8845d36 commit 4371430

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
@@ -2840,12 +2840,11 @@ static bool shouldTailDuplicate(SILBasicBlock &Block) {
28402840
bool SimplifyCFG::tailDuplicateObjCMethodCallSuccessorBlocks() {
28412841
SmallVector<SILBasicBlock *, 16> ObjCBlocks;
28422842

2843-
// TODO: OSSA phi support. Even if all block arguments are trivial,
2844-
// jump-threading may require creation of guaranteed phis, which may require
2845-
// creation of nested borrow scopes.
2846-
if (!EnableOSSARewriteTerminator && Fn.hasOwnership()) {
2843+
// TODO: Evaluate if tail duplication is needed for ossa arc optimizations
2844+
if (Fn.hasOwnership()) {
28472845
return false;
28482846
}
2847+
28492848
// Collect blocks to tail duplicate.
28502849
for (auto &BB : Fn) {
28512850
SILBasicBlock *DestBB;

0 commit comments

Comments
 (0)