Skip to content

Commit 5e4c0f4

Browse files
committed
Revert "[TailDuplicator] Add maximum predecessors and successors to consider tail duplicating blocks (llvm#78582)"
This reverts commit 86a7828. Now, we only consider computed GOTOs.
1 parent 927b95e commit 5e4c0f4

File tree

2 files changed

+0
-777
lines changed

2 files changed

+0
-777
lines changed

llvm/lib/CodeGen/TailDuplicator.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,6 @@ static cl::opt<unsigned> TailDupIndirectBranchSize(
6767
"end with indirect branches."), cl::init(20),
6868
cl::Hidden);
6969

70-
static cl::opt<unsigned>
71-
TailDupPredSize("tail-dup-pred-size",
72-
cl::desc("Maximum predecessors (maximum successors at the "
73-
"same time) to consider tail duplicating blocks."),
74-
cl::init(16), cl::Hidden);
75-
76-
static cl::opt<unsigned>
77-
TailDupSuccSize("tail-dup-succ-size",
78-
cl::desc("Maximum successors (maximum predecessors at the "
79-
"same time) to consider tail duplicating blocks."),
80-
cl::init(16), cl::Hidden);
81-
8270
static cl::opt<bool>
8371
TailDupVerify("tail-dup-verify",
8472
cl::desc("Verify sanity of PHI instructions during taildup"),
@@ -573,14 +561,6 @@ bool TailDuplicator::shouldTailDuplicate(bool IsSimple,
573561
if (TailBB.isSuccessor(&TailBB))
574562
return false;
575563

576-
// Duplicating a BB which has both multiple predecessors and successors will
577-
// result in a complex CFG and also may cause huge amount of PHI nodes. If we
578-
// want to remove this limitation, we have to address
579-
// https://github.com/llvm/llvm-project/issues/78578.
580-
if (TailBB.pred_size() > TailDupPredSize &&
581-
TailBB.succ_size() > TailDupSuccSize)
582-
return false;
583-
584564
// Set the limit on the cost to duplicate. When optimizing for size,
585565
// duplicate only one, because one branch instruction can be eliminated to
586566
// compensate for the duplication.

0 commit comments

Comments
 (0)