Skip to content

Commit 67863c5

Browse files
committed
Revert "SimplifyCFG: fix an infinite jump-threading loop."
This reverts commit fe928d5. This causes an ASAN failure. Reverting until it can be debugged.
1 parent 0b2a626 commit 67863c5

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/SILOptimizer/Transforms/SimplifyCFG.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,6 @@ bool SimplifyCFG::threadEdge(const ThreadInfo &ti) {
318318
return false;
319319

320320
Cloner.cloneBranchTarget(SrcTerm);
321-
JumpThreadingCost[Cloner.getNewBB()] = JumpThreadingCost[SrcTerm->getDestBB()];
322-
323321

324322
// We have copied the threaded block into the edge.
325323
auto *clonedSrc = Cloner.getNewBB();
@@ -1133,10 +1131,6 @@ bool SimplifyCFG::tryJumpThreading(BranchInst *BI) {
11331131
Cloner.cloneBranchTarget(BI);
11341132
Cloner.updateSSAAfterCloning();
11351133

1136-
// Also account the costs to the cloned DestBB, so the jump threading cannot
1137-
// loop by cloning the cloned block again.
1138-
JumpThreadingCost[Cloner.getNewBB()] += copyCosts;
1139-
11401134
// Once all the instructions are copied, we can nuke BI itself. We also add
11411135
// the threaded and edge block to the worklist now that they (likely) can be
11421136
// simplified.
@@ -2879,8 +2873,6 @@ bool SimplifyCFG::tailDuplicateObjCMethodCallSuccessorBlocks() {
28792873
Cloner.cloneBranchTarget(Branch);
28802874
Cloner.updateSSAAfterCloning();
28812875

2882-
JumpThreadingCost[Cloner.getNewBB()] = JumpThreadingCost[DestBB];
2883-
28842876
Changed = true;
28852877
// Simplify the cloned block and continue tail duplicating through its new
28862878
// successors edges.

0 commit comments

Comments
 (0)