diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2021-10-04 23:01:28 +0100 |
---|---|---|
committer | Jeremy Morse <jeremy.morse@sony.com> | 2021-10-04 23:03:02 +0100 |
commit | e2b838dd913200702f2eee29100a788c0573bc50 (patch) | |
tree | 50941f98f30a46f7b5225a75194efb4f2260c0bd /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 2568286892310877f24313c8e1626e415f9ae406 (diff) | |
download | llvm-e2b838dd913200702f2eee29100a788c0573bc50.zip llvm-e2b838dd913200702f2eee29100a788c0573bc50.tar.gz llvm-e2b838dd913200702f2eee29100a788c0573bc50.tar.bz2 |
[DebugInfo][InstrRef] Accept landingpad block arguments
This patch makes instruction-referencing accepts an additional scenario
where values can be read from physical registers at the start of blocks. As
far as I was aware, this only happened:
* With arguments in the entry block,
* With constant physical registers,
To which this patch adds a third case:
* With exception-handling landing-pad blocks
In the attached test: the operand of the dbg.value traces back to the
"landingpad" instruction, which becomes some copies from physregs. Right
now, that's deemed unacceptable, and the assertion fires. The fix is to
just accept this scenario; this is a case where the value in question is
defined by a register and a position, not by an instruction that defines
it. Reading it with a DBG_PHI is the correct behaviour, there isn't a
non-copy instruction that we can refer to.
Differential Revision: https://reviews.llvm.org/D109005
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 7da58fd..bd13c28 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -1148,11 +1148,11 @@ auto MachineFunction::salvageCopySSA(MachineInstr &MI) // locations. ; } else { - // Assert that this is the entry block. If it isn't, then there is some - // code construct we don't recognise that deals with physregs across - // blocks. + // Assert that this is the entry block, or an EH pad. If it isn't, then + // there is some code construct we don't recognise that deals with physregs + // across blocks. assert(!State.first.isVirtual()); - assert(&*InsertBB.getParent()->begin() == &InsertBB); + assert(&*InsertBB.getParent()->begin() == &InsertBB || InsertBB.isEHPad()); } // Create DBG_PHI for specified physreg. |