This is an archive of the discontinued LLVM Phabricator instance.

[LiveDebugValues] 3/4 Add Xclang and CodeGen options for using instr-ref variable locations
ClosedPublic

Authored by jmorse on Jul 2 2020, 7:03 AM.

Details

Summary

(Context: this thread http://lists.llvm.org/pipermail/llvm-dev/2020-June/142368.html )

This patch adds the -Xclang option "-fexperimental-debug-variable-locations" and same LLVM CodeGen option, to pick which variable location tracking solution to use.

Right now all the switch does is pick which LiveDebugValues implementation to use. Over time however, my aim is to add fragments of support in aid of this value-tracking RFC, also controlled by this command line switch. That will slowly move variable locations to be defined by an instruction calculating a value, and a DBG_INSTR_REF instruction referring to that value. Thus, this is going to grow into a "use the new kind of variable locations" switch, rather than just "use the new LiveDebugValues implementation".

Diff Detail

Event Timeline

jmorse created this revision.Jul 2 2020, 7:03 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 2 2020, 7:03 AM

Please add a test case for the Driver option (you can take a look into existing ones within clang/test/Driver/).

jmorse updated this revision to Diff 276040.Jul 7 2020, 6:46 AM

(Rebase, only affecting LiveDebugValues.cpp)

jmorse updated this revision to Diff 286814.Aug 20 2020, 7:31 AM

Add a test for the driver -Xclang option. As far as I understand this, we're just checking that the switch is accepted by the driver, not that it does anything in particular (please correct me if I'm wrong).

djtodoro accepted this revision.Aug 24 2020, 2:30 AM

nit included, otherwise lgtm, thanks!

llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp
45

is this clang-formatted?

This revision is now accepted and ready to land.Aug 24 2020, 2:30 AM