This is an archive of the discontinued LLVM Phabricator instance.

[LoopInterchange] Only skip PHIs with incoming values from the inner loop.
ClosedPublic

Authored by fhahn on Nov 10 2019, 12:01 PM.

Details

Summary

Currently we have limited support for outer loops with multiple basic
blocks after the inner loop exit. But the current checks for creating
PHIs for loop exit values only assumes the header and latches of the
outer loop. It is better to just skip incoming values defined in the
original inner loops. Those are handled earlier.

Diff Detail

Event Timeline

fhahn created this revision.Nov 10 2019, 12:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 10 2019, 12:01 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
efriedma accepted this revision.Nov 11 2019, 3:52 PM

LGTM

llvm/lib/Transforms/Scalar/LoopInterchange.cpp
1406

Comment wrapping?

This revision is now accepted and ready to land.Nov 11 2019, 3:52 PM
This revision was automatically updated to reflect the committed changes.
fhahn marked an inline comment as done.Nov 12 2019, 3:01 AM
fhahn added inline comments.
llvm/lib/Transforms/Scalar/LoopInterchange.cpp
1406

Thanks Eli, I've fixed that. It seems like clang-format does not re-flow comments that do not exceed the maximum length.