[llvm] [SLP] Extract isIdentityOrder to common routine [probably NFC] (PR #106582)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 10:51:28 PDT 2024


================
@@ -1364,6 +1364,18 @@ class BoUpSLP {
   /// Perform LICM and CSE on the newly generated gather sequences.
   void optimizeGatherSequence();
 
+  /// Does this non-empty order represent an identity order?  Identity
+  /// should be represented as an empty order, so this is used to
+  /// decide if we can canonicalize a computed order.  Undef elements
----------------
preames wrote:

This is just describing the behavior of the existing code.  We use an empty order to represent no reordering - i.e. the identity order.  We use this routine to check if a computed order is identity, and can thus be replaced with an empty one.  If you have a preferred wording here, please suggest it.  

https://github.com/llvm/llvm-project/pull/106582


More information about the llvm-commits mailing list