[llvm-commits] [llvm] r134882 - /llvm/trunk/lib/Target/ARM/ARMGlobalMerge.cpp
Cameron Zwarich
zwarich at apple.com
Sun Jul 10 19:14:40 PDT 2011
I made one, but I forgot to git add it. I'll land it later.
Sent from my iPhone
On Jul 10, 2011, at 7:09 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Sun, Jul 10, 2011 at 6:29 PM, Cameron Zwarich <zwarich at apple.com> wrote:
>> 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);
>
> Testcase?
>
> -Eli
More information about the llvm-commits
mailing list