[llvm] r322806 - Make GlobalValues with non-default visibilility dso_local.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 17 18:08:23 PST 2018
Author: rafael
Date: Wed Jan 17 18:08:23 2018
New Revision: 322806
URL: http://llvm.org/viewvc/llvm-project?rev=322806&view=rev
Log:
Make GlobalValues with non-default visibilility dso_local.
This is similar to r322317, but for visibility. It is not as neat
because we have to special case extern_weak.
The idea is the same as the previous change, make the transition to
explicit dso_local easier for the frontends. With this they only have
to add dso_local to symbols where we need some external information to
decide if it is dso_local (like it being part of an ELF executable).
Modified:
llvm/trunk/include/llvm/IR/GlobalValue.h
llvm/trunk/lib/IR/AsmWriter.cpp
llvm/trunk/lib/IR/Verifier.cpp
llvm/trunk/test/Bitcode/dso_location.ll
llvm/trunk/test/Linker/funcimport.ll
llvm/trunk/test/Other/extract.ll
llvm/trunk/test/ThinLTO/X86/export.ll
llvm/trunk/test/ThinLTO/X86/funcimport.ll
llvm/trunk/test/ThinLTO/X86/local_name_conflict.ll
llvm/trunk/test/ThinLTO/X86/referenced_by_constant.ll
llvm/trunk/test/Transforms/FunctionImport/funcimport.ll
llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/comdat.ll
llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-internal1.ll
llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-internal2.ll
llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-vfunc-internal.ll
llvm/trunk/test/Transforms/WholeProgramDevirt/export-single-impl.ll
llvm/trunk/test/tools/gold/X86/emit-llvm.ll
llvm/trunk/test/tools/gold/X86/thinlto_linkonceresolution.ll
llvm/trunk/test/tools/llvm-split/internal.ll
llvm/trunk/test/tools/llvm-split/unnamed.ll
Modified: llvm/trunk/include/llvm/IR/GlobalValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/GlobalValue.h?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/GlobalValue.h (original)
+++ llvm/trunk/include/llvm/IR/GlobalValue.h Wed Jan 17 18:08:23 2018
@@ -233,6 +233,8 @@ public:
assert((!hasLocalLinkage() || V == DefaultVisibility) &&
"local linkage requires default visibility");
Visibility = V;
+ if (!hasExternalWeakLinkage() && V != DefaultVisibility)
+ setDSOLocal(true);
}
/// If the value is "Thread Local", its value isn't shared by the threads.
Modified: llvm/trunk/lib/IR/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp (original)
+++ llvm/trunk/lib/IR/AsmWriter.cpp Wed Jan 17 18:08:23 2018
@@ -2499,8 +2499,11 @@ static void PrintVisibility(GlobalValue:
static void PrintDSOLocation(const GlobalValue &GV,
formatted_raw_ostream &Out) {
- // GVs with local linkage are implicitly dso_local, so we don't print it.
- if (GV.isDSOLocal() && !GV.hasLocalLinkage())
+ // GVs with local linkage or non default visibility are implicitly dso_local,
+ // so we don't print it.
+ bool Implicit = GV.hasLocalLinkage() ||
+ (!GV.hasExternalWeakLinkage() && !GV.hasDefaultVisibility());
+ if (GV.isDSOLocal() && !Implicit)
Out << "dso_local ";
}
Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Wed Jan 17 18:08:23 2018
@@ -575,6 +575,10 @@ void Verifier::visitGlobalValue(const Gl
"GlobalValue with private or internal linkage must be dso_local!",
&GV);
+ if (!GV.hasDefaultVisibility() && !GV.hasExternalWeakLinkage())
+ Assert(GV.isDSOLocal(),
+ "GlobalValue with non default visibility must be dso_local!", &GV);
+
forEachUser(&GV, GlobalValueVisited, [&](const Value *V) -> bool {
if (const Instruction *I = dyn_cast<Instruction>(V)) {
if (!I->getParent() || !I->getParent()->getParent())
Modified: llvm/trunk/test/Bitcode/dso_location.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/dso_location.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/Bitcode/dso_location.ll (original)
+++ llvm/trunk/test/Bitcode/dso_location.ll Wed Jan 17 18:08:23 2018
@@ -15,11 +15,11 @@
@default_local_global = dso_local default global i32 0
; CHECK: @default_local_global = dso_local global i32 0
- at hidden_local_global = dso_local hidden global i32 0
-; CHECK: @hidden_local_global = dso_local hidden global i32 0
+ at hidden_local_global = hidden global i32 0
+; CHECK: @hidden_local_global = hidden global i32 0
- at protected_local_global = dso_local protected global i32 0
-; CHECK: @protected_local_global = dso_local protected global i32 0
+ at protected_local_global = protected global i32 0
+; CHECK: @protected_local_global = protected global i32 0
@local_alias = dso_local alias i32, i32* @local_global
; CHECK-DAG: @local_alias = dso_local alias i32, i32* @local_global
@@ -32,11 +32,11 @@
declare dso_local default void @default_local()
; CHECK: declare dso_local void @default_local()
-declare dso_local hidden void @hidden_local()
-; CHECK: declare dso_local hidden void @hidden_local()
+declare hidden void @hidden_local()
+; CHECK: declare hidden void @hidden_local()
-define dso_local protected void @protected_local() {
-; CHECK: define dso_local protected void @protected_local()
+define protected void @protected_local() {
+; CHECK: define protected void @protected_local()
entry:
ret void
}
Modified: llvm/trunk/test/Linker/funcimport.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/funcimport.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/Linker/funcimport.ll (original)
+++ llvm/trunk/test/Linker/funcimport.ll Wed Jan 17 18:08:23 2018
@@ -13,12 +13,12 @@
; Ensure statics are promoted/renamed correctly from this file (all but
; constant variable need promotion).
; RUN: llvm-link %t.bc -summary-index=%t3.thinlto.bc -S | FileCheck %s --check-prefix=EXPORTSTATIC
-; EXPORTSTATIC-DAG: @staticvar.llvm.{{.*}} = dso_local hidden global
+; EXPORTSTATIC-DAG: @staticvar.llvm.{{.*}} = hidden global
; Eventually @staticconstvar can be exported as a copy and not promoted
-; EXPORTSTATIC-DAG: @staticconstvar.llvm.0 = dso_local hidden unnamed_addr constant
-; EXPORTSTATIC-DAG: @P.llvm.{{.*}} = dso_local hidden global void ()* null
-; EXPORTSTATIC-DAG: define dso_local hidden i32 @staticfunc.llvm.
-; EXPORTSTATIC-DAG: define dso_local hidden void @staticfunc2.llvm.
+; EXPORTSTATIC-DAG: @staticconstvar.llvm.0 = hidden unnamed_addr constant
+; EXPORTSTATIC-DAG: @P.llvm.{{.*}} = hidden global void ()* null
+; EXPORTSTATIC-DAG: define hidden i32 @staticfunc.llvm.
+; EXPORTSTATIC-DAG: define hidden void @staticfunc2.llvm.
; Ensure that both weak alias to an imported function and strong alias to a
; non-imported function are correctly turned into declarations.
@@ -67,13 +67,13 @@
; Ensure that imported static variable and function references are correctly
; promoted and renamed (including static constant variable).
; RUN: llvm-link %t2.bc -summary-index=%t3.thinlto.bc -import=referencestatics:%t.bc -S | FileCheck %s --check-prefix=IMPORTSTATIC
-; IMPORTSTATIC-DAG: @staticvar.llvm.{{.*}} = external dso_local hidden global
+; IMPORTSTATIC-DAG: @staticvar.llvm.{{.*}} = external hidden global
; Eventually @staticconstvar can be imported as a copy
-; IMPORTSTATIC-DAG: @staticconstvar.llvm.{{.*}} = external dso_local hidden unnamed_addr constant
+; IMPORTSTATIC-DAG: @staticconstvar.llvm.{{.*}} = external hidden unnamed_addr constant
; IMPORTSTATIC-DAG: define available_externally i32 @referencestatics
; IMPORTSTATIC-DAG: %call = call i32 @staticfunc.llvm.
; IMPORTSTATIC-DAG: %0 = load i32, i32* @staticvar.llvm.
-; IMPORTSTATIC-DAG: declare dso_local hidden i32 @staticfunc.llvm.
+; IMPORTSTATIC-DAG: declare hidden i32 @staticfunc.llvm.
; Ensure that imported global (external) function and variable references
; are handled correctly (including referenced variable imported as
@@ -90,7 +90,7 @@
; Ensure that imported static function pointer correctly promoted and renamed.
; RUN: llvm-link %t2.bc -summary-index=%t3.thinlto.bc -import=callfuncptr:%t.bc -S | FileCheck %s --check-prefix=IMPORTFUNCPTR
-; IMPORTFUNCPTR-DAG: @P.llvm.{{.*}} = external dso_local hidden global void ()*
+; IMPORTFUNCPTR-DAG: @P.llvm.{{.*}} = external hidden global void ()*
; IMPORTFUNCPTR-DAG: define available_externally void @callfuncptr
; IMPORTFUNCPTR-DAG: %0 = load void ()*, void ()** @P.llvm.
Modified: llvm/trunk/test/Other/extract.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/extract.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/Other/extract.ll (original)
+++ llvm/trunk/test/Other/extract.ll Wed Jan 17 18:08:23 2018
@@ -7,13 +7,13 @@
; llvm-extract uses lazy bitcode loading, so make sure it correctly reads
; from bitcode files in addition to assembly files.
-; CHECK: define dso_local hidden void @foo() comdat($x) {
+; CHECK: define hidden void @foo() comdat($x) {
; CHECK: ret void
; CHECK: }
; The private linkage for foo() should be changed to external linkage and
; hidden visibility added.
-; DELETE: declare dso_local hidden void @foo()
+; DELETE: declare hidden void @foo()
; DELETE-NOT: comdat
; DELETE: define void @bar() {
; DELETE: call void @foo()
Modified: llvm/trunk/test/ThinLTO/X86/export.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ThinLTO/X86/export.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/ThinLTO/X86/export.ll (original)
+++ llvm/trunk/test/ThinLTO/X86/export.ll Wed Jan 17 18:08:23 2018
@@ -5,8 +5,8 @@
; Ensure statics are promoted/renamed correctly from this file.
; RUN: llvm-lto -thinlto-action=promote %t1.bc -thinlto-index=%t3.bc -o - | llvm-dis -o - | FileCheck %s
-; CHECK-DAG: @staticvar.llvm.0 = dso_local hidden global
-; CHECK-DAG: define dso_local hidden void @staticfunc.llvm.0
+; CHECK-DAG: @staticvar.llvm.0 = hidden global
+; CHECK-DAG: define hidden void @staticfunc.llvm.0
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.11.0"
Modified: llvm/trunk/test/ThinLTO/X86/funcimport.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ThinLTO/X86/funcimport.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/ThinLTO/X86/funcimport.ll (original)
+++ llvm/trunk/test/ThinLTO/X86/funcimport.ll Wed Jan 17 18:08:23 2018
@@ -9,12 +9,12 @@
; Ensure statics are promoted/renamed correctly from this file (all but
; constant variable need promotion).
; RUN: llvm-lto -thinlto-action=promote %t.bc -thinlto-index=%t3.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=EXPORTSTATIC
-; EXPORTSTATIC-DAG: @staticvar.llvm.0 = dso_local hidden global
+; EXPORTSTATIC-DAG: @staticvar.llvm.0 = hidden global
; Eventually @staticconstvar can be exported as a copy and not promoted
-; EXPORTSTATIC-DAG: @staticconstvar.llvm.0 = dso_local hidden unnamed_addr constant
-; EXPORTSTATIC-DAG: @P.llvm.0 = dso_local hidden global void ()* null
-; EXPORTSTATIC-DAG: define dso_local hidden i32 @staticfunc.llvm.0
-; EXPORTSTATIC-DAG: define dso_local hidden void @staticfunc2.llvm.0
+; EXPORTSTATIC-DAG: @staticconstvar.llvm.0 = hidden unnamed_addr constant
+; EXPORTSTATIC-DAG: @P.llvm.0 = hidden global void ()* null
+; EXPORTSTATIC-DAG: define hidden i32 @staticfunc.llvm.0
+; EXPORTSTATIC-DAG: define hidden void @staticfunc2.llvm.0
; Ensure that weak alias to an imported function is correctly turned into
; a declaration.
Modified: llvm/trunk/test/ThinLTO/X86/local_name_conflict.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ThinLTO/X86/local_name_conflict.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/ThinLTO/X86/local_name_conflict.ll (original)
+++ llvm/trunk/test/ThinLTO/X86/local_name_conflict.ll Wed Jan 17 18:08:23 2018
@@ -13,7 +13,7 @@
; promoted name matches the imported copy.
; RUN: llvm-lto -thinlto-action=import %t.bc -thinlto-index=%t4.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=IMPORT
; IMPORT: call i32 @foo.llvm.[[HASH:[0-9]+]]
-; IMPORT: define available_externally dso_local hidden i32 @foo.llvm.[[HASH]]()
+; IMPORT: define available_externally hidden i32 @foo.llvm.[[HASH]]()
; The copy in %t2.bc should not be exported/promoted/renamed
; RUN: llvm-lto -thinlto-action=promote %t2.bc -thinlto-index=%t4.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=NOEXPORTSTATIC
@@ -21,7 +21,7 @@
; Make sure foo is promoted and renamed without complaint in %t3.bc.
; RUN: llvm-lto -thinlto-action=promote %t3.bc -thinlto-index=%t4.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=EXPORTSTATIC
-; EXPORTSTATIC: define dso_local hidden i32 @foo.llvm.
+; EXPORTSTATIC: define hidden i32 @foo.llvm.
; ModuleID = 'local_name_conflict_main.o'
source_filename = "local_name_conflict_main.c"
Modified: llvm/trunk/test/ThinLTO/X86/referenced_by_constant.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ThinLTO/X86/referenced_by_constant.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/ThinLTO/X86/referenced_by_constant.ll (original)
+++ llvm/trunk/test/ThinLTO/X86/referenced_by_constant.ll Wed Jan 17 18:08:23 2018
@@ -9,15 +9,15 @@
; cause @referencedbyglobal and @localreferencedbyglobal to be exported
; and promoted).
; RUN: llvm-lto -thinlto-action=import %t.bc -thinlto-index=%t3.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=IMPORT
-; IMPORT: @someglobal.llvm.0 = external dso_local hidden unnamed_addr constant
-; IMPORT: @someglobal2.llvm.0 = external dso_local hidden unnamed_addr constant
+; IMPORT: @someglobal.llvm.0 = external hidden unnamed_addr constant
+; IMPORT: @someglobal2.llvm.0 = external hidden unnamed_addr constant
; IMPORT: define available_externally void @bar()
; Check the export side: we currently only export bar(), which causes
; @someglobal and @someglobal2 to be promoted (see above).
; RUN: llvm-lto -thinlto-action=promote %t2.bc -thinlto-index=%t3.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=EXPORT
-; EXPORT: @someglobal.llvm.0 = dso_local hidden unnamed_addr constant
-; EXPORT: @someglobal2.llvm.0 = dso_local hidden unnamed_addr constant
+; EXPORT: @someglobal.llvm.0 = hidden unnamed_addr constant
+; EXPORT: @someglobal2.llvm.0 = hidden unnamed_addr constant
; EXPORT: define void @referencedbyglobal()
; EXPORT: define internal void @localreferencedbyglobal()
Modified: llvm/trunk/test/Transforms/FunctionImport/funcimport.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/FunctionImport/funcimport.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/FunctionImport/funcimport.ll (original)
+++ llvm/trunk/test/Transforms/FunctionImport/funcimport.ll Wed Jan 17 18:08:23 2018
@@ -55,7 +55,7 @@ declare i32 @referencestatics(...) #1
; Ensure that the call is to the properly-renamed function.
; INSTLIMDEF-DAG: Import staticfunc
; INSTLIMDEF-DAG: %call = call i32 @staticfunc.llvm.
-; INSTLIMDEF-DAG: define available_externally dso_local hidden i32 @staticfunc.llvm.{{.*}} !thinlto_src_module !0 {
+; INSTLIMDEF-DAG: define available_externally hidden i32 @staticfunc.llvm.{{.*}} !thinlto_src_module !0 {
; INSTLIMDEF-DAG: Import referenceglobals
; CHECK-DAG: define available_externally i32 @referenceglobals(i32 %i) !thinlto_src_module !0 {
@@ -80,7 +80,7 @@ declare void @callfuncptr(...) #1
; Ensure that all uses of local variable @P which has used in setfuncptr
; and callfuncptr are to the same promoted/renamed global.
-; CHECK-DAG: @P.llvm.{{.*}} = external dso_local hidden global void ()*
+; CHECK-DAG: @P.llvm.{{.*}} = external hidden global void ()*
; CHECK-DAG: %0 = load void ()*, void ()** @P.llvm.
; CHECK-DAG: store void ()* @staticfunc2.llvm.{{.*}}, void ()** @P.llvm.
@@ -99,8 +99,8 @@ declare void @weakfunc(...) #1
declare void @linkoncefunc2(...) #1
; INSTLIMDEF-DAG: Import funcwithpersonality
-; INSTLIMDEF-DAG: define available_externally dso_local hidden void @funcwithpersonality.llvm.{{.*}}() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !thinlto_src_module !0 {
-; INSTLIM5-DAG: declare dso_local hidden void @funcwithpersonality.llvm.{{.*}}()
+; INSTLIMDEF-DAG: define available_externally hidden void @funcwithpersonality.llvm.{{.*}}() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !thinlto_src_module !0 {
+; INSTLIM5-DAG: declare hidden void @funcwithpersonality.llvm.{{.*}}()
; CHECK-DAG: declare void @variadic(...)
declare void @variadic(...)
Modified: llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/comdat.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/comdat.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/comdat.ll (original)
+++ llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/comdat.ll Wed Jan 17 18:08:23 2018
@@ -25,9 +25,9 @@ $nt = comdat any
; MERGED-SAME: comdat(${{"?lwt[^ ]+}})
@lwt_aliasee = private unnamed_addr global [1 x i8*] [i8* null], comdat($lwt), !type !0
-; MERGED: {{@"?lwt_nl[^ ]+}} = dso_local hidden unnamed_addr global
+; MERGED: {{@"?lwt_nl[^ ]+}} = hidden unnamed_addr global
; MERGED-SAME: comdat(${{"?lwt[^ ]+}})
-; THIN: {{@"?lwt_nl[^ ]+}} = external dso_local hidden
+; THIN: {{@"?lwt_nl[^ ]+}} = external hidden
@lwt_nl = internal unnamed_addr global i32 0, comdat($lwt)
; MERGED: @nlwt_aliasee = private unnamed_addr global
@@ -47,11 +47,11 @@ $nt = comdat any
; THIN-SAME: comdat($nt)
@nt_nl = internal unnamed_addr global i32 0, comdat($nt)
-; MERGED: {{@"?lwt[^ ]+}} = dso_local hidden unnamed_addr alias
+; MERGED: {{@"?lwt[^ ]+}} = hidden unnamed_addr alias
; THIN: {{@"?lwt[^ ]+}} = external hidden
@lwt = internal unnamed_addr alias [1 x i8*], [1 x i8*]* @lwt_aliasee
-; MERGED: {{@"?nlwt_nl[^ ]+}} = dso_local hidden unnamed_addr alias
+; MERGED: {{@"?nlwt_nl[^ ]+}} = hidden unnamed_addr alias
; THIN: {{@"?nlwt_nl[^ ]+}} = external hidden
@nlwt_nl = internal unnamed_addr alias [1 x i8*], [1 x i8*]* @nlwt_aliasee
Modified: llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-internal1.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-internal1.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-internal1.ll (original)
+++ llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-internal1.ll Wed Jan 17 18:08:23 2018
@@ -12,8 +12,8 @@
; BCA0: <GLOBALVAL_SUMMARY_BLOCK
; BCA1-NOT: <GLOBALVAL_SUMMARY_BLOCK
-; M0: @"g$581d7631532fa146ba4061179da39272" = external dso_local hidden global i8{{$}}
-; M1: @"g$581d7631532fa146ba4061179da39272" = dso_local hidden global i8 42, !type !0
+; M0: @"g$581d7631532fa146ba4061179da39272" = external hidden global i8{{$}}
+; M1: @"g$581d7631532fa146ba4061179da39272" = hidden global i8 42, !type !0
@g = internal global i8 42, !type !0
; M0: define i8* @f()
Modified: llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-internal2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-internal2.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-internal2.ll (original)
+++ llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-internal2.ll Wed Jan 17 18:08:23 2018
@@ -16,8 +16,8 @@
; M1: @g = global void ()* @"f$13757e0fb71915e385efa4dc9d1e08fd", !type !0
@g = global void ()* @f, !type !0
-; M0: define dso_local hidden void @"f$13757e0fb71915e385efa4dc9d1e08fd"()
-; M1: declare dso_local hidden void @"f$13757e0fb71915e385efa4dc9d1e08fd"()
+; M0: define hidden void @"f$13757e0fb71915e385efa4dc9d1e08fd"()
+; M1: declare hidden void @"f$13757e0fb71915e385efa4dc9d1e08fd"()
define internal void @f() {
call void @f2()
ret void
Modified: llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-vfunc-internal.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-vfunc-internal.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-vfunc-internal.ll (original)
+++ llvm/trunk/test/Transforms/ThinLTOBitcodeWriter/split-vfunc-internal.ll Wed Jan 17 18:08:23 2018
@@ -6,14 +6,14 @@ define [1 x i8*]* @source() {
ret [1 x i8*]* @g
}
-; M0: @"g$84f59439b469192440047efc8de357fb" = external dso_local hidden constant [1 x i8*]{{$}}
-; M1: @"g$84f59439b469192440047efc8de357fb" = dso_local hidden constant [1 x i8*] [i8* bitcast (i64 (i8*)* @"ok$84f59439b469192440047efc8de357fb" to i8*)]
+; M0: @"g$84f59439b469192440047efc8de357fb" = external hidden constant [1 x i8*]{{$}}
+; M1: @"g$84f59439b469192440047efc8de357fb" = hidden constant [1 x i8*] [i8* bitcast (i64 (i8*)* @"ok$84f59439b469192440047efc8de357fb" to i8*)]
@g = internal constant [1 x i8*] [
i8* bitcast (i64 (i8*)* @ok to i8*)
], !type !0
-; M0: define dso_local hidden i64 @"ok$84f59439b469192440047efc8de357fb"
-; M1: define available_externally dso_local hidden i64 @"ok$84f59439b469192440047efc8de357fb"
+; M0: define hidden i64 @"ok$84f59439b469192440047efc8de357fb"
+; M1: define available_externally hidden i64 @"ok$84f59439b469192440047efc8de357fb"
define internal i64 @ok(i8* %this) {
ret i64 42
}
Modified: llvm/trunk/test/Transforms/WholeProgramDevirt/export-single-impl.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/WholeProgramDevirt/export-single-impl.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/WholeProgramDevirt/export-single-impl.ll (original)
+++ llvm/trunk/test/Transforms/WholeProgramDevirt/export-single-impl.ll Wed Jan 17 18:08:23 2018
@@ -81,12 +81,12 @@ define void @vf2(i8*) {
ret void
}
-; CHECK: define dso_local hidden void @"vf3$merged"(i8*) {
+; CHECK: define hidden void @"vf3$merged"(i8*) {
define internal void @vf3(i8*) {
ret void
}
-; CHECK: define dso_local hidden void @"vf4$merged"(i8*) comdat {
+; CHECK: define hidden void @"vf4$merged"(i8*) comdat {
define internal void @vf4(i8*) comdat {
ret void
}
Modified: llvm/trunk/test/tools/gold/X86/emit-llvm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/gold/X86/emit-llvm.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/tools/gold/X86/emit-llvm.ll (original)
+++ llvm/trunk/test/tools/gold/X86/emit-llvm.ll Wed Jan 17 18:08:23 2018
@@ -54,8 +54,8 @@ define hidden void @f1() {
ret void
}
-; CHECK-DAG: define dso_local hidden void @f2()
-; OPT-DAG: define dso_local hidden void @f2()
+; CHECK-DAG: define hidden void @f2()
+; OPT-DAG: define hidden void @f2()
define hidden void @f2() {
ret void
}
Modified: llvm/trunk/test/tools/gold/X86/thinlto_linkonceresolution.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/gold/X86/thinlto_linkonceresolution.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/tools/gold/X86/thinlto_linkonceresolution.ll (original)
+++ llvm/trunk/test/tools/gold/X86/thinlto_linkonceresolution.ll Wed Jan 17 18:08:23 2018
@@ -21,7 +21,7 @@
; confirm the weak linkage directly in the saved opt bitcode files.
; CHECK-NOT: U f
; OPT-NOT: @f()
-; OPT2: define weak_odr dso_local hidden void @f()
+; OPT2: define weak_odr hidden void @f()
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
Modified: llvm/trunk/test/tools/llvm-split/internal.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-split/internal.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-split/internal.ll (original)
+++ llvm/trunk/test/tools/llvm-split/internal.ll Wed Jan 17 18:08:23 2018
@@ -2,8 +2,8 @@
; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s
; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 %s
-; CHECK0: define dso_local hidden void @foo()
-; CHECK1: declare dso_local hidden void @foo()
+; CHECK0: define hidden void @foo()
+; CHECK1: declare hidden void @foo()
define internal void @foo() {
call void @bar()
ret void
Modified: llvm/trunk/test/tools/llvm-split/unnamed.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-split/unnamed.ll?rev=322806&r1=322805&r2=322806&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-split/unnamed.ll (original)
+++ llvm/trunk/test/tools/llvm-split/unnamed.ll Wed Jan 17 18:08:23 2018
@@ -2,16 +2,16 @@
; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s
; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 %s
-; CHECK0: declare dso_local hidden void @__llvmsplit_unnamed()
-; CHECK1: define dso_local hidden void @__llvmsplit_unnamed()
+; CHECK0: declare hidden void @__llvmsplit_unnamed()
+; CHECK1: define hidden void @__llvmsplit_unnamed()
define internal void @0() {
; CHECK1: call void @foo()
call void @foo()
ret void
}
-; CHECK0: declare dso_local hidden void @__llvmsplit_unnamed.1()
-; CHECK1: define dso_local hidden void @__llvmsplit_unnamed.1()
+; CHECK0: declare hidden void @__llvmsplit_unnamed.1()
+; CHECK1: define hidden void @__llvmsplit_unnamed.1()
define internal void @1() {
; CHECK1: call void @foo()
; CHECK1: call void @foo()
More information about the llvm-commits
mailing list