llvm-project/llvm/unittests
Vedant Kumar 6379a62250 [Local] replaceAllDbgUsesWith: Update debug values before RAUW
The replaceAllDbgUsesWith utility helps passes preserve debug info when
replacing one value with another.

This improves upon the existing insertReplacementDbgValues API by:

- Updating debug intrinsics in-place, while preventing use-before-def of
  the replacement value.
- Falling back to salvageDebugInfo when a replacement can't be made.
- Moving the responsibiliy for rewriting llvm.dbg.* DIExpressions into
  common utility code.

Along with the API change, this teaches replaceAllDbgUsesWith how to
create DIExpressions for three basic integer and pointer conversions:

- The no-op conversion. Applies when the values have the same width, or
  have bit-for-bit compatible pointer representations.
- Truncation. Applies when the new value is wider than the old one.
- Zero/sign extension. Applies when the new value is narrower than the
  old one.

Testing:

- check-llvm, check-clang, a stage2 `-g -O3` build of clang,
  regression/unit testing.
- This resolves a number of mis-sized dbg.value diagnostics from
  Debugify.

Differential Revision: https://reviews.llvm.org/D48676

llvm-svn: 336451
2018-07-06 17:32:39 +00:00
..
ADT [OpenEmbedded] Add OpenEmbedded vendor 2018-07-05 23:41:17 +00:00
Analysis [PhiValues] Adjust unit test to invalidate instructions before deleting them 2018-06-28 15:17:07 +00:00
AsmParser
BinaryFormat Re-land: [MachO] Fixing ub in MachO BinaryFormat 2018-06-03 20:33:42 +00:00
Bitcode Pass a reference to a module to the bitcode writer. 2018-02-14 19:11:32 +00:00
CodeGen [GISel]: Pattern matchers for GFSUB, GFNEG 2018-05-31 19:30:01 +00:00
DebugInfo Move some code from PDBFileBuilder to MSFBuilder. 2018-06-27 21:18:15 +00:00
Demangle [demangler] Add ItaniumPartialDemangler::isCtorOrDtor 2018-05-24 06:57:57 +00:00
ExecutionEngine [ORC] Add a symbolAliases function to the Core APIs. 2018-06-26 01:22:29 +00:00
FuzzMutate [FuzzMutate] Inst deleter doesn't work with PhiNodes 2018-01-25 09:22:18 +00:00
IR [Dominators] Add DomTreeUpdater constructor from DT* and PDT* 2018-07-04 18:37:15 +00:00
LineEditor
Linker Inline a few CMake variables into their only uses. 2018-05-14 19:23:31 +00:00
MC [WebAssembly] Fixed disassembler unit test failure. 2018-06-19 00:02:34 +00:00
MI [LiveIntervals] Handle moving up dead partial write 2018-02-26 14:42:13 +00:00
Object Fix unittest for buildbot with mips host (32bit big endian) from r295174 2017-02-15 16:03:22 +00:00
ObjectYAML
Option Re-revert "[Option] Fix PR37006 prefix choice in findNearest" 2018-05-19 16:21:01 +00:00
Passes Fix build warning compiling TestPlugin on Windows and disable Passes plugin stuff on Windows since it fundamentally can't work 2018-05-19 03:05:30 +00:00
ProfileData [NFC] Change sample profile format enum name SPF_Raw_Binary to SPF_Binary. 2018-06-12 05:53:49 +00:00
Support [Support] Make support types more easily printable. 2018-07-06 05:45:45 +00:00
Target [WebAssembly] Add WebAssemblyException information analysis 2018-06-25 01:20:21 +00:00
Transforms [Local] replaceAllDbgUsesWith: Update debug values before RAUW 2018-07-06 17:32:39 +00:00
XRay Inline a few CMake variables into their only uses. 2018-05-14 19:23:31 +00:00
tools [llvm-exegesis] Adjust AArch64 unit test 2018-07-03 10:52:20 +00:00
CMakeLists.txt alphabetize list 2018-05-14 18:23:05 +00:00