[PATCH] D156395: [Reassociate][NFC] Update the header comment of Reassociate Pass

Hongyu Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 06:48:15 PDT 2023


XChy updated this revision to Diff 544752.
XChy added a comment.

Emphasize ordering.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156395/new/

https://reviews.llvm.org/D156395

Files:
  llvm/lib/Transforms/Scalar/Reassociate.cpp


Index: llvm/lib/Transforms/Scalar/Reassociate.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ llvm/lib/Transforms/Scalar/Reassociate.cpp
@@ -11,10 +11,10 @@
 //
 // For example: 4 + (x + 5) -> x + (4 + 5)
 //
-// In the implementation of this algorithm, constants are assigned rank = 0,
-// function arguments are rank = 1, and other values are assigned ranks
-// corresponding to the reverse post order traversal of current function
-// (starting at 2), which effectively gives values in deep loops higher rank
+// In the implementation of this algorithm, constants are assigned rank 0
+// firstly, the function arguments rank following constants, and at last, other
+// values are assigned ranks corresponding to the reverse post order traversal
+// of current function, which effectively gives values in deep loops higher rank
 // than values not in loops.
 //
 //===----------------------------------------------------------------------===//


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156395.544752.patch
Type: text/x-patch
Size: 1021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230727/4d72b4f0/attachment.bin>


More information about the llvm-commits mailing list