]> granicus.if.org Git - llvm/commit
[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)
commit13e21d90455e62c2f11aa931e8b9bf8675fd091c
treebc8781b40a163fe42ab7dd637e28ccbb1937c7e9
parenta39bc3c640c1e93d07beb35dc8dc9e96c5f51196
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310422 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64InstrInfo.cpp
test/CodeGen/AArch64/machine-outliner.mir [new file with mode: 0644]