[PATCH] D48676: [Local] Teach insertReplacementDbgValues basic integer/pointer conversions

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 27 17:52:41 PDT 2018


vsk updated this revision to Diff 153226.
vsk marked an inline comment as done.
vsk added a comment.

In this update I've taken @aprantl's suggestion and used DW_OP_dup to get the sign-extension down to one dbg.value. This is a neat simplification. One benefit is that LLDB actually understands DW_OP_dup :). The failing "LdOpcode" example now works:

      frame #0: 0x0000000100077f24 llc`(anonymous namespace)::X86AvoidSFBPass::runOnMachineFunction(llvm::MachineFunction&) [inlined] isPotentialBlockedMemCpyPair(LdOpcode=1899, StOpcode=1898) at X86AvoidStoreForwardingBlocks.cpp:162 [opt]
     159  }
     160 
     161  static bool isPotentialBlockedMemCpyPair(int LdOpcode, int StOpcode) {
  -> 162    switch (LdOpcode) {
     163    case X86::MOVUPSrm:
     164    case X86::MOVAPSrm:
     165      return StOpcode == X86::MOVUPSmr || StOpcode == X86::MOVAPSmr;
  Target 0: (llc) stopped.
  (lldb) p LdOpcode
  (int) $0 = 1899


https://reviews.llvm.org/D48676

Files:
  include/llvm/IR/DebugInfoMetadata.h
  include/llvm/Transforms/Utils/Local.h
  lib/CodeGen/AsmPrinter/DwarfExpression.cpp
  lib/IR/DebugInfoMetadata.cpp
  lib/Transforms/InstCombine/InstCombineCasts.cpp
  lib/Transforms/Utils/Local.cpp
  test/Transforms/InstCombine/cast-set-preserve-signed-dbg-val.ll
  test/Transforms/InstCombine/dce-iterate.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48676.153226.patch
Type: text/x-patch
Size: 15494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180628/d4a55625/attachment.bin>


More information about the llvm-commits mailing list