diff options
author | Matthias Braun <matze@braunis.de> | 2017-04-28 20:25:05 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2017-04-28 20:25:05 +0000 |
commit | 744c215e2958c13854c1d730a323132ce2dc9c57 (patch) | |
tree | 96e7d60fb654c50e5fa1fe56957b4c1d71472340 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | b3bc1ed0d414bb63fbf00427508989272d7fea86 (diff) | |
download | bcm5719-llvm-744c215e2958c13854c1d730a323132ce2dc9c57.tar.gz bcm5719-llvm-744c215e2958c13854c1d730a323132ce2dc9c57.zip |
TargetLowering: Add finalizeLowering() function; NFC
Adds a new method finalizeLowering to TargetLoweringBase. This is in
preparation for an upcoming commit.
This function is meant for target specific adjustments to
MachineFrameInfo or register reservations.
Move the freezeRegisters() and the hasCopyImplyingStackAdjustment()
handling into the new function to prove the concept. As an added bonus
GlobalISel no longer missed the hasCopyImplyingStackAdjustment()
handling with this.
Differential Revision: https://reviews.llvm.org/D32621
llvm-svn: 301679
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 9b9f45f0404..7474d5ab9dc 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -21,6 +21,7 @@ #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineJumpTableInfo.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/StackMaps.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/DerivedTypes.h" @@ -2108,3 +2109,7 @@ int TargetLoweringBase::getDivRefinementSteps(EVT VT, MachineFunction &MF) const { return getOpRefinementSteps(false, VT, getRecipEstimateForFunc(MF)); } + +void TargetLoweringBase::finalizeLowering(MachineFunction &MF) const { + MF.getRegInfo().freezeReservedRegs(MF); +} |