[PATCH] D43386: [DebugInfo][FastISel] Fix dropping dbg.value()

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 07:44:42 PST 2018


sdesmalen created this revision.
sdesmalen added reviewers: aprantl, dblaikie, probinson.
Herald added a subscriber: JDevlieghere.
sdesmalen edited the summary of this revision.

https://llvm.org/PR36263 shows that when compiling at -O0 a dbg.value()
instruction (that remains from an original dbg.declare()) is dropped
by FastISel. Since FastISel selects instructions by iterating a basic
block backwards, it drops the dbg.value if one of its operands is not
yet instantiated by a previously selected instruction.

Instead of calling 'lookUpRegForValue()' we can call 'getRegForValue()'
instead that will insert a placeholder for the operand to be filled in
when continuing the instruction selection.


https://reviews.llvm.org/D43386

Files:
  lib/CodeGen/SelectionDAG/FastISel.cpp
  test/CodeGen/Generic/dbg_value_fastisel.ll
  test/DebugInfo/X86/fission-ranges.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43386.134615.patch
Type: text/x-patch
Size: 5173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180216/a1989092/attachment.bin>


More information about the llvm-commits mailing list