This is an archive of the discontinued LLVM Phabricator instance.

[LoopUnroll][DebugInfo] Don't add metadata to unrolled remainder loop
ClosedPublic

Authored by samparker on Aug 31 2017, 8:17 AM.

Details

Summary

Debug information can be, and was, corrupted when the runtime remainder loop was fully unrolled. This is because the a !null node can be created instead of a unique one describing the loop. In this case, the original node gets incorrectly updated with the NewLoopID metadata.

In the case when the remainder loop is going to be quickly fully unrolled, there isn't the need to add loop metadata for it anyway.

Diff Detail

Event Timeline

samparker created this revision.Aug 31 2017, 8:17 AM
aprantl resigned from this revision.Aug 31 2017, 10:49 AM
aprantl added a reviewer: anemet.

I don't understand enough about loop annotations to review this.

hfinkel accepted this revision.Sep 2 2017, 12:45 PM
hfinkel added a subscriber: hfinkel.

LGTM

This revision is now accepted and ready to land.Sep 2 2017, 12:45 PM
This revision was automatically updated to reflect the committed changes.