Target RegisterInfo: devirtualize TargetFrameLowering
authorJF Bastien <jfb@google.com>
Fri, 10 Jul 2015 18:13:17 +0000 (18:13 +0000)
committerJF Bastien <jfb@google.com>
Fri, 10 Jul 2015 18:13:17 +0000 (18:13 +0000)
commit99cb9895937482e36f15770ec97cb5bf3ad0c18d
treea433a049096d702d0bf25028b1ca3fc48ee32b33
parent892af54a915f82701c3bd39849452266852610a1
Target RegisterInfo: devirtualize TargetFrameLowering

Summary:
The target frame lowering's concrete type is always known in RegisterInfo, yet it's only sometimes devirtualized through a static_cast. This change adds an auto-generated static function <Target>GenRegisterInfo::getFrameLowering(const MachineFunction &MF) which does this devirtualization, and uses this function in all targets which can.

This change was suggested by sunfish in D11070 for WebAssembly, I figure that I may as well improve the other targets while I'm here.

Subscribers: sunfish, ted, llvm-commits, jfb

Differential Revision: http://reviews.llvm.org/D11093

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241921 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64RegisterInfo.cpp
lib/Target/ARM/ARMBaseRegisterInfo.cpp
lib/Target/Hexagon/HexagonRegisterInfo.cpp
lib/Target/MSP430/MSP430RegisterInfo.cpp
lib/Target/PowerPC/PPCRegisterInfo.cpp
lib/Target/SystemZ/SystemZRegisterInfo.cpp
lib/Target/X86/X86RegisterInfo.cpp
lib/Target/XCore/XCoreRegisterInfo.cpp
utils/TableGen/RegisterInfoEmitter.cpp