diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2009-04-17 20:42:34 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2009-04-17 20:42:34 +0000 |
| commit | b0b10f8bf6bf9e8732188f38df1925c5d2d8219e (patch) | |
| tree | a4db332ba1281cffc3b87f33e65d5cfa8ab50f3b /llvm/lib/Target | |
| parent | deeaf70dad1e2b25eeb583227d9d5ff3f8bbc395 (diff) | |
| download | bcm5719-llvm-b0b10f8bf6bf9e8732188f38df1925c5d2d8219e.tar.gz bcm5719-llvm-b0b10f8bf6bf9e8732188f38df1925c5d2d8219e.zip | |
Move the AddLiveIn function definition closer to its uses.
llvm-svn: 69382
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index 2f330f8a07d..fdcccffd877 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -478,17 +478,6 @@ static bool RetCC_ARM_AAPCS_Custom_f64(unsigned &ValNo, MVT &ValVT, MVT &LocVT, State); } -/// AddLiveIn - This helper function adds the specified physical register to the -/// MachineFunction as a live in value. It also creates a corresponding virtual -/// register for it. -static unsigned AddLiveIn(MachineFunction &MF, unsigned PReg, - const TargetRegisterClass *RC) { - assert(RC->contains(PReg) && "Not the correct regclass!"); - unsigned VReg = MF.getRegInfo().createVirtualRegister(RC); - MF.getRegInfo().addLiveIn(PReg, VReg); - return VReg; -} - /// LowerCallResult - Lower the result values of an ISD::CALL into the /// appropriate copies out of appropriate physical registers. This assumes that /// Chain/InFlag are the input chain/flag to use, and that TheCall is the call @@ -1064,6 +1053,17 @@ static SDValue LowerVASTART(SDValue Op, SelectionDAG &DAG, return DAG.getStore(Op.getOperand(0), dl, FR, Op.getOperand(1), SV, 0); } +/// AddLiveIn - This helper function adds the specified physical register to the +/// MachineFunction as a live-in value. It also creates a corresponding virtual +/// register for it. +static unsigned AddLiveIn(MachineFunction &MF, unsigned PReg, + const TargetRegisterClass *RC) { + assert(RC->contains(PReg) && "Not the correct regclass!"); + unsigned VReg = MF.getRegInfo().createVirtualRegister(RC); + MF.getRegInfo().addLiveIn(PReg, VReg); + return VReg; +} + SDValue ARMTargetLowering::LowerFORMAL_ARGUMENTS(SDValue Op, SelectionDAG &DAG) { MachineFunction &MF = DAG.getMachineFunction(); |

