[llvm] [VPlan] Move recording of Inst->VPValue to VPRecipeBuilder (NFCI). (PR #84464)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 22 02:48:46 PDT 2024
================
@@ -2985,33 +2977,30 @@ class VPlan {
void setName(const Twine &newName) { Name = newName.str(); }
void addVPValue(Value *V, VPValue *VPV) {
- assert((Value2VPValueEnabled || VPV->isLiveIn()) &&
- "Value2VPValue mapping may be out of date!");
- assert(V && "Trying to add a null Value to VPlan");
- assert(!Value2VPValue.count(V) && "Value already exists in VPlan");
+ assert(VPV->isLiveIn());
Value2VPValue[V] = VPV;
}
/// Returns the VPValue for \p V.
- VPValue *getVPValue(Value *V) {
+ VPValue *getLiveIn(Value *V) {
assert(V && "Trying to get the VPValue of a null Value");
assert(Value2VPValue.count(V) && "Value does not exist in VPlan");
- assert((Value2VPValueEnabled || Value2VPValue[V]->isLiveIn()) &&
- "Value2VPValue mapping may be out of date!");
+ assert(Value2VPValue[V]->isLiveIn() &&
+ "Only live-ins should be in mapping");
return Value2VPValue[V];
}
/// Gets the VPValue for \p V or adds a new live-in (if none exists yet) for
/// \p V.
- VPValue *getVPValueOrAddLiveIn(Value *V) {
+ VPValue *getOrAddLiveIn(Value *V) {
----------------
ayalz wrote:
Certainly more accurate (LiveIn is also a VPValue) and compact. Worth pushing independently.
https://github.com/llvm/llvm-project/pull/84464
More information about the llvm-commits
mailing list