[Lldb-commits] [PATCH] D70644: [DebugInfo] Support for DW_OP_implicit_pointer (llvm.dbg_derefval)

Alok Kumar Sharma via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Nov 24 10:01:20 PST 2019


alok created this revision.
alok added reviewers: aprantl, probinson, dblaikie, jmorse, jini.susan.george, SouraVX, awpandey.
alok added projects: LLVM, debug-info.
Herald added a reviewer: bollu.
Herald added subscribers: llvm-commits, lldb-commits, jdoerfert, asbirlea, george.burgess.iv, hiraditya.
Herald added a project: LLDB.
alok added a child revision: D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).
alok added a parent revision: D70643: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_implicit_pointer).

    This patch (3/N) stems from D69787 as suggested by
    This is suggested by @jmorse.
  
    New intrinsic llvm.dbg.derefval is introduced.
  
  Summary:
    Since dbg.value currently represents (VAR=VALUE), the new intrinsic dbg.derefval will represent de-referenced value (*VAR = VAL)
      - Below represents ptr=null
        call void @llvm.dbg.value(metadata i32* null, metadata !21, metadata !DIExpression())
      - And below represents *ptr=var
        call void @llvm.dbg.derefval(metadata !16, metadata !21, metadata !DIExpression(DW_OP_LLVM_implicit_pointer, DW_OP_LLVM_arg0, 0))
      - And below represents *ptr=arr[1]
        call void @llvm.dbg.derefval(metadata !16, metadata !21, metadata !DIExpression(DW_OP_LLVM_implicit_pointer, DW_OP_LLVM_arg0, 4))
      - We should be able to represent the case when a variable points to temporary (initialized by constant) and temporary is optimized out.
        tmp=[CONST]; ptr=&tmp;
        call void @llvm.dbg.derefval(metadata [CONST], metadata !21, metadata !DIExpression(DW_OP_LLVM_arg0))


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70644

Files:
  lldb/source/Expression/IRInterpreter.cpp
  llvm/docs/SourceLevelDebugging.rst
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
  llvm/include/llvm/CodeGen/MachineInstrBuilder.h
  llvm/include/llvm/IR/DIBuilder.h
  llvm/include/llvm/IR/InstVisitor.h
  llvm/include/llvm/IR/IntrinsicInst.h
  llvm/include/llvm/IR/Intrinsics.td
  llvm/lib/Analysis/MemorySSA.cpp
  llvm/lib/Analysis/ObjCARCInstKind.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
  llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
  llvm/lib/CodeGen/LiveDebugValues.cpp
  llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  llvm/lib/IR/DIBuilder.cpp
  llvm/lib/IR/IntrinsicInst.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  polly/lib/Support/ScopHelper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70644.230800.patch
Type: text/x-patch
Size: 27469 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191124/6178ee69/attachment-0001.bin>


More information about the lldb-commits mailing list