This is an archive of the discontinued LLVM Phabricator instance.

[VPlan] Turn Plan entry node into VPBasicBlock (NFCI).
ClosedPublic

Authored by fhahn on Apr 22 2023, 12:41 PM.

Details

Summary

The entry to the plan is guaranteed to be a VPBasicBlock. Make sure this
is the case by adjusting the type.

Diff Detail

Event Timeline

fhahn created this revision.Apr 22 2023, 12:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2023, 12:41 PM
fhahn requested review of this revision.Apr 22 2023, 12:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2023, 12:41 PM
Ayal accepted this revision.Apr 27 2023, 3:55 PM

Looks good to me, with minor nits.
Worth explaining that Entry is the preheader of the vector loop.

llvm/unittests/Transforms/Vectorize/VPDomTreeTest.cpp
40

nit: better placed in order, before VPBB1?

41

?

113

nit: better place VPBB0 in order, before R1BB1?

114

nit: better place right after creating R1?

llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
441

ditto

This revision is now accepted and ready to land.Apr 27 2023, 3:55 PM
fhahn updated this revision to Diff 517867.Apr 28 2023, 4:20 AM

Looks good to me, with minor nits.
Worth explaining that Entry is the preheader of the vector loop.

Rebase so this can be applied on current main and addressed the comments, thanks! I updated the comment for VPlan::Entry and plan to land this shortly.

fhahn marked 5 inline comments as done.Apr 28 2023, 4:23 AM

Looks good to me, with minor nits.
Worth explaining that Entry is the preheader of the vector loop.

This revision was landed with ongoing or failed builds.Apr 28 2023, 4:29 AM
This revision was automatically updated to reflect the committed changes.