llvm-mirror/include/llvm
Vedant Kumar 7e4e253821 [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 CallGraphSCCPass: iterate over all functions. 2018-07-06 08:04:47 +00:00
Analysis [UnrollAndJam] New Unroll and Jam pass 2018-07-01 12:47:30 +00:00
AsmParser [ThinLTO] Parse module summary index from assembly 2018-06-26 13:56:49 +00:00
BinaryFormat [llvm-readobj] Add experimental support for SHT_RELR sections 2018-06-28 21:07:34 +00:00
Bitcode Fix for llvm-dis/llvm-bcanalyzer overflows 2018-06-04 19:20:02 +00:00
CodeGen [MachineOutliner] Fix typo in getOutliningCandidateInfo function name 2018-07-04 15:37:08 +00:00
Config
DebugInfo Pass DWARFUnit to verifier by reference not by value. I am moderately 2018-06-29 19:17:44 +00:00
Demangle Move Compiler.h from Demangle back to Support 2018-06-04 22:53:38 +00:00
ExecutionEngine [ORC] In CompileOnDemandLayer2, clone modules on to different contexts by 2018-07-05 19:01:27 +00:00
FuzzMutate
IR [Local] replaceAllDbgUsesWith: Update debug values before RAUW 2018-07-06 17:32:39 +00:00
IRReader
LineEditor
Linker
LTO IRGen: Write .dwo files when -split-dwarf-file is used together with -fthinlto-index. 2018-05-31 18:25:59 +00:00
MC [MC] Error on a .zerofill directive in a non-virtual section 2018-07-02 17:29:43 +00:00
Object [llvm-objdump] Add --file-headers (-f) option 2018-07-04 15:25:03 +00:00
ObjectYAML
Option
Passes
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
TableGen TableGen/SearchableTables: Support more generic enums and tables 2018-06-21 13:36:22 +00:00
Target [MachineOutliner] Add support for target-default outlining. 2018-06-30 03:56:03 +00:00
Testing/Support
ToolDrivers
Transforms [Local] replaceAllDbgUsesWith: Update debug values before RAUW 2018-07-06 17:32:39 +00:00
WindowsManifest
WindowsResource
XRay
CMakeLists.txt
InitializePasses.h [UnrollAndJam] New Unroll and Jam pass 2018-07-01 12:47:30 +00:00
LinkAllIR.h
LinkAllPasses.h [UnrollAndJam] New Unroll and Jam pass 2018-07-01 12:47:30 +00:00
module.modulemap Reappl "[Dominators] Add the DomTreeUpdater class" 2018-07-03 02:06:23 +00:00
module.modulemap.build
Pass.h
PassAnalysisSupport.h
PassInfo.h
PassRegistry.h
PassSupport.h