1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[LiveDebugValues] Add instruction-referencing LDV implementation

This patch imports the instruction-referencing implementation of
LiveDebugValues proposed here:

  http://lists.llvm.org/pipermail/llvm-dev/2020-June/142368.html

The new implementation is unreachable in this patch, it's the next patch
that enables it behind a command line switch. Briefly, rather than
tracking variable locations by just their location as the 'VarLoc'
implementation does, this implementation does it by value:
 * Each value defined in a function is numbered, and propagated through
   dataflow,
 * Each DBG_VALUE reads a machine value number from a machine location,
 * Variable _values_ are propagated through dataflow,
 * Variable values are translated back into locations, DBG_VALUEs
   inserted to specify where those locations are.

The ultimate aim of this is to enable referring to variable values
throughout post-isel code, rather than locations. Those patches will
build on top of this new LiveDebugValues implementation in later patches
-- it can't be done with the VarLoc implementation as we don't have
value information, only locations.

Differential Revision: https://reviews.llvm.org/D83047
This commit is contained in:
Jeremy Morse 2020-08-22 16:07:39 +01:00
parent d75baa4613
commit 82eef64a62
3 changed files with 3136 additions and 0 deletions

View File

@ -184,6 +184,7 @@ add_llvm_component_library(LLVMCodeGen
LiveDebugValues/LiveDebugValues.cpp
LiveDebugValues/VarLocBasedImpl.cpp
LiveDebugValues/InstrRefBasedImpl.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/CodeGen

File diff suppressed because it is too large Load Diff

View File

@ -28,4 +28,5 @@ public:
// Factory functions for LiveDebugValues implementations.
extern LDVImpl *makeVarLocBasedLiveDebugValues();
extern LDVImpl *makeInstrRefBasedLiveDebugValues();
} // namespace llvm