Page MenuHomePhabricator

[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.Sun, Jan 31, 6:48 AM

Extend scope of the patch to remove VectorizerValueMap.

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

rebase after adding VPlan pointer to VPTransformState.

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

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

9128–9129

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

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

Rebased after landing all required patches

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

ping :)

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

fhahn updated this revision to Diff 324911.Fri, Feb 19, 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.Fri, Feb 19, 1:21 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
4384

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

9128–9129

Yes, they are not necessary any longer :)

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

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

LGTM, thanks!

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

Thanks Gil! Another rebase ahead of committing.

This revision was landed with ongoing or failed builds.Fri, Feb 19, 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.