This is an archive of the discontinued LLVM Phabricator instance.

[LV] Move code from widenInstruction to VPWidenRecipe. (NFC)
ClosedPublic

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

Details

Summary

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

Moving the code directly to VPWidenRecipe::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 vector code generation are re-introduced.

Diff Detail

Event Timeline

fhahn created this revision.Nov 20 2021, 12:44 PM
fhahn requested review of this revision.Nov 20 2021, 12:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 20 2021, 12:44 PM
fhahn retitled this revision from [LV] Move code from widenInstruction to VPWidenRecipe. to [LV] Move code from widenInstruction to VPWidenRecipe. (NFC).Nov 20 2021, 12:48 PM
Ayal accepted this revision.Nov 28 2021, 1:29 PM

Looks good to me, with a small nit.

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

Above comment for widenCallInstruction() should be retained.

This revision is now accepted and ready to land.Nov 28 2021, 1:29 PM
fhahn marked an inline comment as done.Nov 29 2021, 1:12 AM
fhahn added inline comments.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
480

Thanks, the committed version retains the accidentally dropped comment.

fhahn marked an inline comment as done.Nov 29 2021, 1:13 AM