[llvm] [VPlan] Add VPIRBasicBlock, use to model pre-preheader. (PR #93398)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 13:17:06 PDT 2024
================
@@ -2948,12 +2952,48 @@ class VPBasicBlock : public VPBlockBase {
return NewBlock;
}
+protected:
+ /// Execute the recipes in the IR basic block \p BB.
+ void executeRecipes(VPTransformState *State, BasicBlock *BB);
+
private:
/// Create an IR BasicBlock to hold the output instructions generated by this
/// VPBasicBlock, and return it. Update the CFGState accordingly.
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 first non-phi instruction in the
+/// wrapped block.
+class VPIRBasicBlock : public VPBasicBlock {
+ BasicBlock *IRBB;
+
+public:
+ VPIRBasicBlock(BasicBlock *IRBB)
+ : VPBasicBlock(VPIRBasicBlockSC,
+ (Twine("ir-bb<") + IRBB->getName() + Twine(">")).str()),
----------------
ayalz wrote:
Would the diff of this NFC patch decrease if name is (temporarily) set to "ph" here, avoiding any test change? A subsequent patch can follow, devoted to renaming only. (Or we could try to apply the desired renaming patch first.)
In any case, the Note at the end of the commit message regarding updating tests should be updated / removed.
https://github.com/llvm/llvm-project/pull/93398
More information about the llvm-commits
mailing list