[llvm] 04c8c95 - Revert "[MachineSink] Only add sink candidate if ToBB is a successor of fromBB"

YongKang Zhu via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 11:15:01 PDT 2024


Author: YongKang Zhu
Date: 2024-07-11T11:14:33-07:00
New Revision: 04c8c95c24c051628ef260ba2a32a236f8b81c5d

URL: https://github.com/llvm/llvm-project/commit/04c8c95c24c051628ef260ba2a32a236f8b81c5d
DIFF: https://github.com/llvm/llvm-project/commit/04c8c95c24c051628ef260ba2a32a236f8b81c5d.diff

LOG: Revert "[MachineSink] Only add sink candidate if ToBB is a successor of fromBB"

This reverts commit 546c09018a615388a36bdf898649fffbd2df529f.

Added: 
    

Modified: 
    llvm/lib/CodeGen/MachineSink.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp
index 4d8de6765273f..bbc5ab13a0cd3 100644
--- a/llvm/lib/CodeGen/MachineSink.cpp
+++ b/llvm/lib/CodeGen/MachineSink.cpp
@@ -913,7 +913,7 @@ bool MachineSinking::isWorthBreakingCriticalEdge(
     auto Res = CEMergeCandidates.try_emplace(Key, From);
     // We wanted to sink the same register into the same block, consider it to
     // be profitable.
-    if (!Res.second && Res.first->second->isSuccessor(To)) {
+    if (!Res.second) {
       // Return the source block that was previously held off.
       DeferredFromBlock = Res.first->second;
       return true;


        


More information about the llvm-commits mailing list