This is an archive of the discontinued LLVM Phabricator instance.

Target RegisterInfo: devirtualize TargetFrameLowering
ClosedPublic

Authored by jfb on Jul 9 2015, 6:32 PM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

jfb updated this revision to Diff 29416.Jul 9 2015, 6:32 PM
jfb retitled this revision from to Target RegisterInfo: devirtualize TargetFrameLowering.
jfb updated this object.
jfb added subscribers: llvm-commits, sunfish.

I'm not the person to sign off on this, but FWIW this LGTM.

echristo accepted this revision.Jul 10 2015, 9:35 AM
echristo added a reviewer: echristo.
echristo added a subscriber: echristo.

Sure, this seems reasonable to me.

-eric

This revision is now accepted and ready to land.Jul 10 2015, 9:35 AM
This revision was automatically updated to reflect the committed changes.