This is an archive of the discontinued LLVM Phabricator instance.

[mips] Implement eliminateCallFramePseudoInstr() in MipsFrameLowering. NFC.
ClosedPublic

Authored by vkalintiris on Mar 26 2015, 11:10 AM.

Details

Summary

Avoid duplicate code in Mips16FrameLowering and MipsSEFrameLowering by
providing an implementation of the eliminateCallFramePseudoInstr()
function from their base class.

Depends on D8640.

Diff Detail

Event Timeline

vkalintiris retitled this revision from to [mips] Implement eliminateCallFramePseudoInstr() in MipsFrameLowering. NFC..
vkalintiris updated this object.
vkalintiris edited the test plan for this revision. (Show Details)
vkalintiris added a reviewer: dsanders.
vkalintiris added a subscriber: Unknown Object (MLST).
echristo accepted this revision.Mar 26 2015, 12:44 PM
echristo added a reviewer: echristo.
echristo added a subscriber: echristo.

Random drive by comment. The rest LGTM.

-eric

lib/Target/Mips/MipsFrameLowering.cpp
139

Should probably get the ABI off of the TargetMachine. I'd like to (or someone should) remove the subtarget ones at some point and migrate everything to using TM for them.

This revision is now accepted and ready to land.Mar 26 2015, 12:44 PM
dsanders accepted this revision.Apr 1 2015, 11:29 AM
dsanders edited edge metadata.

Well spotted. LGTM

lib/Target/Mips/MipsFrameLowering.cpp
139

MipsSubtarget::isABI_N64() is just shorthand for TM.getABI().IsN64() at the moment. It's not that much shorter anymore so I agree we should move to using TM.getABI().IsN64() directly.

We should also rename STI to Subtarget here if the above change doesn't eliminate all the uses.. STI is normally the subtarget flags and not a MipsSubtarget object.

This revision was automatically updated to reflect the committed changes.