[PATCH] D131606: [Loop Fusion] Sink/hoist memory instructions between loop fusion candidates

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 09:55:07 PDT 2022


bmahjour added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopFuse.cpp:1065
+    // If this isn't a memory inst, hoisting is safe
+    if (!I.mayReadFromMemory() && !I.mayWriteToMemory()) {
+      return true;
----------------
Whitney wrote:
> No need braces for single instruction block.
why the call to mayHaveSideEffects has been removed?


================
Comment at: llvm/lib/Transforms/Scalar/LoopFuse.cpp:1111
+    // If this isn't a memory inst, sinking is safe
+    if (!I.mayReadFromMemory() && !I.mayWriteToMemory()) {
+      return true;
----------------
Whitney wrote:
> Please remove braces.
why the call to mayHaveSideEffects has been removed?


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

https://reviews.llvm.org/D131606



More information about the llvm-commits mailing list