[llvm] [LoopFusion] Fix sink instructions (PR #147501)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 22 08:50:19 PDT 2025


================
@@ -1176,6 +1176,27 @@ struct LoopFuser {
     return true;
   }
 
+  // This function fixes sunk PHI nodes after fusion.
+  void fixPHINodes(SmallVector<Instruction *, 4> &SafeToSink,
----------------
Meinersbur wrote:

> So, I should be removing `const` qualifier...

`const` refers to the qualifiers of `this`, which with `static` does not exist anymore, so indeed, the consequence would be to remove `const`.

I don't care that much, so I LGTM it already. Keep it non-static if you think it makes more sense.

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


More information about the llvm-commits mailing list