[llvm] 702a3c6 - [NFC][SimplifyCFG] Rename statistic NumSinkCommons into NumSinkCommonInstrs

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 14:22:25 PDT 2020


Author: Roman Lebedev
Date: 2020-07-16T00:21:55+03:00
New Revision: 702a3c6410ab4ec89e4e137c58e59505e1860ba0

URL: https://github.com/llvm/llvm-project/commit/702a3c6410ab4ec89e4e137c58e59505e1860ba0
DIFF: https://github.com/llvm/llvm-project/commit/702a3c6410ab4ec89e4e137c58e59505e1860ba0.diff

LOG: [NFC][SimplifyCFG] Rename statistic NumSinkCommons into NumSinkCommonInstrs

It really counts instructions added into common block,
not number of instruction groups sunk.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index b450d71c996c..3a9326a1d120 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -147,7 +147,7 @@ STATISTIC(
     NumLookupTablesHoles,
     "Number of switch instructions turned into lookup tables (holes checked)");
 STATISTIC(NumTableCmpReuses, "Number of reused switch table lookup compares");
-STATISTIC(NumSinkCommons,
+STATISTIC(NumSinkCommonInstrs,
           "Number of common instructions sunk down to the end block");
 STATISTIC(NumSpeculations, "Number of speculative executed instructions");
 
@@ -1892,7 +1892,7 @@ static bool SinkCommonCodeFromPredecessors(BasicBlock *BB) {
 
     if (!sinkLastInstruction(UnconditionalPreds))
       return Changed;
-    NumSinkCommons++;
+    NumSinkCommonInstrs++;
     Changed = true;
   }
   return Changed;


        


More information about the llvm-commits mailing list