[llvm] r193540 - [mips] Simplify LowerFormalArguments using getRegClassFor.
Akira Hatanaka
ahatanaka at mips.com
Mon Oct 28 14:21:36 PDT 2013
Author: ahatanak
Date: Mon Oct 28 16:21:36 2013
New Revision: 193540
URL: http://llvm.org/viewvc/llvm-project?rev=193540&view=rev
Log:
[mips] Simplify LowerFormalArguments using getRegClassFor.
No functionality change.
Modified:
llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=193540&r1=193539&r2=193540&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Mon Oct 28 16:21:36 2013
@@ -2598,22 +2598,9 @@ MipsTargetLowering::LowerFormalArguments
// Arguments stored on registers
if (IsRegLoc) {
- EVT RegVT = VA.getLocVT();
+ MVT RegVT = VA.getLocVT();
unsigned ArgReg = VA.getLocReg();
- const TargetRegisterClass *RC;
-
- if (RegVT == MVT::i32)
- RC = Subtarget->inMips16Mode()? &Mips::CPU16RegsRegClass :
- &Mips::GPR32RegClass;
- else if (RegVT == MVT::i64)
- RC = &Mips::GPR64RegClass;
- else if (RegVT == MVT::f32)
- RC = &Mips::FGR32RegClass;
- else if (RegVT == MVT::f64)
- RC = Subtarget->isFP64bit() ? &Mips::FGR64RegClass :
- &Mips::AFGR64RegClass;
- else
- llvm_unreachable("RegVT not supported by FormalArguments Lowering");
+ const TargetRegisterClass *RC = getRegClassFor(RegVT);
// Transform the arguments stored on
// physical registers into virtual ones
More information about the llvm-commits
mailing list