[llvm] 9dbfd58 - [CodeLayout] CDSortImpl: remove two conditions that cannot trigger. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 13 16:13:47 PDT 2023


Author: Fangrui Song
Date: 2023-10-13T16:13:41-07:00
New Revision: 9dbfd5828e3b23d3a752641e073ecfae04674f7f

URL: https://github.com/llvm/llvm-project/commit/9dbfd5828e3b23d3a752641e073ecfae04674f7f
DIFF: https://github.com/llvm/llvm-project/commit/9dbfd5828e3b23d3a752641e073ecfae04674f7f.diff

LOG: [CodeLayout] CDSortImpl: remove two conditions that cannot trigger. NFC

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/CodeLayout.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/CodeLayout.cpp b/llvm/lib/Transforms/Utils/CodeLayout.cpp
index 620b52b69c31d57..d9e302d8b4fa54d 100644
--- a/llvm/lib/Transforms/Utils/CodeLayout.cpp
+++ b/llvm/lib/Transforms/Utils/CodeLayout.cpp
@@ -1139,13 +1139,6 @@ class CDSortImpl {
       // Extract the best (top) edge for merging.
       ChainEdge *BestEdge = *Queue.begin();
       Queue.erase(Queue.begin());
-      // Ignore self-edges.
-      if (BestEdge->isSelfEdge())
-        continue;
-      // Ignore edges with non-positive gains.
-      if (BestEdge->gain() <= EPS)
-        continue;
-
       ChainT *BestSrcChain = BestEdge->srcChain();
       ChainT *BestDstChain = BestEdge->dstChain();
 


        


More information about the llvm-commits mailing list