[llvm] 979b374 - [AggressiveInstCombine] Fix terminology in a few comments (NFC) (#222327)

via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 13 09:17:10 PDT 2026


Author: Ömer Sinan Ağacan
Date: 2026-09-13T18:17:05+02:00
New Revision: 979b374a7ca7adc936d9339c1db79b0d6cda06db

URL: https://github.com/llvm/llvm-project/commit/979b374a7ca7adc936d9339c1db79b0d6cda06db
DIFF: https://github.com/llvm/llvm-project/commit/979b374a7ca7adc936d9339c1db79b0d6cda06db.diff

LOG: [AggressiveInstCombine] Fix terminology in a few comments (NFC) (#222327)

Fix the comments (and a debug print) that say "dominated by trunc"
rather than "post-dominated".

Also fixes a Doxygen syntax (use \p instead of /p) and fix
capitalization in the middle of a sentence.

Added: 
    

Modified: 
    llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h
    llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h
index 0b8a9fa48e342..f56c30f5f3af8 100644
--- a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h
+++ b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h
@@ -21,7 +21,7 @@
 #include "llvm/Support/KnownBits.h"
 
 //===----------------------------------------------------------------------===//
-// TruncInstCombine - looks for expression graphs dominated by trunc
+// TruncInstCombine - looks for expression graphs post-dominated by trunc
 // instructions and for each eligible graph, it will create a reduced bit-width
 // expression and replace the old expression with this new one and remove the
 // old one. Eligible expression graph is such that:
@@ -85,8 +85,8 @@ class TruncInstCombine {
   bool run(Function &F);
 
 private:
-  /// Build expression graph dominated by the /p CurrentTruncInst and append it
-  /// to the InstInfoMap container.
+  /// Build expression graph post-dominated by the \p CurrentTruncInst and
+  /// append it to the InstInfoMap container.
   ///
   /// \return true only if succeed to generate an eligible sub expression graph.
   bool buildTruncExpressionGraph();
@@ -98,8 +98,8 @@ class TruncInstCombine {
   /// truncate's operand can be shrunk to.
   unsigned getMinBitWidth();
 
-  /// Build an expression graph dominated by the current processed TruncInst and
-  /// Check if it is eligible to be reduced to a smaller type.
+  /// Build an expression graph post-dominated by the current processed
+  /// TruncInst and check if it is eligible to be reduced to a smaller type.
   ///
   /// \return the scalar version of the new type to be used for the reduced
   ///         expression graph, or nullptr if the expression graph is not

diff  --git a/llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp b/llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
index 4b29e33c2e7f7..2d50a376bf2e9 100644
--- a/llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
+++ b/llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
@@ -555,7 +555,7 @@ bool TruncInstCombine::run(Function &F) {
     if (Type *NewDstSclTy = getBestTruncatedType()) {
       LLVM_DEBUG(
           dbgs() << "ICE: TruncInstCombine reducing type of expression graph "
-                    "dominated by: "
+                    "post-dominated by: "
                  << CurrentTruncInst << '\n');
       ReduceExpressionGraph(NewDstSclTy);
       ++NumExprsReduced;


        


More information about the llvm-commits mailing list