[PATCH] D145565: [DebugInfo][InstrRef] Instrument x86 CMOV conversion to preserve variable values

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 03:01:25 PST 2023


jmorse created this revision.
jmorse added reviewers: StephenTozer, Orlando, CarlosAlbertoEnciso.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
jmorse requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

X86's CMOV conversion transforms CMOV instructions into control flow between blocks, meaning the value is computed by a PHI rather than a "real" machine instruction. In instruction-referencing mode, we need to transfer the instruction label between the old CMOV and the new PHI instruction to mark where the variable value is computed.

There's an extra complication in that memory operands can be unfolded from the CMOV and sunk into the new blocks -- the test checks both scenarios where the instruction number has to hop between instructions.

This omission exposed by Dexter testing :O !


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145565

Files:
  llvm/lib/Target/X86/X86CmovConversion.cpp
  llvm/test/DebugInfo/MIR/InstrRef/x86-cmov-converter.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145565.503289.patch
Type: text/x-patch
Size: 10276 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230308/94f3e591/attachment.bin>


More information about the llvm-commits mailing list