Page MenuHomePhabricator

[VPlan] Wrap vector loop blocks in region.
ClosedPublic

Authored by fhahn on Thu, Nov 4, 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.Thu, Nov 4, 5:22 AM
fhahn requested review of this revision.Thu, Nov 4, 5:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptThu, Nov 4, 5:22 AM
Herald added a subscriber: vkmr. · View Herald Transcript
Ayal added inline comments.Tue, Nov 16, 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.Fri, Nov 19, 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.Sat, Nov 20, 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.Sat, Nov 20, 4:00 AM
This revision was automatically updated to reflect the committed changes.