[PATCH] D70419: [DebugInfo] Support for DW_OP_implicit_pointer (for InstComb optimization)

Alok Kumar Sharma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 20:48:01 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 subscribers: llvm-commits, asbirlea, hiraditya.

This patch (6/N) stems from D69787 <https://reviews.llvm.org/D69787>

  Summary:
    This modification should include most optimizations under the scope of DW_OP_implicit_pointer, though only InstComb optimization has been validated.
  
    It makes more sense to give a try to preserve debug info whenever an instruction is being erased. In place of doing salvaging before any call-site where Instruction::eraseFromParent is being called, this modification makes salvaging part of deletion method itself. To do this salvaging methods have been moved from file Transforms/Utils/Local.cpp to files llvm/lib/IR/Instruction.cpp and llvm/lib/IR/Value.cpp
  
  Testing:
    - Added unit tests for validation of LLVM IR and object file thru llvm-dwarfdump
    - check-llvm, and an end-to-end test using gnu GDB to debug an optimized
       program (LLDB need to be enhanced to support).
    - check-debuginfo (the debug info integration tests)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70419

Files:
  llvm/include/llvm/IR/Instruction.h
  llvm/include/llvm/IR/Value.h
  llvm/include/llvm/Transforms/Utils/Local.h
  llvm/lib/CodeGen/CodeGenPrepare.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/IR/Instruction.cpp
  llvm/lib/IR/Value.cpp
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/lib/Transforms/Scalar/BDCE.cpp
  llvm/lib/Transforms/Scalar/DCE.cpp
  llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
  llvm/lib/Transforms/Scalar/EarlyCSE.cpp
  llvm/lib/Transforms/Scalar/GVN.cpp
  llvm/lib/Transforms/Scalar/LICM.cpp
  llvm/lib/Transforms/Scalar/SROA.cpp
  llvm/lib/Transforms/Utils/CodeExtractor.cpp
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
  llvm/test/DebugInfo/dwarfdump-implicit_pointer_instcomb.c
  llvm/test/DebugInfo/implicit_pointer_instcomb.c
  llvm/unittests/Transforms/Utils/LocalTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70419.229967.patch
Type: text/x-patch
Size: 35495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191119/ac7c7bf8/attachment.bin>


More information about the llvm-commits mailing list