This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Handle call site values for instructions before call bundle
ClosedPublic

Authored by dstenb on Dec 4 2019, 9:14 AM.

Details

Summary

If a call is bundled then the code that looks for instructions that
produce parameter values would break when reaching the call's bundle
header, due to the ifCall(/*AnyInBundle*/) invocation returning true.

It is not enough to simply ignore bundle headers in the isCall()
invocation, as the bundle header may have defines of parameter registers
due to the call, meaning that such registers would incorrectly be
removed from the worklist. Therefore, do not look at bundle headers at
all.

Diff Detail

Event Timeline

dstenb created this revision.Dec 4 2019, 9:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 4 2019, 9:14 AM
aprantl accepted this revision.Dec 4 2019, 4:55 PM
aprantl added inline comments.
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
621

is there a higher-level iterator that does this skipping automatically?

This revision is now accepted and ready to land.Dec 4 2019, 4:55 PM
vsk accepted this revision.Dec 4 2019, 5:34 PM
vsk added inline comments.
llvm/test/DebugInfo/MIR/Hexagon/dbgcall-site-instr-before-bundled-call.mir
36

Are the dbg.value/DBG_VALUE's necessary?

dstenb marked 2 inline comments as done.Dec 5 2019, 1:47 AM
dstenb added inline comments.
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
621

AFAICT there is no such iterator.

llvm/test/DebugInfo/MIR/Hexagon/dbgcall-site-instr-before-bundled-call.mir
36

No, I'll clean them up!

dstenb updated this revision to Diff 232276.Dec 5 2019, 1:47 AM

Remove unnecessary debug information from test case.

djtodoro accepted this revision.Dec 5 2019, 2:57 AM

Looks good! Thanks!

llvm/test/DebugInfo/MIR/Hexagon/dbgcall-site-instr-before-bundled-call.mir
175

Cool, thanks! :)

This revision was automatically updated to reflect the committed changes.