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

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 22 05:36:37 PDT 2025


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

This is a non-member function, so adding `static` here affects its visibility. It is recommended to use `static` in this case (see [Restrict Visibility](https://llvm.org/docs/CodingStandards.html#restrict-visibility)).

(It may still be preferable to add it even if it is a member function)

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


More information about the llvm-commits mailing list