This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen][DebugInfo] Append OP_deref when converting an EntryValue dbg.declare
ClosedPublic

Authored by fdeazeve on Aug 21 2023, 9:24 AM.

Details

Summary

When we convert an EntryValue dbg.declare into an entry of the MF side table, we
currently copy its DIExpression as is, and rely on subsequent layers to "know"
that this expression is implicitly indirect. This is bad because it adds an
implicit assumption to the IR representation, and requires subsequent layers to
know about this assumption. This also limits the reusability of this table:
what if, in the future, we want to use this table for dbg.values?

This patch changes existing behavior so that the entities converting
dbg_declares explicitly add an OP_deref when converting EntryValue dbg.declares.

Diff Detail

Event Timeline

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