mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Revert "[DebugInfo][SIL] Introduce the 'implicit' attribute for debug variable"
This reverts commit e63632fda8.
rdar://125939953
This commit is contained in:
@@ -4297,7 +4297,6 @@ less verbose.
|
||||
debug-var-attr ::= 'let'
|
||||
debug-var-attr ::= 'name' string-literal
|
||||
debug-var-attr ::= 'argno' integer-literal
|
||||
debug-var-attr ::= 'implicit'
|
||||
|
||||
There are a number of attributes that provide details about the source
|
||||
variable that is being described, including the name of the
|
||||
|
||||
@@ -38,7 +38,6 @@ struct SILDebugVariable {
|
||||
StringRef Name;
|
||||
unsigned ArgNo : 16;
|
||||
unsigned Constant : 1;
|
||||
unsigned Implicit : 1;
|
||||
unsigned isDenseMapSingleton : 2;
|
||||
std::optional<SILType> Type;
|
||||
std::optional<SILLocation> Loc;
|
||||
@@ -58,17 +57,17 @@ struct SILDebugVariable {
|
||||
}
|
||||
|
||||
SILDebugVariable()
|
||||
: ArgNo(0), Constant(false), Implicit(false), isDenseMapSingleton(0),
|
||||
: ArgNo(0), Constant(false), isDenseMapSingleton(0),
|
||||
Scope(nullptr) {}
|
||||
SILDebugVariable(bool Constant, uint16_t ArgNo)
|
||||
: ArgNo(ArgNo), Constant(Constant), Implicit(false),
|
||||
: ArgNo(ArgNo), Constant(Constant),
|
||||
isDenseMapSingleton(0), Scope(nullptr) {}
|
||||
SILDebugVariable(StringRef Name, bool Constant, unsigned ArgNo,
|
||||
bool IsImplicit = false, std::optional<SILType> AuxType = {},
|
||||
std::optional<SILType> AuxType = {},
|
||||
std::optional<SILLocation> DeclLoc = {},
|
||||
const SILDebugScope *DeclScope = nullptr,
|
||||
llvm::ArrayRef<SILDIExprElement> ExprElements = {})
|
||||
: Name(Name), ArgNo(ArgNo), Constant(Constant), Implicit(IsImplicit),
|
||||
: Name(Name), ArgNo(ArgNo), Constant(Constant),
|
||||
isDenseMapSingleton(0), Type(AuxType), Loc(DeclLoc), Scope(DeclScope),
|
||||
DIExpr(ExprElements) {}
|
||||
|
||||
@@ -85,9 +84,8 @@ struct SILDebugVariable {
|
||||
// it in this class so that's it's easier to carry DIExpr around.
|
||||
bool operator==(const SILDebugVariable &V) const {
|
||||
return ArgNo == V.ArgNo && Constant == V.Constant && Name == V.Name &&
|
||||
Implicit == V.Implicit && Type == V.Type && Loc == V.Loc &&
|
||||
Scope == V.Scope && isDenseMapSingleton == V.isDenseMapSingleton &&
|
||||
DIExpr == V.DIExpr;
|
||||
Type == V.Type && Loc == V.Loc && Scope == V.Scope &&
|
||||
isDenseMapSingleton == V.isDenseMapSingleton && DIExpr == V.DIExpr;
|
||||
}
|
||||
|
||||
SILDebugVariable withoutDIExpr() const {
|
||||
@@ -103,7 +101,7 @@ struct SILDebugVariable {
|
||||
|
||||
/// Returns the hashcode for the new projection path.
|
||||
inline llvm::hash_code hash_value(const SILDebugVariable &P) {
|
||||
return llvm::hash_combine(P.ArgNo, P.Constant, P.Name, P.Implicit,
|
||||
return llvm::hash_combine(P.ArgNo, P.Constant, P.Name,
|
||||
P.isDenseMapSingleton, P.Type, P.Loc, P.Scope,
|
||||
P.DIExpr);
|
||||
}
|
||||
|
||||
@@ -1849,12 +1849,10 @@ class TailAllocatedDebugVariable {
|
||||
int_type HasValue : 1;
|
||||
/// True if this is a let-binding.
|
||||
int_type Constant : 1;
|
||||
/// True if this variable is created by compiler
|
||||
int_type Implicit : 1;
|
||||
/// When this is nonzero there is a tail-allocated string storing
|
||||
/// variable name present. This typically only happens for
|
||||
/// instructions that were created from parsing SIL assembler.
|
||||
int_type NameLength : 13;
|
||||
int_type NameLength : 14;
|
||||
/// The source function argument position from left to right
|
||||
/// starting with 1 or 0 if this is a local variable.
|
||||
int_type ArgNo : 16;
|
||||
@@ -1876,9 +1874,6 @@ public:
|
||||
StringRef getName(const char *buf) const;
|
||||
bool isLet() const { return Bits.Data.Constant; }
|
||||
|
||||
bool isImplicit() const { return Bits.Data.Implicit; }
|
||||
void setImplicit(bool V = true) { Bits.Data.Implicit = V; }
|
||||
|
||||
std::optional<SILDebugVariable>
|
||||
get(VarDecl *VD, const char *buf, std::optional<SILType> AuxVarType = {},
|
||||
std::optional<SILLocation> DeclLoc = {},
|
||||
@@ -1890,8 +1885,8 @@ public:
|
||||
StringRef name = getName(buf);
|
||||
if (VD && name.empty())
|
||||
name = VD->getName().str();
|
||||
return SILDebugVariable(name, isLet(), getArgNo(), isImplicit(), AuxVarType,
|
||||
DeclLoc, DeclScope, DIExprElements);
|
||||
return SILDebugVariable(name, isLet(), getArgNo(), AuxVarType, DeclLoc,
|
||||
DeclScope, DIExprElements);
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(TailAllocatedDebugVariable) == 4,
|
||||
|
||||
@@ -175,7 +175,6 @@ TailAllocatedDebugVariable::TailAllocatedDebugVariable(
|
||||
Bits.Data.HasValue = true;
|
||||
Bits.Data.Constant = Var->Constant;
|
||||
Bits.Data.ArgNo = Var->ArgNo;
|
||||
Bits.Data.Implicit = Var->Implicit;
|
||||
Bits.Data.NameLength = Var->Name.size();
|
||||
assert(Bits.Data.ArgNo == Var->ArgNo && "Truncation");
|
||||
assert(Bits.Data.NameLength == Var->Name.size() && "Truncation");
|
||||
@@ -256,10 +255,6 @@ AllocStackInst::AllocStackInst(
|
||||
assert(sharedUInt32().AllocStackInst.numOperands ==
|
||||
TypeDependentOperands.size() &&
|
||||
"Truncation");
|
||||
auto *VD = Loc.getLocation().getAsASTNode<VarDecl>();
|
||||
if (Var && VD) {
|
||||
VarInfo.setImplicit(VD->isImplicit() || VarInfo.isImplicit());
|
||||
}
|
||||
TrailingOperandsList::InitOperandsList(getAllOperands().begin(), this,
|
||||
TypeDependentOperands);
|
||||
}
|
||||
@@ -454,8 +449,6 @@ DebugValueInst::DebugValueInst(
|
||||
getTrailingObjects<SILLocation>(),
|
||||
getTrailingObjects<const SILDebugScope *>(),
|
||||
getTrailingObjects<SILDIExprElement>()) {
|
||||
if (auto *VD = DebugLoc.getLocation().getAsASTNode<VarDecl>())
|
||||
VarInfo.setImplicit(VD->isImplicit() || VarInfo.isImplicit());
|
||||
setPoisonRefs(poisonRefs);
|
||||
if (usesMoveableValueDebugInfo || Operand->getType().isMoveOnly())
|
||||
setUsesMoveableValueDebugInfo();
|
||||
|
||||
@@ -1424,8 +1424,6 @@ public:
|
||||
|
||||
if (Var->ArgNo)
|
||||
*this << ", argno " << Var->ArgNo;
|
||||
if (Var->Implicit)
|
||||
*this << ", implicit";
|
||||
if (Var->Type) {
|
||||
*this << ", type ";
|
||||
Var->Type->print(PrintState.OS, PrintState.ASTOptions);
|
||||
|
||||
@@ -1677,8 +1677,6 @@ bool SILParser::parseSILDebugVar(SILDebugVariable &Var) {
|
||||
Var.Constant = false;
|
||||
} else if (Key == "loc") {
|
||||
Var.Constant = false;
|
||||
} else if (Key == "implicit") {
|
||||
Var.Implicit = true;
|
||||
} else {
|
||||
P.diagnose(P.Tok, diag::sil_dbg_unknown_key, Key);
|
||||
return true;
|
||||
|
||||
@@ -238,11 +238,7 @@ bool swift::hasOnlyEndOfScopeOrEndOfLifetimeUses(SILInstruction *inst) {
|
||||
// Include debug uses only in Onone mode.
|
||||
if (isDebugUser && inst->getFunction()->getEffectiveOptimizationMode() <=
|
||||
OptimizationMode::NoOptimization)
|
||||
if (auto DbgVarInst = DebugVarCarryingInst(user)) {
|
||||
auto VarInfo = DbgVarInst.getVarInfo();
|
||||
if (VarInfo && !VarInfo->Implicit)
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -45,9 +45,9 @@ struct MyModel: Differentiable {
|
||||
@differentiable(reverse)
|
||||
mutating func member4() {
|
||||
// CHECK-LABEL: // pullback of MyModel.member4()
|
||||
// CHECK-NOT: debug_value %{{.*}} : $MyModel.TangentVector, var, name %{{.*}}, argno 1, implicit, scope
|
||||
// CHECK-NOT: debug_value %{{.*}} : $MyModel.TangentVector, var, name %{{.*}}, argno 1, scope
|
||||
// CHECK: bb0(%{{.*}} : $_AD__$s4main7MyModelV7member4yyF_bb3__Pred__src_0_wrt_0):
|
||||
// CHECK: debug_value %{{.*}} : $MyModel.TangentVector, var, name "derivative of 'self' in scope at {{.*}} (scope #1)", implicit, scope
|
||||
// CHECK: debug_value %{{.*}} : $MyModel.TangentVector, var, name "derivative of 'self' in scope at {{.*}} (scope #1)", scope
|
||||
// Must be a differentiable type.
|
||||
var localVar: Float = 0
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@ bb3(%4 : @owned $FakeOptional<NonSendableKlass>):
|
||||
|
||||
sil [ossa] @warningIfCallingGetter : $@convention(method) @async (@sil_isolated @guaranteed MyActor) -> () {
|
||||
bb0(%0 : @guaranteed $MyActor):
|
||||
debug_value %0 : $MyActor, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $MyActor, let, name "self", argno 1
|
||||
hop_to_executor %0 : $MyActor
|
||||
%3 = class_method %0 : $MyActor, #MyActor.klass!getter : (isolated MyActor) -> () -> NonSendableKlass, $@convention(method) (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
||||
%4 = apply %3(%0) : $@convention(method) (@sil_isolated @guaranteed MyActor) -> @owned NonSendableKlass
|
||||
@@ -301,7 +301,7 @@ bb0(%0 : @guaranteed $MyActor):
|
||||
|
||||
sil [ossa] @assignIntoSetter : $@convention(method) @async (@sil_isolated @guaranteed MyActor) -> () {
|
||||
bb0(%0 : @guaranteed $MyActor):
|
||||
debug_value %0 : $MyActor, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $MyActor, let, name "self", argno 1
|
||||
hop_to_executor %0 : $MyActor
|
||||
%4 = function_ref @constructNonSendableKlass : $@convention(thin) () -> @owned NonSendableKlass
|
||||
%5 = apply %4() : $@convention(thin) () -> @owned NonSendableKlass
|
||||
|
||||
@@ -1680,7 +1680,7 @@ bb0(%arg : $Builtin.Word):
|
||||
|
||||
sil hidden [ossa] @test_unconditional_checked_cast : $@convention(method) (@guaranteed ChildClass) -> @owned ChildClass {
|
||||
bb0(%0 : @guaranteed $ChildClass):
|
||||
debug_value %0 : $ChildClass, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $ChildClass, let, name "self", argno 1
|
||||
%2 = copy_value %0 : $ChildClass
|
||||
%3 = upcast %2 : $ChildClass to $ParentClass
|
||||
%4 = function_ref @copyParentClass : $@convention(thin) (@guaranteed ParentClass) -> @owned ParentClass
|
||||
@@ -1693,4 +1693,4 @@ bb0(%0 : @guaranteed $ChildClass):
|
||||
%11 = copy_value %8 : $ChildClass
|
||||
destroy_value %8 : $ChildClass
|
||||
return %11 : $ChildClass
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ open class Cache<T> {
|
||||
let value = try creationBlock()
|
||||
return value
|
||||
} catch {
|
||||
// CHECK: debug_value {{.*}} : $any Error, let, name "error", implicit, loc "{{.*}}":[[@LINE-1]]:13, scope [[SCOPE:[0-9]+]]
|
||||
// CHECK: debug_value {{.*}} : $any Error, let, name "error", loc "{{.*}}":[[@LINE-1]]:13, scope [[SCOPE:[0-9]+]]
|
||||
// CHECK: alloc_stack $@opened({{.*}}, any Error) Self, loc{{.*}}, scope [[SCOPE]]
|
||||
|
||||
_negativeCache.setObject(error, forKey: NSNumber(1))
|
||||
|
||||
@@ -28,7 +28,7 @@ func use<T>(_ t : T) {}
|
||||
// CHECK-SIL: sil hidden @$s16debug_value_addr11GenericSelfV1xACyxGx_tcfC : $@convention(method) <T> (@in T, @thin GenericSelf<T>.Type) -> GenericSelf<T> {
|
||||
// CHECK-SIL: bb0(%0 : $*T, %1 : $@thin GenericSelf<T>.Type):
|
||||
//
|
||||
// CHECK-SIL-NEXT: alloc_stack [var_decl] $GenericSelf<T>, var, name "self", implicit, loc {{.*}}
|
||||
// CHECK-SIL-NEXT: alloc_stack [var_decl] $GenericSelf<T>, var, name "self", loc {{.*}}
|
||||
// CHECK-SIL-NEXT: debug_value %0 : $*T, let, name "x", argno 1, expr op_deref, loc {{.*}}
|
||||
struct GenericSelf<T> {
|
||||
init(x: T) {
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -g %s -o %t.sil
|
||||
// RUN: %FileCheck %s --input-file=%t.sil
|
||||
// Test the SILParser / SILPrinter
|
||||
// RUN: %target-swift-frontend -module-name ImplicitVar -emit-sil -g %t.sil | %FileCheck %s
|
||||
|
||||
struct MyStruct {
|
||||
// Check if the 'implicit' directive for `self` is properly generated (and parsed)
|
||||
// CHECK: sil {{.*}} @{{.*}}MyStructV5hello
|
||||
// CHECK: debug_value %0 : $MyStruct
|
||||
// CHECK-SAME: let, name "self", argno 1, implicit, loc
|
||||
func hello() {}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ sil private @pop : $@convention(method) (UInt64, Wrapper) -> Wrapper {
|
||||
[global: ]
|
||||
bb0(%0 : $UInt64, %1 : $Wrapper):
|
||||
debug_value %0 : $UInt64, let, name "numBits", argno 1, scope 3
|
||||
debug_value %1 : $Wrapper, let, name "self", argno 2, implicit, scope 3
|
||||
debug_value %1 : $Wrapper, let, name "self", argno 2, scope 3
|
||||
%4 = struct_extract %1 : $Wrapper, #Wrapper.bytes, scope 3
|
||||
%5 = struct_extract %4 : $UInt64, #UInt64._value, scope 3
|
||||
%6 = struct_extract %0 : $UInt64, #UInt64._value, scope 3
|
||||
@@ -46,15 +46,15 @@ sil hidden @maker : $@convention(method) (UInt64, @thin Wrapper.Type) -> Wrapper
|
||||
bb0(%0 : $UInt64, %1 : $@thin Wrapper.Type):
|
||||
// CHECK: debug_value %0 : $UInt64, let, name "bits", argno 1
|
||||
debug_value %0 : $UInt64, let, name "bits", argno 1, scope 7
|
||||
// CHECK: debug_value %1 : $@thin Wrapper.Type, let, name "self", argno 2, implicit
|
||||
debug_value %1 : $@thin Wrapper.Type, let, name "self", argno 2, implicit, scope 7
|
||||
// CHECK: debug_value %1 : $@thin Wrapper.Type, let, name "self", argno 2
|
||||
debug_value %1 : $@thin Wrapper.Type, let, name "self", argno 2, scope 7
|
||||
%4 = integer_literal $Builtin.Int64, 3735928559, scope 7
|
||||
%5 = struct $UInt64 (%4 : $Builtin.Int64), scope 7
|
||||
%6 = struct $Wrapper (%5 : $UInt64), loc * "e.swift":3:8
|
||||
// CHECK-DAG: debug_value %0 : $UInt64, let, name "numBits", argno 1
|
||||
debug_value %0 : $UInt64, let, name "numBits", argno 1, scope 11
|
||||
// CHECK-DAG: debug_value %{{.*}} : $Builtin.Int64, let, name "self", {{.*}}, implicit, type $Wrapper, expr op_fragment:#Wrapper.bytes:op_fragment:#UInt64._value
|
||||
debug_value %6 : $Wrapper, let, name "self", argno 2, implicit, scope 11
|
||||
// CHECK-DAG: debug_value %{{.*}} : $Builtin.Int64, let, name "self", {{.*}}, type $Wrapper, expr op_fragment:#Wrapper.bytes:op_fragment:#UInt64._value
|
||||
debug_value %6 : $Wrapper, let, name "self", argno 2, scope 11
|
||||
%9 = struct_extract %6 : $Wrapper, #Wrapper.bytes, scope 11
|
||||
%10 = struct_extract %9 : $UInt64, #UInt64._value, scope 11
|
||||
%11 = struct_extract %0 : $UInt64, #UInt64._value, scope 11
|
||||
|
||||
@@ -15,8 +15,8 @@ import resilient_struct
|
||||
|
||||
sil @test_debug_value_resilient : $@convention(thin) () -> () {
|
||||
bb0:
|
||||
%0 = alloc_stack $Size, var, name "assertions", implicit
|
||||
debug_value %0 : $*Size, var, name "assertions", implicit
|
||||
%0 = alloc_stack $Size, var, name "assertions"
|
||||
debug_value %0 : $*Size, var, name "assertions"
|
||||
dealloc_stack %0: $*Size
|
||||
%1 = tuple ()
|
||||
return %1 : $()
|
||||
|
||||
@@ -19,7 +19,7 @@ func consumeAndCreate(_ x: consuming BufferView) -> _inherit(x) BufferView
|
||||
|
||||
sil hidden [unsafe_nonescapable_result] @bufferviewinit1 : $@convention(method) (UnsafeRawBufferPointer, @thin BufferView.Type) -> @owned BufferView {
|
||||
bb0(%0 : $UnsafeRawBufferPointer, %1 : $@thin BufferView.Type):
|
||||
%2 = alloc_stack [var_decl] $BufferView, var, name "self", implicit
|
||||
%2 = alloc_stack [var_decl] $BufferView, var, name "self"
|
||||
debug_value %0 : $UnsafeRawBufferPointer, let, name "ptr", argno 1
|
||||
%4 = begin_access [modify] [static] %2 : $*BufferView
|
||||
%5 = struct_element_addr %4 : $*BufferView, #BufferView.ptr
|
||||
@@ -34,7 +34,7 @@ bb0(%0 : $UnsafeRawBufferPointer, %1 : $@thin BufferView.Type):
|
||||
// CHECK-LABEL: sil hidden @bufferviewtest2 : $@convention(method) (UnsafeRawBufferPointer, @guaranteed Array<Int>, @thin BufferView.Type) -> _scope(2) @owned BufferView {
|
||||
sil hidden @bufferviewtest2 : $@convention(method) (UnsafeRawBufferPointer, @guaranteed Array<Int>, @thin BufferView.Type) -> _scope(2) @owned BufferView {
|
||||
bb0(%0 : $UnsafeRawBufferPointer, %1 : @noImplicitCopy $Array<Int>, %2 : $@thin BufferView.Type):
|
||||
%3 = alloc_stack [var_decl] $BufferView, var, name "self", implicit
|
||||
%3 = alloc_stack [var_decl] $BufferView, var, name "self"
|
||||
%6 = begin_access [modify] [static] %3 : $*BufferView
|
||||
%7 = struct_element_addr %6 : $*BufferView, #BufferView.ptr
|
||||
store %0 to %7 : $*UnsafeRawBufferPointer
|
||||
|
||||
@@ -60,7 +60,7 @@ class Node2<A, B> {
|
||||
// CHECK: sil hidden [ossa] @$s31deinit_recursive_linear_generic5Node2Cfd : $@convention(method) <A, B> (@guaranteed Node2<A, B>) -> @owned Builtin.NativeObject {
|
||||
// CHECK: [[SELF:%.*]] "self"
|
||||
// CHECK: bb0([[SELF]] : @guaranteed $Node2<A, B>):
|
||||
// CHECK: debug_value [[SELF]] : $Node2<A, B>, let, name "self", argno 1, implicit
|
||||
// CHECK: debug_value [[SELF]] : $Node2<A, B>, let, name "self", argno 1
|
||||
// CHECK: [[NEXT_ADDR:%.*]] = ref_element_addr [[SELF]] : $Node2<A, B>, #Node2.next
|
||||
// CHECK: [[NEXT_ACCESS:%.*]] = begin_access [deinit] [static] [[NEXT_ADDR]] : $*Optional<Node2<Int, (A, B)>>
|
||||
// CHECK: destroy_addr [[NEXT_ACCESS]] : $*Optional<Node2<Int, (A, B)>>
|
||||
@@ -68,4 +68,4 @@ class Node2<A, B> {
|
||||
// CHECK: [[SELF_NATIVE:%.*]] = unchecked_ref_cast [[SELF]] : $Node2<A, B> to $Builtin.NativeObject
|
||||
// CHECK: [[SELF_OWNED:%.*]] = unchecked_ownership_conversion [[SELF_NATIVE]] : $Builtin.NativeObject, @guaranteed to @owned
|
||||
// CHECK: return [[SELF_OWNED]] : $Builtin.NativeObject
|
||||
// CHECK: } // end sil function '$s31deinit_recursive_linear_generic5Node2Cfd'
|
||||
// CHECK: } // end sil function '$s31deinit_recursive_linear_generic5Node2Cfd'
|
||||
|
||||
@@ -20,7 +20,7 @@ let foo = Foo(value: "Hello")
|
||||
// Foo.value.setter //
|
||||
|
||||
// CHECK-LABEL: sil hidden [ossa] @$s35didset_oldvalue_not_accessed_silgen3FooC5valuexvs : $@convention(method) <T> (@in T, @guaranteed Foo<T>) -> ()
|
||||
// CHECK: debug_value [[VALUE:%.*]] : $*T, let, name "value", argno {{[0-9+]}}, {{.*}} expr op_deref
|
||||
// CHECK: debug_value [[VALUE:%.*]] : $*T, let, name "value", argno {{[0-9+]}}, expr op_deref
|
||||
// CHECK-NEXT: debug_value [[SELF:%.*]] : $Foo<T>, let, name "self", argno {{[0-9+]}}
|
||||
// CHECK-NEXT: [[ALLOC_STACK:%.*]] = alloc_stack $T
|
||||
// CHECK-NEXT: copy_addr [[VALUE]] to [init] [[ALLOC_STACK]] : $*T
|
||||
|
||||
@@ -172,7 +172,7 @@ final class Wallet {
|
||||
// CHECK: destroy_value [[DD]] : $Ticket
|
||||
|
||||
// CHECK-SIL-LABEL: sil hidden @$s4test6TicketO06changeB08inWalletyAA0E0CSg_tF : $@convention(method) (@guaranteed Optional<Wallet>, @owned Ticket) -> () {
|
||||
// CHECK-SIL: [[SELF_REF:%.*]] = alloc_stack [lexical] [var_decl] $Ticket, var, name "self", implicit
|
||||
// CHECK-SIL: [[SELF_REF:%.*]] = alloc_stack [lexical] [var_decl] $Ticket, var, name "self"
|
||||
// CHECK-SIL: switch_enum {{.*}} : $Optional<Wallet>, case #Optional.some!enumelt: {{.*}}, case #Optional.none!enumelt: [[NO_WALLET_BB:bb[0-9]+]]
|
||||
//
|
||||
// >> now we begin the destruction sequence, which involves pattern matching on self to destroy its innards
|
||||
|
||||
@@ -38,7 +38,7 @@ foo1.bar = 2
|
||||
// CHECK-LABEL: sil hidden [ossa] @$s28lazy_property_with_observers4Foo1V3barSivs : $@convention(method) (Int, @inout Foo1) -> () {
|
||||
// CHECK: bb0([[VALUE:%.*]] : $Int, [[FOO1:%.*]] : $*Foo1):
|
||||
// CHECK-NEXT: debug_value [[VALUE]] : $Int, let, name "value", argno 1
|
||||
// CHECK-NEXT: debug_value [[FOO1]] : $*Foo1, var, name "self", argno 2, {{.*}} expr op_deref
|
||||
// CHECK-NEXT: debug_value [[FOO1]] : $*Foo1, var, name "self", argno 2, expr op_deref
|
||||
// CHECK-NEXT: [[BEGIN_ACCESS:%.*]] = begin_access [modify] [unknown] %1 : $*Foo1
|
||||
// CHECK-NEXT: // function_ref Foo1.bar.getter
|
||||
// CHECK-NEXT: [[GETTER:%.*]] = function_ref @$s28lazy_property_with_observers4Foo1V3barSivg : $@convention(method) (@inout Foo1) -> Int
|
||||
|
||||
@@ -36,7 +36,7 @@ _ = state1.someValues
|
||||
|
||||
// CHECK-LABEL: sil hidden [ossa] @$s26property_wrapper_coroutine5StateV6valuesSaySSGvM : $@yield_once @convention(method) (@inout State) -> @yields @inout Array<String> {
|
||||
// CHECK: bb0([[STATE:%.*]] : $*State):
|
||||
// CHECK: debug_value [[STATE]] : $*State, var, name "self", argno {{.*}}, {{.*}} expr op_deref
|
||||
// CHECK: debug_value [[STATE]] : $*State, var, name "self", argno {{.*}}, expr op_deref
|
||||
// CHECK: [[BEGIN_ACCESS:%.*]] = begin_access [modify] [unknown] [[STATE]] : $*State
|
||||
// CHECK: [[BACKING_ADDR:%.*]] = struct_element_addr [[BEGIN_ACCESS]] : $*State, #State._values
|
||||
// CHECK: [[VALUE_ADDR:%.*]] = struct_element_addr [[BACKING_ADDR]] : $*TestWrapper<Array<String>>, #TestWrapper.wrappedValue
|
||||
|
||||
@@ -978,7 +978,7 @@ struct S_58201 {
|
||||
|
||||
// CHECK-LABEL: sil hidden [ossa] @$s17property_wrappers7S_58201V1ayyF : $@convention(method) (S_58201) -> () {
|
||||
// CHECK: bb0(%0 : $S_58201):
|
||||
// CHECK-NEXT: debug_value %0 : $S_58201, let, name "self", argno 1, implicit
|
||||
// CHECK-NEXT: debug_value %0 : $S_58201, let, name "self", argno 1
|
||||
// CHECK-NEXT: [[BOX:%.*]] = alloc_box ${ var BasicComputedIntWrapper }, var, name "_b"
|
||||
// CHECK-NEXT: [[BOX_LIFETIME:%[^,]+]] = begin_borrow [var_decl] [[BOX]]
|
||||
// CHECK-NEXT: [[BOXADDR:%.*]] = project_box [[BOX_LIFETIME]] : ${ var BasicComputedIntWrapper }, 0
|
||||
|
||||
@@ -34,7 +34,7 @@ bb0:
|
||||
|
||||
sil [transparent] @$s28accessed_storage_unavailable11UnavailableV1iAA1SVvg : $@convention(method) (Unavailable) -> S {
|
||||
bb0(%0 : $Unavailable):
|
||||
debug_value %0 : $Unavailable, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $Unavailable, let, name "self", argno 1
|
||||
%2 = function_ref @$ss31_diagnoseUnavailableCodeReacheds5NeverOyF : $@convention(thin) () -> Never
|
||||
%3 = apply %2() : $@convention(thin) () -> Never
|
||||
unreachable
|
||||
|
||||
@@ -89,7 +89,7 @@ sil @$s4main6do_fooyyyyXEF : $@convention(thin) (@guaranteed @noescape @callee_g
|
||||
sil hidden [ossa] @$s4main5FooerC3fooyyF : $@convention(method) (@owned Fooer) -> () {
|
||||
// %0 "self" // users: %13, %5, %1
|
||||
bb0(%0 : @owned $Fooer):
|
||||
debug_value %0 : $Fooer, let, name "self", argno 1, implicit // id: %1
|
||||
debug_value %0 : $Fooer, let, name "self", argno 1 // id: %1
|
||||
%2 = alloc_box ${ var @sil_weak Optional<Fooer> }, var, name "weakSelf" // users: %16, %3
|
||||
%3 = begin_borrow [lexical] %2 : ${ var @sil_weak Optional<Fooer> } // users: %10, %15, %4
|
||||
%4 = project_box %3 : ${ var @sil_weak Optional<Fooer> }, 0 // user: %7
|
||||
|
||||
@@ -426,7 +426,7 @@ exit:
|
||||
// MO.deinit
|
||||
sil hidden [ossa] @testDropDeinit : $@convention(method) (@owned MO) -> () {
|
||||
bb0(%0 : @owned $MO):
|
||||
debug_value %0 : $MO, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $MO, let, name "self", argno 1
|
||||
%61 = drop_deinit %0 : $MO
|
||||
end_lifetime %61 : $MO
|
||||
%63 = tuple ()
|
||||
|
||||
@@ -149,7 +149,7 @@ actor BoringActor {
|
||||
// FIXME: the convenience init below is missing a hop after the call to arbitraryAsync (rdar://87485045)
|
||||
|
||||
// CHECK-LABEL: sil hidden @$s4test14SingleVarActorC10delegatingACSb_tYacfC : $@convention(method) @async (Bool, @thick SingleVarActor.Type) -> @owned SingleVarActor {
|
||||
// CHECK: [[SELF_ALLOC:%[0-9]+]] = alloc_stack [lexical] [var_decl] $SingleVarActor, let, name "self", implicit
|
||||
// CHECK: [[SELF_ALLOC:%[0-9]+]] = alloc_stack [lexical] [var_decl] $SingleVarActor, let, name "self"
|
||||
// ** first hop is after the call to the synchronous init, right after initializing the allocation.
|
||||
// CHECK: [[SYNC_FN:%[0-9]+]] = function_ref @$s4test14SingleVarActorC4syncACyt_tcfC : $@convention(method) (@thick SingleVarActor.Type) -> @owned SingleVarActor
|
||||
// CHECK: [[INIT1:%[0-9]+]] = apply [[SYNC_FN]]({{%[0-9]+}}) : $@convention(method) (@thick SingleVarActor.Type) -> @owned SingleVarActor
|
||||
|
||||
@@ -36,7 +36,7 @@ struct MyText<V> {
|
||||
|
||||
sil [ossa] @tuple_addr_constructor_1 : $@convention(method) (@owned String, Int, @thin MyText<(Int, Int)>.Type) -> @owned MyText<(Int, Int)> {
|
||||
bb0(%0 : @owned $String, %1 : $Int, %2 : $@thin MyText<(Int, Int)>.Type):
|
||||
%3 = alloc_stack $MyText<(Int, Int)>, var, name "self", implicit
|
||||
%3 = alloc_stack $MyText<(Int, Int)>, var, name "self"
|
||||
%4 = mark_uninitialized [rootself] %3 : $*MyText<(Int, Int)>
|
||||
%7 = copy_value %0 : $String
|
||||
%8 = begin_access [modify] [static] %4 : $*MyText<(Int, Int)>
|
||||
@@ -56,7 +56,7 @@ bb0(%0 : @owned $String, %1 : $Int, %2 : $@thin MyText<(Int, Int)>.Type):
|
||||
|
||||
sil [ossa] @tuple_addr_constructor_2 : $@convention(method) (@owned String, Int, @thin MyText<(Int, Int)>.Type) -> @owned MyText<(Int, Int)> {
|
||||
bb0(%0 : @owned $String, %1 : $Int, %2 : $@thin MyText<(Int, Int)>.Type):
|
||||
%3 = alloc_stack $MyText<(Int, Int)>, var, name "self", implicit
|
||||
%3 = alloc_stack $MyText<(Int, Int)>, var, name "self"
|
||||
%4 = mark_uninitialized [rootself] %3 : $*MyText<(Int, Int)>
|
||||
%7 = copy_value %0 : $String
|
||||
%8 = begin_access [modify] [static] %4 : $*MyText<(Int, Int)>
|
||||
@@ -76,7 +76,7 @@ bb0(%0 : @owned $String, %1 : $Int, %2 : $@thin MyText<(Int, Int)>.Type):
|
||||
|
||||
sil [ossa] @tuple_addr_constructor_3 : $@convention(method) (@owned String, Int, @thin MyText<(Int, Int)>.Type) -> @owned MyText<(Int, Int)> {
|
||||
bb0(%0 : @owned $String, %1 : $Int, %2 : $@thin MyText<(Int, Int)>.Type):
|
||||
%3 = alloc_stack $MyText<(Int, Int)>, var, name "self", implicit
|
||||
%3 = alloc_stack $MyText<(Int, Int)>, var, name "self"
|
||||
%4 = mark_uninitialized [rootself] %3 : $*MyText<(Int, Int)>
|
||||
%7 = copy_value %0 : $String
|
||||
%8 = begin_access [modify] [static] %4 : $*MyText<(Int, Int)>
|
||||
@@ -88,4 +88,4 @@ bb0(%0 : @owned $String, %1 : $Int, %2 : $@thin MyText<(Int, Int)>.Type):
|
||||
destroy_addr %4 : $*MyText<(Int, Int)>
|
||||
dealloc_stack %3 : $*MyText<(Int, Int)>
|
||||
return %16 : $MyText<(Int, Int)>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ struct Test {
|
||||
sil private [ossa] @$s14init_accessors4TestV1xSivi : $@convention(thin) (Int) -> @out Int {
|
||||
bb0(%0 : $*Int, %1 : $Int):
|
||||
%2 = mark_uninitialized [out] %0 : $*Int
|
||||
debug_value %1 : $Int, let, name "newValue", argno 1, implicit
|
||||
debug_value %1 : $Int, let, name "newValue", argno 1
|
||||
%4 = begin_access [modify] [unknown] %2 : $*Int
|
||||
assign %1 to %4 : $*Int
|
||||
end_access %4 : $*Int
|
||||
@@ -28,8 +28,8 @@ bb0(%0 : $*Int, %1 : $Int):
|
||||
|
||||
sil hidden [ossa] @$s14init_accessors4TestV1xSivs : $@convention(method) (Int, @inout Test) -> () {
|
||||
bb0(%0 : $Int, %1 : $*Test):
|
||||
debug_value %0 : $Int, let, name "newValue", argno 1, implicit
|
||||
debug_value %1 : $*Test, var, name "self", argno 2, implicit, expr op_deref
|
||||
debug_value %0 : $Int, let, name "newValue", argno 1
|
||||
debug_value %1 : $*Test, var, name "self", argno 2, expr op_deref
|
||||
%4 = begin_access [modify] [unknown] %1 : $*Test
|
||||
%5 = struct_element_addr %4 : $*Test, #Test._x
|
||||
assign %0 to %5 : $*Int
|
||||
@@ -92,4 +92,4 @@ bb0(%0 : $Int, %1 : $Int, %2 : $@thin Test.Type):
|
||||
%22 = load [trivial] %5 : $*Test
|
||||
destroy_value %4 : ${ var Test }
|
||||
return %22 : $Test
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,9 +377,9 @@ bb0(%0 : @owned $Klass, %1 : @owned $Klass):
|
||||
// CHECK: } // end sil function 'myBufferViewSetter'
|
||||
sil [ossa] @myBufferViewSetter : $@convention(method) <T> (UnsafeBufferPointer<T>, @inout MyBufferView<T>) -> () {
|
||||
bb0(%0 : $UnsafeBufferPointer<T>, %1 : $*MyBufferView<T>):
|
||||
debug_value %0 : $UnsafeBufferPointer<T>, let, name "value", argno 1, implicit
|
||||
debug_value %0 : $UnsafeBufferPointer<T>, let, name "value", argno 1
|
||||
%3 = mark_unresolved_non_copyable_value [consumable_and_assignable] %1 : $*MyBufferView<T>
|
||||
debug_value %3 : $*MyBufferView<T>, var, name "self", argno 2, implicit, expr op_deref
|
||||
debug_value %3 : $*MyBufferView<T>, var, name "self", argno 2, expr op_deref
|
||||
%5 = begin_access [modify] [static] %3 : $*MyBufferView<T>
|
||||
%6 = struct_element_addr %5 : $*MyBufferView<T>, #MyBufferView.ptr
|
||||
store %0 to [trivial] %6 : $*UnsafeBufferPointer<T>
|
||||
@@ -721,7 +721,7 @@ sil @get_fixedsize_queue : $@convention(thin) () -> @owned FixedSizeQueue
|
||||
// CHECK: } // end sil function 'test_return_trivial_type'
|
||||
sil [ossa] @test_return_trivial_type : $@convention(thin) (@owned FixedSizeQueue) -> Builtin.Int32 {
|
||||
bb0(%0 : @owned $FixedSizeQueue):
|
||||
%1 = alloc_stack [lexical] $FixedSizeQueue, var, name "self", implicit
|
||||
%1 = alloc_stack [lexical] $FixedSizeQueue, var, name "self"
|
||||
%2 = mark_unresolved_non_copyable_value [consumable_and_assignable] %1 : $*FixedSizeQueue
|
||||
store %0 to [init] %2 : $*FixedSizeQueue
|
||||
%4 = begin_access [modify] [static] %2 : $*FixedSizeQueue
|
||||
@@ -790,7 +790,7 @@ sil @testUseCorrectBitsClosureUser : $@convention(thin) (@guaranteed @noescape @
|
||||
sil [ossa] @testUseCorrectBits : $@convention(method) (Int, @inout NonCopyableNativeObjectIntPair) -> () {
|
||||
bb0(%0 : $Int, %1a : $*NonCopyableNativeObjectIntPair):
|
||||
debug_value %0 : $Int, let, name "index", argno 1
|
||||
debug_value %1a : $*NonCopyableNativeObjectIntPair, var, name "self", argno 2, implicit, expr op_deref
|
||||
debug_value %1a : $*NonCopyableNativeObjectIntPair, var, name "self", argno 2, expr op_deref
|
||||
%1 = mark_unresolved_non_copyable_value [consumable_and_assignable] %1a : $*NonCopyableNativeObjectIntPair
|
||||
%4 = function_ref @testUseCorrectBitsClosureCallee : $@convention(thin) (Int, @inout_aliasable NonCopyableNativeObjectIntPair) -> Bool
|
||||
%5 = partial_apply [callee_guaranteed] [on_stack] %4(%0, %1) : $@convention(thin) (Int, @inout_aliasable NonCopyableNativeObjectIntPair) -> Bool
|
||||
@@ -798,7 +798,7 @@ bb0(%0 : $Int, %1a : $*NonCopyableNativeObjectIntPair):
|
||||
%7 = function_ref @testUseCorrectBitsClosureUser : $@convention(thin) (@guaranteed @noescape @callee_guaranteed () -> Bool) -> ()
|
||||
%8 = apply %7(%6) : $@convention(thin) (@guaranteed @noescape @callee_guaranteed () -> Bool) -> ()
|
||||
%9 = struct_element_addr %1 : $*NonCopyableNativeObjectIntPair, #NonCopyableNativeObjectIntPair.currentPosition
|
||||
debug_value undef : $*NonCopyableNativeObjectIntPair, var, name "self", argno 2, implicit, expr op_deref
|
||||
debug_value undef : $*NonCopyableNativeObjectIntPair, var, name "self", argno 2, expr op_deref
|
||||
destroy_value %6 : $@noescape @callee_guaranteed () -> Bool
|
||||
%12 = begin_access [modify] [static] %1 : $*NonCopyableNativeObjectIntPair
|
||||
%13 = struct_element_addr %12 : $*NonCopyableNativeObjectIntPair, #NonCopyableNativeObjectIntPair.currentPosition
|
||||
@@ -825,7 +825,7 @@ sil @testUseCorrectBits2ClosureCallee : $@convention(thin) (Int, @inout_aliasabl
|
||||
sil [ossa] @testUseCorrectBits2 : $@convention(method) (Int, @inout NonCopyableNativeObjectPair) -> () {
|
||||
bb0(%0 : $Int, %1a : $*NonCopyableNativeObjectPair):
|
||||
debug_value %0 : $Int, let, name "index", argno 1
|
||||
debug_value %1a : $*NonCopyableNativeObjectPair, var, name "self", argno 2, implicit, expr op_deref
|
||||
debug_value %1a : $*NonCopyableNativeObjectPair, var, name "self", argno 2, expr op_deref
|
||||
%1 = mark_unresolved_non_copyable_value [consumable_and_assignable] %1a : $*NonCopyableNativeObjectPair
|
||||
%4 = function_ref @testUseCorrectBits2ClosureCallee : $@convention(thin) (Int, @inout_aliasable NonCopyableNativeObjectPair) -> Bool
|
||||
%5 = partial_apply [callee_guaranteed] [on_stack] %4(%0, %1) : $@convention(thin) (Int, @inout_aliasable NonCopyableNativeObjectPair) -> Bool
|
||||
@@ -833,7 +833,7 @@ bb0(%0 : $Int, %1a : $*NonCopyableNativeObjectPair):
|
||||
%7 = function_ref @testUseCorrectBitsClosureUser : $@convention(thin) (@guaranteed @noescape @callee_guaranteed () -> Bool) -> ()
|
||||
%8 = apply %7(%6) : $@convention(thin) (@guaranteed @noescape @callee_guaranteed () -> Bool) -> ()
|
||||
%9 = struct_element_addr %1 : $*NonCopyableNativeObjectPair, #NonCopyableNativeObjectPair.currentPosition
|
||||
debug_value undef : $*NonCopyableNativeObjectPair, var, name "self", argno 2, implicit, expr op_deref
|
||||
debug_value undef : $*NonCopyableNativeObjectPair, var, name "self", argno 2, expr op_deref
|
||||
destroy_value %6 : $@noescape @callee_guaranteed () -> Bool
|
||||
%12 = begin_access [modify] [static] %1 : $*NonCopyableNativeObjectPair
|
||||
%13 = struct_element_addr %12 : $*NonCopyableNativeObjectPair, #NonCopyableNativeObjectPair.currentPosition
|
||||
|
||||
@@ -41,7 +41,7 @@ bb0(%0 : $*_Node<T>, %1 : @owned $_Box<T>):
|
||||
%2 = alloc_stack [lexical] $_Node<T>, var, name "value"
|
||||
%3 = mark_unresolved_non_copyable_value [consumable_and_assignable] %2 : $*_Node<T>
|
||||
copy_addr [take] %0 to [init] %3 : $*_Node<T>
|
||||
debug_value %1 : $_Box<T>, let, name "self", argno 2, implicit
|
||||
debug_value %1 : $_Box<T>, let, name "self", argno 2
|
||||
%6 = mark_uninitialized [rootself] %1 : $_Box<T>
|
||||
%7 = begin_borrow %6 : $_Box<T>
|
||||
%8 = begin_access [read] [static] %3 : $*_Node<T>
|
||||
|
||||
@@ -93,7 +93,7 @@ sil @addressOnlyGenericUse : $@convention(thin) <τ_0_0 where τ_0_0 : P> (@in_g
|
||||
|
||||
sil hidden [ossa] @initWithSplitStores : $@convention(thin) (Int) -> @owned AggStruct {
|
||||
bb0(%0 : $Int):
|
||||
%2 = alloc_stack [lexical] $AggStruct, var, name "self", implicit
|
||||
%2 = alloc_stack [lexical] $AggStruct, var, name "self"
|
||||
%3 = mark_unresolved_non_copyable_value [consumable_and_assignable] %2 : $*AggStruct // expected-error {{'self' consumed more than once}}
|
||||
debug_value %0 : $Int, let, name "myInit3", argno 1
|
||||
%5 = function_ref @get_aggstruct : $@convention(thin) () -> @owned AggStruct
|
||||
|
||||
@@ -73,7 +73,7 @@ sil @builtin32_use : $@convention(thin) (Builtin.Int32) -> ()
|
||||
// CHECK: [[INIT_COPY:%.*]] = copy_value [[ARG]] : $AggStruct
|
||||
// CHECK: [[MARKED_VALUE:%.*]] = mark_unresolved_non_copyable_value [no_consume_or_assign] [[INIT_COPY]] : $AggStruct
|
||||
// CHECK: [[DESTRUCTURE_COPY:%.*]] = copy_value [[MARKED_VALUE]] : $AggStruct
|
||||
// CHECK: debug_value [[MARKED_VALUE]] : $AggStruct, let, name "self", argno 1, implicit
|
||||
// CHECK: debug_value [[MARKED_VALUE]] : $AggStruct, let, name "self", argno 1
|
||||
// CHECK: destroy_value [[MARKED_VALUE]] : $AggStruct
|
||||
// CHECK: [[DESTRUCTURE_COPY_1:%.*]] = destructure_struct [[DESTRUCTURE_COPY]] : $AggStruct
|
||||
// CHECK: return [[DESTRUCTURE_COPY_1]] : $KlassPair
|
||||
@@ -82,7 +82,7 @@ sil [ossa] @test_access_single_child_field_consume : $@convention(method) (@guar
|
||||
bb0(%0 : @guaranteed $AggStruct):
|
||||
%1 = copy_value %0 : $AggStruct
|
||||
%2 = mark_unresolved_non_copyable_value [no_consume_or_assign] %1 : $AggStruct
|
||||
debug_value %2 : $AggStruct, let, name "self", argno 1, implicit
|
||||
debug_value %2 : $AggStruct, let, name "self", argno 1
|
||||
%4 = begin_borrow %2 : $AggStruct
|
||||
%5 = struct_extract %4 : $AggStruct, #AggStruct.pair
|
||||
%6 = copy_value %5 : $KlassPair
|
||||
@@ -96,7 +96,7 @@ bb0(%0 : @guaranteed $AggStruct):
|
||||
// CHECK: [[INIT_COPY:%.*]] = copy_value [[ARG]] : $AggStruct
|
||||
// CHECK: [[MARKED_VALUE:%.*]] = mark_unresolved_non_copyable_value [no_consume_or_assign] [[INIT_COPY]] : $AggStruct
|
||||
// CHECK: [[DESTRUCTURE_COPY:%.*]] = copy_value [[MARKED_VALUE]] : $AggStruct
|
||||
// CHECK: debug_value [[MARKED_VALUE]] : $AggStruct, let, name "self", argno 1, implicit
|
||||
// CHECK: debug_value [[MARKED_VALUE]] : $AggStruct, let, name "self", argno 1
|
||||
// CHECK: destroy_value [[MARKED_VALUE]] : $AggStruct
|
||||
// CHECK: [[DESTRUCTURE_COPY_1:%.*]] = destructure_struct [[DESTRUCTURE_COPY]] : $AggStruct
|
||||
// CHECK: ([[LHS:%.*]], [[RHS:%.*]]) = destructure_struct [[DESTRUCTURE_COPY_1]] : $KlassPair
|
||||
@@ -107,7 +107,7 @@ sil [ossa] @test_access_grandfield_consume : $@convention(method) (@guaranteed A
|
||||
bb0(%0 : @guaranteed $AggStruct):
|
||||
%1 = copy_value %0 : $AggStruct
|
||||
%2 = mark_unresolved_non_copyable_value [no_consume_or_assign] %1 : $AggStruct
|
||||
debug_value %2 : $AggStruct, let, name "self", argno 1, implicit
|
||||
debug_value %2 : $AggStruct, let, name "self", argno 1
|
||||
%4 = begin_borrow %2 : $AggStruct
|
||||
%5 = struct_extract %4 : $AggStruct, #AggStruct.pair
|
||||
%6 = copy_value %5 : $KlassPair
|
||||
|
||||
@@ -64,7 +64,7 @@ sil [ossa] @test_access_single_child_field_consume : $@convention(method) (@guar
|
||||
bb0(%0 : @guaranteed $AggStruct2):
|
||||
%1 = copy_value %0 : $AggStruct2
|
||||
%2 = mark_unresolved_non_copyable_value [no_consume_or_assign] %1 : $AggStruct2 // expected-error {{cannot use 'self' after partial consume}}
|
||||
debug_value %2 : $AggStruct2, let, name "self", argno 1, implicit
|
||||
debug_value %2 : $AggStruct2, let, name "self", argno 1
|
||||
%4 = begin_borrow %2 : $AggStruct2
|
||||
%5 = struct_extract %4 : $AggStruct2, #AggStruct2.pair
|
||||
%6 = struct_extract %5 : $KlassPair2, #KlassPair2.lhs
|
||||
@@ -87,7 +87,7 @@ sil [ossa] @test_access_single_child_field_consume2 : $@convention(method) (@gua
|
||||
bb0(%0 : @guaranteed $AggStruct2):
|
||||
%1 = copy_value %0 : $AggStruct2
|
||||
%2 = mark_unresolved_non_copyable_value [no_consume_or_assign] %1 : $AggStruct2 // expected-error {{'self' consumed more than once}}
|
||||
debug_value %2 : $AggStruct2, let, name "self", argno 1, implicit
|
||||
debug_value %2 : $AggStruct2, let, name "self", argno 1
|
||||
%4 = begin_borrow %2 : $AggStruct2
|
||||
%5 = struct_extract %4 : $AggStruct2, #AggStruct2.pair
|
||||
%6 = struct_extract %5 : $KlassPair2, #KlassPair2.lhs
|
||||
@@ -107,7 +107,7 @@ sil [ossa] @test_access_single_child_field_consume3 : $@convention(method) (@gua
|
||||
bb0(%0 : @guaranteed $AggStruct2):
|
||||
%1 = copy_value %0 : $AggStruct2
|
||||
%2 = mark_unresolved_non_copyable_value [no_consume_or_assign] %1 : $AggStruct2 // expected-error {{'self' consumed and used at the same time}}
|
||||
debug_value %2 : $AggStruct2, let, name "self", argno 1, implicit
|
||||
debug_value %2 : $AggStruct2, let, name "self", argno 1
|
||||
%4 = begin_borrow %2 : $AggStruct2
|
||||
%5 = struct_extract %4 : $AggStruct2, #AggStruct2.pair
|
||||
%6 = struct_extract %5 : $KlassPair2, #KlassPair2.lhs
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ListOfFiles {
|
||||
// ListOfFiles.file.setter
|
||||
// CHECK-LABEL: sil [transparent] @$s4test11ListOfFilesC4fileAA4FileVvs : $@convention(method) (@owned File, @guaranteed ListOfFiles) -> () {
|
||||
// CHECK: bb0([[NEW_VAL:%.*]] : $File, [[SELF:%.*]] : $ListOfFiles):
|
||||
// CHECK: [[NEW_VAL_STACK:%.*]] = alloc_stack $File, let, name "value", argno 1, implicit
|
||||
// CHECK: [[NEW_VAL_STACK:%.*]] = alloc_stack $File, let, name "value", argno 1
|
||||
// CHECK: store [[NEW_VAL]] to [[NEW_VAL_STACK]] : $*File
|
||||
// CHECK: [[NEW_VAL_RELOADED:%.*]] = load [[NEW_VAL_STACK]] : $*File
|
||||
// >> destroy the element currently in the field
|
||||
|
||||
@@ -219,7 +219,7 @@ bb0(%0 : $*ThreeNonTrivialNoDeinit):
|
||||
|
||||
sil hidden [ossa] @$s4main12StructDeinitVfD : $@convention(method) (@owned StructDeinit) -> () {
|
||||
bb0(%0 : @owned $StructDeinit):
|
||||
debug_value %0 : $StructDeinit, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $StructDeinit, let, name "self", argno 1
|
||||
%2 = drop_deinit %0 : $StructDeinit
|
||||
end_lifetime %2 : $StructDeinit
|
||||
%4 = tuple ()
|
||||
@@ -228,7 +228,7 @@ bb0(%0 : @owned $StructDeinit):
|
||||
|
||||
sil hidden [ossa] @$s4main21SingleFieldNonTrivialVfD : $@convention(method) (@owned SingleFieldNonTrivial) -> () {
|
||||
bb0(%0 : @owned $SingleFieldNonTrivial):
|
||||
debug_value %0 : $SingleFieldNonTrivial, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $SingleFieldNonTrivial, let, name "self", argno 1
|
||||
%1 = drop_deinit %0 : $SingleFieldNonTrivial
|
||||
%2 = destructure_struct %1 : $SingleFieldNonTrivial
|
||||
destroy_value %2 : $Klass
|
||||
@@ -238,7 +238,7 @@ bb0(%0 : @owned $SingleFieldNonTrivial):
|
||||
|
||||
sil hidden [ossa] @$s4main15ThreeNonTrivialVfD : $@convention(method) (@owned ThreeNonTrivial) -> () {
|
||||
bb0(%0 : @owned $ThreeNonTrivial):
|
||||
debug_value %0 : $ThreeNonTrivial, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $ThreeNonTrivial, let, name "self", argno 1
|
||||
%1 = drop_deinit %0 : $ThreeNonTrivial
|
||||
(%2, %3, %4) = destructure_struct %1 : $ThreeNonTrivial
|
||||
destroy_value %2 : $Klass
|
||||
@@ -249,7 +249,7 @@ bb0(%0 : @owned $ThreeNonTrivial):
|
||||
|
||||
sil hidden [ossa] @$s4main19TrivialMoveOnlyEnumOfD : $@convention(method) (@owned TrivialMoveOnlyEnum) -> () {
|
||||
bb0(%0 : @owned $TrivialMoveOnlyEnum):
|
||||
debug_value %0 : $TrivialMoveOnlyEnum, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $TrivialMoveOnlyEnum, let, name "self", argno 1
|
||||
switch_enum %0 : $TrivialMoveOnlyEnum, case #TrivialMoveOnlyEnum.first!enumelt: bb1, case #TrivialMoveOnlyEnum.second!enumelt: bb2, case #TrivialMoveOnlyEnum.third!enumelt: bb3
|
||||
|
||||
bb1:
|
||||
@@ -273,7 +273,7 @@ bb4:
|
||||
// CHECK: } // end sil function '$s4main22NonTrivialMoveOnlyEnumOfD'
|
||||
sil hidden [ossa] @$s4main22NonTrivialMoveOnlyEnumOfD : $@convention(method) (@owned NonTrivialMoveOnlyEnum) -> () {
|
||||
bb0(%0 : @owned $NonTrivialMoveOnlyEnum):
|
||||
debug_value %0 : $NonTrivialMoveOnlyEnum, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $NonTrivialMoveOnlyEnum, let, name "self", argno 1
|
||||
switch_enum %0 : $NonTrivialMoveOnlyEnum, case #NonTrivialMoveOnlyEnum.first!enumelt: bb1, case #NonTrivialMoveOnlyEnum.second!enumelt: bb2, case #NonTrivialMoveOnlyEnum.third!enumelt: bb3, case #NonTrivialMoveOnlyEnum.fourth!enumelt: bb4, case #NonTrivialMoveOnlyEnum.fifth!enumelt: bb5
|
||||
|
||||
bb1:
|
||||
|
||||
@@ -219,7 +219,7 @@ bb0(%0 : $*ThreeNonTrivialNoDeinit):
|
||||
|
||||
sil hidden [ossa] @$s4main12StructDeinitVfD : $@convention(method) (@in StructDeinit) -> () {
|
||||
bb0(%0 : $*StructDeinit):
|
||||
debug_value %0 : $*StructDeinit, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $*StructDeinit, let, name "self", argno 1
|
||||
%2 = drop_deinit %0 : $*StructDeinit
|
||||
%3 = tuple ()
|
||||
return %3 : $()
|
||||
@@ -227,7 +227,7 @@ bb0(%0 : $*StructDeinit):
|
||||
|
||||
sil hidden [ossa] @$s4main21SingleFieldNonTrivialVfD : $@convention(method) (@in SingleFieldNonTrivial) -> () {
|
||||
bb0(%0 : $*SingleFieldNonTrivial):
|
||||
debug_value %0 : $*SingleFieldNonTrivial, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $*SingleFieldNonTrivial, let, name "self", argno 1
|
||||
%2 = struct_element_addr %0 : $*SingleFieldNonTrivial, #SingleFieldNonTrivial.k
|
||||
destroy_addr %2 : $*Klass
|
||||
%4 = tuple ()
|
||||
@@ -236,7 +236,7 @@ bb0(%0 : $*SingleFieldNonTrivial):
|
||||
|
||||
sil hidden [ossa] @$s4main15ThreeNonTrivialVfD : $@convention(method) (@in ThreeNonTrivial) -> () {
|
||||
bb0(%0 : $*ThreeNonTrivial):
|
||||
debug_value %0 : $*ThreeNonTrivial, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $*ThreeNonTrivial, let, name "self", argno 1
|
||||
%2 = struct_element_addr %0 : $*ThreeNonTrivial, #ThreeNonTrivial.k
|
||||
%3 = struct_element_addr %0 : $*ThreeNonTrivial, #ThreeNonTrivial.k2
|
||||
destroy_addr %2 : $*Klass
|
||||
@@ -247,7 +247,7 @@ bb0(%0 : $*ThreeNonTrivial):
|
||||
|
||||
sil hidden [ossa] @$s4main19TrivialMoveOnlyEnumOfD : $@convention(method) (@in TrivialMoveOnlyEnum) -> () {
|
||||
bb0(%0 : $*TrivialMoveOnlyEnum):
|
||||
debug_value %0 : $*TrivialMoveOnlyEnum, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $*TrivialMoveOnlyEnum, let, name "self", argno 1
|
||||
switch_enum_addr %0 : $*TrivialMoveOnlyEnum, case #TrivialMoveOnlyEnum.first!enumelt: bb1, case #TrivialMoveOnlyEnum.second!enumelt: bb2, case #TrivialMoveOnlyEnum.third!enumelt: bb3
|
||||
|
||||
bb1:
|
||||
@@ -273,7 +273,7 @@ bb4:
|
||||
// CHECK: } // end sil function '$s4main22NonTrivialMoveOnlyEnumOfD'
|
||||
sil hidden [ossa] @$s4main22NonTrivialMoveOnlyEnumOfD : $@convention(method) (@in NonTrivialMoveOnlyEnum) -> () {
|
||||
bb0(%0 : $*NonTrivialMoveOnlyEnum):
|
||||
debug_value %0 : $*NonTrivialMoveOnlyEnum, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $*NonTrivialMoveOnlyEnum, let, name "self", argno 1
|
||||
switch_enum_addr %0 : $*NonTrivialMoveOnlyEnum, case #NonTrivialMoveOnlyEnum.first!enumelt: bb1, case #NonTrivialMoveOnlyEnum.second!enumelt: bb2, case #NonTrivialMoveOnlyEnum.third!enumelt: bb3, case #NonTrivialMoveOnlyEnum.fourth!enumelt: bb4, case #NonTrivialMoveOnlyEnum.fifth!enumelt: bb5
|
||||
|
||||
bb1:
|
||||
|
||||
@@ -149,7 +149,7 @@ bb0(%0 : $@thick Vista.Type):
|
||||
sil hidden [ossa] @$s3bug9PresenterCfd : $@convention(method) (@guaranteed Presenter) -> @owned Builtin.NativeObject {
|
||||
// %0 "self" // users: %6, %2, %1
|
||||
bb0(%0 : @guaranteed $Presenter):
|
||||
debug_value %0 : $Presenter, let, name "self", argno 1, implicit // id: %1
|
||||
debug_value %0 : $Presenter, let, name "self", argno 1 // id: %1
|
||||
%2 = ref_element_addr %0 : $Presenter, #Presenter.view // user: %3
|
||||
%3 = begin_access [deinit] [static] %2 : $*Optional<Vista> // users: %5, %4
|
||||
destroy_addr %3 : $*Optional<Vista> // id: %4
|
||||
@@ -163,7 +163,7 @@ bb0(%0 : @guaranteed $Presenter):
|
||||
sil hidden [ossa] @$s3bug9PresenterCfD : $@convention(method) (@owned Presenter) -> () {
|
||||
// %0 "self" // users: %6, %3, %1
|
||||
bb0(%0 : @owned $Presenter):
|
||||
debug_value %0 : $Presenter, let, name "self", argno 1, implicit // id: %1
|
||||
debug_value %0 : $Presenter, let, name "self", argno 1 // id: %1
|
||||
// function_ref Presenter.deinit
|
||||
%2 = function_ref @$s3bug9PresenterCfd : $@convention(method) (@guaranteed Presenter) -> @owned Builtin.NativeObject // user: %4
|
||||
%3 = begin_borrow %0 : $Presenter // users: %5, %4
|
||||
@@ -191,7 +191,7 @@ bb0(%0 : $@thick Presenter.Type):
|
||||
sil hidden [ossa] @$s3bug9PresenterCACycfc : $@convention(method) (@owned Presenter) -> @owned Presenter {
|
||||
// %0 "self" // users: %2, %1
|
||||
bb0(%0 : @owned $Presenter):
|
||||
debug_value %0 : $Presenter, let, name "self", argno 1, implicit // id: %1
|
||||
debug_value %0 : $Presenter, let, name "self", argno 1 // id: %1
|
||||
%2 = mark_uninitialized [rootself] %0 : $Presenter // users: %10, %9, %3
|
||||
%3 = begin_borrow %2 : $Presenter // users: %8, %4
|
||||
%4 = ref_element_addr %3 : $Presenter, #Presenter.view // user: %7
|
||||
@@ -210,7 +210,7 @@ sil hidden [ossa] @$s3bug5VistaC12doSmthOnMainyyF : $@convention(method) (@guara
|
||||
// %0 "self" // user: %2
|
||||
bb0(%0 : @guaranteed $Vista):
|
||||
%1 = global_addr @$s3bug1xSivp : $*Int // user: %7
|
||||
debug_value %0 : $Vista, let, name "self", argno 1, implicit // id: %2
|
||||
debug_value %0 : $Vista, let, name "self", argno 1 // id: %2
|
||||
%3 = integer_literal $Builtin.IntLiteral, 1 // user: %6
|
||||
%4 = metatype $@thin Int.Type // user: %6
|
||||
// function_ref Int.init(_builtinIntegerLiteral:)
|
||||
@@ -230,7 +230,7 @@ sil [transparent] [serialized] @$sSi22_builtinIntegerLiteralSiBI_tcfC : $@conven
|
||||
sil hidden [ossa] @$s3bug5VistaCfd : $@convention(method) (@guaranteed Vista) -> @owned Builtin.NativeObject {
|
||||
// %0 "self" // users: %2, %1
|
||||
bb0(%0 : @guaranteed $Vista):
|
||||
debug_value %0 : $Vista, let, name "self", argno 1, implicit // id: %1
|
||||
debug_value %0 : $Vista, let, name "self", argno 1 // id: %1
|
||||
%2 = unchecked_ref_cast %0 : $Vista to $Builtin.NativeObject // user: %3
|
||||
%3 = unchecked_ownership_conversion %2 : $Builtin.NativeObject, @guaranteed to @owned // user: %4
|
||||
return %3 : $Builtin.NativeObject // id: %4
|
||||
@@ -240,7 +240,7 @@ bb0(%0 : @guaranteed $Vista):
|
||||
sil hidden [ossa] @$s3bug5VistaCfD : $@convention(method) (@owned Vista) -> () {
|
||||
// %0 "self" // users: %6, %3, %1
|
||||
bb0(%0 : @owned $Vista):
|
||||
debug_value %0 : $Vista, let, name "self", argno 1, implicit // id: %1
|
||||
debug_value %0 : $Vista, let, name "self", argno 1 // id: %1
|
||||
// function_ref Vista.deinit
|
||||
%2 = function_ref @$s3bug5VistaCfd : $@convention(method) (@guaranteed Vista) -> @owned Builtin.NativeObject // user: %4
|
||||
%3 = begin_borrow %0 : $Vista // users: %5, %4
|
||||
@@ -257,7 +257,7 @@ bb0(%0 : @owned $Vista):
|
||||
sil hidden [ossa] @$s3bug5VistaCACycfc : $@convention(method) (@owned Vista) -> @owned Vista {
|
||||
// %0 "self" // users: %2, %1
|
||||
bb0(%0 : @owned $Vista):
|
||||
debug_value %0 : $Vista, let, name "self", argno 1, implicit // id: %1
|
||||
debug_value %0 : $Vista, let, name "self", argno 1 // id: %1
|
||||
%2 = mark_uninitialized [rootself] %0 : $Vista // users: %4, %3
|
||||
%3 = copy_value %2 : $Vista // user: %5
|
||||
destroy_value %2 : $Vista // id: %4
|
||||
|
||||
@@ -415,7 +415,7 @@ bb0(%0 : @owned $Klass, %1 : @guaranteed $KlassWithKlassPair):
|
||||
sil [ossa] @function_argument_inference_through_structextract : $@convention(thin) (@guaranteed KlassPair) -> @owned Klass {
|
||||
bb0(%0 : @guaranteed $KlassPair):
|
||||
specify_test "variable-name-inference @trace[0]"
|
||||
debug_value %0 : $KlassPair, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $KlassPair, let, name "self", argno 1
|
||||
%2 = struct_extract %0 : $KlassPair, #KlassPair.lhs
|
||||
%3 = copy_value %2 : $Klass
|
||||
debug_value [trace] %3 : $Klass
|
||||
@@ -430,7 +430,7 @@ bb0(%0 : @guaranteed $KlassPair):
|
||||
sil [ossa] @function_argument_inference_through_uncheckedenumdata : $@convention(thin) (@guaranteed FakeOptional<Klass>) -> @owned Klass {
|
||||
bb0(%0 : @guaranteed $FakeOptional<Klass>):
|
||||
specify_test "variable-name-inference @trace[0]"
|
||||
debug_value %0 : $FakeOptional<Klass>, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $FakeOptional<Klass>, let, name "self", argno 1
|
||||
%2 = unchecked_enum_data %0 : $FakeOptional<Klass>, #FakeOptional.some!enumelt
|
||||
%3 = copy_value %2 : $Klass
|
||||
debug_value [trace] %3 : $Klass
|
||||
@@ -445,7 +445,7 @@ bb0(%0 : @guaranteed $FakeOptional<Klass>):
|
||||
sil [ossa] @function_argument_inference_through_uncheckedtakeenumdataaddr : $@convention(thin) (@in FakeOptional<Klass>) -> @owned Klass {
|
||||
bb0(%0 : $*FakeOptional<Klass>):
|
||||
specify_test "variable-name-inference @trace[0]"
|
||||
debug_value %0 : $*FakeOptional<Klass>, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $*FakeOptional<Klass>, let, name "self", argno 1
|
||||
%2 = unchecked_take_enum_data_addr %0 : $*FakeOptional<Klass>, #FakeOptional.some!enumelt
|
||||
%3 = load [take] %2 : $*Klass
|
||||
debug_value [trace] %3 : $Klass
|
||||
@@ -460,7 +460,7 @@ bb0(%0 : $*FakeOptional<Klass>):
|
||||
sil [ossa] @function_argument_inference_through_uncheckedtakeenumdataaddr_2 : $@convention(thin) (@in FakeOptional<Klass>) -> @owned Klass {
|
||||
bb0(%0 : $*FakeOptional<Klass>):
|
||||
specify_test "variable-name-inference @trace[0]"
|
||||
debug_value %0 : $*FakeOptional<Klass>, let, name "self", argno 1, implicit
|
||||
debug_value %0 : $*FakeOptional<Klass>, let, name "self", argno 1
|
||||
%2 = unchecked_take_enum_data_addr %0 : $*FakeOptional<Klass>, #FakeOptional.some!enumelt
|
||||
debug_value [trace] %2 : $*Klass
|
||||
%3 = load [take] %2 : $*Klass
|
||||
@@ -771,4 +771,4 @@ bb0(%0 : $*Klass):
|
||||
dealloc_stack %1 : $*Any
|
||||
%9999 = tuple ()
|
||||
return %9999 : $()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user