This is an archive of the discontinued LLVM Phabricator instance.

[VPlan] Wrap vector loop blocks in region.
ClosedPublic

Authored by fhahn on Nov 4 2021, 5:22 AM.

Details

Summary

A first step towards modeling preheader and exit blocks in VPlan as well.
Keeping the vector loop in a region allows for changing the VF as we
traverse region boundaries.

Diff Detail

Event Timeline

fhahn created this revision.Nov 4 2021, 5:22 AM
fhahn requested review of this revision.Nov 4 2021, 5:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 4 2021, 5:22 AM
Herald added a subscriber: vkmr. · View Herald Transcript
Ayal added inline comments.Nov 16 2021, 11:21 PM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
9338–9339

Is this comment about dummy pre-entry obsolete?

9360

nit: can alternatively fold into a 1-liner by feeding FirstVPBBForBB to the constructor of VPRegionBlock, but above is more informative.

9433–9435

"entry block must be set to a VPRegionBlock having a non-empty entry VPBasicBlock");

llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-gep.ll
11

(<x1> indicating that this region is not replicating; i.e., is a loop region.)

fhahn updated this revision to Diff 388539.Nov 19 2021, 9:34 AM
fhahn marked 4 inline comments as done.

Adjusted assert message as suggested, thanks!

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
9338–9339

Yes! It should have been dropped as part of a6c4969f5f45. Removed in 76effb001d33.

9360

I kept it as is for now, preferring the more informative version. But I'm happy to adjust it if you prefer that.

9433–9435

Updated, thanks!

llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-gep.ll
11

Yes, unfortunately this is not very explicit. Should we change that?

Ayal accepted this revision.Nov 20 2021, 4:00 AM

Thanks!

llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-gep.ll
11

possibly, provided a better indicator is found; in a separate patch in any case
(added the comment for clarity/completeness)

This revision is now accepted and ready to land.Nov 20 2021, 4:00 AM
This revision was automatically updated to reflect the committed changes.