[MachineOutliner] Ensure AArch64 outliner doesn't mess with W30 or LR
authorJessica Paquette <jpaquette@apple.com>
Tue, 8 Aug 2017 21:51:26 +0000 (21:51 +0000)
committerJessica Paquette <jpaquette@apple.com>
Tue, 8 Aug 2017 21:51:26 +0000 (21:51 +0000)
commitd36945bf3a67fabfb5e28726deaede4295dcc574
tree16e29db015f751815536612f5bc8dc508bacbf34
parentbb9106ac4b8c3c7bf2c7c12d484c1eea60707b76
[MachineOutliner] Ensure AArch64 outliner doesn't mess with W30 or LR

Before, the outliner would mark all instructions that read from/modify LR as
illegal. This doesn't handle W30, which overlaps with LR. This shouldn't be
outlined.

This commit fixes that by making modifiesRegister() and readsRegister() look at
W30 + take in a TRI argument. This makes sure that modifiesRegister() and
readsRegister() won't outline either of W30 and LR.

https://reviews.llvm.org/D36435

llvm-svn: 310422
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/test/CodeGen/AArch64/machine-outliner.mir [new file with mode: 0644]