[VPlan] Add assignSlot(const VPBasicBlock *) (NFC).
Factor out utility to simplify D147964 as sugested.
This commit is contained in:
parent
9bb28a18d9
commit
b9efffa7e9
@ -1116,9 +1116,13 @@ void VPSlotTracker::assignSlots(const VPlan &Plan) {
|
||||
RPOT(VPBlockDeepTraversalWrapper<const VPBlockBase *>(Plan.getEntry()));
|
||||
for (const VPBasicBlock *VPBB :
|
||||
VPBlockUtils::blocksOnly<const VPBasicBlock>(RPOT))
|
||||
for (const VPRecipeBase &Recipe : *VPBB)
|
||||
for (VPValue *Def : Recipe.definedValues())
|
||||
assignSlot(Def);
|
||||
assignSlots(VPBB);
|
||||
}
|
||||
|
||||
void VPSlotTracker::assignSlots(const VPBasicBlock *VPBB) {
|
||||
for (const VPRecipeBase &Recipe : *VPBB)
|
||||
for (VPValue *Def : Recipe.definedValues())
|
||||
assignSlot(Def);
|
||||
}
|
||||
|
||||
bool vputils::onlyFirstLaneUsed(VPValue *Def) {
|
||||
|
||||
@ -440,6 +440,7 @@ class VPSlotTracker {
|
||||
|
||||
void assignSlot(const VPValue *V);
|
||||
void assignSlots(const VPlan &Plan);
|
||||
void assignSlots(const VPBasicBlock *VPBB);
|
||||
|
||||
public:
|
||||
VPSlotTracker(const VPlan *Plan = nullptr) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user