[llvm] [LoopFusion] Fix sink instructions (PR #147501)
    Michael Kruse via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jul 21 04:05:46 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:
```suggestion
  void fixPHINodes(ArrayRef<Instruction *> SafeToSink,
```
Pass an ArrayRef it itr is read-only, makes it independent of the underlaying implementation
https://github.com/llvm/llvm-project/pull/147501
    
    
More information about the llvm-commits
mailing list