1 ; RUN: opt < %s -passes=globalopt -disable-output
3 target datalayout = "e-p:32:32"
4 target triple = "i686-pc-linux-gnu"
5 %struct..0FileDescriptor = type { i32 }
6 %"struct.FlagDescription<int32>" = type { ptr, ptr, i1, i1, i32, ptr }
7 %"struct.FlagRegisterer<bool>" = type { i8 }
8 %struct.MutexLock = type { ptr }
9 %"struct.std::DisabledRangeMap" = type { %"struct.std::_Rb_tree<const char*,std::pair<const char* const, FlagDescription<bool> >,std::_Select1st<std::pair<const char* const, FlagDescription<bool> > >,StringCmp,std::allocator<std::pair<const char* const, FlagDescription<bool> > > >" }
10 %"struct.std::_Rb_tree<const char*,std::pair<const char* const, FlagDescription<bool> >,std::_Select1st<std::pair<const char* const, FlagDescription<bool> > >,StringCmp,std::allocator<std::pair<const char* const, FlagDescription<bool> > > >" = type { %"struct.std::_Rb_tree<const char*,std::pair<const char* const, FlagDescription<bool> >,std::_Select1st<std::pair<const char* const, FlagDescription<bool> > >,StringCmp,std::allocator<std::pair<const char* const, FlagDescription<bool> > > >::_Rb_tree_impl<StringCmp,false>" }
11 %"struct.std::_Rb_tree<const char*,std::pair<const char* const, FlagDescription<bool> >,std::_Select1st<std::pair<const char* const, FlagDescription<bool> > >,StringCmp,std::allocator<std::pair<const char* const, FlagDescription<bool> > > >::_Rb_tree_impl<StringCmp,false>" = type { %"struct.FlagRegisterer<bool>", %"struct.std::_Rb_tree_node_base", i32 }
12 %"struct.std::_Rb_tree_const_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >" = type { ptr }
13 %"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
14 %"struct.std::_Vector_base<int,std::allocator<int> >" = type { %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl" }
15 %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl" = type { ptr, ptr, ptr }
16 %"struct.std::vector<int,std::allocator<int> >" = type { %"struct.std::_Vector_base<int,std::allocator<int> >" }
17 @registry_lock = external global %struct..0FileDescriptor ; <ptr> [#uses=0]
18 @_ZN61FLAG__foo_int32_44FLAGS_E = external global %"struct.FlagRegisterer<bool>" ; <ptr> [#uses=0]
19 @llvm.global_ctors = appending global [20 x { i32, ptr, ptr }] [ { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN62FLAG__foo_string_10FLAGS_E, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN60FLAG__foo_bool_19FLAGS_E, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZNK5Bzh4Enum13is_contiguousEv, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN62FLAG__foo_string_17FLAGS_E, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN61FLAG__foo_int32_21FLAGS_E, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN7ScannerC2Ev, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__Z11StripStringPSsPKcc, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZNK9__gnu_cxx4hashI11StringPieceEclERKS1_, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN8Hasher325ResetEj, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__Z25ACLRv, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN61FLAG__foo_int64_25FLAGS_E, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN61FLAG__foo_int32_7FLAGS_E, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN62FLAG__foo_string_18FLAGS_E, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN62FLAG__foo_string_17FLAGS_E, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN61FLAG__foo_int32_25FLAGS_E, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I_eventbuf, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN61FLAG__foo_int32_26FLAGS_E, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN62FLAG__foo_string_16FLAGS_E, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__ZN17InitializerC2EPKcS1_PFvvE, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I__checker_bcad_variable, ptr null } ] ; <ptr> [#uses=0]
21 declare void @_GLOBAL__I__ZN62FLAG__foo_string_10FLAGS_E()
23 declare void @_GLOBAL__I__ZN60FLAG__foo_bool_19FLAGS_E()
25 declare void @_GLOBAL__I__ZNK5Bzh4Enum13is_contiguousEv()
27 declare void @_GLOBAL__I__ZN62FLAG__foo_string_17FLAGS_E()
29 declare void @_GLOBAL__I__ZN61FLAG__foo_int32_21FLAGS_E()
31 define void @_ZN14FlagRegistererIiEC1EPKcRK15FlagDescriptionIiE() {
33 call void @_Z12RegisterFlagIiEvPKcRK15FlagDescriptionIT_E( )
37 define void @_Z12RegisterFlagIiEvPKcRK15FlagDescriptionIT_E() {
39 call void @_ZN9MutexLockC1EP5Mutex( )
43 declare void @_GLOBAL__I__ZN7ScannerC2Ev()
45 declare void @_GLOBAL__I__Z11StripStringPSsPKcc()
47 define void @_ZNSt6vectorIiSaIiEEC1ERKS0_() {
52 declare void @_GLOBAL__I__ZNK9__gnu_cxx4hashI11StringPieceEclERKS1_()
54 declare void @_GLOBAL__I__ZN8Hasher325ResetEj()
56 declare void @_GLOBAL__I__Z25ACLRv()
58 define void @_ZN9MutexLockC1EP5Mutex() {
60 call void @_ZN5Mutex4LockEv( )
64 define void @_ZN5Mutex4LockEv() {
66 call void @_Z22Acquire_CASPViii( )
70 define void @_ZNSt3mapIPKc15FlagDescriptionIiE9StringCmpSaISt4pairIKS1_S3_EEE3endEv(ptr sret(%"struct.std::_Rb_tree_const_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >") %agg.result) {
75 declare void @_GLOBAL__I__ZN61FLAG__foo_int64_25FLAGS_E()
77 define void @_Z14CASPViii() {
79 %tmp3 = call i32 asm sideeffect "lock; cmpxchg $1,$2", "={ax},q,m,0,~{dirflag},~{fpsr},~{flags},~{memory}"( i32 0, ptr null, i32 0 ) ; <i32> [#uses=0]
83 declare void @_GLOBAL__I__ZN61FLAG__foo_int32_7FLAGS_E()
85 declare void @_GLOBAL__I__ZN62FLAG__foo_string_18FLAGS_E()
87 define void @_Z22Acquire_CASPViii() {
89 call void @_Z14CASPViii( )
93 declare void @_GLOBAL__I__ZN61FLAG__foo_int32_25FLAGS_E()
95 declare void @_GLOBAL__I_eventbuf()
97 define void @_GLOBAL__I__ZN61FLAG__foo_int32_26FLAGS_E() {
99 call void @_Z41__static_initialization_and_destruction_0ii1662( i32 1, i32 65535 )
103 define void @_Z41__static_initialization_and_destruction_0ii1662(i32 %__initialize_p, i32 %__priority) {
105 %__initialize_p_addr = alloca i32 ; <ptr> [#uses=2]
106 %__priority_addr = alloca i32 ; <ptr> [#uses=2]
107 store i32 %__initialize_p, ptr %__initialize_p_addr
108 store i32 %__priority, ptr %__priority_addr
109 %tmp = load i32, ptr %__priority_addr ; <i32> [#uses=1]
110 %tmp.upgrd.1 = icmp eq i32 %tmp, 65535 ; <i1> [#uses=1]
111 br i1 %tmp.upgrd.1, label %cond_true, label %cond_next14
113 cond_true: ; preds = %entry
114 %tmp8 = load i32, ptr %__initialize_p_addr ; <i32> [#uses=1]
115 %tmp9 = icmp eq i32 %tmp8, 1 ; <i1> [#uses=1]
116 br i1 %tmp9, label %cond_true10, label %cond_next14
118 cond_true10: ; preds = %cond_true
119 call void @_ZN14FlagRegistererIiEC1EPKcRK15FlagDescriptionIiE( )
122 cond_next14: ; preds = %cond_true, %entry
126 declare void @_GLOBAL__I__ZN62FLAG__foo_string_16FLAGS_E()
128 define void @_ZN9__gnu_cxx13new_allocatorIPNS_15_Hashtable_nodeIjEEEC2Ev() {
133 declare void @_GLOBAL__I__ZN17InitializerC2EPKcS1_PFvvE()
135 declare void @_GLOBAL__I__checker_bcad_variable()