This is an archive of the discontinued LLVM Phabricator instance.

[LV] Move code from widenGEP to VPWidenGEPRecipe (NFC).
ClosedPublic

Authored by fhahn on Nov 20 2021, 12:41 PM.

Details

Summary

The code in widenGEP has already been transitioned to only rely on
information provided by VPWidenGEPRecipe directly.

Moving the code directly to VPWidenGEPRecipe::execute completes
the transition for the recipe.

It provides the following advantages:

  1. Less indirection, easier to see what's going on.
  2. Removes accesses to fields of ILV.
  1. in particular ensures that no dependencies on

fields in ILV for GEP code generation are re-introduced.

Diff Detail

Event Timeline

fhahn created this revision.Nov 20 2021, 12:41 PM
fhahn requested review of this revision.Nov 20 2021, 12:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 20 2021, 12:41 PM
fhahn updated this revision to Diff 388912.Nov 22 2021, 7:15 AM

rebased after4348cd42c385

fhahn updated this revision to Diff 389797.Nov 25 2021, 7:51 AM

Fix clang-format issues.

Ayal accepted this revision.Nov 28 2021, 8:20 AM

Nice inlining! Looks good to me, with a minor nit.

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
563

Better keep both addMetadata() methods next to each other; the one left below is not more "protected" than this one, plus their documentations are linked - above refers to the "previous function" below.

This revision is now accepted and ready to land.Nov 28 2021, 8:20 AM
This revision was automatically updated to reflect the committed changes.
fhahn marked an inline comment as done.Nov 28 2021, 10:53 AM
fhahn added inline comments.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
563

Thanks, I moved both in the committed version.