summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-08-04 21:25:23 +0000
committerEric Christopher <echristo@gmail.com>2014-08-04 21:25:23 +0000
commitd913448b38bab6ace92ae5057b917eb57035f83b (patch)
treef2050928fa5994c44fab60d66e7d89e7cc7d7a4f /llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
parentacc8ef273b1c3796b0fc7f19aa347115b4bc2ea4 (diff)
downloadbcm5719-llvm-d913448b38bab6ace92ae5057b917eb57035f83b.tar.gz
bcm5719-llvm-d913448b38bab6ace92ae5057b917eb57035f83b.zip
Remove the TargetMachine forwards for TargetSubtargetInfo based
information and update all callers. No functional change. llvm-svn: 214781
Diffstat (limited to 'llvm/lib/CodeGen/LocalStackSlotAllocation.cpp')
-rw-r--r--llvm/lib/CodeGen/LocalStackSlotAllocation.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp b/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
index 36885e8890d..69f1220a4c2 100644
--- a/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
+++ b/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
@@ -36,6 +36,7 @@
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetFrameLowering.h"
#include "llvm/Target/TargetRegisterInfo.h"
+#include "llvm/Target/TargetSubtargetInfo.h"
using namespace llvm;
@@ -102,7 +103,8 @@ INITIALIZE_PASS_END(LocalStackSlotPass, "localstackalloc",
bool LocalStackSlotPass::runOnMachineFunction(MachineFunction &MF) {
MachineFrameInfo *MFI = MF.getFrameInfo();
- const TargetRegisterInfo *TRI = MF.getTarget().getRegisterInfo();
+ const TargetRegisterInfo *TRI =
+ MF.getTarget().getSubtargetImpl()->getRegisterInfo();
unsigned LocalObjectCount = MFI->getObjectIndexEnd();
// If the target doesn't want/need this pass, or if there are no locals
@@ -183,7 +185,8 @@ void LocalStackSlotPass::AssignProtectedObjSet(const StackObjSet &UnassignedObjs
void LocalStackSlotPass::calculateFrameObjectOffsets(MachineFunction &Fn) {
// Loop over all of the stack objects, assigning sequential addresses...
MachineFrameInfo *MFI = Fn.getFrameInfo();
- const TargetFrameLowering &TFI = *Fn.getTarget().getFrameLowering();
+ const TargetFrameLowering &TFI =
+ *Fn.getTarget().getSubtargetImpl()->getFrameLowering();
bool StackGrowsDown =
TFI.getStackGrowthDirection() == TargetFrameLowering::StackGrowsDown;
int64_t Offset = 0;
@@ -272,8 +275,10 @@ bool LocalStackSlotPass::insertFrameReferenceRegisters(MachineFunction &Fn) {
bool UsedBaseReg = false;
MachineFrameInfo *MFI = Fn.getFrameInfo();
- const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo();
- const TargetFrameLowering &TFI = *Fn.getTarget().getFrameLowering();
+ const TargetRegisterInfo *TRI =
+ Fn.getTarget().getSubtargetImpl()->getRegisterInfo();
+ const TargetFrameLowering &TFI =
+ *Fn.getTarget().getSubtargetImpl()->getFrameLowering();
bool StackGrowsDown =
TFI.getStackGrowthDirection() == TargetFrameLowering::StackGrowsDown;
OpenPOWER on IntegriCloud