1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/lib
Jeremy Morse 0c18b2fb0d [DebugInstrRef] Handle DBG_INSTR_REFs use-before-defs in LiveDebugValues
Deciding where to place debugging instructions when normal instructions
sink between blocks is difficult -- see PR44117. Dealing with this with
instruction-referencing variable locations is simple: we just tolerate
DBG_INSTR_REFs referring to values that haven't been computed yet. This
patch adds support into InstrRefBasedLDV to record when a variable value
appears in the middle of a block, and should have a DBG_VALUE added when it
appears (a debug use before def).

While described simply, this relies heavily on the value-propagation
algorithm in InstrRefBasedLDV. The implementation doesn't attempt to verify
the location of a value unless something non-trivial occurs to merge
variable values in vlocJoin. This means that a variable with a value that
has no location can retain it across all control flow (including loops).
It's only when another debug instruction specifies a different variable
value that we have to check, and find there's no location.

This property means that if a machine value is defined in a block dominated
by a DBG_INSTR_REF that refers to it, all the successor blocks can
automatically find a location for that value (if it's not clobbered). Thus
in a sense, InstrRefBasedLDV is already supporting and implementing
use-before-defs. This patch allows us to specify a variable location in the
block where it's defined.

When loading live-in variable locations, TransferTracker currently discards
those where it can't find a location for the variable value. However, we
can tell from the machine value number whether the value is defined in this
block. If it is, add it to a set of use-before-def records. Then, once the
relevant instruction has been processed, emit a DBG_VALUE immediately after
it.

Differential Revision: https://reviews.llvm.org/D85775
2020-10-23 16:33:23 +01:00
..
Analysis [LSR] ignore profitable chain when reg num is not major cost. 2020-10-23 09:35:48 -04:00
AsmParser [IR] Adds mustprogress as a LLVM IR attribute 2020-10-20 03:09:57 -04:00
BinaryFormat [WebAssembly] Added .tabletype to asm and multiple table support in obj files 2020-10-13 07:52:23 -07:00
Bitcode Handle value uses wrapped in metadata for the use-list order 2020-10-20 20:05:59 +02:00
Bitstream [Bitstream] Use alignTo to make code more readable. NFC 2020-09-01 11:06:45 -07:00
CodeGen [DebugInstrRef] Handle DBG_INSTR_REFs use-before-defs in LiveDebugValues 2020-10-23 16:33:23 +01:00
DebugInfo Revert several changes related to llvm-symbolizer exiting non-zero on failure. 2020-10-21 15:21:44 -07:00
Demangle
DWARFLinker Revert "[DWARFLinker] Capitalize type names (NFC)" 2020-10-22 15:09:45 +07:00
ExecutionEngine Revert "[JITLink][ELF] Add support for ELF::R_X86_64_REX_GOTPCRELX relocation." 2020-10-22 23:21:29 -07:00
Extensions Remove unused variable(s) 2020-09-08 16:58:01 -07:00
FileCheck Reland [FileCheck] Move FileCheck implementation out of LLVMSupport into its own library 2020-09-01 14:59:28 +02:00
Frontend [OpenMP] Emit calls to int64_t functions for amdgcn 2020-10-22 15:02:47 +01:00
Fuzzer
FuzzMutate
InterfaceStub [llvm] Fix ODRViolations for VersionTuple YAML specializations NFC 2020-10-20 18:29:15 -07:00
IR [IR] Merge metadata manipulation code into Value 2020-10-23 11:08:26 +07:00
IRReader
LineEditor
Linker Reapply "OpaquePtr: Add type to sret attribute" 2020-10-16 11:05:02 -04:00
LTO Re-land [ThinLTO] Re-order modules for optimal multi-threaded processing 2020-10-13 21:54:15 -04:00
MC [MC] Adjust StringTableBuilder for linked Mach-O binaries 2020-10-22 19:19:41 -07:00
MCA [ARM][SchedModels] Convert IsPredicatedPred to MCSchedPredicate 2020-10-19 11:37:54 +03:00
Object Fix various format specifier mismatches 2020-10-18 12:39:15 -04:00
ObjectYAML Reland "[yaml2obj][ELF] - Simplify the code that performs sections validation." 2020-10-20 16:25:33 +03:00
Option [NFC] Fix the signature and definition of findByPrefix 2020-09-11 12:38:28 +01:00
Passes Port -instnamer to NPM 2020-10-22 12:08:36 -07:00
ProfileData [NFC][SampleFDO] Move some common stuff from SampleProfileReaderExtBinary/WriterExtBinary 2020-10-22 15:56:55 -07:00
Remarks
Support [X86] Add User Interrupts(UINTR) instructions 2020-10-22 17:33:07 +08:00
TableGen [TableGen] Change !getop and !setop to !getdagop and !setdagop. 2020-10-23 10:36:05 -04:00
Target [AMDGPU] Add simplification/combines for llvm.amdgcn.fma.legacy 2020-10-23 16:16:13 +01:00
Testing
TextAPI
ToolDrivers
Transforms [LSR] ignore profitable chain when reg num is not major cost. 2020-10-23 09:35:48 -04:00
WindowsManifest [CMake] Simplify CMake handling for libxml2 2020-09-09 21:44:44 -07:00
XRay
CMakeLists.txt Reland [FileCheck] Move FileCheck implementation out of LLVMSupport into its own library 2020-09-01 14:59:28 +02:00
LLVMBuild.txt