[all-commits] [llvm/llvm-project] d47bda: [VPlan] Remove duplicated VPValue IDs (NFCI).

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Jan 17 07:12:10 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d47bdae28e8ea7a64de2ac27159733bba8117cda
      https://github.com/llvm/llvm-project/commit/d47bdae28e8ea7a64de2ac27159733bba8117cda
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2023-01-17 (Tue, 17 Jan 2023)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VPlan.h
    M llvm/lib/Transforms/Vectorize/VPlanValue.h

  Log Message:
  -----------
  [VPlan] Remove duplicated VPValue IDs (NFCI).

At the moment, both VPValue and VPDef have an ID used when casting via
classof. This duplication is cumbersome, because it requires adding IDs
for new recipes twice and also requires setting them twice. In a few
cases, there's only a VPDef ID and no VPValue ID, which can cause same
confusion.

To simplify things, remove the VPValue IDs for different recipes.
Instead, only retain the generic VPValue ID (= used VPValues without a
corresponding defining recipe) and VPVRecipe for VPValues that are
defined by recipes that inherit from VPValue.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D140848




More information about the All-commits mailing list