mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "SimplifyCFG: fix an infinite jump-threading loop."
This reverts commit fe928d57ac.
This causes an ASAN failure. Reverting until it can be debugged.
This commit is contained in:
@@ -318,8 +318,6 @@ bool SimplifyCFG::threadEdge(const ThreadInfo &ti) {
|
||||
return false;
|
||||
|
||||
Cloner.cloneBranchTarget(SrcTerm);
|
||||
JumpThreadingCost[Cloner.getNewBB()] = JumpThreadingCost[SrcTerm->getDestBB()];
|
||||
|
||||
|
||||
// We have copied the threaded block into the edge.
|
||||
auto *clonedSrc = Cloner.getNewBB();
|
||||
@@ -1133,10 +1131,6 @@ bool SimplifyCFG::tryJumpThreading(BranchInst *BI) {
|
||||
Cloner.cloneBranchTarget(BI);
|
||||
Cloner.updateSSAAfterCloning();
|
||||
|
||||
// Also account the costs to the cloned DestBB, so the jump threading cannot
|
||||
// loop by cloning the cloned block again.
|
||||
JumpThreadingCost[Cloner.getNewBB()] += copyCosts;
|
||||
|
||||
// Once all the instructions are copied, we can nuke BI itself. We also add
|
||||
// the threaded and edge block to the worklist now that they (likely) can be
|
||||
// simplified.
|
||||
@@ -2879,8 +2873,6 @@ bool SimplifyCFG::tailDuplicateObjCMethodCallSuccessorBlocks() {
|
||||
Cloner.cloneBranchTarget(Branch);
|
||||
Cloner.updateSSAAfterCloning();
|
||||
|
||||
JumpThreadingCost[Cloner.getNewBB()] = JumpThreadingCost[DestBB];
|
||||
|
||||
Changed = true;
|
||||
// Simplify the cloned block and continue tail duplicating through its new
|
||||
// successors edges.
|
||||
|
||||
Reference in New Issue
Block a user