[llvm-commits] [llvm] r111864 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp

Eric Christopher echristo at apple.com
Mon Aug 23 16:28:04 PDT 2010


Author: echristo
Date: Mon Aug 23 18:28:04 2010
New Revision: 111864

URL: http://llvm.org/viewvc/llvm-project?rev=111864&view=rev
Log:
Don't need the extra register here.

Modified:
    llvm/trunk/lib/Target/ARM/ARMFastISel.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=111864&r1=111863&r2=111864&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Mon Aug 23 18:28:04 2010
@@ -370,23 +370,21 @@
   // Since the offset may be too large for the load instruction
   // get the reg+offset into a register.
   // TODO: Optimize this somewhat.
-  // FIXME: There is more than one register class in the world...
-  unsigned ScratchReg
-    = FuncInfo.MF->getRegInfo().createVirtualRegister(ARM::GPRRegisterClass);
   ARMCC::CondCodes Pred = ARMCC::AL;
   unsigned PredReg = 0;
   
   if (!AFI->isThumbFunction())
     emitARMRegPlusImmediate(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
-                            ScratchReg, Reg, Offset, Pred, PredReg,
+                            Reg, Reg, Offset, Pred, PredReg,
                             static_cast<const ARMBaseInstrInfo&>(TII));
   else {
     assert(AFI->isThumb2Function());
     emitT2RegPlusImmediate(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
-                           ScratchReg, Reg, Offset, Pred, PredReg,
+                           Reg, Reg, Offset, Pred, PredReg,
                            static_cast<const ARMBaseInstrInfo&>(TII));
   } 
-    
+  
+  // FIXME: There is more than one register class in the world...
   unsigned ResultReg = createResultReg(ARM::GPRRegisterClass);
   AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
                           TII.get(ARM::LDR), ResultReg)





More information about the llvm-commits mailing list