summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CallingConvLower.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-08-06 18:45:26 +0000
committerEric Christopher <echristo@gmail.com>2014-08-06 18:45:26 +0000
commitb5217507c7b6cb1e72109313e0980c55bddc534b (patch)
tree29f5b876c8951970cad1518d77cf065694d09d88 /llvm/lib/CodeGen/CallingConvLower.cpp
parent364d13170a62e006934cb5761c9bb90378304775 (diff)
downloadbcm5719-llvm-b5217507c7b6cb1e72109313e0980c55bddc534b.tar.gz
bcm5719-llvm-b5217507c7b6cb1e72109313e0980c55bddc534b.zip
Remove the target machine from CCState. Previously it was only used
to get the subtarget and that's accessible from the MachineFunction now. This helps clear the way for smaller changes where we getting a subtarget will require passing in a MachineFunction/Function as well. llvm-svn: 214988
Diffstat (limited to 'llvm/lib/CodeGen/CallingConvLower.cpp')
-rw-r--r--llvm/lib/CodeGen/CallingConvLower.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/CallingConvLower.cpp b/llvm/lib/CodeGen/CallingConvLower.cpp
index cfcc9eae14e..9c1cbaf971a 100644
--- a/llvm/lib/CodeGen/CallingConvLower.cpp
+++ b/llvm/lib/CodeGen/CallingConvLower.cpp
@@ -25,10 +25,9 @@
using namespace llvm;
CCState::CCState(CallingConv::ID CC, bool isVarArg, MachineFunction &mf,
- const TargetMachine &tm, SmallVectorImpl<CCValAssign> &locs,
- LLVMContext &C)
- : CallingConv(CC), IsVarArg(isVarArg), MF(mf), TM(tm),
- TRI(*TM.getSubtargetImpl()->getRegisterInfo()), Locs(locs), Context(C),
+ SmallVectorImpl<CCValAssign> &locs, LLVMContext &C)
+ : CallingConv(CC), IsVarArg(isVarArg), MF(mf),
+ TRI(*MF.getSubtarget().getRegisterInfo()), Locs(locs), Context(C),
CallOrPrologue(Unknown) {
// No stack is used.
StackOffset = 0;
@@ -51,7 +50,7 @@ void CCState::HandleByVal(unsigned ValNo, MVT ValVT,
if (MinAlign > (int)Align)
Align = MinAlign;
MF.getFrameInfo()->ensureMaxAlignment(Align);
- TM.getSubtargetImpl()->getTargetLowering()->HandleByVal(this, Size, Align);
+ MF.getSubtarget().getTargetLowering()->HandleByVal(this, Size, Align);
Size = unsigned(RoundUpToAlignment(Size, MinAlign));
unsigned Offset = AllocateStack(Size, Align);
addLoc(CCValAssign::getMem(ValNo, ValVT, Offset, LocVT, LocInfo));
OpenPOWER on IntegriCloud