[llvm] [CodeGen] Extract copy-paste on PHI MachineInstr income removal. (PR #158634)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 18 22:15:18 PDT 2025


================
@@ -1503,6 +1503,15 @@ inline auto instructionsWithoutDebug(IterT It, IterT End,
   });
 }
 
+/// Iterate over block PHI instructions and remove all incoming values for
+/// PredMBB.
+///
+/// Function does not erase PHI instructions even if they have single income or
+/// do not have incoming values ar all. It is a caller responsibility to make
+/// decision how to process PHI instructions after incoming values removal.
+void removePHIsIncomingValuesForMBB(MachineBasicBlock &MBB,
+                                    const MachineBasicBlock &PredMBB);
----------------
arsenm wrote:

I meant a method, MachineBasicBlock::removePHIIncomingValuesForPredecessor 

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


More information about the llvm-commits mailing list