[llvm-commits] [llvm] r111854 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
Eric Christopher
echristo at apple.com
Mon Aug 23 15:32:45 PDT 2010
Author: echristo
Date: Mon Aug 23 17:32:45 2010
New Revision: 111854
URL: http://llvm.org/viewvc/llvm-project?rev=111854&view=rev
Log:
Add an ARMFunctionInfo member and use it.
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=111854&r1=111853&r2=111854&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Mon Aug 23 17:32:45 2010
@@ -57,6 +57,7 @@
const TargetMachine &TM;
const TargetInstrInfo &TII;
const TargetLowering &TLI;
+ const ARMFunctionInfo *AFI;
public:
explicit ARMFastISel(FunctionLoweringInfo &funcInfo)
@@ -65,6 +66,7 @@
TII(*TM.getInstrInfo()),
TLI(*TM.getTargetLowering()) {
Subtarget = &TM.getSubtarget<ARMSubtarget>();
+ AFI = funcInfo.MF->getInfo<ARMFunctionInfo>();
}
// Code from FastISel.cpp.
@@ -363,7 +365,6 @@
if (!ARMComputeRegOffset(I, Reg, Offset))
return false;
-
unsigned ResultReg = createResultReg(ARM::GPRRegisterClass);
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
TII.get(ARM::LDR), ResultReg)
@@ -373,6 +374,9 @@
}
bool ARMFastISel::TargetSelectInstruction(const Instruction *I) {
+ // No Thumb-1 for now.
+ if (AFI->isThumbFunction() && !AFI->isThumb2Function()) return false;
+
switch (I->getOpcode()) {
case Instruction::Load:
return ARMSelectLoad(I);
More information about the llvm-commits
mailing list