[PATCH] D147892: [VPlan] Unify Value2VPValue and VPExternalDefs maps (NFCI).

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 9 12:56:33 PDT 2023


fhahn created this revision.
fhahn added reviewers: Ayal, gilr, rengolin.
Herald added subscribers: StephenFan, tschuett, psnobl, rogfer01, bollu, hiraditya.
Herald added a project: All.
fhahn requested review of this revision.
Herald added subscribers: pcwang-thead, vkmr.
Herald added a project: LLVM.

Before this patch, a VPlan contained 2 mappings for Values -> VPValue:

1. Value2VPValue and 2) VPExternalDefs.

This duplication is unnecessary and there are already cases where
external defs are added to Value2VPValue. This patch replaces all uses
of VPExternalDefs with Value2VPValue.

It clarifies the naming of getOrAddVPValue (to getOrAddExternalVPValue)
and addVPValue (to addExternalVPValue).

At the moment, this is NFC, but will enable additional simplifications
in D147783 <https://reviews.llvm.org/D147783>.

Depends on D147891 <https://reviews.llvm.org/D147891>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147892

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/VPlan.cpp
  llvm/lib/Transforms/Vectorize/VPlan.h
  llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
  llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
  llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
  llvm/unittests/Transforms/Vectorize/VPlanTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147892.512033.patch
Type: text/x-patch
Size: 14459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230409/94f450cb/attachment.bin>


More information about the llvm-commits mailing list