[all-commits] [llvm/llvm-project] f46321: [InstrRef][X86] Drop debug instruction numbers fro...
Jeremy Morse via All-commits
all-commits at lists.llvm.org
Mon Jul 19 07:08:47 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f46321207f7d28f21d0dfb3635933d1bd84b5e05
https://github.com/llvm/llvm-project/commit/f46321207f7d28f21d0dfb3635933d1bd84b5e05
Author: Jeremy Morse <jeremy.morse at sony.com>
Date: 2021-07-19 (Mon, 19 Jul 2021)
Changed paths:
M llvm/include/llvm/CodeGen/MachineInstr.h
M llvm/lib/Target/X86/X86FloatingPoint.cpp
M llvm/lib/Target/X86/X86InstrInfo.cpp
A llvm/test/DebugInfo/MIR/InstrRef/x86-fp-stackifier-drop-locations.mir
Log Message:
-----------
[InstrRef][X86] Drop debug instruction numbers from x87 instructions
Avoid a crash when using instruction referencing if x87 floating point
instructions are used. These instructions are significantly mutated when
they're rewritten from referring to registers, to referring to
floating-point-stack positions. As a result, their operands are re-ordered,
and (InstrRef) LiveDebugValues asserts when it sees a DBG_INSTR_REF
referring to a non-reg non-def register operand.
To fix this, drop the instruction numbers, and thus variable locations.
This patch adds a helper utility do do that.
Dropping the variable locations is sub-optimal, but applying DBG_VALUEs to
the $fp0 and similar registers is dropped on emission too. It seems we've
never done well at describing variables that live in x87 registers, at all.
Differential Revision: https://reviews.llvm.org/D105657
More information about the All-commits
mailing list