This is an archive of the discontinued LLVM Phabricator instance.

[LV] Move getScalarizationOverhead and vector call cost computations to CM. (NFC)
ClosedPublic

Authored by fhahn on May 7 2019, 3:51 AM.

Details

Summary

This reduces the number of parameters we need to pass in and they seem a
natural fit in LoopVectorizationCostModel. Also simplifies things for
D59995.

As a follow up refactoring, we could only expose a expose a
shouldUseVectorIntrinsic() helper in LoopVectorizationCostModel, instead
of calling getVectorCallCost/getVectorIntrinsicCost in
InnerLoopVectorizer/VPRecipeBuilder.

Diff Detail

Repository
rL LLVM

Event Timeline

fhahn created this revision.May 7 2019, 3:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 7 2019, 3:51 AM
rengolin accepted this revision.May 8 2019, 2:33 PM

looks obviously good to me. thanks!

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
6043 ↗(On Diff #198428)

spurious new line?

6647 ↗(On Diff #198428)

same here?

This revision is now accepted and ready to land.May 8 2019, 2:33 PM
fhahn updated this revision to Diff 199293.May 13 2019, 10:16 AM
fhahn marked 2 inline comments as done.

Ran clang-format.

Thanks Renato! I'll wait with committing until D59995 is reviewed, in case
there are additional suggestions there.

This revision was automatically updated to reflect the committed changes.