Page MenuHomePhabricator

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

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)