[llvm-branch-commits] [llvm-branch] r118520 - /llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp

Daniel Dunbar daniel at zuster.org
Tue Nov 9 09:27:57 PST 2010


Author: ddunbar
Date: Tue Nov  9 11:27:57 2010
New Revision: 118520

URL: http://llvm.org/viewvc/llvm-project?rev=118520&view=rev
Log:
Merge r117994:
--
Author: Eric Christopher <echristo at apple.com>
Date:   Tue Nov 2 01:21:28 2010 +0000

    No really, no thumb1 for arm fast isel. Also add an informative comment as
    to what someone would need to do to support thumb1.

Modified:
    llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp

Modified: llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp?rev=118520&r1=118519&r2=118520&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp (original)
+++ llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp Tue Nov  9 11:27:57 2010
@@ -195,6 +195,9 @@
 
 // If the machine is predicable go ahead and add the predicate operands, if
 // it needs default CC operands add those.
+// TODO: If we want to support thumb1 then we'll need to deal with optional
+// CPSR defs that need to be added before the remaining operands. See s_cc_out
+// for descriptions why.
 const MachineInstrBuilder &
 ARMFastISel::AddOptionalDefs(const MachineInstrBuilder &MIB) {
   MachineInstr *MI = &*MIB;
@@ -1761,8 +1764,6 @@
 
 // TODO: SoftFP support.
 bool ARMFastISel::TargetSelectInstruction(const Instruction *I) {
-  // No Thumb-1 for now.
-  if (isThumb && !AFI->isThumb2Function()) return false;
 
   switch (I->getOpcode()) {
     case Instruction::Load:
@@ -1807,8 +1808,11 @@
   llvm::FastISel *ARM::createFastISel(FunctionLoweringInfo &funcInfo) {
     // Completely untested on non-darwin.
     const TargetMachine &TM = funcInfo.MF->getTarget();
+    
+    // Darwin and thumb1 only for now.
     const ARMSubtarget *Subtarget = &TM.getSubtarget<ARMSubtarget>();
-    if (Subtarget->isTargetDarwin() && !DisableARMFastISel)
+    if (Subtarget->isTargetDarwin() && !Subtarget->isThumb1Only() && 
+        !DisableARMFastISel)
       return new ARMFastISel(funcInfo);
     return 0;
   }





More information about the llvm-branch-commits mailing list