Page MenuHomePhabricator

[DebugInfo] Support for DW_OP_implicit_pointer (for InstComb optimization)
Needs ReviewPublic

Authored by alok on Mon, Nov 18, 8:47 PM.

Details

Summary

This patch (9/N) stems from 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)

Diff Detail

Event Timeline

alok created this revision.Mon, Nov 18, 8:47 PM
alok updated this revision to Diff 230812.Sun, Nov 24, 10:35 AM
alok edited the summary of this revision. (Show Details)

Updated to rebase due to changes in trunk and parent patches.

alok updated this revision to Diff 230835.Sun, Nov 24, 10:13 PM

Updated to rebase due to change in parent patch D70260.