summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-11-12 22:52:32 +0000
committerEric Christopher <echristo@apple.com>2010-11-12 22:52:32 +0000
commit49a66f7d712a62d51e111823556a39f39002c1a0 (patch)
tree49bad254e2f98dbd9983f6d4f38bed755de78283 /llvm/lib
parent0fc8084a64e5fd76b7ccdf390a11ad81b5f84f66 (diff)
downloadbcm5719-llvm-49a66f7d712a62d51e111823556a39f39002c1a0.tar.gz
bcm5719-llvm-49a66f7d712a62d51e111823556a39f39002c1a0.zip
Make this happen for ARM like x86. Don't entirely bail out when
an address is in a different block, get it into a register and go from there. llvm-svn: 118936
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMFastISel.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp
index 58f72f6c159..f0413a38ec4 100644
--- a/llvm/lib/Target/ARM/ARMFastISel.cpp
+++ b/llvm/lib/Target/ARM/ARMFastISel.cpp
@@ -590,10 +590,11 @@ bool ARMFastISel::ARMComputeRegOffset(const Value *Obj, unsigned &Base,
// Don't walk into other basic blocks; it's possible we haven't
// visited them yet, so the instructions may not yet be assigned
// virtual registers.
- if (FuncInfo.MBBMap[I->getParent()] != FuncInfo.MBB)
- return false;
- Opcode = I->getOpcode();
- U = I;
+ if (FuncInfo.StaticAllocaMap.count(static_cast<const AllocaInst *>(Obj)) ||
+ FuncInfo.MBBMap[I->getParent()] == FuncInfo.MBB) {
+ Opcode = I->getOpcode();
+ U = I;
+ }
} else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(Obj)) {
Opcode = C->getOpcode();
U = C;
OpenPOWER on IntegriCloud