[STATEPOINT] Force implicit-def for lr register.
authorSerguei Katkov <serguei.katkov@azul.com>
Tue, 5 Oct 2021 04:00:53 +0000 (11:00 +0700)
committerSerguei Katkov <serguei.katkov@azul.com>
Tue, 16 Nov 2021 05:52:00 +0000 (12:52 +0700)
commit0ecb12a27ff63eca481cef5ed67ce654a8f111b4
tree112f87bc22c52f297931daa872d7370e05b7ffcc
parent94992670fcc59d12d7f97cb08beb8d2eb15110ed
[STATEPOINT] Force implicit-def for lr register.

STATEPOINT instruction behavior is similar to call instruction.
In aarch64 BL instruction implicitly define lr register, so
STATEPOINT instruction should do the same.
However STATEPOINT is a general pseudo instruction and I could not find
a way to override list of implicit defs for specific target.

So this patch post processes inserting STATEPOINT instruction by
adding implisit dead def for lr.

Reviewers: reames, loicottet, ostannard
Reviewed By: reames
Subscribers: danilaml, hiraditya, kristof.beyls, llvm-commits, yrouban
Differential Revision: https://reviews.llvm.org/D111114
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/statepoint-call-lowering.ll