This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Handle DBG_VALUES with multiple variable location operands in MIR
ClosedPublic

Authored by StephenTozer on Dec 3 2020, 9:09 AM.

Details

Summary

Another patch neede for the implementation of the variadic debug values change[0], this patch adds handling for multiple location operands in the MIR-passes, excluding the debug liveness passes and DWARF emission.

Apologies for this patch only going up now, it was accidentally excluded from the patch stack until now. The changes here are relatively simple compared to the IR, debug liveness, and DWARF patches; MachineSink has slightly larger changes than the rest, but most cases are simply replacing accesses of the first debug operand, i.e. getDebugOperand(0), with an iteration over all debug operands.

[0] http://lists.llvm.org/pipermail/llvm-dev/2020-February/139376.html

Diff Detail

Event Timeline

StephenTozer created this revision.Dec 3 2020, 9:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 3 2020, 9:09 AM
StephenTozer requested review of this revision.Dec 3 2020, 9:09 AM

Rebased onto recent master.

aprantl accepted this revision.Dec 14 2020, 3:06 PM

Mechanically LGTM to me (one question inline).

llvm/lib/CodeGen/MachineSink.cpp
1011

why is this no longer calling the helper?

This revision is now accepted and ready to land.Dec 14 2020, 3:06 PM
scott.linder added inline comments.
llvm/lib/CodeGen/PrologEpilogInserter.cpp
1206

Couldn't this assert be retained as:

(isNotList && i ==0) || (isList && i > 1)

?

1252

I think this belongs to the parent commit?

Rebased onto recent master, fixed up MachineSink implementation.

This revision was landed with ongoing or failed builds.Mar 10 2021, 9:16 AM
This revision was automatically updated to reflect the committed changes.
yanok added a subscriber: yanok.Nov 8 2021, 12:40 PM

Just wanted to mention that this causes resulting assembly to be non-deterministic, see https://bugs.llvm.org/show_bug.cgi?id=52441