1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/include/llvm/Transforms
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
..
AggressiveInstCombine Fix some layering in AggressiveInstCombine (avoiding inclusion of Scalar.h) 2018-04-24 15:40:07 +00:00
InstCombine Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
Instrumentation Revert "Add support for generating a call graph profile from Branch Frequency Info." 2018-06-28 13:15:03 +00:00
IPO [ThinLTO] Port InlinerFunctionImportStats handling to new PM 2018-06-28 20:07:47 +00:00
Scalar [UnrollAndJam] New Unroll and Jam pass 2018-07-01 12:47:30 +00:00
Utils [Local] replaceAllDbgUsesWith: Update debug values before RAUW 2018-07-06 17:32:39 +00:00
Vectorize Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
Coroutines.h [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00
Instrumentation.h Revert r335306 (and r335314) - the Call Graph Profile pass. 2018-06-22 05:33:57 +00:00
IPO.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
ObjCARC.h
Scalar.h [UnrollAndJam] New Unroll and Jam pass 2018-07-01 12:47:30 +00:00
Utils.h [instsimplify] Move the instsimplify pass to use more obvious file names 2018-06-29 23:36:03 +00:00
Vectorize.h Remove @brief commands from doxygen comments, too. 2018-05-01 16:10:38 +00:00