This is an archive of the discontinued LLVM Phabricator instance.

[LV] Remove VPCallback.
ClosedPublic

Authored by fhahn on Jan 25 2021, 11:46 AM.

Details

Summary

Now that all state for generated instructions is managed directly in
VPTransformState, VPCallBack is no longer needed. This patch updates the
last use of getOrCreateScalarValue to instead manage the value
directly in VPTransformState and removes VPCallback.

Diff Detail

Event Timeline

fhahn created this revision.Jan 25 2021, 11:46 AM
fhahn requested review of this revision.Jan 25 2021, 11:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2021, 11:46 AM
Herald added a subscriber: vkmr. · View Herald Transcript
fhahn updated this revision to Diff 320355.Jan 31 2021, 6:48 AM

Extend scope of the patch to remove VectorizerValueMap.

fhahn updated this revision to Diff 321986.Feb 7 2021, 3:06 AM

rebase after adding VPlan pointer to VPTransformState.

gilr added inline comments.Feb 9 2021, 9:33 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
4389

Should this be !OrigLoop->contains() to match invariants? (why check at all?)

9090

Aren't the IRDef parameter(s) now redundant?

fhahn updated this revision to Diff 323910.Feb 16 2021, 1:12 AM

Rebased after landing all required patches

gilr added a comment.Feb 18 2021, 11:46 AM

ping :)

Nice cleanup!
There seem to still be a couple of outstanding comments?

fhahn updated this revision to Diff 324911.Feb 19 2021, 1:19 AM

ping :)

Nice cleanup!
There seem to still be a couple of outstanding comments?

Oh yes, sorry about this. They should be addressed now.

Remove VPTransformState::get/set variants which takes IRDef.

fhahn added inline comments.Feb 19 2021, 1:21 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
4389

This is not needed in the latest version, and the code is removed, thanks!

9090

Yes, they are not necessary any longer :)

I removed the VPTransformState::get/set variants with IRDef

gilr accepted this revision.Feb 19 2021, 3:40 AM

LGTM, thanks!

This revision is now accepted and ready to land.Feb 19 2021, 3:40 AM
fhahn updated this revision to Diff 324950.Feb 19 2021, 4:49 AM

Thanks Gil! Another rebase ahead of committing.

This revision was landed with ongoing or failed builds.Feb 19 2021, 4:53 AM
Closed by commit rGedc92a1c4259: [LV] Remove VPCallback. (authored by fhahn). · Explain Why
This revision was automatically updated to reflect the committed changes.