The only remaining use was to get the exit block of the loop. Instead of
relying on the loop, use the successor of VectorHeaderBB
(LoopMiddleBlock) directly to set VPTransformState::CFG::ExitB
Depends on D121621.
Paths
| Differential D121623
[LV] Remove unneeded createHeaderBranch.(NFCI) ClosedPublic Authored by fhahn on Mar 14 2022, 10:18 AM.
Details Summary The only remaining use was to get the exit block of the loop. Instead of Depends on D121621.
Diff Detail
Event Timeline
fhahn marked an inline comment as done. Comment ActionsAdd back loop creation part to the comment, move all initial CFGTransformState initialization to single place as suggested, thanks! fhahn added inline comments.
fhahn marked an inline comment as done. Comment ActionsMove initialization of State::CFG back to VPlan::execute.
Comment Actions This is fine, thanks! Couple of minor nits, plus Summary can be updated:
This revision is now accepted and ready to land.Mar 30 2022, 4:41 AM fhahn marked 2 inline comments as done. Comment Actions
Thanks, the nits should be addressedd in the latest version. I'll update the description and plan to land this soon.
This revision was landed with ongoing or failed builds.Mar 31 2022, 3:49 AM Closed by commit rG32bc83d11e19: [LV] Remove unneeded createHeaderBranch.(NFCI) (authored by fhahn). · Explain Why This revision was automatically updated to reflect the committed changes. fhahn added a reverting change: rG2760cdc9c6e4: Revert "[LV] Remove unneeded createHeaderBranch.(NFCI)".Mar 31 2022, 4:36 AM
Revision Contents
Diff 419087 llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/VPlan.cpp
|
It still also allocates a loop object for the new vector loop, placing the header in it, and could return it, but doing so would be useless - the loop is retrieved when needed from its header block.