Skip to content

Instantly share code, notes, and snippets.

@ukitaka
Created February 26, 2018 10:51
Show Gist options
  • Save ukitaka/b7f554b1ba99a93c0808a2a2effc7b48 to your computer and use it in GitHub Desktop.
Save ukitaka/b7f554b1ba99a93c0808a2a2effc7b48 to your computer and use it in GitHub Desktop.
Eq.sil
*** SIL module before Guaranteed Passes transformation (0) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %5, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref Bool._getBuiltinLogicValue()
%2 = function_ref @_T0Sb21_getBuiltinLogicValueBi1_yF : $@convention(method) (Bool) -> Builtin.Int1 // user: %17
// function_ref != infix<A>(_:_:)
%3 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %13
%4 = alloc_stack $Optional<Int> // users: %16, %13, %5
store %0 to [trivial] %4 : $*Optional<Int> // id: %5
// function_ref Optional.init(nilLiteral:)
%6 = function_ref @_T0SqxSgyt10nilLiteral_tcfC : $@convention(method) <τ_0_0> (@thin Optional<τ_0_0>.Type) -> @out Optional<τ_0_0> // user: %9
%7 = alloc_stack $Optional<Int> // users: %15, %10, %9
%8 = metatype $@thin Optional<Int>.Type // user: %9
%9 = apply %6<Int>(%7, %8) : $@convention(method) <τ_0_0> (@thin Optional<τ_0_0>.Type) -> @out Optional<τ_0_0>
%10 = load [trivial] %7 : $*Optional<Int> // user: %12
%11 = alloc_stack $Optional<Int> // users: %14, %13, %12
store %10 to [trivial] %11 : $*Optional<Int> // id: %12
%13 = apply %3<Int>(%4, %11) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %17
dealloc_stack %11 : $*Optional<Int> // id: %14
dealloc_stack %7 : $*Optional<Int> // id: %15
dealloc_stack %4 : $*Optional<Int> // id: %16
%17 = apply %2(%13) : $@convention(method) (Bool) -> Builtin.Int1 // user: %18
cond_br %17, bb1, bb2 // id: %18
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%19 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %42
%20 = integer_literal $Builtin.Word, 1 // user: %22
// function_ref _allocateUninitializedArray<A>(_:)
%21 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %22
%22 = apply %21<Any>(%20) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %28, %27, %23
%23 = begin_borrow %22 : $(Array<Any>, Builtin.RawPointer) // users: %27, %26, %24
%24 = tuple_extract %23 : $(Array<Any>, Builtin.RawPointer), 0 // user: %25
%25 = copy_value %24 : $Array<Any> // user: %42
%26 = tuple_extract %23 : $(Array<Any>, Builtin.RawPointer), 1 // user: %29
end_borrow %23 from %22 : $(Array<Any>, Builtin.RawPointer), $(Array<Any>, Builtin.RawPointer) // id: %27
destroy_value %22 : $(Array<Any>, Builtin.RawPointer) // id: %28
%29 = pointer_to_address %26 : $Builtin.RawPointer to [strict] $*Any // user: %30
%30 = init_existential_addr %29 : $*Any, $String // user: %37
%31 = string_literal utf8 "not nil" // user: %36
%32 = integer_literal $Builtin.Word, 7 // user: %36
%33 = integer_literal $Builtin.Int1, -1 // user: %36
%34 = metatype $@thin String.Type // user: %36
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%35 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %36
%36 = apply %35(%31, %32, %33, %34) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %37
store %36 to [init] %30 : $*String // id: %37
// function_ref default argument 1 of print(_:separator:terminator:)
%38 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %39
%39 = apply %38() : $@convention(thin) () -> @owned String // user: %42
// function_ref default argument 2 of print(_:separator:terminator:)
%40 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %41
%41 = apply %40() : $@convention(thin) () -> @owned String // user: %42
%42 = apply %19(%25, %39, %41) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %43
bb2: // Preds: bb1 bb0
%44 = tuple () // user: %45
return %44 : $() // id: %45
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module after Guaranteed Passes "Capture Promotion to Eliminate Escaping Boxes" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %5, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref Bool._getBuiltinLogicValue()
%2 = function_ref @_T0Sb21_getBuiltinLogicValueBi1_yF : $@convention(method) (Bool) -> Builtin.Int1 // user: %17
// function_ref != infix<A>(_:_:)
%3 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %13
%4 = alloc_stack $Optional<Int> // users: %16, %13, %5
store %0 to [trivial] %4 : $*Optional<Int> // id: %5
// function_ref Optional.init(nilLiteral:)
%6 = function_ref @_T0SqxSgyt10nilLiteral_tcfC : $@convention(method) <τ_0_0> (@thin Optional<τ_0_0>.Type) -> @out Optional<τ_0_0> // user: %9
%7 = alloc_stack $Optional<Int> // users: %15, %10, %9
%8 = metatype $@thin Optional<Int>.Type // user: %9
%9 = apply %6<Int>(%7, %8) : $@convention(method) <τ_0_0> (@thin Optional<τ_0_0>.Type) -> @out Optional<τ_0_0>
%10 = load [trivial] %7 : $*Optional<Int> // user: %12
%11 = alloc_stack $Optional<Int> // users: %14, %13, %12
store %10 to [trivial] %11 : $*Optional<Int> // id: %12
%13 = apply %3<Int>(%4, %11) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %17
dealloc_stack %11 : $*Optional<Int> // id: %14
dealloc_stack %7 : $*Optional<Int> // id: %15
dealloc_stack %4 : $*Optional<Int> // id: %16
%17 = apply %2(%13) : $@convention(method) (Bool) -> Builtin.Int1 // user: %18
cond_br %17, bb1, bb2 // id: %18
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%19 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %42
%20 = integer_literal $Builtin.Word, 1 // user: %22
// function_ref _allocateUninitializedArray<A>(_:)
%21 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %22
%22 = apply %21<Any>(%20) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %28, %27, %23
%23 = begin_borrow %22 : $(Array<Any>, Builtin.RawPointer) // users: %27, %26, %24
%24 = tuple_extract %23 : $(Array<Any>, Builtin.RawPointer), 0 // user: %25
%25 = copy_value %24 : $Array<Any> // user: %42
%26 = tuple_extract %23 : $(Array<Any>, Builtin.RawPointer), 1 // user: %29
end_borrow %23 from %22 : $(Array<Any>, Builtin.RawPointer), $(Array<Any>, Builtin.RawPointer) // id: %27
destroy_value %22 : $(Array<Any>, Builtin.RawPointer) // id: %28
%29 = pointer_to_address %26 : $Builtin.RawPointer to [strict] $*Any // user: %30
%30 = init_existential_addr %29 : $*Any, $String // user: %37
%31 = string_literal utf8 "not nil" // user: %36
%32 = integer_literal $Builtin.Word, 7 // user: %36
%33 = integer_literal $Builtin.Int1, -1 // user: %36
%34 = metatype $@thin String.Type // user: %36
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%35 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %36
%36 = apply %35(%31, %32, %33, %34) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %37
store %36 to [init] %30 : $*String // id: %37
// function_ref default argument 1 of print(_:separator:terminator:)
%38 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %39
%39 = apply %38() : $@convention(thin) () -> @owned String // user: %42
// function_ref default argument 2 of print(_:separator:terminator:)
%40 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %41
%41 = apply %40() : $@convention(thin) () -> @owned String // user: %42
%42 = apply %19(%25, %39, %41) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %43
bb2: // Preds: bb1 bb0
%44 = tuple () // user: %45
return %44 : $() // id: %45
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module after Guaranteed Passes "Access Enforcement Selection" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %5, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref Bool._getBuiltinLogicValue()
%2 = function_ref @_T0Sb21_getBuiltinLogicValueBi1_yF : $@convention(method) (Bool) -> Builtin.Int1 // user: %17
// function_ref != infix<A>(_:_:)
%3 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %13
%4 = alloc_stack $Optional<Int> // users: %16, %13, %5
store %0 to [trivial] %4 : $*Optional<Int> // id: %5
// function_ref Optional.init(nilLiteral:)
%6 = function_ref @_T0SqxSgyt10nilLiteral_tcfC : $@convention(method) <τ_0_0> (@thin Optional<τ_0_0>.Type) -> @out Optional<τ_0_0> // user: %9
%7 = alloc_stack $Optional<Int> // users: %15, %10, %9
%8 = metatype $@thin Optional<Int>.Type // user: %9
%9 = apply %6<Int>(%7, %8) : $@convention(method) <τ_0_0> (@thin Optional<τ_0_0>.Type) -> @out Optional<τ_0_0>
%10 = load [trivial] %7 : $*Optional<Int> // user: %12
%11 = alloc_stack $Optional<Int> // users: %14, %13, %12
store %10 to [trivial] %11 : $*Optional<Int> // id: %12
%13 = apply %3<Int>(%4, %11) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %17
dealloc_stack %11 : $*Optional<Int> // id: %14
dealloc_stack %7 : $*Optional<Int> // id: %15
dealloc_stack %4 : $*Optional<Int> // id: %16
%17 = apply %2(%13) : $@convention(method) (Bool) -> Builtin.Int1 // user: %18
cond_br %17, bb1, bb2 // id: %18
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%19 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %42
%20 = integer_literal $Builtin.Word, 1 // user: %22
// function_ref _allocateUninitializedArray<A>(_:)
%21 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %22
%22 = apply %21<Any>(%20) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %28, %27, %23
%23 = begin_borrow %22 : $(Array<Any>, Builtin.RawPointer) // users: %27, %26, %24
%24 = tuple_extract %23 : $(Array<Any>, Builtin.RawPointer), 0 // user: %25
%25 = copy_value %24 : $Array<Any> // user: %42
%26 = tuple_extract %23 : $(Array<Any>, Builtin.RawPointer), 1 // user: %29
end_borrow %23 from %22 : $(Array<Any>, Builtin.RawPointer), $(Array<Any>, Builtin.RawPointer) // id: %27
destroy_value %22 : $(Array<Any>, Builtin.RawPointer) // id: %28
%29 = pointer_to_address %26 : $Builtin.RawPointer to [strict] $*Any // user: %30
%30 = init_existential_addr %29 : $*Any, $String // user: %37
%31 = string_literal utf8 "not nil" // user: %36
%32 = integer_literal $Builtin.Word, 7 // user: %36
%33 = integer_literal $Builtin.Int1, -1 // user: %36
%34 = metatype $@thin String.Type // user: %36
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%35 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %36
%36 = apply %35(%31, %32, %33, %34) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %37
store %36 to [init] %30 : $*String // id: %37
// function_ref default argument 1 of print(_:separator:terminator:)
%38 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %39
%39 = apply %38() : $@convention(thin) () -> @owned String // user: %42
// function_ref default argument 2 of print(_:separator:terminator:)
%40 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %41
%41 = apply %40() : $@convention(thin) () -> @owned String // user: %42
%42 = apply %19(%25, %39, %41) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %43
bb2: // Preds: bb1 bb0
%44 = tuple () // user: %45
return %44 : $() // id: %45
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module after Guaranteed Passes "Prune Control Flow at No-Return Calls Using SIL unreachable" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %5, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref Bool._getBuiltinLogicValue()
%2 = function_ref @_T0Sb21_getBuiltinLogicValueBi1_yF : $@convention(method) (Bool) -> Builtin.Int1 // user: %17
// function_ref != infix<A>(_:_:)
%3 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %13
%4 = alloc_stack $Optional<Int> // users: %16, %13, %5
store %0 to [trivial] %4 : $*Optional<Int> // id: %5
// function_ref Optional.init(nilLiteral:)
%6 = function_ref @_T0SqxSgyt10nilLiteral_tcfC : $@convention(method) <τ_0_0> (@thin Optional<τ_0_0>.Type) -> @out Optional<τ_0_0> // user: %9
%7 = alloc_stack $Optional<Int> // users: %15, %10, %9
%8 = metatype $@thin Optional<Int>.Type // user: %9
%9 = apply %6<Int>(%7, %8) : $@convention(method) <τ_0_0> (@thin Optional<τ_0_0>.Type) -> @out Optional<τ_0_0>
%10 = load [trivial] %7 : $*Optional<Int> // user: %12
%11 = alloc_stack $Optional<Int> // users: %14, %13, %12
store %10 to [trivial] %11 : $*Optional<Int> // id: %12
%13 = apply %3<Int>(%4, %11) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %17
dealloc_stack %11 : $*Optional<Int> // id: %14
dealloc_stack %7 : $*Optional<Int> // id: %15
dealloc_stack %4 : $*Optional<Int> // id: %16
%17 = apply %2(%13) : $@convention(method) (Bool) -> Builtin.Int1 // user: %18
cond_br %17, bb1, bb2 // id: %18
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%19 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %42
%20 = integer_literal $Builtin.Word, 1 // user: %22
// function_ref _allocateUninitializedArray<A>(_:)
%21 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %22
%22 = apply %21<Any>(%20) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %28, %27, %23
%23 = begin_borrow %22 : $(Array<Any>, Builtin.RawPointer) // users: %27, %26, %24
%24 = tuple_extract %23 : $(Array<Any>, Builtin.RawPointer), 0 // user: %25
%25 = copy_value %24 : $Array<Any> // user: %42
%26 = tuple_extract %23 : $(Array<Any>, Builtin.RawPointer), 1 // user: %29
end_borrow %23 from %22 : $(Array<Any>, Builtin.RawPointer), $(Array<Any>, Builtin.RawPointer) // id: %27
destroy_value %22 : $(Array<Any>, Builtin.RawPointer) // id: %28
%29 = pointer_to_address %26 : $Builtin.RawPointer to [strict] $*Any // user: %30
%30 = init_existential_addr %29 : $*Any, $String // user: %37
%31 = string_literal utf8 "not nil" // user: %36
%32 = integer_literal $Builtin.Word, 7 // user: %36
%33 = integer_literal $Builtin.Int1, -1 // user: %36
%34 = metatype $@thin String.Type // user: %36
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%35 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %36
%36 = apply %35(%31, %32, %33, %34) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %37
store %36 to [init] %30 : $*String // id: %37
// function_ref default argument 1 of print(_:separator:terminator:)
%38 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %39
%39 = apply %38() : $@convention(thin) () -> @owned String // user: %42
// function_ref default argument 2 of print(_:separator:terminator:)
%40 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %41
%41 = apply %40() : $@convention(thin) () -> @owned String // user: %42
%42 = apply %19(%25, %39, %41) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %43
bb2: // Preds: bb1 bb0
%44 = tuple () // user: %45
return %44 : $() // id: %45
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module after Guaranteed Passes "Eliminate Ownership Annotation of SIL" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %5, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref Bool._getBuiltinLogicValue()
%2 = function_ref @_T0Sb21_getBuiltinLogicValueBi1_yF : $@convention(method) (Bool) -> Builtin.Int1 // user: %17
// function_ref != infix<A>(_:_:)
%3 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %13
%4 = alloc_stack $Optional<Int> // users: %5, %16, %13
store %0 to %4 : $*Optional<Int> // id: %5
// function_ref Optional.init(nilLiteral:)
%6 = function_ref @_T0SqxSgyt10nilLiteral_tcfC : $@convention(method) <τ_0_0> (@thin Optional<τ_0_0>.Type) -> @out Optional<τ_0_0> // user: %9
%7 = alloc_stack $Optional<Int> // users: %10, %15, %9
%8 = metatype $@thin Optional<Int>.Type // user: %9
%9 = apply %6<Int>(%7, %8) : $@convention(method) <τ_0_0> (@thin Optional<τ_0_0>.Type) -> @out Optional<τ_0_0>
%10 = load %7 : $*Optional<Int> // user: %12
%11 = alloc_stack $Optional<Int> // users: %12, %14, %13
store %10 to %11 : $*Optional<Int> // id: %12
%13 = apply %3<Int>(%4, %11) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %17
dealloc_stack %11 : $*Optional<Int> // id: %14
dealloc_stack %7 : $*Optional<Int> // id: %15
dealloc_stack %4 : $*Optional<Int> // id: %16
%17 = apply %2(%13) : $@convention(method) (Bool) -> Builtin.Int1 // user: %18
cond_br %17, bb1, bb2 // id: %18
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%19 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %40
%20 = integer_literal $Builtin.Word, 1 // user: %22
// function_ref _allocateUninitializedArray<A>(_:)
%21 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %22
%22 = apply %21<Any>(%20) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %26, %23, %25
%23 = tuple_extract %22 : $(Array<Any>, Builtin.RawPointer), 0 // users: %40, %24
retain_value %23 : $Array<Any> // id: %24
%25 = tuple_extract %22 : $(Array<Any>, Builtin.RawPointer), 1 // user: %27
release_value %22 : $(Array<Any>, Builtin.RawPointer) // id: %26
%27 = pointer_to_address %25 : $Builtin.RawPointer to [strict] $*Any // user: %28
%28 = init_existential_addr %27 : $*Any, $String // user: %35
%29 = string_literal utf8 "not nil" // user: %34
%30 = integer_literal $Builtin.Word, 7 // user: %34
%31 = integer_literal $Builtin.Int1, -1 // user: %34
%32 = metatype $@thin String.Type // user: %34
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%33 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %34
%34 = apply %33(%29, %30, %31, %32) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %35
store %34 to %28 : $*String // id: %35
// function_ref default argument 1 of print(_:separator:terminator:)
%36 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %37
%37 = apply %36() : $@convention(thin) () -> @owned String // user: %40
// function_ref default argument 2 of print(_:separator:terminator:)
%38 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %39
%39 = apply %38() : $@convention(thin) () -> @owned String // user: %40
%40 = apply %19(%23, %37, %39) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %41
bb2: // Preds: bb1 bb0
%42 = tuple () // user: %43
return %42 : $() // id: %43
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module after Guaranteed Passes "Mandatory Inlining of Transparent Functions" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %4, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref != infix<A>(_:_:)
%2 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %11
%3 = alloc_stack $Optional<Int> // users: %4, %14, %11
store %0 to %3 : $*Optional<Int> // id: %4
%5 = alloc_stack $Optional<Int> // users: %6, %8, %13
inject_enum_addr %5 : $*Optional<Int>, #Optional.none!enumelt // id: %6
%7 = tuple ()
%8 = load %5 : $*Optional<Int> // user: %10
%9 = alloc_stack $Optional<Int> // users: %10, %12, %11
store %8 to %9 : $*Optional<Int> // id: %10
%11 = apply %2<Int>(%3, %9) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %15
dealloc_stack %9 : $*Optional<Int> // id: %12
dealloc_stack %5 : $*Optional<Int> // id: %13
dealloc_stack %3 : $*Optional<Int> // id: %14
%15 = struct_extract %11 : $Bool, #Bool._value // user: %16
cond_br %15, bb1, bb2 // id: %16
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%17 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %38
%18 = integer_literal $Builtin.Word, 1 // user: %20
// function_ref _allocateUninitializedArray<A>(_:)
%19 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %20
%20 = apply %19<Any>(%18) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %24, %21, %23
%21 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 0 // users: %38, %22
retain_value %21 : $Array<Any> // id: %22
%23 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 1 // user: %25
release_value %20 : $(Array<Any>, Builtin.RawPointer) // id: %24
%25 = pointer_to_address %23 : $Builtin.RawPointer to [strict] $*Any // user: %26
%26 = init_existential_addr %25 : $*Any, $String // user: %33
%27 = string_literal utf8 "not nil" // user: %32
%28 = integer_literal $Builtin.Word, 7 // user: %32
%29 = integer_literal $Builtin.Int1, -1 // user: %32
%30 = metatype $@thin String.Type // user: %32
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%31 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %32
%32 = apply %31(%27, %28, %29, %30) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %33
store %32 to %26 : $*String // id: %33
// function_ref default argument 1 of print(_:separator:terminator:)
%34 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %35
%35 = apply %34() : $@convention(thin) () -> @owned String // user: %38
// function_ref default argument 2 of print(_:separator:terminator:)
%36 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %37
%37 = apply %36() : $@convention(thin) () -> @owned String // user: %38
%38 = apply %17(%21, %35, %37) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %39
bb2: // Preds: bb1 bb0
%40 = tuple () // user: %41
return %40 : $() // id: %41
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module after Guaranteed Passes "Diagnose Unreachable Code" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %4, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref != infix<A>(_:_:)
%2 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %11
%3 = alloc_stack $Optional<Int> // users: %4, %14, %11
store %0 to %3 : $*Optional<Int> // id: %4
%5 = alloc_stack $Optional<Int> // users: %6, %8, %13
inject_enum_addr %5 : $*Optional<Int>, #Optional.none!enumelt // id: %6
%7 = tuple ()
%8 = load %5 : $*Optional<Int> // user: %10
%9 = alloc_stack $Optional<Int> // users: %10, %12, %11
store %8 to %9 : $*Optional<Int> // id: %10
%11 = apply %2<Int>(%3, %9) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %15
dealloc_stack %9 : $*Optional<Int> // id: %12
dealloc_stack %5 : $*Optional<Int> // id: %13
dealloc_stack %3 : $*Optional<Int> // id: %14
%15 = struct_extract %11 : $Bool, #Bool._value // user: %16
cond_br %15, bb1, bb2 // id: %16
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%17 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %38
%18 = integer_literal $Builtin.Word, 1 // user: %20
// function_ref _allocateUninitializedArray<A>(_:)
%19 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %20
%20 = apply %19<Any>(%18) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %24, %21, %23
%21 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 0 // users: %38, %22
retain_value %21 : $Array<Any> // id: %22
%23 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 1 // user: %25
release_value %20 : $(Array<Any>, Builtin.RawPointer) // id: %24
%25 = pointer_to_address %23 : $Builtin.RawPointer to [strict] $*Any // user: %26
%26 = init_existential_addr %25 : $*Any, $String // user: %33
%27 = string_literal utf8 "not nil" // user: %32
%28 = integer_literal $Builtin.Word, 7 // user: %32
%29 = integer_literal $Builtin.Int1, -1 // user: %32
%30 = metatype $@thin String.Type // user: %32
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%31 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %32
%32 = apply %31(%27, %28, %29, %30) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %33
store %32 to %26 : $*String // id: %33
// function_ref default argument 1 of print(_:separator:terminator:)
%34 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %35
%35 = apply %34() : $@convention(thin) () -> @owned String // user: %38
// function_ref default argument 2 of print(_:separator:terminator:)
%36 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %37
%37 = apply %36() : $@convention(thin) () -> @owned String // user: %38
%38 = apply %17(%21, %35, %37) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %39
bb2: // Preds: bb1 bb0
%40 = tuple () // user: %41
return %40 : $() // id: %41
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module before SILOpt Prepare Passes transformation (0) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %4, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref != infix<A>(_:_:)
%2 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %11
%3 = alloc_stack $Optional<Int> // users: %4, %14, %11
store %0 to %3 : $*Optional<Int> // id: %4
%5 = alloc_stack $Optional<Int> // users: %6, %8, %13
inject_enum_addr %5 : $*Optional<Int>, #Optional.none!enumelt // id: %6
%7 = tuple ()
%8 = load %5 : $*Optional<Int> // user: %10
%9 = alloc_stack $Optional<Int> // users: %10, %12, %11
store %8 to %9 : $*Optional<Int> // id: %10
%11 = apply %2<Int>(%3, %9) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %15
dealloc_stack %9 : $*Optional<Int> // id: %12
dealloc_stack %5 : $*Optional<Int> // id: %13
dealloc_stack %3 : $*Optional<Int> // id: %14
%15 = struct_extract %11 : $Bool, #Bool._value // user: %16
cond_br %15, bb1, bb2 // id: %16
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%17 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %38
%18 = integer_literal $Builtin.Word, 1 // user: %20
// function_ref _allocateUninitializedArray<A>(_:)
%19 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %20
%20 = apply %19<Any>(%18) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %24, %21, %23
%21 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 0 // users: %38, %22
retain_value %21 : $Array<Any> // id: %22
%23 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 1 // user: %25
release_value %20 : $(Array<Any>, Builtin.RawPointer) // id: %24
%25 = pointer_to_address %23 : $Builtin.RawPointer to [strict] $*Any // user: %26
%26 = init_existential_addr %25 : $*Any, $String // user: %33
%27 = string_literal utf8 "not nil" // user: %32
%28 = integer_literal $Builtin.Word, 7 // user: %32
%29 = integer_literal $Builtin.Int1, -1 // user: %32
%30 = metatype $@thin String.Type // user: %32
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%31 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %32
%32 = apply %31(%27, %28, %29, %30) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %33
store %32 to %26 : $*String // id: %33
// function_ref default argument 1 of print(_:separator:terminator:)
%34 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %35
%35 = apply %34() : $@convention(thin) () -> @owned String // user: %38
// function_ref default argument 2 of print(_:separator:terminator:)
%36 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %37
%37 = apply %36() : $@convention(thin) () -> @owned String // user: %38
%38 = apply %17(%21, %35, %37) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %39
bb2: // Preds: bb1 bb0
%40 = tuple () // user: %41
return %40 : $() // id: %41
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module before EarlyModulePasses transformation (0) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %4, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref != infix<A>(_:_:)
%2 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %11
%3 = alloc_stack $Optional<Int> // users: %4, %14, %11
store %0 to %3 : $*Optional<Int> // id: %4
%5 = alloc_stack $Optional<Int> // users: %6, %8, %13
inject_enum_addr %5 : $*Optional<Int>, #Optional.none!enumelt // id: %6
%7 = tuple ()
%8 = load %5 : $*Optional<Int> // user: %10
%9 = alloc_stack $Optional<Int> // users: %10, %12, %11
store %8 to %9 : $*Optional<Int> // id: %10
%11 = apply %2<Int>(%3, %9) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %15
dealloc_stack %9 : $*Optional<Int> // id: %12
dealloc_stack %5 : $*Optional<Int> // id: %13
dealloc_stack %3 : $*Optional<Int> // id: %14
%15 = struct_extract %11 : $Bool, #Bool._value // user: %16
cond_br %15, bb1, bb2 // id: %16
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%17 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %38
%18 = integer_literal $Builtin.Word, 1 // user: %20
// function_ref _allocateUninitializedArray<A>(_:)
%19 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %20
%20 = apply %19<Any>(%18) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %24, %21, %23
%21 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 0 // users: %38, %22
retain_value %21 : $Array<Any> // id: %22
%23 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 1 // user: %25
release_value %20 : $(Array<Any>, Builtin.RawPointer) // id: %24
%25 = pointer_to_address %23 : $Builtin.RawPointer to [strict] $*Any // user: %26
%26 = init_existential_addr %25 : $*Any, $String // user: %33
%27 = string_literal utf8 "not nil" // user: %32
%28 = integer_literal $Builtin.Word, 7 // user: %32
%29 = integer_literal $Builtin.Int1, -1 // user: %32
%30 = metatype $@thin String.Type // user: %32
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%31 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %32
%32 = apply %31(%27, %28, %29, %30) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %33
store %32 to %26 : $*String // id: %33
// function_ref default argument 1 of print(_:separator:terminator:)
%34 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %35
%35 = apply %34() : $@convention(thin) () -> @owned String // user: %38
// function_ref default argument 2 of print(_:separator:terminator:)
%36 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %37
%37 = apply %36() : $@convention(thin) () -> @owned String // user: %38
%38 = apply %17(%21, %35, %37) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %39
bb2: // Preds: bb1 bb0
%40 = tuple () // user: %41
return %40 : $() // id: %41
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module after EarlyModulePasses "Dead Function Elimination" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %4, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref != infix<A>(_:_:)
%2 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %11
%3 = alloc_stack $Optional<Int> // users: %4, %14, %11
store %0 to %3 : $*Optional<Int> // id: %4
%5 = alloc_stack $Optional<Int> // users: %6, %8, %13
inject_enum_addr %5 : $*Optional<Int>, #Optional.none!enumelt // id: %6
%7 = tuple ()
%8 = load %5 : $*Optional<Int> // user: %10
%9 = alloc_stack $Optional<Int> // users: %10, %12, %11
store %8 to %9 : $*Optional<Int> // id: %10
%11 = apply %2<Int>(%3, %9) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %15
dealloc_stack %9 : $*Optional<Int> // id: %12
dealloc_stack %5 : $*Optional<Int> // id: %13
dealloc_stack %3 : $*Optional<Int> // id: %14
%15 = struct_extract %11 : $Bool, #Bool._value // user: %16
cond_br %15, bb1, bb2 // id: %16
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%17 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %38
%18 = integer_literal $Builtin.Word, 1 // user: %20
// function_ref _allocateUninitializedArray<A>(_:)
%19 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %20
%20 = apply %19<Any>(%18) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %24, %21, %23
%21 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 0 // users: %38, %22
retain_value %21 : $Array<Any> // id: %22
%23 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 1 // user: %25
release_value %20 : $(Array<Any>, Builtin.RawPointer) // id: %24
%25 = pointer_to_address %23 : $Builtin.RawPointer to [strict] $*Any // user: %26
%26 = init_existential_addr %25 : $*Any, $String // user: %33
%27 = string_literal utf8 "not nil" // user: %32
%28 = integer_literal $Builtin.Word, 7 // user: %32
%29 = integer_literal $Builtin.Int1, -1 // user: %32
%30 = metatype $@thin String.Type // user: %32
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%31 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %32
%32 = apply %31(%27, %28, %29, %30) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %33
store %32 to %26 : $*String // id: %33
// function_ref default argument 1 of print(_:separator:terminator:)
%34 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %35
%35 = apply %34() : $@convention(thin) () -> @owned String // user: %38
// function_ref default argument 2 of print(_:separator:terminator:)
%36 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %37
%37 = apply %36() : $@convention(thin) () -> @owned String // user: %38
%38 = apply %17(%21, %35, %37) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %39
bb2: // Preds: bb1 bb0
%40 = tuple () // user: %41
return %40 : $() // id: %41
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module after EarlyModulePasses "Link all SIL Referenced within the Module via Deserialization" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %4, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref != infix<A>(_:_:)
%2 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %11
%3 = alloc_stack $Optional<Int> // users: %4, %14, %11
store %0 to %3 : $*Optional<Int> // id: %4
%5 = alloc_stack $Optional<Int> // users: %6, %8, %13
inject_enum_addr %5 : $*Optional<Int>, #Optional.none!enumelt // id: %6
%7 = tuple ()
%8 = load %5 : $*Optional<Int> // user: %10
%9 = alloc_stack $Optional<Int> // users: %10, %12, %11
store %8 to %9 : $*Optional<Int> // id: %10
%11 = apply %2<Int>(%3, %9) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %15
dealloc_stack %9 : $*Optional<Int> // id: %12
dealloc_stack %5 : $*Optional<Int> // id: %13
dealloc_stack %3 : $*Optional<Int> // id: %14
%15 = struct_extract %11 : $Bool, #Bool._value // user: %16
cond_br %15, bb1, bb2 // id: %16
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%17 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %38
%18 = integer_literal $Builtin.Word, 1 // user: %20
// function_ref _allocateUninitializedArray<A>(_:)
%19 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %20
%20 = apply %19<Any>(%18) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %24, %21, %23
%21 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 0 // users: %38, %22
retain_value %21 : $Array<Any> // id: %22
%23 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 1 // user: %25
release_value %20 : $(Array<Any>, Builtin.RawPointer) // id: %24
%25 = pointer_to_address %23 : $Builtin.RawPointer to [strict] $*Any // user: %26
%26 = init_existential_addr %25 : $*Any, $String // user: %33
%27 = string_literal utf8 "not nil" // user: %32
%28 = integer_literal $Builtin.Word, 7 // user: %32
%29 = integer_literal $Builtin.Int1, -1 // user: %32
%30 = metatype $@thin String.Type // user: %32
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%31 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %32
%32 = apply %31(%27, %28, %29, %30) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %33
store %32 to %26 : $*String // id: %33
// function_ref default argument 1 of print(_:separator:terminator:)
%34 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %35
%35 = apply %34() : $@convention(thin) () -> @owned String // user: %38
// function_ref default argument 2 of print(_:separator:terminator:)
%36 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %37
%37 = apply %36() : $@convention(thin) () -> @owned String // user: %38
%38 = apply %17(%21, %35, %37) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %39
bb2: // Preds: bb1 bb0
%40 = tuple () // user: %41
return %40 : $() // id: %41
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module before HighLevel+EarlyLoopOpt transformation (0) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %4, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref != infix<A>(_:_:)
%2 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %11
%3 = alloc_stack $Optional<Int> // users: %4, %14, %11
store %0 to %3 : $*Optional<Int> // id: %4
%5 = alloc_stack $Optional<Int> // users: %6, %8, %13
inject_enum_addr %5 : $*Optional<Int>, #Optional.none!enumelt // id: %6
%7 = tuple ()
%8 = load %5 : $*Optional<Int> // user: %10
%9 = alloc_stack $Optional<Int> // users: %10, %12, %11
store %8 to %9 : $*Optional<Int> // id: %10
%11 = apply %2<Int>(%3, %9) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %15
dealloc_stack %9 : $*Optional<Int> // id: %12
dealloc_stack %5 : $*Optional<Int> // id: %13
dealloc_stack %3 : $*Optional<Int> // id: %14
%15 = struct_extract %11 : $Bool, #Bool._value // user: %16
cond_br %15, bb1, bb2 // id: %16
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%17 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %38
%18 = integer_literal $Builtin.Word, 1 // user: %20
// function_ref _allocateUninitializedArray<A>(_:)
%19 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %20
%20 = apply %19<Any>(%18) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %24, %21, %23
%21 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 0 // users: %38, %22
retain_value %21 : $Array<Any> // id: %22
%23 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 1 // user: %25
release_value %20 : $(Array<Any>, Builtin.RawPointer) // id: %24
%25 = pointer_to_address %23 : $Builtin.RawPointer to [strict] $*Any // user: %26
%26 = init_existential_addr %25 : $*Any, $String // user: %33
%27 = string_literal utf8 "not nil" // user: %32
%28 = integer_literal $Builtin.Word, 7 // user: %32
%29 = integer_literal $Builtin.Int1, -1 // user: %32
%30 = metatype $@thin String.Type // user: %32
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%31 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %32
%32 = apply %31(%27, %28, %29, %30) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %33
store %32 to %26 : $*String // id: %33
// function_ref default argument 1 of print(_:separator:terminator:)
%34 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %35
%35 = apply %34() : $@convention(thin) () -> @owned String // user: %38
// function_ref default argument 2 of print(_:separator:terminator:)
%36 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %37
%37 = apply %36() : $@convention(thin) () -> @owned String // user: %38
%38 = apply %17(%21, %35, %37) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %39
bb2: // Preds: bb1 bb0
%40 = tuple () // user: %41
return %40 : $() // id: %41
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after HighLevel+EarlyLoopOpt "Lower Aggregate SIL Instructions to Multiple Scalar Operations" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %4, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref != infix<A>(_:_:)
%2 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %11
%3 = alloc_stack $Optional<Int> // users: %4, %14, %11
store %0 to %3 : $*Optional<Int> // id: %4
%5 = alloc_stack $Optional<Int> // users: %6, %8, %13
inject_enum_addr %5 : $*Optional<Int>, #Optional.none!enumelt // id: %6
%7 = tuple ()
%8 = load %5 : $*Optional<Int> // user: %10
%9 = alloc_stack $Optional<Int> // users: %10, %12, %11
store %8 to %9 : $*Optional<Int> // id: %10
%11 = apply %2<Int>(%3, %9) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %15
dealloc_stack %9 : $*Optional<Int> // id: %12
dealloc_stack %5 : $*Optional<Int> // id: %13
dealloc_stack %3 : $*Optional<Int> // id: %14
%15 = struct_extract %11 : $Bool, #Bool._value // user: %16
cond_br %15, bb1, bb2 // id: %16
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%17 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %48
%18 = integer_literal $Builtin.Word, 1 // user: %20
// function_ref _allocateUninitializedArray<A>(_:)
%19 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %20
%20 = apply %19<Any>(%18) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %30, %21, %29
%21 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 0 // users: %22, %48
%22 = struct_extract %21 : $Array<Any>, #Array._buffer // user: %23
%23 = struct_extract %22 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %24
%24 = struct_extract %23 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // users: %26, %25
strong_retain %24 : $Builtin.BridgeObject // id: %25
%26 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%24 : $Builtin.BridgeObject) // user: %27
%27 = struct $_ArrayBuffer<Any> (%26 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %28
%28 = struct $Array<Any> (%27 : $_ArrayBuffer<Any>)
%29 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 1 // user: %35
%30 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 0 // user: %31
%31 = struct_extract %30 : $Array<Any>, #Array._buffer // user: %32
%32 = struct_extract %31 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %33
%33 = struct_extract %32 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %34
strong_release %33 : $Builtin.BridgeObject // id: %34
%35 = pointer_to_address %29 : $Builtin.RawPointer to [strict] $*Any // user: %36
%36 = init_existential_addr %35 : $*Any, $String // user: %43
%37 = string_literal utf8 "not nil" // user: %42
%38 = integer_literal $Builtin.Word, 7 // user: %42
%39 = integer_literal $Builtin.Int1, -1 // user: %42
%40 = metatype $@thin String.Type // user: %42
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%41 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %42
%42 = apply %41(%37, %38, %39, %40) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %43
store %42 to %36 : $*String // id: %43
// function_ref default argument 1 of print(_:separator:terminator:)
%44 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %45
%45 = apply %44() : $@convention(thin) () -> @owned String // user: %48
// function_ref default argument 2 of print(_:separator:terminator:)
%46 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %47
%47 = apply %46() : $@convention(thin) () -> @owned String // user: %48
%48 = apply %17(%21, %45, %47) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %49
bb2: // Preds: bb1 bb0
%50 = tuple () // user: %51
return %50 : $() // id: %51
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after HighLevel+EarlyLoopOpt "Combine SIL Instructions via Peephole Optimization" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %4, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
// function_ref != infix<A>(_:_:)
%2 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %11
%3 = alloc_stack $Optional<Int> // users: %4, %14, %11
store %0 to %3 : $*Optional<Int> // id: %4
%5 = alloc_stack $Optional<Int> // users: %7, %8, %13
%6 = enum $Optional<Int>, #Optional.none!enumelt // user: %7
store %6 to %5 : $*Optional<Int> // id: %7
%8 = load %5 : $*Optional<Int> // user: %10
%9 = alloc_stack $Optional<Int> // users: %10, %12, %11
store %8 to %9 : $*Optional<Int> // id: %10
%11 = apply %2<Int>(%3, %9) : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@in Optional<τ_0_0>, @in Optional<τ_0_0>) -> Bool // user: %15
dealloc_stack %9 : $*Optional<Int> // id: %12
dealloc_stack %5 : $*Optional<Int> // id: %13
dealloc_stack %3 : $*Optional<Int> // id: %14
%15 = struct_extract %11 : $Bool, #Bool._value // user: %16
cond_br %15, bb1, bb2 // id: %16
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%17 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %45
%18 = integer_literal $Builtin.Word, 1 // user: %20
// function_ref _allocateUninitializedArray<A>(_:)
%19 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %20
%20 = apply %19<Any>(%18) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %27, %21, %26
%21 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 0 // users: %22, %45
%22 = struct_extract %21 : $Array<Any>, #Array._buffer // user: %23
%23 = struct_extract %22 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %24
%24 = struct_extract %23 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %25
strong_retain %24 : $Builtin.BridgeObject // id: %25
%26 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 1 // user: %32
%27 = tuple_extract %20 : $(Array<Any>, Builtin.RawPointer), 0 // user: %28
%28 = struct_extract %27 : $Array<Any>, #Array._buffer // user: %29
%29 = struct_extract %28 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %30
%30 = struct_extract %29 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %31
strong_release %30 : $Builtin.BridgeObject // id: %31
%32 = pointer_to_address %26 : $Builtin.RawPointer to [strict] $*Any // user: %33
%33 = init_existential_addr %32 : $*Any, $String // user: %40
%34 = string_literal utf8 "not nil" // user: %39
%35 = integer_literal $Builtin.Word, 7 // user: %39
%36 = integer_literal $Builtin.Int1, -1 // user: %39
%37 = metatype $@thin String.Type // user: %39
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%38 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %39
%39 = apply %38(%34, %35, %36, %37) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %40
store %39 to %33 : $*String // id: %40
// function_ref default argument 1 of print(_:separator:terminator:)
%41 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %42
%42 = apply %41() : $@convention(thin) () -> @owned String // user: %45
// function_ref default argument 2 of print(_:separator:terminator:)
%43 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %44
%44 = apply %43() : $@convention(thin) () -> @owned String // user: %45
%45 = apply %17(%21, %42, %44) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %46
bb2: // Preds: bb1 bb0
%47 = tuple () // user: %48
return %47 : $() // id: %48
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after HighLevel+EarlyLoopOpt "Generic Function Specialization on Static Types" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %3, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
%2 = alloc_stack $Optional<Int> // users: %11, %3, %16
store %0 to %2 : $*Optional<Int> // id: %3
%4 = alloc_stack $Optional<Int> // users: %6, %7, %15
%5 = enum $Optional<Int>, #Optional.none!enumelt // user: %6
store %5 to %4 : $*Optional<Int> // id: %6
%7 = load %4 : $*Optional<Int> // user: %9
%8 = alloc_stack $Optional<Int> // users: %12, %9, %14
store %7 to %8 : $*Optional<Int> // id: %9
// function_ref specialized != infix<A>(_:_:)
%10 = function_ref @_T0s2neoiSbxSg_ABts9EquatableRzlFSi_Tg5 : $@convention(thin) (Optional<Int>, Optional<Int>) -> Bool // user: %13
%11 = load %2 : $*Optional<Int> // user: %13
%12 = load %8 : $*Optional<Int> // user: %13
%13 = apply %10(%11, %12) : $@convention(thin) (Optional<Int>, Optional<Int>) -> Bool // user: %17
dealloc_stack %8 : $*Optional<Int> // id: %14
dealloc_stack %4 : $*Optional<Int> // id: %15
dealloc_stack %2 : $*Optional<Int> // id: %16
%17 = struct_extract %13 : $Bool, #Bool._value // user: %18
cond_br %17, bb1, bb2 // id: %18
bb1: // Preds: bb0
// function_ref print(_:separator:terminator:)
%19 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %47
%20 = integer_literal $Builtin.Word, 1 // user: %22
// function_ref specialized _allocateUninitializedArray<A>(_:)
%21 = function_ref @_T0s27_allocateUninitializedArraySayxG_BptBwlFyp_Tg5 : $@convention(thin) (Builtin.Word) -> (@owned Array<Any>, Builtin.RawPointer) // user: %22
%22 = apply %21(%20) : $@convention(thin) (Builtin.Word) -> (@owned Array<Any>, Builtin.RawPointer) // users: %28, %23, %29
%23 = tuple_extract %22 : $(Array<Any>, Builtin.RawPointer), 0 // users: %24, %47
%24 = struct_extract %23 : $Array<Any>, #Array._buffer // user: %25
%25 = struct_extract %24 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %26
%26 = struct_extract %25 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %27
strong_retain %26 : $Builtin.BridgeObject // id: %27
%28 = tuple_extract %22 : $(Array<Any>, Builtin.RawPointer), 1 // user: %34
%29 = tuple_extract %22 : $(Array<Any>, Builtin.RawPointer), 0 // user: %30
%30 = struct_extract %29 : $Array<Any>, #Array._buffer // user: %31
%31 = struct_extract %30 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %32
%32 = struct_extract %31 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %33
strong_release %32 : $Builtin.BridgeObject // id: %33
%34 = pointer_to_address %28 : $Builtin.RawPointer to [strict] $*Any // user: %35
%35 = init_existential_addr %34 : $*Any, $String // user: %42
%36 = string_literal utf8 "not nil" // user: %41
%37 = integer_literal $Builtin.Word, 7 // user: %41
%38 = integer_literal $Builtin.Int1, -1 // user: %41
%39 = metatype $@thin String.Type // user: %41
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%40 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %41
%41 = apply %40(%36, %37, %38, %39) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %42
store %41 to %35 : $*String // id: %42
// function_ref default argument 1 of print(_:separator:terminator:)
%43 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %44
%44 = apply %43() : $@convention(thin) () -> @owned String // user: %47
// function_ref default argument 2 of print(_:separator:terminator:)
%45 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %46
%46 = apply %45() : $@convention(thin) () -> @owned String // user: %47
%47 = apply %19(%23, %44, %46) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb2 // id: %48
bb2: // Preds: bb1 bb0
%49 = tuple () // user: %50
return %49 : $() // id: %50
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after HighLevel+EarlyLoopOpt "Early Inlining Preserving Semantic Functions" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %3, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
%2 = alloc_stack $Optional<Int> // users: %10, %3, %35
store %0 to %2 : $*Optional<Int> // id: %3
%4 = alloc_stack $Optional<Int> // users: %6, %7, %34
%5 = enum $Optional<Int>, #Optional.none!enumelt // user: %6
store %5 to %4 : $*Optional<Int> // id: %6
%7 = load %4 : $*Optional<Int> // user: %9
%8 = alloc_stack $Optional<Int> // users: %11, %9, %33
store %7 to %8 : $*Optional<Int> // id: %9
%10 = load %2 : $*Optional<Int> // users: %28, %14, %15
%11 = load %8 : $*Optional<Int> // users: %12, %13
switch_enum %11 : $Optional<Int>, case #Optional.some!enumelt.1: bb1, case #Optional.none!enumelt: bb6 // id: %12
bb1: // Preds: bb0
%13 = unchecked_enum_data %11 : $Optional<Int>, #Optional.some!enumelt.1 // user: %17
switch_enum %10 : $Optional<Int>, case #Optional.some!enumelt.1: bb2, case #Optional.none!enumelt: bb4 // id: %14
bb2: // Preds: bb1
%15 = unchecked_enum_data %10 : $Optional<Int>, #Optional.some!enumelt.1 // user: %16
%16 = struct_extract %15 : $Int, #Int._value // user: %18
%17 = struct_extract %13 : $Int, #Int._value // user: %18
%18 = builtin "cmp_eq_Int64"(%16 : $Builtin.Int64, %17 : $Builtin.Int64) : $Builtin.Int1 // user: %19
br bb3(%18 : $Builtin.Int1) // id: %19
// %20 // user: %22
bb3(%20 : $Builtin.Int1): // Preds: bb7 bb5 bb2
%21 = integer_literal $Builtin.Int1, -1 // user: %22
%22 = builtin "xor_Int1"(%20 : $Builtin.Int1, %21 : $Builtin.Int1) : $Builtin.Int1 // user: %23
%23 = struct $Bool (%22 : $Builtin.Int1) // user: %24
br bb9(%23 : $Bool) // id: %24
bb4: // Preds: bb1
br bb5 // id: %25
bb5: // Preds: bb8 bb4
%26 = integer_literal $Builtin.Int1, 0 // user: %27
br bb3(%26 : $Builtin.Int1) // id: %27
bb6: // Preds: bb0
switch_enum %10 : $Optional<Int>, case #Optional.none!enumelt: bb7, case #Optional.some!enumelt.1: bb8 // id: %28
bb7: // Preds: bb6
%29 = integer_literal $Builtin.Int1, -1 // user: %30
br bb3(%29 : $Builtin.Int1) // id: %30
bb8: // Preds: bb6
br bb5 // id: %31
// %32 // user: %36
bb9(%32 : $Bool): // Preds: bb3
dealloc_stack %8 : $*Optional<Int> // id: %33
dealloc_stack %4 : $*Optional<Int> // id: %34
dealloc_stack %2 : $*Optional<Int> // id: %35
%36 = struct_extract %32 : $Bool, #Bool._value // user: %37
cond_br %36, bb10, bb15 // id: %37
bb10: // Preds: bb9
// function_ref print(_:separator:terminator:)
%38 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %89
%39 = integer_literal $Builtin.Word, 1 // users: %45, %40
%40 = builtin "zextOrBitCast_Word_Int64"(%39 : $Builtin.Word) : $Builtin.Int64 // users: %43, %41
%41 = struct $Int (%40 : $Builtin.Int64) // users: %59, %48
%42 = integer_literal $Builtin.Int64, 0 // user: %43
%43 = builtin "cmp_slt_Int64"(%42 : $Builtin.Int64, %40 : $Builtin.Int64) : $Builtin.Int1 // user: %44
cond_br %43, bb11, bb13 // id: %44
bb11: // Preds: bb10
%45 = alloc_ref [tail_elems $Any * %39 : $Builtin.Word] $_ContiguousArrayStorage<Any> // user: %48
%46 = metatype $@thin Array<Any>.Type // user: %48
// function_ref specialized static Array._adoptStorage(_:count:)
%47 = function_ref @_T0Sa13_adoptStorageSayxG_SpyxGts016_ContiguousArrayB0CyxG_Si5counttFZyp_Tg5 : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %48
%48 = apply %47(%45, %41, %46) : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %50, %49
%49 = tuple_extract %48 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %52
%50 = tuple_extract %48 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %51
%51 = struct_extract %50 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %52
br bb12(%49 : $Array<Any>, %51 : $Builtin.RawPointer) // id: %52
// %53 // user: %55
// %54 // user: %55
bb12(%53 : $Array<Any>, %54 : $Builtin.RawPointer): // Preds: bb13 bb11
%55 = tuple (%53 : $Array<Any>, %54 : $Builtin.RawPointer) // user: %56
br bb14(%55 : $(Array<Any>, Builtin.RawPointer)) // id: %56
bb13: // Preds: bb10
%57 = metatype $@thin Array<Any>.Type // user: %59
// function_ref specialized static Array._allocateUninitialized(_:)
%58 = function_ref @_T0Sa22_allocateUninitializedSayxG_SpyxGtSiFZyp_Tg5 : $@convention(method) (Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %59
%59 = apply %58(%41, %57) : $@convention(method) (Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %61, %60
%60 = tuple_extract %59 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %63
%61 = tuple_extract %59 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %62
%62 = struct_extract %61 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %63
br bb12(%60 : $Array<Any>, %62 : $Builtin.RawPointer) // id: %63
// %64 // users: %71, %65, %70
bb14(%64 : $(Array<Any>, Builtin.RawPointer)): // Preds: bb12
%65 = tuple_extract %64 : $(Array<Any>, Builtin.RawPointer), 0 // users: %66, %89
%66 = struct_extract %65 : $Array<Any>, #Array._buffer // user: %67
%67 = struct_extract %66 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %68
%68 = struct_extract %67 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %69
strong_retain %68 : $Builtin.BridgeObject // id: %69
%70 = tuple_extract %64 : $(Array<Any>, Builtin.RawPointer), 1 // user: %76
%71 = tuple_extract %64 : $(Array<Any>, Builtin.RawPointer), 0 // user: %72
%72 = struct_extract %71 : $Array<Any>, #Array._buffer // user: %73
%73 = struct_extract %72 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %74
%74 = struct_extract %73 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %75
strong_release %74 : $Builtin.BridgeObject // id: %75
%76 = pointer_to_address %70 : $Builtin.RawPointer to [strict] $*Any // user: %77
%77 = init_existential_addr %76 : $*Any, $String // user: %84
%78 = string_literal utf8 "not nil" // user: %83
%79 = integer_literal $Builtin.Word, 7 // user: %83
%80 = integer_literal $Builtin.Int1, -1 // user: %83
%81 = metatype $@thin String.Type // user: %83
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%82 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %83
%83 = apply %82(%78, %79, %80, %81) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %84
store %83 to %77 : $*String // id: %84
// function_ref default argument 1 of print(_:separator:terminator:)
%85 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %86
%86 = apply %85() : $@convention(thin) () -> @owned String // user: %89
// function_ref default argument 2 of print(_:separator:terminator:)
%87 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %88
%88 = apply %87() : $@convention(thin) () -> @owned String // user: %89
%89 = apply %38(%65, %86, %88) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb15 // id: %90
bb15: // Preds: bb14 bb9
%91 = tuple () // user: %92
return %91 : $() // id: %92
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after HighLevel+EarlyLoopOpt "Memory to SSA Value Conversion to Remove Stack Allocation" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %6, %5, %19, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
%2 = enum $Optional<Int>, #Optional.none!enumelt // users: %4, %3
switch_enum %2 : $Optional<Int>, case #Optional.some!enumelt.1: bb1, case #Optional.none!enumelt: bb6 // id: %3
bb1: // Preds: bb0
%4 = unchecked_enum_data %2 : $Optional<Int>, #Optional.some!enumelt.1 // user: %8
switch_enum %0 : $Optional<Int>, case #Optional.some!enumelt.1: bb2, case #Optional.none!enumelt: bb4 // id: %5
bb2: // Preds: bb1
%6 = unchecked_enum_data %0 : $Optional<Int>, #Optional.some!enumelt.1 // user: %7
%7 = struct_extract %6 : $Int, #Int._value // user: %9
%8 = struct_extract %4 : $Int, #Int._value // user: %9
%9 = builtin "cmp_eq_Int64"(%7 : $Builtin.Int64, %8 : $Builtin.Int64) : $Builtin.Int1 // user: %10
br bb3(%9 : $Builtin.Int1) // id: %10
// %11 // user: %13
bb3(%11 : $Builtin.Int1): // Preds: bb7 bb5 bb2
%12 = integer_literal $Builtin.Int1, -1 // user: %13
%13 = builtin "xor_Int1"(%11 : $Builtin.Int1, %12 : $Builtin.Int1) : $Builtin.Int1 // user: %14
%14 = struct $Bool (%13 : $Builtin.Int1) // user: %15
br bb9(%14 : $Bool) // id: %15
bb4: // Preds: bb1
br bb5 // id: %16
bb5: // Preds: bb8 bb4
%17 = integer_literal $Builtin.Int1, 0 // user: %18
br bb3(%17 : $Builtin.Int1) // id: %18
bb6: // Preds: bb0
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb7, case #Optional.some!enumelt.1: bb8 // id: %19
bb7: // Preds: bb6
%20 = integer_literal $Builtin.Int1, -1 // user: %21
br bb3(%20 : $Builtin.Int1) // id: %21
bb8: // Preds: bb6
br bb5 // id: %22
// %23 // user: %24
bb9(%23 : $Bool): // Preds: bb3
%24 = struct_extract %23 : $Bool, #Bool._value // user: %25
cond_br %24, bb10, bb15 // id: %25
bb10: // Preds: bb9
// function_ref print(_:separator:terminator:)
%26 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %77
%27 = integer_literal $Builtin.Word, 1 // users: %33, %28
%28 = builtin "zextOrBitCast_Word_Int64"(%27 : $Builtin.Word) : $Builtin.Int64 // users: %31, %29
%29 = struct $Int (%28 : $Builtin.Int64) // users: %47, %36
%30 = integer_literal $Builtin.Int64, 0 // user: %31
%31 = builtin "cmp_slt_Int64"(%30 : $Builtin.Int64, %28 : $Builtin.Int64) : $Builtin.Int1 // user: %32
cond_br %31, bb11, bb13 // id: %32
bb11: // Preds: bb10
%33 = alloc_ref [tail_elems $Any * %27 : $Builtin.Word] $_ContiguousArrayStorage<Any> // user: %36
%34 = metatype $@thin Array<Any>.Type // user: %36
// function_ref specialized static Array._adoptStorage(_:count:)
%35 = function_ref @_T0Sa13_adoptStorageSayxG_SpyxGts016_ContiguousArrayB0CyxG_Si5counttFZyp_Tg5 : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %36
%36 = apply %35(%33, %29, %34) : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %38, %37
%37 = tuple_extract %36 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %40
%38 = tuple_extract %36 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %39
%39 = struct_extract %38 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %40
br bb12(%37 : $Array<Any>, %39 : $Builtin.RawPointer) // id: %40
// %41 // user: %43
// %42 // user: %43
bb12(%41 : $Array<Any>, %42 : $Builtin.RawPointer): // Preds: bb13 bb11
%43 = tuple (%41 : $Array<Any>, %42 : $Builtin.RawPointer) // user: %44
br bb14(%43 : $(Array<Any>, Builtin.RawPointer)) // id: %44
bb13: // Preds: bb10
%45 = metatype $@thin Array<Any>.Type // user: %47
// function_ref specialized static Array._allocateUninitialized(_:)
%46 = function_ref @_T0Sa22_allocateUninitializedSayxG_SpyxGtSiFZyp_Tg5 : $@convention(method) (Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %47
%47 = apply %46(%29, %45) : $@convention(method) (Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %49, %48
%48 = tuple_extract %47 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %51
%49 = tuple_extract %47 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %50
%50 = struct_extract %49 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %51
br bb12(%48 : $Array<Any>, %50 : $Builtin.RawPointer) // id: %51
// %52 // users: %59, %53, %58
bb14(%52 : $(Array<Any>, Builtin.RawPointer)): // Preds: bb12
%53 = tuple_extract %52 : $(Array<Any>, Builtin.RawPointer), 0 // users: %54, %77
%54 = struct_extract %53 : $Array<Any>, #Array._buffer // user: %55
%55 = struct_extract %54 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %56
%56 = struct_extract %55 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %57
strong_retain %56 : $Builtin.BridgeObject // id: %57
%58 = tuple_extract %52 : $(Array<Any>, Builtin.RawPointer), 1 // user: %64
%59 = tuple_extract %52 : $(Array<Any>, Builtin.RawPointer), 0 // user: %60
%60 = struct_extract %59 : $Array<Any>, #Array._buffer // user: %61
%61 = struct_extract %60 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %62
%62 = struct_extract %61 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %63
strong_release %62 : $Builtin.BridgeObject // id: %63
%64 = pointer_to_address %58 : $Builtin.RawPointer to [strict] $*Any // user: %65
%65 = init_existential_addr %64 : $*Any, $String // user: %72
%66 = string_literal utf8 "not nil" // user: %71
%67 = integer_literal $Builtin.Word, 7 // user: %71
%68 = integer_literal $Builtin.Int1, -1 // user: %71
%69 = metatype $@thin String.Type // user: %71
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%70 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %71
%71 = apply %70(%66, %67, %68, %69) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %72
store %71 to %65 : $*String // id: %72
// function_ref default argument 1 of print(_:separator:terminator:)
%73 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %74
%74 = apply %73() : $@convention(thin) () -> @owned String // user: %77
// function_ref default argument 2 of print(_:separator:terminator:)
%75 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %76
%76 = apply %75() : $@convention(thin) () -> @owned String // user: %77
%77 = apply %26(%53, %74, %76) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb15 // id: %78
bb15: // Preds: bb14 bb9
%79 = tuple () // user: %80
return %79 : $() // id: %80
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after HighLevel+EarlyLoopOpt "Constant Propagation for Performance without Diagnostics" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %6, %5, %19, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
%2 = enum $Optional<Int>, #Optional.none!enumelt // users: %4, %3
switch_enum %2 : $Optional<Int>, case #Optional.some!enumelt.1: bb1, case #Optional.none!enumelt: bb6 // id: %3
bb1: // Preds: bb0
%4 = unchecked_enum_data %2 : $Optional<Int>, #Optional.some!enumelt.1 // user: %8
switch_enum %0 : $Optional<Int>, case #Optional.some!enumelt.1: bb2, case #Optional.none!enumelt: bb4 // id: %5
bb2: // Preds: bb1
%6 = unchecked_enum_data %0 : $Optional<Int>, #Optional.some!enumelt.1 // user: %7
%7 = struct_extract %6 : $Int, #Int._value // user: %9
%8 = struct_extract %4 : $Int, #Int._value // user: %9
%9 = builtin "cmp_eq_Int64"(%7 : $Builtin.Int64, %8 : $Builtin.Int64) : $Builtin.Int1 // user: %10
br bb3(%9 : $Builtin.Int1) // id: %10
// %11 // user: %13
bb3(%11 : $Builtin.Int1): // Preds: bb7 bb5 bb2
%12 = integer_literal $Builtin.Int1, -1 // user: %13
%13 = builtin "xor_Int1"(%11 : $Builtin.Int1, %12 : $Builtin.Int1) : $Builtin.Int1 // user: %14
%14 = struct $Bool (%13 : $Builtin.Int1) // user: %15
br bb9(%14 : $Bool) // id: %15
bb4: // Preds: bb1
br bb5 // id: %16
bb5: // Preds: bb8 bb4
%17 = integer_literal $Builtin.Int1, 0 // user: %18
br bb3(%17 : $Builtin.Int1) // id: %18
bb6: // Preds: bb0
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb7, case #Optional.some!enumelt.1: bb8 // id: %19
bb7: // Preds: bb6
%20 = integer_literal $Builtin.Int1, -1 // user: %21
br bb3(%20 : $Builtin.Int1) // id: %21
bb8: // Preds: bb6
br bb5 // id: %22
// %23 // user: %24
bb9(%23 : $Bool): // Preds: bb3
%24 = struct_extract %23 : $Bool, #Bool._value // user: %25
cond_br %24, bb10, bb15 // id: %25
bb10: // Preds: bb9
// function_ref print(_:separator:terminator:)
%26 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %76
%27 = integer_literal $Builtin.Word, 1 // user: %32
%28 = integer_literal $Builtin.Int64, 1 // user: %29
%29 = struct $Int (%28 : $Builtin.Int64) // users: %46, %35
%30 = integer_literal $Builtin.Int1, -1 // user: %31
cond_br %30, bb11, bb13 // id: %31
bb11: // Preds: bb10
%32 = alloc_ref [tail_elems $Any * %27 : $Builtin.Word] $_ContiguousArrayStorage<Any> // user: %35
%33 = metatype $@thin Array<Any>.Type // user: %35
// function_ref specialized static Array._adoptStorage(_:count:)
%34 = function_ref @_T0Sa13_adoptStorageSayxG_SpyxGts016_ContiguousArrayB0CyxG_Si5counttFZyp_Tg5 : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %35
%35 = apply %34(%32, %29, %33) : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %37, %36
%36 = tuple_extract %35 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %39
%37 = tuple_extract %35 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %38
%38 = struct_extract %37 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %39
br bb12(%36 : $Array<Any>, %38 : $Builtin.RawPointer) // id: %39
// %40 // user: %42
// %41 // user: %42
bb12(%40 : $Array<Any>, %41 : $Builtin.RawPointer): // Preds: bb13 bb11
%42 = tuple (%40 : $Array<Any>, %41 : $Builtin.RawPointer) // user: %43
br bb14(%42 : $(Array<Any>, Builtin.RawPointer)) // id: %43
bb13: // Preds: bb10
%44 = metatype $@thin Array<Any>.Type // user: %46
// function_ref specialized static Array._allocateUninitialized(_:)
%45 = function_ref @_T0Sa22_allocateUninitializedSayxG_SpyxGtSiFZyp_Tg5 : $@convention(method) (Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %46
%46 = apply %45(%29, %44) : $@convention(method) (Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %48, %47
%47 = tuple_extract %46 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %50
%48 = tuple_extract %46 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %49
%49 = struct_extract %48 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %50
br bb12(%47 : $Array<Any>, %49 : $Builtin.RawPointer) // id: %50
// %51 // users: %58, %52, %57
bb14(%51 : $(Array<Any>, Builtin.RawPointer)): // Preds: bb12
%52 = tuple_extract %51 : $(Array<Any>, Builtin.RawPointer), 0 // users: %53, %76
%53 = struct_extract %52 : $Array<Any>, #Array._buffer // user: %54
%54 = struct_extract %53 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %55
%55 = struct_extract %54 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %56
strong_retain %55 : $Builtin.BridgeObject // id: %56
%57 = tuple_extract %51 : $(Array<Any>, Builtin.RawPointer), 1 // user: %63
%58 = tuple_extract %51 : $(Array<Any>, Builtin.RawPointer), 0 // user: %59
%59 = struct_extract %58 : $Array<Any>, #Array._buffer // user: %60
%60 = struct_extract %59 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %61
%61 = struct_extract %60 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %62
strong_release %61 : $Builtin.BridgeObject // id: %62
%63 = pointer_to_address %57 : $Builtin.RawPointer to [strict] $*Any // user: %64
%64 = init_existential_addr %63 : $*Any, $String // user: %71
%65 = string_literal utf8 "not nil" // user: %70
%66 = integer_literal $Builtin.Word, 7 // user: %70
%67 = integer_literal $Builtin.Int1, -1 // user: %70
%68 = metatype $@thin String.Type // user: %70
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%69 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %70
%70 = apply %69(%65, %66, %67, %68) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %71
store %70 to %64 : $*String // id: %71
// function_ref default argument 1 of print(_:separator:terminator:)
%72 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %73
%73 = apply %72() : $@convention(thin) () -> @owned String // user: %76
// function_ref default argument 2 of print(_:separator:terminator:)
%74 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %75
%75 = apply %74() : $@convention(thin) () -> @owned String // user: %76
%76 = apply %26(%52, %73, %75) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb15 // id: %77
bb15: // Preds: bb14 bb9
%78 = tuple () // user: %79
return %78 : $() // id: %79
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after HighLevel+EarlyLoopOpt "SIL CFG Simplification" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %3, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
%2 = enum $Optional<Int>, #Optional.none!enumelt
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %3
bb1: // Preds: bb0
%4 = integer_literal $Builtin.Int1, -1 // user: %6
%5 = integer_literal $Builtin.Int1, -1 // user: %6
%6 = builtin "xor_Int1"(%4 : $Builtin.Int1, %5 : $Builtin.Int1) : $Builtin.Int1 // user: %7
%7 = struct $Bool (%6 : $Builtin.Int1)
br bb3 // id: %8
bb2: // Preds: bb0
%9 = integer_literal $Builtin.Int1, 0 // user: %11
%10 = integer_literal $Builtin.Int1, -1 // user: %11
%11 = builtin "xor_Int1"(%9 : $Builtin.Int1, %10 : $Builtin.Int1) : $Builtin.Int1 // user: %12
%12 = struct $Bool (%11 : $Builtin.Int1)
// function_ref print(_:separator:terminator:)
%13 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %49
%14 = integer_literal $Builtin.Word, 1 // user: %17
%15 = integer_literal $Builtin.Int64, 1 // user: %16
%16 = struct $Int (%15 : $Builtin.Int64) // user: %20
%17 = alloc_ref [tail_elems $Any * %14 : $Builtin.Word] $_ContiguousArrayStorage<Any> // user: %20
%18 = metatype $@thin Array<Any>.Type // user: %20
// function_ref specialized static Array._adoptStorage(_:count:)
%19 = function_ref @_T0Sa13_adoptStorageSayxG_SpyxGts016_ContiguousArrayB0CyxG_Si5counttFZyp_Tg5 : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %20
%20 = apply %19(%17, %16, %18) : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %22, %21
%21 = tuple_extract %20 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %24
%22 = tuple_extract %20 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %23
%23 = struct_extract %22 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %24
%24 = tuple (%21 : $Array<Any>, %23 : $Builtin.RawPointer) // users: %30, %25, %31
%25 = tuple_extract %24 : $(Array<Any>, Builtin.RawPointer), 0 // users: %26, %49
%26 = struct_extract %25 : $Array<Any>, #Array._buffer // user: %27
%27 = struct_extract %26 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %28
%28 = struct_extract %27 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %29
strong_retain %28 : $Builtin.BridgeObject // id: %29
%30 = tuple_extract %24 : $(Array<Any>, Builtin.RawPointer), 1 // user: %36
%31 = tuple_extract %24 : $(Array<Any>, Builtin.RawPointer), 0 // user: %32
%32 = struct_extract %31 : $Array<Any>, #Array._buffer // user: %33
%33 = struct_extract %32 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %34
%34 = struct_extract %33 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %35
strong_release %34 : $Builtin.BridgeObject // id: %35
%36 = pointer_to_address %30 : $Builtin.RawPointer to [strict] $*Any // user: %37
%37 = init_existential_addr %36 : $*Any, $String // user: %44
%38 = string_literal utf8 "not nil" // user: %43
%39 = integer_literal $Builtin.Word, 7 // user: %43
%40 = integer_literal $Builtin.Int1, -1 // user: %43
%41 = metatype $@thin String.Type // user: %43
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%42 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %43
%43 = apply %42(%38, %39, %40, %41) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %44
store %43 to %37 : $*String // id: %44
// function_ref default argument 1 of print(_:separator:terminator:)
%45 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %46
%46 = apply %45() : $@convention(thin) () -> @owned String // user: %49
// function_ref default argument 2 of print(_:separator:terminator:)
%47 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %48
%48 = apply %47() : $@convention(thin) () -> @owned String // user: %49
%49 = apply %13(%25, %46, %48) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %50
bb3: // Preds: bb1 bb2
%51 = tuple () // user: %52
return %51 : $() // id: %52
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after HighLevel+EarlyLoopOpt "Combine SIL Instructions via Peephole Optimization" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %36
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %11
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // user: %11
%9 = metatype $@thin Array<Any>.Type // user: %11
// function_ref specialized static Array._adoptStorage(_:count:)
%10 = function_ref @_T0Sa13_adoptStorageSayxG_SpyxGts016_ContiguousArrayB0CyxG_Si5counttFZyp_Tg5 : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %11
%11 = apply %10(%8, %7, %9) : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %13, %12
%12 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // users: %19, %36, %15
%13 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %14
%14 = struct_extract %13 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %23
%15 = struct_extract %12 : $Array<Any>, #Array._buffer // user: %16
%16 = struct_extract %15 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %17
%17 = struct_extract %16 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %18
strong_retain %17 : $Builtin.BridgeObject // id: %18
%19 = struct_extract %12 : $Array<Any>, #Array._buffer // user: %20
%20 = struct_extract %19 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %21
%21 = struct_extract %20 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %22
strong_release %21 : $Builtin.BridgeObject // id: %22
%23 = pointer_to_address %14 : $Builtin.RawPointer to [strict] $*Any // user: %24
%24 = init_existential_addr %23 : $*Any, $String // user: %31
%25 = string_literal utf8 "not nil" // user: %30
%26 = integer_literal $Builtin.Word, 7 // user: %30
%27 = integer_literal $Builtin.Int1, -1 // user: %30
%28 = metatype $@thin String.Type // user: %30
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%29 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %30
%30 = apply %29(%25, %26, %27, %28) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %31
store %30 to %24 : $*String // id: %31
// function_ref default argument 1 of print(_:separator:terminator:)
%32 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %33
%33 = apply %32() : $@convention(thin) () -> @owned String // user: %36
// function_ref default argument 2 of print(_:separator:terminator:)
%34 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %35
%35 = apply %34() : $@convention(thin) () -> @owned String // user: %36
%36 = apply %4(%12, %33, %35) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %37
bb3: // Preds: bb1 bb2
%38 = tuple () // user: %39
return %38 : $() // id: %39
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after HighLevel+EarlyLoopOpt "Common Subexpression Elimination" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %33
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %11
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // user: %11
%9 = metatype $@thin Array<Any>.Type // user: %11
// function_ref specialized static Array._adoptStorage(_:count:)
%10 = function_ref @_T0Sa13_adoptStorageSayxG_SpyxGts016_ContiguousArrayB0CyxG_Si5counttFZyp_Tg5 : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %11
%11 = apply %10(%8, %7, %9) : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %13, %12
%12 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // users: %33, %15
%13 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %14
%14 = struct_extract %13 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %20
%15 = struct_extract %12 : $Array<Any>, #Array._buffer // user: %16
%16 = struct_extract %15 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %17
%17 = struct_extract %16 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // users: %19, %18
strong_retain %17 : $Builtin.BridgeObject // id: %18
strong_release %17 : $Builtin.BridgeObject // id: %19
%20 = pointer_to_address %14 : $Builtin.RawPointer to [strict] $*Any // user: %21
%21 = init_existential_addr %20 : $*Any, $String // user: %28
%22 = string_literal utf8 "not nil" // user: %27
%23 = integer_literal $Builtin.Word, 7 // user: %27
%24 = integer_literal $Builtin.Int1, -1 // user: %27
%25 = metatype $@thin String.Type // user: %27
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%26 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %27
%27 = apply %26(%22, %23, %24, %25) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %28
store %27 to %21 : $*String // id: %28
// function_ref default argument 1 of print(_:separator:terminator:)
%29 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %30
%30 = apply %29() : $@convention(thin) () -> @owned String // user: %33
// function_ref default argument 2 of print(_:separator:terminator:)
%31 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %32
%32 = apply %31() : $@convention(thin) () -> @owned String // user: %33
%33 = apply %4(%12, %30, %32) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %34
bb3: // Preds: bb1 bb2
%35 = tuple () // user: %36
return %35 : $() // id: %36
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after HighLevel+EarlyLoopOpt "SIL release Hoisting" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %33
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %11
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // user: %11
%9 = metatype $@thin Array<Any>.Type // user: %11
// function_ref specialized static Array._adoptStorage(_:count:)
%10 = function_ref @_T0Sa13_adoptStorageSayxG_SpyxGts016_ContiguousArrayB0CyxG_Si5counttFZyp_Tg5 : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %11
%11 = apply %10(%8, %7, %9) : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %19, %13, %12
%12 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // users: %33, %15
%13 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %14
%14 = struct_extract %13 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %20
%15 = struct_extract %12 : $Array<Any>, #Array._buffer // user: %16
%16 = struct_extract %15 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %17
%17 = struct_extract %16 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %18
strong_retain %17 : $Builtin.BridgeObject // id: %18
release_value %11 : $(Array<Any>, UnsafeMutablePointer<Any>) // id: %19
%20 = pointer_to_address %14 : $Builtin.RawPointer to [strict] $*Any // user: %21
%21 = init_existential_addr %20 : $*Any, $String // user: %28
%22 = string_literal utf8 "not nil" // user: %27
%23 = integer_literal $Builtin.Word, 7 // user: %27
%24 = integer_literal $Builtin.Int1, -1 // user: %27
%25 = metatype $@thin String.Type // user: %27
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%26 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %27
%27 = apply %26(%22, %23, %24, %25) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %28
store %27 to %21 : $*String // id: %28
// function_ref default argument 1 of print(_:separator:terminator:)
%29 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %30
%30 = apply %29() : $@convention(thin) () -> @owned String // user: %33
// function_ref default argument 2 of print(_:separator:terminator:)
%31 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %32
%32 = apply %31() : $@convention(thin) () -> @owned String // user: %33
%33 = apply %4(%12, %30, %32) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %34
bb3: // Preds: bb1 bb2
%35 = tuple () // user: %36
return %35 : $() // id: %36
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after HighLevel+EarlyLoopOpt "ARC Sequence Optimization" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %31
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %11
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // user: %11
%9 = metatype $@thin Array<Any>.Type // user: %11
// function_ref specialized static Array._adoptStorage(_:count:)
%10 = function_ref @_T0Sa13_adoptStorageSayxG_SpyxGts016_ContiguousArrayB0CyxG_Si5counttFZyp_Tg5 : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %11
%11 = apply %10(%8, %7, %9) : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %13, %12
%12 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // users: %31, %15
%13 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %14
%14 = struct_extract %13 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %18
%15 = struct_extract %12 : $Array<Any>, #Array._buffer // user: %16
%16 = struct_extract %15 : $_ArrayBuffer<Any>, #_ArrayBuffer._storage // user: %17
%17 = struct_extract %16 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue
%18 = pointer_to_address %14 : $Builtin.RawPointer to [strict] $*Any // user: %19
%19 = init_existential_addr %18 : $*Any, $String // user: %26
%20 = string_literal utf8 "not nil" // user: %25
%21 = integer_literal $Builtin.Word, 7 // user: %25
%22 = integer_literal $Builtin.Int1, -1 // user: %25
%23 = metatype $@thin String.Type // user: %25
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%24 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %25
%25 = apply %24(%20, %21, %22, %23) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %26
store %25 to %19 : $*String // id: %26
// function_ref default argument 1 of print(_:separator:terminator:)
%27 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %28
%28 = apply %27() : $@convention(thin) () -> @owned String // user: %31
// function_ref default argument 2 of print(_:separator:terminator:)
%29 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %30
%30 = apply %29() : $@convention(thin) () -> @owned String // user: %31
%31 = apply %4(%12, %28, %30) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %32
bb3: // Preds: bb1 bb2
%33 = tuple () // user: %34
return %33 : $() // id: %34
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after HighLevel+EarlyLoopOpt "Combine SIL Instructions via Peephole Optimization" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %28
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %11
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // user: %11
%9 = metatype $@thin Array<Any>.Type // user: %11
// function_ref specialized static Array._adoptStorage(_:count:)
%10 = function_ref @_T0Sa13_adoptStorageSayxG_SpyxGts016_ContiguousArrayB0CyxG_Si5counttFZyp_Tg5 : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %11
%11 = apply %10(%8, %7, %9) : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %13, %12
%12 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %28
%13 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %14
%14 = struct_extract %13 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %15
%15 = pointer_to_address %14 : $Builtin.RawPointer to [strict] $*Any // user: %16
%16 = init_existential_addr %15 : $*Any, $String // user: %23
%17 = string_literal utf8 "not nil" // user: %22
%18 = integer_literal $Builtin.Word, 7 // user: %22
%19 = integer_literal $Builtin.Int1, -1 // user: %22
%20 = metatype $@thin String.Type // user: %22
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%21 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %22
%22 = apply %21(%17, %18, %19, %20) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %23
store %22 to %16 : $*String // id: %23
// function_ref default argument 1 of print(_:separator:terminator:)
%24 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %25
%25 = apply %24() : $@convention(thin) () -> @owned String // user: %28
// function_ref default argument 2 of print(_:separator:terminator:)
%26 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %27
%27 = apply %26() : $@convention(thin) () -> @owned String // user: %28
%28 = apply %4(%12, %25, %27) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %29
bb3: // Preds: bb1 bb2
%30 = tuple () // user: %31
return %30 : $() // id: %31
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module before MidModulePasses+StackPromote transformation (0) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %28
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %11
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // user: %11
%9 = metatype $@thin Array<Any>.Type // user: %11
// function_ref specialized static Array._adoptStorage(_:count:)
%10 = function_ref @_T0Sa13_adoptStorageSayxG_SpyxGts016_ContiguousArrayB0CyxG_Si5counttFZyp_Tg5 : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %11
%11 = apply %10(%8, %7, %9) : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %13, %12
%12 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %28
%13 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %14
%14 = struct_extract %13 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %15
%15 = pointer_to_address %14 : $Builtin.RawPointer to [strict] $*Any // user: %16
%16 = init_existential_addr %15 : $*Any, $String // user: %23
%17 = string_literal utf8 "not nil" // user: %22
%18 = integer_literal $Builtin.Word, 7 // user: %22
%19 = integer_literal $Builtin.Int1, -1 // user: %22
%20 = metatype $@thin String.Type // user: %22
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%21 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %22
%22 = apply %21(%17, %18, %19, %20) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %23
store %22 to %16 : $*String // id: %23
// function_ref default argument 1 of print(_:separator:terminator:)
%24 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %25
%25 = apply %24() : $@convention(thin) () -> @owned String // user: %28
// function_ref default argument 2 of print(_:separator:terminator:)
%26 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %27
%27 = apply %26() : $@convention(thin) () -> @owned String // user: %28
%28 = apply %4(%12, %25, %27) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %29
bb3: // Preds: bb1 bb2
%30 = tuple () // user: %31
return %30 : $() // id: %31
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module after MidModulePasses+StackPromote "Dead Function Elimination" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %28
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %11
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // user: %11
%9 = metatype $@thin Array<Any>.Type // user: %11
// function_ref specialized static Array._adoptStorage(_:count:)
%10 = function_ref @_T0Sa13_adoptStorageSayxG_SpyxGts016_ContiguousArrayB0CyxG_Si5counttFZyp_Tg5 : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %11
%11 = apply %10(%8, %7, %9) : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %13, %12
%12 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %28
%13 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %14
%14 = struct_extract %13 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %15
%15 = pointer_to_address %14 : $Builtin.RawPointer to [strict] $*Any // user: %16
%16 = init_existential_addr %15 : $*Any, $String // user: %23
%17 = string_literal utf8 "not nil" // user: %22
%18 = integer_literal $Builtin.Word, 7 // user: %22
%19 = integer_literal $Builtin.Int1, -1 // user: %22
%20 = metatype $@thin String.Type // user: %22
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%21 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %22
%22 = apply %21(%17, %18, %19, %20) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %23
store %22 to %16 : $*String // id: %23
// function_ref default argument 1 of print(_:separator:terminator:)
%24 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %25
%25 = apply %24() : $@convention(thin) () -> @owned String // user: %28
// function_ref default argument 2 of print(_:separator:terminator:)
%26 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %27
%27 = apply %26() : $@convention(thin) () -> @owned String // user: %28
%28 = apply %4(%12, %25, %27) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %29
bb3: // Preds: bb1 bb2
%30 = tuple () // user: %31
return %30 : $() // id: %31
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module after MidModulePasses+StackPromote "Link all SIL Referenced within the Module via Deserialization" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %28
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %11
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // user: %11
%9 = metatype $@thin Array<Any>.Type // user: %11
// function_ref specialized static Array._adoptStorage(_:count:)
%10 = function_ref @_T0Sa13_adoptStorageSayxG_SpyxGts016_ContiguousArrayB0CyxG_Si5counttFZyp_Tg5 : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %11
%11 = apply %10(%8, %7, %9) : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %13, %12
%12 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %28
%13 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %14
%14 = struct_extract %13 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %15
%15 = pointer_to_address %14 : $Builtin.RawPointer to [strict] $*Any // user: %16
%16 = init_existential_addr %15 : $*Any, $String // user: %23
%17 = string_literal utf8 "not nil" // user: %22
%18 = integer_literal $Builtin.Word, 7 // user: %22
%19 = integer_literal $Builtin.Int1, -1 // user: %22
%20 = metatype $@thin String.Type // user: %22
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%21 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %22
%22 = apply %21(%17, %18, %19, %20) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %23
store %22 to %16 : $*String // id: %23
// function_ref default argument 1 of print(_:separator:terminator:)
%24 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %25
%25 = apply %24() : $@convention(thin) () -> @owned String // user: %28
// function_ref default argument 2 of print(_:separator:terminator:)
%26 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %27
%27 = apply %26() : $@convention(thin) () -> @owned String // user: %28
%28 = apply %4(%12, %25, %27) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %29
bb3: // Preds: bb1 bb2
%30 = tuple () // user: %31
return %30 : $() // id: %31
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module before MidLevel transformation (0) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %28
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %11
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // user: %11
%9 = metatype $@thin Array<Any>.Type // user: %11
// function_ref specialized static Array._adoptStorage(_:count:)
%10 = function_ref @_T0Sa13_adoptStorageSayxG_SpyxGts016_ContiguousArrayB0CyxG_Si5counttFZyp_Tg5 : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // user: %11
%11 = apply %10(%8, %7, %9) : $@convention(method) (@owned _ContiguousArrayStorage<Any>, Int, @thin Array<Any>.Type) -> (@owned Array<Any>, UnsafeMutablePointer<Any>) // users: %13, %12
%12 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %28
%13 = tuple_extract %11 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %14
%14 = struct_extract %13 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %15
%15 = pointer_to_address %14 : $Builtin.RawPointer to [strict] $*Any // user: %16
%16 = init_existential_addr %15 : $*Any, $String // user: %23
%17 = string_literal utf8 "not nil" // user: %22
%18 = integer_literal $Builtin.Word, 7 // user: %22
%19 = integer_literal $Builtin.Int1, -1 // user: %22
%20 = metatype $@thin String.Type // user: %22
// function_ref String.init(_builtinStringLiteral:utf8CodeUnitCount:isASCII:)
%21 = function_ref @_T0S2SBp21_builtinStringLiteral_Bw17utf8CodeUnitCountBi1_7isASCIItcfC : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %22
%22 = apply %21(%17, %18, %19, %20) : $@convention(method) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %23
store %22 to %16 : $*String // id: %23
// function_ref default argument 1 of print(_:separator:terminator:)
%24 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %25
%25 = apply %24() : $@convention(thin) () -> @owned String // user: %28
// function_ref default argument 2 of print(_:separator:terminator:)
%26 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %27
%27 = apply %26() : $@convention(thin) () -> @owned String // user: %28
%28 = apply %4(%12, %25, %27) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %29
bb3: // Preds: bb1 bb2
%30 = tuple () // user: %31
return %30 : $() // id: %31
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after MidLevel "Performance Function Inlining" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb9 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %78
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // users: %14, %11
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %18, %10
%9 = integer_literal $Builtin.Int64, 1 // user: %12
%10 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %22, %16
%11 = struct_extract %7 : $Int, #Int._value // user: %12
%12 = builtin "shl_Int64"(%11 : $Builtin.Int64, %9 : $Builtin.Int64) : $Builtin.Int64 // user: %13
%13 = struct $UInt (%12 : $Builtin.Int64) // user: %14
%14 = struct $_SwiftArrayBodyStorage (%7 : $Int, %13 : $UInt) // user: %15
%15 = struct $_ArrayBody (%14 : $_SwiftArrayBodyStorage) // user: %17
%16 = ref_element_addr %10 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %17
store %15 to %16 : $*_ArrayBody // id: %17
%18 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %19
%19 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%18 : $Builtin.BridgeObject) // user: %20
%20 = struct $_ArrayBuffer<Any> (%19 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %21
%21 = struct $Array<Any> (%20 : $_ArrayBuffer<Any>) // user: %25
%22 = ref_tail_addr %10 : $_ContiguousArrayStorageBase, $Any // user: %23
%23 = address_to_pointer %22 : $*Any to $Builtin.RawPointer // user: %24
%24 = struct $UnsafeMutablePointer<Any> (%23 : $Builtin.RawPointer) // user: %25
%25 = tuple (%21 : $Array<Any>, %24 : $UnsafeMutablePointer<Any>) // users: %26, %27
%26 = tuple_extract %25 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %78
%27 = tuple_extract %25 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %28
%28 = struct_extract %27 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %29
%29 = pointer_to_address %28 : $Builtin.RawPointer to [strict] $*Any // user: %30
%30 = init_existential_addr %29 : $*Any, $String // user: %73
%31 = string_literal utf8 "not nil" // users: %54, %48, %35
%32 = integer_literal $Builtin.Word, 7 // users: %55, %50, %37
%33 = integer_literal $Builtin.Int1, -1 // user: %34
cond_br %33, bb3, bb5 // id: %34
bb3: // Preds: bb2
%35 = struct $UnsafeMutableRawPointer (%31 : $Builtin.RawPointer) // user: %36
%36 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %35 : $UnsafeMutableRawPointer // user: %39
%37 = builtin "zextOrBitCast_Word_Int64"(%32 : $Builtin.Word) : $Builtin.Int64 // user: %39
%38 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %39
br bb4(%36 : $Optional<UnsafeMutableRawPointer>, %37 : $Builtin.Int64, %38 : $Optional<AnyObject>) // id: %39
// %40 // user: %44
// %41 // user: %43
// %42 // user: %44
bb4(%40 : $Optional<UnsafeMutableRawPointer>, %41 : $Builtin.Int64, %42 : $Optional<AnyObject>): // Preds: bb6 bb3
%43 = struct $UInt (%41 : $Builtin.Int64) // user: %44
%44 = struct $_StringCore (%40 : $Optional<UnsafeMutableRawPointer>, %43 : $UInt, %42 : $Optional<AnyObject>) // user: %45
%45 = struct $String (%44 : $_StringCore) // user: %46
br bb8(%45 : $String) // id: %46
bb5: // Preds: bb2
%47 = metatype $@thick Unicode.UTF8.Type // user: %60
%48 = struct $UnsafePointer<UInt8> (%31 : $Builtin.RawPointer) // user: %49
%49 = enum $Optional<UnsafePointer<UInt8>>, #Optional.some!enumelt.1, %48 : $UnsafePointer<UInt8> // user: %60
%50 = builtin "zextOrBitCast_Word_Int64"(%32 : $Builtin.Word) : $Builtin.Int64 // user: %52
%51 = integer_literal $Builtin.Int64, 0 // user: %52
%52 = builtin "cmp_slt_Int64"(%50 : $Builtin.Int64, %51 : $Builtin.Int64) : $Builtin.Int1 // user: %53
cond_fail %52 : $Builtin.Int1 // id: %53
%54 = pointer_to_address %31 : $Builtin.RawPointer to [strict] $*UInt8 // user: %55
%55 = index_addr %54 : $*UInt8, %32 : $Builtin.Word // user: %56
%56 = address_to_pointer %55 : $*UInt8 to $Builtin.RawPointer // user: %57
%57 = struct $UnsafePointer<UInt8> (%56 : $Builtin.RawPointer) // user: %58
%58 = enum $Optional<UnsafePointer<UInt8>>, #Optional.some!enumelt.1, %57 : $UnsafePointer<UInt8> // user: %60
// function_ref specialized static String._fromCodeUnitSequence<A, B>(_:input:)
%59 = function_ref @_T0SS21_fromCodeUnitSequenceSSSgxm_q_5inputts16_UnicodeEncodingRzs10CollectionR_7ElementQy_0bC0Rtzr0_lFZs0F0O4UTF8O_SRys5UInt8VGTgq5Tfq4nxd_n : $@convention(thin) (@thick Unicode.UTF8.Type, Optional<UnsafePointer<UInt8>>, Optional<UnsafePointer<UInt8>>) -> @owned Optional<String> // user: %60
%60 = apply %59(%47, %49, %58) : $@convention(thin) (@thick Unicode.UTF8.Type, Optional<UnsafePointer<UInt8>>, Optional<UnsafePointer<UInt8>>) -> @owned Optional<String> // user: %61
switch_enum %60 : $Optional<String>, case #Optional.some!enumelt.1: bb6, case #Optional.none!enumelt: bb7 // id: %61
// %62 // user: %63
bb6(%62 : $String): // Preds: bb5
%63 = struct_extract %62 : $String, #String._core // users: %67, %65, %64
%64 = struct_extract %63 : $_StringCore, #_StringCore._baseAddress // user: %68
%65 = struct_extract %63 : $_StringCore, #_StringCore._countAndFlags // user: %66
%66 = struct_extract %65 : $UInt, #UInt._value // user: %68
%67 = struct_extract %63 : $_StringCore, #_StringCore._owner // user: %68
br bb4(%64 : $Optional<UnsafeMutableRawPointer>, %66 : $Builtin.Int64, %67 : $Optional<AnyObject>) // id: %68
bb7: // Preds: bb5
%69 = integer_literal $Builtin.Int1, -1 // user: %70
cond_fail %69 : $Builtin.Int1 // id: %70
unreachable // id: %71
// %72 // user: %73
bb8(%72 : $String): // Preds: bb4
store %72 to %30 : $*String // id: %73
// function_ref default argument 1 of print(_:separator:terminator:)
%74 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %75
%75 = apply %74() : $@convention(thin) () -> @owned String // user: %78
// function_ref default argument 2 of print(_:separator:terminator:)
%76 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %77
%77 = apply %76() : $@convention(thin) () -> @owned String // user: %78
%78 = apply %4(%26, %75, %77) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb9 // id: %79
bb9: // Preds: bb1 bb8
%80 = tuple () // user: %81
return %80 : $() // id: %81
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after MidLevel "Constant Propagation for Performance without Diagnostics" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb9 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %72
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %12
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %16, %9
%9 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %20, %14
%10 = integer_literal $Builtin.Int64, 2 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%7 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %9 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Any> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Any> (%18 : $_ArrayBuffer<Any>) // user: %23
%20 = ref_tail_addr %9 : $_ContiguousArrayStorageBase, $Any // user: %21
%21 = address_to_pointer %20 : $*Any to $Builtin.RawPointer // user: %22
%22 = struct $UnsafeMutablePointer<Any> (%21 : $Builtin.RawPointer) // user: %23
%23 = tuple (%19 : $Array<Any>, %22 : $UnsafeMutablePointer<Any>) // users: %24, %25
%24 = tuple_extract %23 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %72
%25 = tuple_extract %23 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %26
%26 = struct_extract %25 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %27
%27 = pointer_to_address %26 : $Builtin.RawPointer to [strict] $*Any // user: %28
%28 = init_existential_addr %27 : $*Any, $String // user: %67
%29 = string_literal utf8 "not nil" // users: %48, %46, %33
%30 = integer_literal $Builtin.Word, 7 // user: %49
%31 = integer_literal $Builtin.Int1, -1 // user: %32
cond_br %31, bb3, bb5 // id: %32
bb3: // Preds: bb2
%33 = struct $UnsafeMutableRawPointer (%29 : $Builtin.RawPointer) // user: %34
%34 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %33 : $UnsafeMutableRawPointer // user: %37
%35 = integer_literal $Builtin.Int64, 7 // user: %37
%36 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %37
br bb4(%34 : $Optional<UnsafeMutableRawPointer>, %35 : $Builtin.Int64, %36 : $Optional<AnyObject>) // id: %37
// %38 // user: %42
// %39 // user: %41
// %40 // user: %42
bb4(%38 : $Optional<UnsafeMutableRawPointer>, %39 : $Builtin.Int64, %40 : $Optional<AnyObject>): // Preds: bb6 bb3
%41 = struct $UInt (%39 : $Builtin.Int64) // user: %42
%42 = struct $_StringCore (%38 : $Optional<UnsafeMutableRawPointer>, %41 : $UInt, %40 : $Optional<AnyObject>) // user: %43
%43 = struct $String (%42 : $_StringCore) // user: %44
br bb8(%43 : $String) // id: %44
bb5: // Preds: bb2
%45 = metatype $@thick Unicode.UTF8.Type // user: %54
%46 = struct $UnsafePointer<UInt8> (%29 : $Builtin.RawPointer) // user: %47
%47 = enum $Optional<UnsafePointer<UInt8>>, #Optional.some!enumelt.1, %46 : $UnsafePointer<UInt8> // user: %54
%48 = pointer_to_address %29 : $Builtin.RawPointer to [strict] $*UInt8 // user: %49
%49 = index_addr %48 : $*UInt8, %30 : $Builtin.Word // user: %50
%50 = address_to_pointer %49 : $*UInt8 to $Builtin.RawPointer // user: %51
%51 = struct $UnsafePointer<UInt8> (%50 : $Builtin.RawPointer) // user: %52
%52 = enum $Optional<UnsafePointer<UInt8>>, #Optional.some!enumelt.1, %51 : $UnsafePointer<UInt8> // user: %54
// function_ref specialized static String._fromCodeUnitSequence<A, B>(_:input:)
%53 = function_ref @_T0SS21_fromCodeUnitSequenceSSSgxm_q_5inputts16_UnicodeEncodingRzs10CollectionR_7ElementQy_0bC0Rtzr0_lFZs0F0O4UTF8O_SRys5UInt8VGTgq5Tfq4nxd_n : $@convention(thin) (@thick Unicode.UTF8.Type, Optional<UnsafePointer<UInt8>>, Optional<UnsafePointer<UInt8>>) -> @owned Optional<String> // user: %54
%54 = apply %53(%45, %47, %52) : $@convention(thin) (@thick Unicode.UTF8.Type, Optional<UnsafePointer<UInt8>>, Optional<UnsafePointer<UInt8>>) -> @owned Optional<String> // user: %55
switch_enum %54 : $Optional<String>, case #Optional.some!enumelt.1: bb6, case #Optional.none!enumelt: bb7 // id: %55
// %56 // user: %57
bb6(%56 : $String): // Preds: bb5
%57 = struct_extract %56 : $String, #String._core // users: %61, %59, %58
%58 = struct_extract %57 : $_StringCore, #_StringCore._baseAddress // user: %62
%59 = struct_extract %57 : $_StringCore, #_StringCore._countAndFlags // user: %60
%60 = struct_extract %59 : $UInt, #UInt._value // user: %62
%61 = struct_extract %57 : $_StringCore, #_StringCore._owner // user: %62
br bb4(%58 : $Optional<UnsafeMutableRawPointer>, %60 : $Builtin.Int64, %61 : $Optional<AnyObject>) // id: %62
bb7: // Preds: bb5
%63 = integer_literal $Builtin.Int1, -1 // user: %64
cond_fail %63 : $Builtin.Int1 // id: %64
unreachable // id: %65
// %66 // user: %67
bb8(%66 : $String): // Preds: bb4
store %66 to %28 : $*String // id: %67
// function_ref default argument 1 of print(_:separator:terminator:)
%68 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %69
%69 = apply %68() : $@convention(thin) () -> @owned String // user: %72
// function_ref default argument 2 of print(_:separator:terminator:)
%70 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %71
%71 = apply %70() : $@convention(thin) () -> @owned String // user: %72
%72 = apply %4(%24, %69, %71) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb9 // id: %73
bb9: // Preds: bb1 bb8
%74 = tuple () // user: %75
return %74 : $() // id: %75
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after MidLevel "Simplify CFG via Jump Threading" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %43
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %12
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %16, %9
%9 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %20, %14
%10 = integer_literal $Builtin.Int64, 2 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%7 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %9 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Any> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Any> (%18 : $_ArrayBuffer<Any>) // user: %23
%20 = ref_tail_addr %9 : $_ContiguousArrayStorageBase, $Any // user: %21
%21 = address_to_pointer %20 : $*Any to $Builtin.RawPointer // user: %22
%22 = struct $UnsafeMutablePointer<Any> (%21 : $Builtin.RawPointer) // user: %23
%23 = tuple (%19 : $Array<Any>, %22 : $UnsafeMutablePointer<Any>) // users: %24, %25
%24 = tuple_extract %23 : $(Array<Any>, UnsafeMutablePointer<Any>), 0 // user: %43
%25 = tuple_extract %23 : $(Array<Any>, UnsafeMutablePointer<Any>), 1 // user: %26
%26 = struct_extract %25 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue // user: %27
%27 = pointer_to_address %26 : $Builtin.RawPointer to [strict] $*Any // user: %28
%28 = init_existential_addr %27 : $*Any, $String // user: %38
%29 = string_literal utf8 "not nil" // user: %31
%30 = integer_literal $Builtin.Word, 7
%31 = struct $UnsafeMutableRawPointer (%29 : $Builtin.RawPointer) // user: %32
%32 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %31 : $UnsafeMutableRawPointer // user: %36
%33 = integer_literal $Builtin.Int64, 7 // user: %35
%34 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %36
%35 = struct $UInt (%33 : $Builtin.Int64) // user: %36
%36 = struct $_StringCore (%32 : $Optional<UnsafeMutableRawPointer>, %35 : $UInt, %34 : $Optional<AnyObject>) // user: %37
%37 = struct $String (%36 : $_StringCore) // user: %38
store %37 to %28 : $*String // id: %38
// function_ref default argument 1 of print(_:separator:terminator:)
%39 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %40
%40 = apply %39() : $@convention(thin) () -> @owned String // user: %43
// function_ref default argument 2 of print(_:separator:terminator:)
%41 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %42
%42 = apply %41() : $@convention(thin) () -> @owned String // user: %43
%43 = apply %4(%24, %40, %42) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %44
bb3: // Preds: bb1 bb2
%45 = tuple () // user: %46
return %45 : $() // id: %46
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after MidLevel "Combine SIL Instructions via Peephole Optimization" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %35
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %12
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %16, %9
%9 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %20, %14
%10 = integer_literal $Builtin.Int64, 2 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%7 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %9 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Any> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Any> (%18 : $_ArrayBuffer<Any>) // user: %35
%20 = ref_tail_addr %9 : $_ContiguousArrayStorageBase, $Any // user: %21
%21 = init_existential_addr %20 : $*Any, $String // user: %30
%22 = string_literal utf8 "not nil" // user: %23
%23 = struct $UnsafeMutableRawPointer (%22 : $Builtin.RawPointer) // user: %24
%24 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %23 : $UnsafeMutableRawPointer // user: %28
%25 = integer_literal $Builtin.Int64, 7 // user: %27
%26 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %28
%27 = struct $UInt (%25 : $Builtin.Int64) // user: %28
%28 = struct $_StringCore (%24 : $Optional<UnsafeMutableRawPointer>, %27 : $UInt, %26 : $Optional<AnyObject>) // user: %29
%29 = struct $String (%28 : $_StringCore) // user: %30
store %29 to %21 : $*String // id: %30
// function_ref default argument 1 of print(_:separator:terminator:)
%31 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %32
%32 = apply %31() : $@convention(thin) () -> @owned String // user: %35
// function_ref default argument 2 of print(_:separator:terminator:)
%33 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %34
%34 = apply %33() : $@convention(thin) () -> @owned String // user: %35
%35 = apply %4(%19, %32, %34) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %36
bb3: // Preds: bb1 bb2
%37 = tuple () // user: %38
return %37 : $() // id: %38
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module before ClosureSpecialize transformation (0) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %35
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %12
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %16, %9
%9 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %20, %14
%10 = integer_literal $Builtin.Int64, 2 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%7 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %9 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Any> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Any> (%18 : $_ArrayBuffer<Any>) // user: %35
%20 = ref_tail_addr %9 : $_ContiguousArrayStorageBase, $Any // user: %21
%21 = init_existential_addr %20 : $*Any, $String // user: %30
%22 = string_literal utf8 "not nil" // user: %23
%23 = struct $UnsafeMutableRawPointer (%22 : $Builtin.RawPointer) // user: %24
%24 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %23 : $UnsafeMutableRawPointer // user: %28
%25 = integer_literal $Builtin.Int64, 7 // user: %27
%26 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %28
%27 = struct $UInt (%25 : $Builtin.Int64) // user: %28
%28 = struct $_StringCore (%24 : $Optional<UnsafeMutableRawPointer>, %27 : $UInt, %26 : $Optional<AnyObject>) // user: %29
%29 = struct $String (%28 : $_StringCore) // user: %30
store %29 to %21 : $*String // id: %30
// function_ref default argument 1 of print(_:separator:terminator:)
%31 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %32
%32 = apply %31() : $@convention(thin) () -> @owned String // user: %35
// function_ref default argument 2 of print(_:separator:terminator:)
%33 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %34
%34 = apply %33() : $@convention(thin) () -> @owned String // user: %35
%35 = apply %4(%19, %32, %34) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %36
bb3: // Preds: bb1 bb2
%37 = tuple () // user: %38
return %37 : $() // id: %38
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module after ClosureSpecialize "Dead Function Elimination" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %35
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %12
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %16, %9
%9 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %20, %14
%10 = integer_literal $Builtin.Int64, 2 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%7 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %9 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Any> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Any> (%18 : $_ArrayBuffer<Any>) // user: %35
%20 = ref_tail_addr %9 : $_ContiguousArrayStorageBase, $Any // user: %21
%21 = init_existential_addr %20 : $*Any, $String // user: %30
%22 = string_literal utf8 "not nil" // user: %23
%23 = struct $UnsafeMutableRawPointer (%22 : $Builtin.RawPointer) // user: %24
%24 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %23 : $UnsafeMutableRawPointer // user: %28
%25 = integer_literal $Builtin.Int64, 7 // user: %27
%26 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %28
%27 = struct $UInt (%25 : $Builtin.Int64) // user: %28
%28 = struct $_StringCore (%24 : $Optional<UnsafeMutableRawPointer>, %27 : $UInt, %26 : $Optional<AnyObject>) // user: %29
%29 = struct $String (%28 : $_StringCore) // user: %30
store %29 to %21 : $*String // id: %30
// function_ref default argument 1 of print(_:separator:terminator:)
%31 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %32
%32 = apply %31() : $@convention(thin) () -> @owned String // user: %35
// function_ref default argument 2 of print(_:separator:terminator:)
%33 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %34
%34 = apply %33() : $@convention(thin) () -> @owned String // user: %35
%35 = apply %4(%19, %32, %34) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %36
bb3: // Preds: bb1 bb2
%37 = tuple () // user: %38
return %37 : $() // id: %38
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module before LowLevel transformation (0) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %35
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %12
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %16, %9
%9 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %20, %14
%10 = integer_literal $Builtin.Int64, 2 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%7 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %9 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Any> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Any> (%18 : $_ArrayBuffer<Any>) // user: %35
%20 = ref_tail_addr %9 : $_ContiguousArrayStorageBase, $Any // user: %21
%21 = init_existential_addr %20 : $*Any, $String // user: %30
%22 = string_literal utf8 "not nil" // user: %23
%23 = struct $UnsafeMutableRawPointer (%22 : $Builtin.RawPointer) // user: %24
%24 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %23 : $UnsafeMutableRawPointer // user: %28
%25 = integer_literal $Builtin.Int64, 7 // user: %27
%26 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %28
%27 = struct $UInt (%25 : $Builtin.Int64) // user: %28
%28 = struct $_StringCore (%24 : $Optional<UnsafeMutableRawPointer>, %27 : $UInt, %26 : $Optional<AnyObject>) // user: %29
%29 = struct $String (%28 : $_StringCore) // user: %30
store %29 to %21 : $*String // id: %30
// function_ref default argument 1 of print(_:separator:terminator:)
%31 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %32
%32 = apply %31() : $@convention(thin) () -> @owned String // user: %35
// function_ref default argument 2 of print(_:separator:terminator:)
%33 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %34
%34 = apply %33() : $@convention(thin) () -> @owned String // user: %35
%35 = apply %4(%19, %32, %34) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %36
bb3: // Preds: bb1 bb2
%37 = tuple () // user: %38
return %37 : $() // id: %38
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module before LateLoopOpt transformation (0) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %35
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %12
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %16, %9
%9 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %20, %14
%10 = integer_literal $Builtin.Int64, 2 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%7 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %9 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Any> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Any> (%18 : $_ArrayBuffer<Any>) // user: %35
%20 = ref_tail_addr %9 : $_ContiguousArrayStorageBase, $Any // user: %21
%21 = init_existential_addr %20 : $*Any, $String // user: %30
%22 = string_literal utf8 "not nil" // user: %23
%23 = struct $UnsafeMutableRawPointer (%22 : $Builtin.RawPointer) // user: %24
%24 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %23 : $UnsafeMutableRawPointer // user: %28
%25 = integer_literal $Builtin.Int64, 7 // user: %27
%26 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %28
%27 = struct $UInt (%25 : $Builtin.Int64) // user: %28
%28 = struct $_StringCore (%24 : $Optional<UnsafeMutableRawPointer>, %27 : $UInt, %26 : $Optional<AnyObject>) // user: %29
%29 = struct $String (%28 : $_StringCore) // user: %30
store %29 to %21 : $*String // id: %30
// function_ref default argument 1 of print(_:separator:terminator:)
%31 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %32
%32 = apply %31() : $@convention(thin) () -> @owned String // user: %35
// function_ref default argument 2 of print(_:separator:terminator:)
%33 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %34
%34 = apply %33() : $@convention(thin) () -> @owned String // user: %35
%35 = apply %4(%19, %32, %34) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %36
bb3: // Preds: bb1 bb2
%37 = tuple () // user: %38
return %37 : $() // id: %38
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module after LateLoopOpt "External Function Definition Elimination" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %35
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %12
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %16, %9
%9 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %20, %14
%10 = integer_literal $Builtin.Int64, 2 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%7 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %9 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Any> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Any> (%18 : $_ArrayBuffer<Any>) // user: %35
%20 = ref_tail_addr %9 : $_ContiguousArrayStorageBase, $Any // user: %21
%21 = init_existential_addr %20 : $*Any, $String // user: %30
%22 = string_literal utf8 "not nil" // user: %23
%23 = struct $UnsafeMutableRawPointer (%22 : $Builtin.RawPointer) // user: %24
%24 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %23 : $UnsafeMutableRawPointer // user: %28
%25 = integer_literal $Builtin.Int64, 7 // user: %27
%26 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %28
%27 = struct $UInt (%25 : $Builtin.Int64) // user: %28
%28 = struct $_StringCore (%24 : $Optional<UnsafeMutableRawPointer>, %27 : $UInt, %26 : $Optional<AnyObject>) // user: %29
%29 = struct $String (%28 : $_StringCore) // user: %30
store %29 to %21 : $*String // id: %30
// function_ref default argument 1 of print(_:separator:terminator:)
%31 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %32
%32 = apply %31() : $@convention(thin) () -> @owned String // user: %35
// function_ref default argument 2 of print(_:separator:terminator:)
%33 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %34
%34 = apply %33() : $@convention(thin) () -> @owned String // user: %35
%35 = apply %4(%19, %32, %34) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %36
bb3: // Preds: bb1 bb2
%37 = tuple () // user: %38
return %37 : $() // id: %38
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module after LateLoopOpt "Dead Function Elimination" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %35
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %12
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %16, %9
%9 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %20, %14
%10 = integer_literal $Builtin.Int64, 2 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%7 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %9 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Any> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Any> (%18 : $_ArrayBuffer<Any>) // user: %35
%20 = ref_tail_addr %9 : $_ContiguousArrayStorageBase, $Any // user: %21
%21 = init_existential_addr %20 : $*Any, $String // user: %30
%22 = string_literal utf8 "not nil" // user: %23
%23 = struct $UnsafeMutableRawPointer (%22 : $Builtin.RawPointer) // user: %24
%24 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %23 : $UnsafeMutableRawPointer // user: %28
%25 = integer_literal $Builtin.Int64, 7 // user: %27
%26 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %28
%27 = struct $UInt (%25 : $Builtin.Int64) // user: %28
%28 = struct $_StringCore (%24 : $Optional<UnsafeMutableRawPointer>, %27 : $UInt, %26 : $Optional<AnyObject>) // user: %29
%29 = struct $String (%28 : $_StringCore) // user: %30
store %29 to %21 : $*String // id: %30
// function_ref default argument 1 of print(_:separator:terminator:)
%31 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %32
%32 = apply %31() : $@convention(thin) () -> @owned String // user: %35
// function_ref default argument 2 of print(_:separator:terminator:)
%33 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %34
%34 = apply %33() : $@convention(thin) () -> @owned String // user: %35
%35 = apply %4(%19, %32, %34) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %36
bb3: // Preds: bb1 bb2
%37 = tuple () // user: %38
return %37 : $() // id: %38
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module before SIL Debug Info Generator transformation (0) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %35
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %12
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %16, %9
%9 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %20, %14
%10 = integer_literal $Builtin.Int64, 2 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%7 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %9 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Any> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Any> (%18 : $_ArrayBuffer<Any>) // user: %35
%20 = ref_tail_addr %9 : $_ContiguousArrayStorageBase, $Any // user: %21
%21 = init_existential_addr %20 : $*Any, $String // user: %30
%22 = string_literal utf8 "not nil" // user: %23
%23 = struct $UnsafeMutableRawPointer (%22 : $Builtin.RawPointer) // user: %24
%24 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %23 : $UnsafeMutableRawPointer // user: %28
%25 = integer_literal $Builtin.Int64, 7 // user: %27
%26 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %28
%27 = struct $UInt (%25 : $Builtin.Int64) // user: %28
%28 = struct $_StringCore (%24 : $Optional<UnsafeMutableRawPointer>, %27 : $UInt, %26 : $Optional<AnyObject>) // user: %29
%29 = struct $String (%28 : $_StringCore) // user: %30
store %29 to %21 : $*String // id: %30
// function_ref default argument 1 of print(_:separator:terminator:)
%31 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %32
%32 = apply %31() : $@convention(thin) () -> @owned String // user: %35
// function_ref default argument 2 of print(_:separator:terminator:)
%33 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %34
%34 = apply %33() : $@convention(thin) () -> @owned String // user: %35
%35 = apply %4(%19, %32, %34) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %36
bb3: // Preds: bb1 bb2
%37 = tuple () // user: %38
return %37 : $() // id: %38
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module before Address Lowering transformation (0) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %35
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %12
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %16, %9
%9 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %20, %14
%10 = integer_literal $Builtin.Int64, 2 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%7 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %9 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Any> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Any> (%18 : $_ArrayBuffer<Any>) // user: %35
%20 = ref_tail_addr %9 : $_ContiguousArrayStorageBase, $Any // user: %21
%21 = init_existential_addr %20 : $*Any, $String // user: %30
%22 = string_literal utf8 "not nil" // user: %23
%23 = struct $UnsafeMutableRawPointer (%22 : $Builtin.RawPointer) // user: %24
%24 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %23 : $UnsafeMutableRawPointer // user: %28
%25 = integer_literal $Builtin.Int64, 7 // user: %27
%26 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %28
%27 = struct $UInt (%25 : $Builtin.Int64) // user: %28
%28 = struct $_StringCore (%24 : $Optional<UnsafeMutableRawPointer>, %27 : $UInt, %26 : $Optional<AnyObject>) // user: %29
%29 = struct $String (%28 : $_StringCore) // user: %30
store %29 to %21 : $*String // id: %30
// function_ref default argument 1 of print(_:separator:terminator:)
%31 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %32
%32 = apply %31() : $@convention(thin) () -> @owned String // user: %35
// function_ref default argument 2 of print(_:separator:terminator:)
%33 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %34
%34 = apply %33() : $@convention(thin) () -> @owned String // user: %35
%35 = apply %4(%19, %32, %34) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %36
bb3: // Preds: bb1 bb2
%37 = tuple () // user: %38
return %37 : $() // id: %38
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL function after Address Lowering "SIL Cleanup Preparation for IRGen" (1) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %35
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %12
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %16, %9
%9 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %20, %14
%10 = integer_literal $Builtin.Int64, 2 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%7 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %9 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Any> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Any> (%18 : $_ArrayBuffer<Any>) // user: %35
%20 = ref_tail_addr %9 : $_ContiguousArrayStorageBase, $Any // user: %21
%21 = init_existential_addr %20 : $*Any, $String // user: %30
%22 = string_literal utf8 "not nil" // user: %23
%23 = struct $UnsafeMutableRawPointer (%22 : $Builtin.RawPointer) // user: %24
%24 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %23 : $UnsafeMutableRawPointer // user: %28
%25 = integer_literal $Builtin.Int64, 7 // user: %27
%26 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %28
%27 = struct $UInt (%25 : $Builtin.Int64) // user: %28
%28 = struct $_StringCore (%24 : $Optional<UnsafeMutableRawPointer>, %27 : $UInt, %26 : $Optional<AnyObject>) // user: %29
%29 = struct $String (%28 : $_StringCore) // user: %30
store %29 to %21 : $*String // id: %30
// function_ref default argument 1 of print(_:separator:terminator:)
%31 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %32
%32 = apply %31() : $@convention(thin) () -> @owned String // user: %35
// function_ref default argument 2 of print(_:separator:terminator:)
%33 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %34
%34 = apply %33() : $@convention(thin) () -> @owned String // user: %35
%35 = apply %4(%19, %32, %34) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %36
bb3: // Preds: bb1 bb2
%37 = tuple () // user: %38
return %37 : $() // id: %38
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
*** SIL module before IRGen Preparation transformation (0) ***
// unwrapByEq(_:)
sil @_T02Eq08unwrapByA0ySiSgF : $@convention(thin) (Optional<Int>) -> () {
// %0 // users: %2, %1
bb0(%0 : $Optional<Int>):
debug_value %0 : $Optional<Int>, let, name "optional", argno 1 // id: %1
switch_enum %0 : $Optional<Int>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2 // id: %2
bb1: // Preds: bb0
br bb3 // id: %3
bb2: // Preds: bb0
// function_ref print(_:separator:terminator:)
%4 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %35
%5 = integer_literal $Builtin.Word, 1 // user: %8
%6 = integer_literal $Builtin.Int64, 1 // user: %7
%7 = struct $Int (%6 : $Builtin.Int64) // user: %12
%8 = alloc_ref [tail_elems $Any * %5 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %16, %9
%9 = upcast %8 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %20, %14
%10 = integer_literal $Builtin.Int64, 2 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%7 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %9 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %8 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // user: %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Any> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Any> (%18 : $_ArrayBuffer<Any>) // user: %35
%20 = ref_tail_addr %9 : $_ContiguousArrayStorageBase, $Any // user: %21
%21 = init_existential_addr %20 : $*Any, $String // user: %30
%22 = string_literal utf8 "not nil" // user: %23
%23 = struct $UnsafeMutableRawPointer (%22 : $Builtin.RawPointer) // user: %24
%24 = enum $Optional<UnsafeMutableRawPointer>, #Optional.some!enumelt.1, %23 : $UnsafeMutableRawPointer // user: %28
%25 = integer_literal $Builtin.Int64, 7 // user: %27
%26 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %28
%27 = struct $UInt (%25 : $Builtin.Int64) // user: %28
%28 = struct $_StringCore (%24 : $Optional<UnsafeMutableRawPointer>, %27 : $UInt, %26 : $Optional<AnyObject>) // user: %29
%29 = struct $String (%28 : $_StringCore) // user: %30
store %29 to %21 : $*String // id: %30
// function_ref default argument 1 of print(_:separator:terminator:)
%31 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA0_ : $@convention(thin) () -> @owned String // user: %32
%32 = apply %31() : $@convention(thin) () -> @owned String // user: %35
// function_ref default argument 2 of print(_:separator:terminator:)
%33 = function_ref @_T0s5printySayypGd_SS9separatorSS10terminatortFfA1_ : $@convention(thin) () -> @owned String // user: %34
%34 = apply %33() : $@convention(thin) () -> @owned String // user: %35
%35 = apply %4(%19, %32, %34) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
br bb3 // id: %36
bb3: // Preds: bb1 bb2
%37 = tuple () // user: %38
return %37 : $() // id: %38
} // end sil function '_T02Eq08unwrapByA0ySiSgF'
@ukitaka
Copy link
Author

ukitaka commented Feb 26, 2018

*** SIL module before Guaranteed Passes transformation (0) ***
*** SIL module after Guaranteed Passes "Capture Promotion to Eliminate Escaping Boxes" (1) ***
*** SIL module after Guaranteed Passes "Access Enforcement Selection" (1) ***
*** SIL module after Guaranteed Passes "Prune Control Flow at No-Return Calls Using SIL unreachable" (1) ***
*** SIL module after Guaranteed Passes "Eliminate Ownership Annotation of SIL" (1) ***
*** SIL module after Guaranteed Passes "Mandatory Inlining of Transparent Functions" (1) ***
*** SIL module after Guaranteed Passes "Diagnose Unreachable Code" (1) ***
*** SIL module before SILOpt Prepare Passes transformation (0) ***
*** SIL module before EarlyModulePasses transformation (0) ***
*** SIL module after EarlyModulePasses "Dead Function Elimination" (1) ***
*** SIL module after EarlyModulePasses "Link all SIL Referenced within the Module via Deserialization" (1) ***
*** SIL module before HighLevel+EarlyLoopOpt transformation (0) ***
*** SIL function after HighLevel+EarlyLoopOpt "Lower Aggregate SIL Instructions to Multiple Scalar Operations" (1) ***
*** SIL function after HighLevel+EarlyLoopOpt "Combine SIL Instructions via Peephole Optimization" (1) ***
*** SIL function after HighLevel+EarlyLoopOpt "Generic Function Specialization on Static Types" (1) ***
*** SIL function after HighLevel+EarlyLoopOpt "Early Inlining Preserving Semantic Functions" (1) ***
*** SIL function after HighLevel+EarlyLoopOpt "Memory to SSA Value Conversion to Remove Stack Allocation" (1) ***
*** SIL function after HighLevel+EarlyLoopOpt "Constant Propagation for Performance without Diagnostics" (1) ***
*** SIL function after HighLevel+EarlyLoopOpt "SIL CFG Simplification" (1) ***
*** SIL function after HighLevel+EarlyLoopOpt "Combine SIL Instructions via Peephole Optimization" (1) ***
*** SIL function after HighLevel+EarlyLoopOpt "Common Subexpression Elimination" (1) ***
*** SIL function after HighLevel+EarlyLoopOpt "SIL release Hoisting" (1) ***
*** SIL function after HighLevel+EarlyLoopOpt "ARC Sequence Optimization" (1) ***
*** SIL function after HighLevel+EarlyLoopOpt "Combine SIL Instructions via Peephole Optimization" (1) ***
*** SIL module before MidModulePasses+StackPromote transformation (0) ***
*** SIL module after MidModulePasses+StackPromote "Dead Function Elimination" (1) ***
*** SIL module after MidModulePasses+StackPromote "Link all SIL Referenced within the Module via Deserialization" (1) ***
*** SIL module before MidLevel transformation (0) ***
*** SIL function after MidLevel "Performance Function Inlining" (1) ***
*** SIL function after MidLevel "Constant Propagation for Performance without Diagnostics" (1) ***
*** SIL function after MidLevel "Simplify CFG via Jump Threading" (1) ***
*** SIL function after MidLevel "Combine SIL Instructions via Peephole Optimization" (1) ***
*** SIL module before ClosureSpecialize transformation (0) ***
*** SIL module after ClosureSpecialize "Dead Function Elimination" (1) ***
*** SIL module before LowLevel transformation (0) ***
*** SIL module before LateLoopOpt transformation (0) ***
*** SIL module after LateLoopOpt "External Function Definition Elimination" (1) ***
*** SIL module after LateLoopOpt "Dead Function Elimination" (1) ***
*** SIL module before SIL Debug Info Generator transformation (0) ***
*** SIL module before Address Lowering transformation (0) ***
*** SIL function after Address Lowering "SIL Cleanup Preparation for IRGen" (1) ***
*** SIL module before IRGen Preparation transformation (0) ***

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment