[PATCH] D11093: Target RegisterInfo: devirtualize TargetFrameLowering

JF Bastien jfb at chromium.org
Thu Jul 9 18:32:12 PDT 2015


jfb created this revision.
jfb added subscribers: llvm-commits, sunfish.
Herald added subscribers: jfb, ted.

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.

http://reviews.llvm.org/D11093

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11093.29416.patch
Type: text/x-patch
Size: 19969 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150710/b02a4242/attachment.bin>


More information about the llvm-commits mailing list