From 863bfdbfb446adaef767ff514d1f2ffb5d489562 Mon Sep 17 00:00:00 2001 From: John Brawn Date: Tue, 11 Aug 2015 15:48:04 +0000 Subject: [GlobalMerge] Use private linkage for MergedGlobals variables Other objects can never reference the MergedGlobals symbol so external linkage is never needed. Using private instead of internal linkage means the object is more similar to what it looks like when global merging is not enabled, with the only difference being that the merged variables are addressed indirectly relative to the start of the section they are in. Also add aliases for merged variables with internal linkage, as this also makes the object be more like what it is when they are not merged. Differential Revision: http://reviews.llvm.org/D11942 llvm-svn: 244615 --- llvm/test/CodeGen/AArch64/global-merge-1.ll | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'llvm/test/CodeGen/AArch64/global-merge-1.ll') diff --git a/llvm/test/CodeGen/AArch64/global-merge-1.ll b/llvm/test/CodeGen/AArch64/global-merge-1.ll index 14b04303ffb..304d0a78c2c 100644 --- a/llvm/test/CodeGen/AArch64/global-merge-1.ll +++ b/llvm/test/CodeGen/AArch64/global-merge-1.ll @@ -12,16 +12,16 @@ define void @f1(i32 %a1, i32 %a2) { ;CHECK-APPLE-IOS-NOT: adrp -;CHECK-APPLE-IOS: adrp x8, __MergedGlobals@PAGE +;CHECK-APPLE-IOS: adrp x8, l__MergedGlobals@PAGE ;CHECK-APPLE-IOS-NOT: adrp -;CHECK-APPLE-IOS: add x8, x8, __MergedGlobals@PAGEOFF +;CHECK-APPLE-IOS: add x8, x8, l__MergedGlobals@PAGEOFF store i32 %a1, i32* @m, align 4 store i32 %a2, i32* @n, align 4 ret void } -;CHECK: .type _MergedGlobals,@object // @_MergedGlobals -;CHECK: .local _MergedGlobals -;CHECK: .comm _MergedGlobals,8,8 +;CHECK: .type .L_MergedGlobals,@object // @_MergedGlobals +;CHECK: .local .L_MergedGlobals +;CHECK: .comm .L_MergedGlobals,8,8 -;CHECK-APPLE-IOS: .zerofill __DATA,__bss,__MergedGlobals,8,3 ; @_MergedGlobals +;CHECK-APPLE-IOS: .zerofill __DATA,__bss,l__MergedGlobals,8,3 ; @_MergedGlobals -- cgit v1.2.3