[ARM][NFC] Tidy up subtarget frame pointer routines
authorTomas Matheson <tomas.matheson@arm.com>
Thu, 17 Jun 2021 18:11:25 +0000 (19:11 +0100)
committerTomas Matheson <tomas.matheson@arm.com>
Sat, 19 Jun 2021 16:00:45 +0000 (17:00 +0100)
commit18dbe6897857944653ee8f68dca8d63bc38aaff8
tree2c4bb8a6d31d50fedfbd43b3109a4ee140e0cab8
parent9abaf5c359ca29fcdd4f42b72ae0a62f18626180
[ARM][NFC] Tidy up subtarget frame pointer routines

getFramePointerReg only depends on information in ARMSubtarget,
so move it in there so it can be accessed from more places.

Make use of ARMSubtarget::getFramePointerReg to remove duplicated code.

The main use of useR7AsFramePointer is getFramePointerReg, so inline it.

Differential Revision: https://reviews.llvm.org/D104476
llvm/lib/Target/ARM/ARMAsmPrinter.cpp
llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
llvm/lib/Target/ARM/ARMFrameLowering.cpp
llvm/lib/Target/ARM/ARMSubtarget.h
llvm/lib/Target/ARM/Thumb1FrameLowering.cpp