This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG][DebugInfo] Handle entry_value dbg.value DIExprs earlier
ClosedPublic

Authored by fdeazeve on Aug 23 2023, 11:18 AM.

Details

Summary

When SelectiondDAG converts dbg.value intrinsics, it first ensures we have
already generated code for the value operator of the intrinsic. The rationale
being that if we haven't had the need to generate code for this value, it won't
be a debug value that causes the generation.

For example, if the first use the physical register of an argument is a
dbg.value, we are going to hit this code path. However, this is irrelevant for
entry value expressions: by definition we are not interested in the _current_
value of the physical register, but rather on its value at the start of the
function. To deal with this, this patch changes lowering to handle this case as
early as possible.

Diff Detail

Event Timeline

fdeazeve created this revision.Aug 23 2023, 11:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 11:18 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
fdeazeve requested review of this revision.Aug 23 2023, 11:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 11:18 AM
fdeazeve added a project: debug-info.
aprantl accepted this revision.Aug 23 2023, 11:36 AM
This revision is now accepted and ready to land.Aug 23 2023, 11:36 AM
This revision was landed with ongoing or failed builds.Aug 24 2023, 6:34 AM
This revision was automatically updated to reflect the committed changes.