This is an archive of the discontinued LLVM Phabricator instance.

Correctly report modified status for LoopDistribute
ClosedPublic

Authored by serge-sans-paille on Jun 5 2020, 12:17 AM.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2020, 12:17 AM
serge-sans-paille retitled this revision from Correctlt report modified status for LoopDistribute to Correctly report modified status for LoopDistribute.Jun 5 2020, 12:18 AM
foad added inline comments.Jun 5 2020, 5:55 AM
llvm/lib/Transforms/Scalar/LoopDistribute.cpp
789

It doesn't really matter but... aren't these variables usually called "Changed"?

791–792

Would it be possible to delay this splitting until we know that the checks below won't fail? Or is that difficult to do?

Move code that unconditionally modifiy the loop *after* the structural check, to avoid returning false while some changes happened.

It passes validation, and I did a quick check, the change looks fine, but I'd be happy to take an extra review from someone more familiar with the codebase.

This comment was removed by serge-sans-paille.

Ooops™ uploaded the wrong patch, restoring the correct version.

foad added a subscriber: arsenm.Jun 11 2020, 4:34 AM
foad added inline comments.
llvm/lib/Transforms/Scalar/LoopDistribute.cpp
792–802

Adding @arsenm who last touched this bit of code.

foad resigned from this revision.Jun 18 2020, 7:05 AM

I have absolutely no idea whether it is safe to move that code, sorry.

foad added a subscriber: foad.Jun 18 2020, 7:06 AM
jdoerfert accepted this revision.Jun 18 2020, 7:38 AM

LGTM.

llvm/lib/Transforms/Scalar/LoopDistribute.cpp
809

Nit: unsure why you added braces but I think we prefer without.

This revision is now accepted and ready to land.Jun 18 2020, 7:38 AM
This revision was automatically updated to reflect the committed changes.