[llvm] [VPlan] Manage created blocks directly in VPlan. (NFC) (PR #120918)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 29 13:12:30 PST 2024
================
@@ -474,6 +469,16 @@ void VPIRBasicBlock::execute(VPTransformState *State) {
connectToPredecessors(State->CFG);
}
+VPIRBasicBlock *VPIRBasicBlock::clone() {
+ auto *NewBlock = getPlan()->createVPIRBasicBlock(IRBB);
+ for (VPRecipeBase &R : make_early_inc_range(*NewBlock))
+ R.eraseFromParent();
+
+ for (VPRecipeBase &R : Recipes)
+ NewBlock->appendRecipe(R.clone());
----------------
fhahn wrote:
New constructor should avoid need to rename.
https://github.com/llvm/llvm-project/pull/120918
More information about the llvm-commits
mailing list