Page MenuHomePhabricator

[LV] Move code from vectorizeMemoryInstruction to recipe's execute().
ClosedPublic

Authored by fhahn on Sat, Nov 20, 12:47 PM.

Details

Summary

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

Moving the code directly to VPWidenMemoryInstructionRecipe::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.Sat, Nov 20, 12:47 PM
fhahn requested review of this revision.Sat, Nov 20, 12:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptSat, Nov 20, 12:47 PM
Ayal added inline comments.Sun, Nov 28, 1:53 PM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
10045

The assert(Vec->getType()->isVectorTy() && "Invalid type"); of reverseVector() being dropped will be taken care of by Builder.CreateVectorReverse() anyhow?

10053

clean up above comments?

fhahn updated this revision to Diff 390658.Tue, Nov 30, 3:41 AM
fhahn marked 2 inline comments as done.

remove commented out code

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

CreateVectorReverse has auto *Ty = cast<VectorType>(V->getType()); which should be equivalent to the assert.

10053

Removed!

Ayal accepted this revision.Tue, Nov 30, 6:43 AM

Ship it!

This revision is now accepted and ready to land.Tue, Nov 30, 6:43 AM