[llvm-commits] [llvm] r134882 - /llvm/trunk/lib/Target/ARM/ARMGlobalMerge.cpp
Cameron Zwarich
zwarich at apple.com
Sun Jul 10 18:29:42 PDT 2011
Author: zwarich
Date: Sun Jul 10 20:29:42 2011
New Revision: 134882
URL: http://llvm.org/viewvc/llvm-project?rev=134882&view=rev
Log:
Fix <rdar://problem/9751331>.
Modified:
llvm/trunk/lib/Target/ARM/ARMGlobalMerge.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMGlobalMerge.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMGlobalMerge.cpp?rev=134882&r1=134881&r2=134882&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMGlobalMerge.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMGlobalMerge.cpp Sun Jul 10 20:29:42 2011
@@ -176,8 +176,8 @@
// Ignore fancy-aligned globals for now.
unsigned Alignment = I->getAlignment();
- unsigned AllocSize = TD->getTypeAllocSize(I->getType()->getElementType());
- if (Alignment > AllocSize)
+ const Type *Ty = I->getType()->getElementType();
+ if (Alignment > TD->getABITypeAlignment(Ty))
continue;
// Ignore all 'special' globals.
@@ -185,7 +185,7 @@
I->getName().startswith(".llvm."))
continue;
- if (AllocSize < MaxOffset) {
+ if (TD->getTypeAllocSize(Ty) < MaxOffset) {
const TargetLoweringObjectFile &TLOF = TLI->getObjFileLowering();
if (TLOF.getKindForGlobal(I, TLI->getTargetMachine()).isBSSLocal())
BSSGlobals.push_back(I);
More information about the llvm-commits
mailing list