[llvm] [VPlan] Add VPIRInstruction, use for exit block live-outs. (PR #100735)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 06:12:22 PDT 2024
================
@@ -855,10 +855,18 @@ VPlan::~VPlan() {
delete BackedgeTakenCount;
}
+static VPIRBasicBlock *createVPIRBasicBlockFor(BasicBlock *BB) {
+ auto *VPIRBB = new VPIRBasicBlock(BB);
+ for (Instruction &I :
+ make_range(BB->begin(), BB->getTerminator()->getIterator()))
----------------
ayalz wrote:
This is ok, adding some further thoughts:
Appending VPBB should be fine when iterating over BB?
Unconditional branches are redundant in VPlan, but there are recipes for binary branches. Should terminators be wrapped as well, possibly excluding unconditional branches? Need to make sure appended recipes are inserted before them.
For now, suffice to wrap (lcssa) phi's and last non-terminal instruction, but easier to fully populate with all instructions excluding terminal?
https://github.com/llvm/llvm-project/pull/100735
More information about the llvm-commits
mailing list