[llvm-commits] [llvm] r111974 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
Eric Christopher
echristo at apple.com
Tue Aug 24 15:07:27 PDT 2010
Author: echristo
Date: Tue Aug 24 17:07:27 2010
New Revision: 111974
URL: http://llvm.org/viewvc/llvm-project?rev=111974&view=rev
Log:
Rework braindead conditionals I put in yesterday.
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=111974&r1=111973&r2=111974&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Tue Aug 24 17:07:27 2010
@@ -365,20 +365,18 @@
Value *Op0 = I->getOperand(0);
// Verify it's an alloca.
- const Instruction *Inst = dyn_cast<Instruction>(Op0);
- if (!Inst || Inst->getOpcode() != Instruction::Alloca) return false;
+ if (const AllocaInst *AI = dyn_cast<AllocaInst>(Op0)) {
+ DenseMap<const AllocaInst*, int>::iterator SI =
+ FuncInfo.StaticAllocaMap.find(AI);
- const AllocaInst *AI = cast<AllocaInst>(Op0);
- DenseMap<const AllocaInst*, int>::iterator SI =
- FuncInfo.StaticAllocaMap.find(AI);
-
- if (SI != FuncInfo.StaticAllocaMap.end()) {
- unsigned ResultReg = createResultReg(FixedRC);
- TII.loadRegFromStackSlot(*FuncInfo.MBB, *FuncInfo.InsertPt,
- ResultReg, SI->second, FixedRC,
- TM.getRegisterInfo());
- UpdateValueMap(I, ResultReg);
- return true;
+ if (SI != FuncInfo.StaticAllocaMap.end()) {
+ unsigned ResultReg = createResultReg(FixedRC);
+ TII.loadRegFromStackSlot(*FuncInfo.MBB, *FuncInfo.InsertPt,
+ ResultReg, SI->second, FixedRC,
+ TM.getRegisterInfo());
+ UpdateValueMap(I, ResultReg);
+ return true;
+ }
}
return false;
More information about the llvm-commits
mailing list