This is an archive of the discontinued LLVM Phabricator instance.

[LV] Refactor cross-iteration phi's back-patching; NFC
ClosedPublic

Authored by gilr on Mar 8 2017, 12:57 PM.

Details

Summary

This patch refactors the PHisToFix loop as follows:

  • The loop itself now resides in its own method.
  • The new method iterates on scalar-loop's header; the PHIsToFix map formerly propagated as an output parameter and filled during phi widening is removed.
  • The code handling reductions is moved into its own method, similar to the existing fixFirstOrderRecurrence().

Follows https://reviews.llvm.org/D28975 and its tentative breakdown.

Joint work with Ayal.

Diff Detail

Repository
rL LLVM

Event Timeline

gilr created this revision.Mar 8 2017, 12:57 PM
mssimpso edited edge metadata.Mar 9 2017, 5:50 AM

Hi Gil,

This looks good to me! I did have one minor suggestion to avoid some duplicated text in the comments. Also, you'll have to rebase to get the change from rL297302 (sorry about that).

lib/Transforms/Vectorize/LoopVectorize.cpp
4003–4006 ↗(On Diff #91014)

This paragraph seems to be mostly duplicating the previous. Can we reword it?

gilr added a comment.Mar 13 2017, 7:28 AM

I did have one minor suggestion to avoid some duplicated text in the comments.

Right, moved those comments a bit too mechanically.

Also, you'll have to rebase to get the change from rL297302 (sorry about that).

No problem :)

gilr updated this revision to Diff 91557.Mar 13 2017, 7:30 AM

Merged with rL297302 & ironed the affected phi-handling comments.

mssimpso accepted this revision.Mar 13 2017, 7:44 AM

Thanks, Gil!

This revision is now accepted and ready to land.Mar 13 2017, 7:44 AM
This revision was automatically updated to reflect the committed changes.