llvm-mirror/include/llvm/IR
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
..
Argument.h
AssemblyAnnotationWriter.h
Attributes.h IR: fix documentation markup 2018-06-13 17:51:27 +00:00
Attributes.td Add the ShadowCallStack attribute 2018-04-03 20:10:40 +00:00
AutoUpgrade.h [IR] Upgrade comment token in objc retain release marker for asm call 2018-04-17 04:02:24 +00:00
BasicBlock.h Rename skipDebugInfo -> skipDebugIntrinsics, NFC 2018-06-26 21:16:59 +00:00
CallingConv.h Remove @brief commands from doxygen comments, too. 2018-05-01 16:10:38 +00:00
CallSite.h
CFG.h [STLExtras] Add distance() for ranges, pred_size(), and succ_size() 2018-05-10 23:01:54 +00:00
CMakeLists.txt [IR] Split Intrinsics.inc into enums and implementations 2018-06-23 02:02:38 +00:00
Comdat.h [LLVM-C] [bindings/go] Add C and Golang bindings for COMDAT 2018-03-14 18:33:53 +00:00
Constant.h [Constant] add undef element query for vector constants; NFC 2018-07-06 14:52:36 +00:00
ConstantFolder.h
ConstantRange.h Remove @brief commands from doxygen comments, too. 2018-05-01 16:10:38 +00:00
Constants.h [Constants] extend getBinOpIdentity(); NFC 2018-07-06 15:18:58 +00:00
DataLayout.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
DebugInfo.h [DebugInfo][OPT] NFC follow-up on "Fixing a couple of DI duplication bugs of CloneModule" 2018-04-13 21:23:11 +00:00
DebugInfoFlags.def [CodeView] Initial support for emitting S_THUNK32 symbols for compiler... 2018-04-16 16:53:57 +00:00
DebugInfoMetadata.h [Local] replaceAllDbgUsesWith: Update debug values before RAUW 2018-07-06 17:32:39 +00:00
DebugLoc.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
DerivedTypes.h Remove @brief commands from doxygen comments, too. 2018-05-01 16:10:38 +00:00
DerivedUser.h
DiagnosticHandler.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
DiagnosticInfo.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
DiagnosticPrinter.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
DIBuilder.h [DebugInfo] Refactoring DIType::setFlags to DIType::cloneWithFlags, NFC 2018-06-01 23:15:09 +00:00
Dominators.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
DomTreeUpdater.h [Dominators] Add DomTreeUpdater constructor from DT* and PDT* 2018-07-04 18:37:15 +00:00
Function.h Add remarks describing when a pass changes the IR instruction count of a module 2018-05-18 17:26:39 +00:00
GetElementPtrTypeIterator.h
GlobalAlias.h
GlobalIFunc.h
GlobalIndirectSymbol.h
GlobalObject.h Extend the GlobalObject metadata interface 2018-05-31 13:29:58 +00:00
GlobalValue.h Remove @brief commands from doxygen comments, too. 2018-05-01 16:10:38 +00:00
GlobalVariable.h
GVMaterializer.h
InlineAsm.h
InstIterator.h
InstrTypes.h Remove @brief commands from doxygen comments, too. 2018-05-01 16:10:38 +00:00
Instruction.def
Instruction.h [IR] fix typo in comment; NFC 2018-06-21 22:25:42 +00:00
Instructions.h Improve ConvertDebugDeclareToDebugValue 2018-06-26 06:17:00 +00:00
InstVisitor.h [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
IntrinsicInst.h Re-apply "[DebugInfo] Check size of variable in ConvertDebugDeclareToDebugValue" 2018-06-15 13:48:55 +00:00
Intrinsics.h [IR] Split Intrinsics.inc into enums and implementations 2018-06-23 02:02:38 +00:00
Intrinsics.td Implement strip.invariant.group 2018-07-02 04:49:30 +00:00
IntrinsicsAArch64.td [AArch64] Implement FLT_ROUNDS macro. 2018-06-20 12:09:01 +00:00
IntrinsicsAMDGPU.td [AMDGPU] Overload llvm.amdgcn.fmad.ftz to support f16 2018-06-28 15:24:46 +00:00
IntrinsicsARM.td [NEON] Support vldNq intrinsics in AArch32 (LLVM part) 2018-06-27 13:57:52 +00:00
IntrinsicsBPF.td
IntrinsicsHexagon.td [Hexagon] Fix flags for store-related intrinsics 2018-03-30 14:57:01 +00:00
IntrinsicsMips.td
IntrinsicsNVVM.td [NVPTX, CUDA] Added support for m8n32k16 and m32n8k16 variants of wmma instructions. 2018-04-18 21:51:48 +00:00
IntrinsicsPowerPC.td [PowerPC] Mark the BDNZ intrinsic as NoDuplicate 2018-04-17 13:07:01 +00:00
IntrinsicsSystemZ.td
IntrinsicsWebAssembly.td [WebAssembly] Update to the new names for the memory intrinsics. 2018-05-31 22:35:25 +00:00
IntrinsicsX86.td [X86] Remove FMA4 scalar intrinsics. Use llvm.fma intrinsic instead. 2018-07-06 07:14:41 +00:00
IntrinsicsXCore.td
IRBuilder.h Implement strip.invariant.group 2018-07-02 04:49:30 +00:00
IRPrintingPasses.h [Debugify] Add -debugify-each for testing each pass in a pipeline 2018-05-15 00:29:27 +00:00
LegacyPassManager.h
LegacyPassManagers.h Add remarks describing when a pass changes the IR instruction count of a module 2018-05-18 17:26:39 +00:00
LegacyPassNameParser.h
LLVMContext.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
Mangler.h
MDBuilder.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
Metadata.def [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
Metadata.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
Module.h Add remarks describing when a pass changes the IR instruction count of a module 2018-05-18 17:26:39 +00:00
ModuleSlotTracker.h
ModuleSummaryIndex.h [ThinLTO] Print names in function import debug messages when available 2018-06-27 18:03:39 +00:00
ModuleSummaryIndexYAML.h Use branch funnels for virtual calls when retpoline mitigation is enabled. 2018-03-09 19:11:44 +00:00
NoFolder.h
OperandTraits.h
Operator.h FastMathFlags: Make it easier to unset individual ones. 2018-05-24 15:15:27 +00:00
OptBisect.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
PassManager.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
PassManagerInternal.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
PatternMatch.h [PatternMatch] allow undef elements in vectors with m_Neg 2018-07-01 13:42:57 +00:00
PredIteratorCache.h
ProfileSummary.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
SafepointIRVerifier.h
Statepoint.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
SymbolTableListTraits.h
TrackingMDRef.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
Type.h [Local] replaceAllDbgUsesWith: Update debug values before RAUW 2018-07-06 17:32:39 +00:00
TypeBuilder.h
TypeFinder.h
Use.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
UseListOrder.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
User.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
Value.def
Value.h In thin and full LTO + CFI, direct function calls may go through jump table 2018-06-04 18:18:12 +00:00
ValueHandle.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
ValueMap.h NFC: delete ValueMap move ctor 2018-04-08 12:23:58 +00:00
ValueSymbolTable.h Remove @brief commands from doxygen comments, too. 2018-05-01 16:10:38 +00:00
Verifier.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00