[llvm] [VPlan] Move recording of Inst->VPValue to VPRecipeBuilder (NFCI). (PR #84464)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 05:07:22 PDT 2024


ayalz wrote:

> Instead of keeping a mapping of Inst->VPValues (of their corresponding recipes) in VPlan's Value2VPValue mapping, keep it in VPRecipeBuilder instead. After recently replacing the last user of this mapping after initial construction, this mapping is only needed for recipe construction (to map IR operands to VPValue operands).
> 
> By moving the mapping, VPlan's VPValue tracking can be simplified and limited only to live-ins. It also allows removing disableValue2VPValue and associated machinery & asserts.

Nice clean-up! Conceptually analogous to TransformState which keeps track of VPValue-to-Value(s) mapping during codegen only. Independent of this patch: should VPRecipeBuilder (or some other sub/class thereof) be confined to initial VPlan construction from LLVM-IR, excluding construction of recipes during VPlan-to-VPlan transformations?

https://github.com/llvm/llvm-project/pull/84464


More information about the llvm-commits mailing list