[llvm] [VPlan] Introduce explicit broadcasts for live-ins. (PR #124644)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 7 04:11:31 PST 2025
================
@@ -3716,6 +3759,9 @@ class VPlan {
/// Return the live-in VPValue for \p V, if there is one or nullptr otherwise.
VPValue *getLiveIn(Value *V) const { return Value2VPValue.lookup(V); }
+ /// Return the list of live-in VPValues available in the VPlan.
+ ArrayRef<VPValue *> getLiveIns() const { return VPLiveIns; }
----------------
david-arm wrote:
OK, I still feel this could lead to confusion/problems though. If I understand correctly, `VPLiveIns` is essentially a superset of `Value2VPValue`? For example, any VPValue contained in the map `Value2VPValue` *should* also exist in `VPLiveIns`? Unless live-ins get deleted from `VPLiveIns` or re-added?
Essentially it sounds like `getLiveIn` should really be called something like `findLiveInForValue` or something like that. And we might want to assert somewhere that the values found in the `Value2VPValue` map also exist in `VPLiveIns`. I'm just a bit worried that we have two ways of recording the same state and there might not be anything to defend them being kept in sync?
https://github.com/llvm/llvm-project/pull/124644
More information about the llvm-commits
mailing list