This is an archive of the discontinued LLVM Phabricator instance.

[Assignment Tracking] Only set module flag if pass modifies a function
ClosedPublic

Authored by Orlando on Feb 21 2023, 6:39 AM.

Details

Summary

The module flag "debug-info-assignment-tracking" is set by the declare-to-assign pass to indicate that assignment tracking is enabled. This patch changes declare-to-assign to only set the flag if it makes a modification. This lets the compiler avoid doing extra work for no benefit, such as is currently the case if assignment tracking is requested for a build with line tables only (-gmlt) or a build without debug info.

Diff Detail

Event Timeline

Orlando created this revision.Feb 21 2023, 6:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2023, 6:39 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
Orlando requested review of this revision.Feb 21 2023, 6:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2023, 6:39 AM
scott.linder accepted this revision.Feb 21 2023, 8:55 AM
This revision is now accepted and ready to land.Feb 21 2023, 8:55 AM