[llvm-commits] [llvm] r116401 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
Eric Christopher
echristo at apple.com
Wed Oct 13 02:11:46 PDT 2010
Author: echristo
Date: Wed Oct 13 04:11:46 2010
New Revision: 116401
URL: http://llvm.org/viewvc/llvm-project?rev=116401&view=rev
Log:
Start handling more global variables.
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=116401&r1=116400&r2=116401&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Wed Oct 13 04:11:46 2010
@@ -620,8 +620,11 @@
// FIXME: Handle global variables.
if (const GlobalValue *GV = dyn_cast<GlobalValue>(Obj)) {
- (void)GV;
- return false;
+ unsigned Tmp = ARMMaterializeGV(GV, TLI.getValueType(Obj->getType()));
+ if (Tmp == 0) return false;
+
+ Reg = Tmp;
+ return true;
}
// Try to get this in a register if nothing else has worked.
More information about the llvm-commits
mailing list