[llvm] [VPlan] Add VPIRWrapperBlock, use to model pre-preheader. (PR #93398)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 27 09:00:42 PDT 2024


================
@@ -2951,6 +2960,50 @@ class VPBasicBlock : public VPBlockBase {
   BasicBlock *createEmptyBasicBlock(VPTransformState::CFGState &CFG);
 };
 
+/// A special type of VPBasicBlock that wraps an existing IR basic block.
+/// Recipes of the block get added before the terminator of the wrapped IR basic
+/// block.
----------------
ayalz wrote:

Can also serve to wrap ExitBB as well, hopefully simplifying VPBasicBlock::execute()? In which case recipes, if added, would be placed at the beginning rather than the end, e.g., replace (LCSSA) header phi's in ExitBB instead of having VPLiveOut::fixPhi() add incoming to existing Phi's.

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


More information about the llvm-commits mailing list