mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Abolish the old attribute syntax for type attributes (and SIL type attrs)
- Change type attribute printing logic (in astprinter and the demangler) to print in the new syntax - Change the swift parser to only accept type attributes in the new syntax. - Update canParseTypeTupleBody to lookahead over new-syntax type attributes. - Update the testsuite to use the new syntax. Swift SVN r9273
This commit is contained in:
@@ -484,7 +484,7 @@ public:
|
|||||||
DeclAttributes &Attributes,
|
DeclAttributes &Attributes,
|
||||||
PatternBindingDecl *PBD = nullptr);
|
PatternBindingDecl *PBD = nullptr);
|
||||||
|
|
||||||
bool parseAttributeList(DeclAttributes &Attributes, bool OldStyle) {
|
bool parseAttributeList(DeclAttributes &Attributes, bool OldStyle = false) {
|
||||||
if (OldStyle) {
|
if (OldStyle) {
|
||||||
if (Tok.is(tok::l_square))
|
if (Tok.is(tok::l_square))
|
||||||
return parseAttributeListPresent(Attributes, OldStyle);
|
return parseAttributeListPresent(Attributes, OldStyle);
|
||||||
@@ -497,18 +497,13 @@ public:
|
|||||||
bool parseAttributeListPresent(DeclAttributes &Attributes, bool OldStyle);
|
bool parseAttributeListPresent(DeclAttributes &Attributes, bool OldStyle);
|
||||||
bool parseAttribute(DeclAttributes &Attributes, bool OldStyle);
|
bool parseAttribute(DeclAttributes &Attributes, bool OldStyle);
|
||||||
|
|
||||||
bool parseTypeAttributeList(TypeAttributes &Attributes, bool OldStyle) {
|
bool parseTypeAttributeList(TypeAttributes &Attributes) {
|
||||||
if (OldStyle) {
|
if (Tok.is(tok::at_sign))
|
||||||
if (Tok.is(tok::l_square))
|
return parseTypeAttributeListPresent(Attributes);
|
||||||
return parseTypeAttributeListPresent(Attributes, OldStyle);
|
|
||||||
} else {
|
|
||||||
if (Tok.is(tok::at_sign))
|
|
||||||
return parseTypeAttributeListPresent(Attributes, OldStyle);
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool parseTypeAttributeListPresent(TypeAttributes &Attributes, bool OldStyle);
|
bool parseTypeAttributeListPresent(TypeAttributes &Attributes);
|
||||||
bool parseTypeAttribute(TypeAttributes &Attributes, bool OldStyle);
|
bool parseTypeAttribute(TypeAttributes &Attributes);
|
||||||
|
|
||||||
|
|
||||||
ParserResult<ImportDecl> parseDeclImport(unsigned Flags,
|
ParserResult<ImportDecl> parseDeclImport(unsigned Flags,
|
||||||
|
|||||||
@@ -135,28 +135,6 @@ public:
|
|||||||
return OS << (AttrCount++ == 0 ? "[" : ", ");
|
return OS << (AttrCount++ == 0 ? "[" : ", ");
|
||||||
}
|
}
|
||||||
|
|
||||||
void printCC(AbstractCC CC) {
|
|
||||||
if (CC == AbstractCC::Freestanding)
|
|
||||||
return;
|
|
||||||
|
|
||||||
next() << "cc(";
|
|
||||||
switch (CC) {
|
|
||||||
case AbstractCC::Freestanding:
|
|
||||||
OS << "freestanding";
|
|
||||||
break;
|
|
||||||
case AbstractCC::Method:
|
|
||||||
OS << "method";
|
|
||||||
break;
|
|
||||||
case AbstractCC::C:
|
|
||||||
OS << "cdecl";
|
|
||||||
break;
|
|
||||||
case AbstractCC::ObjCMethod:
|
|
||||||
OS << "objc_method";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
OS << ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
void finish() {
|
void finish() {
|
||||||
if (AttrCount > 0)
|
if (AttrCount > 0)
|
||||||
OS << "] ";
|
OS << "] ";
|
||||||
@@ -1291,19 +1269,27 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void printFunctionExtInfo(AnyFunctionType::ExtInfo info) {
|
void printFunctionExtInfo(AnyFunctionType::ExtInfo info) {
|
||||||
AttributePrinter attrs(OS);
|
|
||||||
|
|
||||||
if (info.isAutoClosure())
|
if (info.isAutoClosure())
|
||||||
attrs.next() << "auto_closure";
|
OS << "@auto_closure ";
|
||||||
attrs.printCC(info.getCC());
|
switch (info.getCC()) {
|
||||||
if (info.isBlock())
|
case AbstractCC::Freestanding: break;
|
||||||
attrs.next() << "objc_block";
|
case AbstractCC::Method:
|
||||||
if (info.isThin())
|
OS << "@cc(method) ";
|
||||||
attrs.next() << "thin";
|
break;
|
||||||
if (info.isNoReturn())
|
case AbstractCC::C:
|
||||||
attrs.next() << "noreturn";
|
OS << "@cc(cdecl) ";
|
||||||
|
break;
|
||||||
|
case AbstractCC::ObjCMethod:
|
||||||
|
OS << "@cc(objc_method) ";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
attrs.finish();
|
if (info.isBlock())
|
||||||
|
OS << "@objc_block ";
|
||||||
|
if (info.isThin())
|
||||||
|
OS << "@thin ";
|
||||||
|
if (info.isNoReturn())
|
||||||
|
OS << "@noreturn ";
|
||||||
}
|
}
|
||||||
|
|
||||||
void visitFunctionType(FunctionType *T) {
|
void visitFunctionType(FunctionType *T) {
|
||||||
@@ -1435,7 +1421,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void visitLValueType(LValueType *T) {
|
void visitLValueType(LValueType *T) {
|
||||||
OS << "[inout";
|
OS << "@inout ";
|
||||||
|
|
||||||
LValueType::Qual QS = T->getQualifiers();
|
LValueType::Qual QS = T->getQualifiers();
|
||||||
if (QS != LValueType::Qual::DefaultForType) {
|
if (QS != LValueType::Qual::DefaultForType) {
|
||||||
@@ -1457,7 +1443,6 @@ public:
|
|||||||
|
|
||||||
#undef APPEND_QUAL
|
#undef APPEND_QUAL
|
||||||
}
|
}
|
||||||
OS << "] ";
|
|
||||||
visit(T->getObjectType());
|
visit(T->getObjectType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1738,7 +1738,7 @@ void toString(NodePointer pointer, DemanglerPrinter &printer) {
|
|||||||
toStringChildren(pointer, printer);
|
toStringChildren(pointer, printer);
|
||||||
break;
|
break;
|
||||||
case swift::Demangle::Node::Kind::InOut:
|
case swift::Demangle::Node::Kind::InOut:
|
||||||
printer << "[inout] ";
|
printer << "@inout ";
|
||||||
pointer = pointer->child_at(0); continue;
|
pointer = pointer->child_at(0); continue;
|
||||||
case swift::Demangle::Node::Kind::ObjCAttribute:
|
case swift::Demangle::Node::Kind::ObjCAttribute:
|
||||||
printer << "[objc] ";
|
printer << "[objc] ";
|
||||||
@@ -1856,7 +1856,7 @@ void toString(NodePointer pointer, DemanglerPrinter &printer) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case swift::Demangle::Node::Kind::ObjCBlock: {
|
case swift::Demangle::Node::Kind::ObjCBlock: {
|
||||||
printer << "[objc_block] ";
|
printer << "@objc_block ";
|
||||||
NodePointer tuple = pointer->child_at(0);
|
NodePointer tuple = pointer->child_at(0);
|
||||||
NodePointer rettype = pointer->child_at(1);
|
NodePointer rettype = pointer->child_at(1);
|
||||||
toString(tuple, printer);
|
toString(tuple, printer);
|
||||||
|
|||||||
@@ -264,13 +264,10 @@ bool Parser::parseAttribute(DeclAttributes &Attributes, bool OldStyle) {
|
|||||||
/// attribute-type:
|
/// attribute-type:
|
||||||
/// 'noreturn'
|
/// 'noreturn'
|
||||||
/// \endverbatim
|
/// \endverbatim
|
||||||
bool Parser::parseTypeAttribute(TypeAttributes &Attributes, bool OldStyle) {
|
bool Parser::parseTypeAttribute(TypeAttributes &Attributes) {
|
||||||
// If this not an identifier, the attribute is malformed.
|
// If this not an identifier, the attribute is malformed.
|
||||||
if (Tok.isNot(tok::identifier) &&
|
if (Tok.isNot(tok::identifier)) {
|
||||||
Tok.isNot(tok::kw_weak) &&
|
|
||||||
Tok.isNot(tok::kw_unowned)) {
|
|
||||||
diagnose(Tok, diag::expected_attribute_name);
|
diagnose(Tok, diag::expected_attribute_name);
|
||||||
if (OldStyle) skipUntil(tok::r_square);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -291,19 +288,16 @@ bool Parser::parseTypeAttribute(TypeAttributes &Attributes, bool OldStyle) {
|
|||||||
diagnose(Tok, diag::decl_attribute_applied_to_type);
|
diagnose(Tok, diag::decl_attribute_applied_to_type);
|
||||||
else
|
else
|
||||||
diagnose(Tok, diag::unknown_attribute, Tok.getText());
|
diagnose(Tok, diag::unknown_attribute, Tok.getText());
|
||||||
if (OldStyle)
|
|
||||||
skipUntil(tok::r_square);
|
|
||||||
else {
|
|
||||||
// Recover by eating @foo when foo is not known.
|
|
||||||
consumeToken();
|
|
||||||
|
|
||||||
// Recovery by eating "@foo=bar" if present.
|
// Recover by eating @foo when foo is not known.
|
||||||
if (consumeIf(tok::equal)) {
|
consumeToken();
|
||||||
if (Tok.is(tok::identifier) ||
|
|
||||||
Tok.is(tok::integer_literal) ||
|
// Recovery by eating "@foo=bar" if present.
|
||||||
Tok.is(tok::floating_literal))
|
if (consumeIf(tok::equal)) {
|
||||||
consumeToken();
|
if (Tok.is(tok::identifier) ||
|
||||||
}
|
Tok.is(tok::integer_literal) ||
|
||||||
|
Tok.is(tok::floating_literal))
|
||||||
|
consumeToken();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -377,16 +371,9 @@ bool Parser::parseTypeAttribute(TypeAttributes &Attributes, bool OldStyle) {
|
|||||||
} else {
|
} else {
|
||||||
diagnose(Tok, diag::cc_attribute_expected_name);
|
diagnose(Tok, diag::cc_attribute_expected_name);
|
||||||
}
|
}
|
||||||
if (parseMatchingToken(tok::r_paren, endLoc,
|
parseMatchingToken(tok::r_paren, endLoc,
|
||||||
diag::cc_attribute_expected_rparen,
|
diag::cc_attribute_expected_rparen,
|
||||||
beginLoc)) {
|
beginLoc);
|
||||||
// If the name isn't immediately followed by a closing paren, recover
|
|
||||||
// by trying to find some closing paren.
|
|
||||||
if (OldStyle) {
|
|
||||||
skipUntil(tok::r_paren);
|
|
||||||
consumeIf(tok::r_paren);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
diagnose(Tok, diag::cc_attribute_expected_lparen);
|
diagnose(Tok, diag::cc_attribute_expected_lparen);
|
||||||
}
|
}
|
||||||
@@ -469,36 +456,15 @@ bool Parser::parseAttributeListPresent(DeclAttributes &Attributes,
|
|||||||
/// '@' attribute
|
/// '@' attribute
|
||||||
/// '@' attribute ','? attribute-list-clause
|
/// '@' attribute ','? attribute-list-clause
|
||||||
/// \endverbatim
|
/// \endverbatim
|
||||||
bool Parser::parseTypeAttributeListPresent(TypeAttributes &Attributes,
|
bool Parser::parseTypeAttributeListPresent(TypeAttributes &Attributes) {
|
||||||
bool OldStyle) {
|
Attributes.AtLoc = Tok.getLoc();
|
||||||
if (OldStyle) {
|
do {
|
||||||
Attributes.AtLoc = consumeToken(tok::l_square);
|
if (parseToken(tok::at_sign, diag::expected_in_attribute_list) ||
|
||||||
|
parseTypeAttribute(Attributes))
|
||||||
|
return true;
|
||||||
|
|
||||||
do {
|
// Attribute lists don't require separating commas.
|
||||||
SourceLoc RightLoc;
|
} while (Tok.is(tok::at_sign) || consumeIf(tok::comma));
|
||||||
if (parseList(tok::r_square, Attributes.AtLoc, RightLoc,
|
|
||||||
tok::comma, /*OptionalSep=*/false,
|
|
||||||
diag::expected_in_attribute_list,
|
|
||||||
[&] () -> bool {
|
|
||||||
return parseTypeAttribute(Attributes, OldStyle);
|
|
||||||
}))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// A square bracket here begins another attribute-list-clause;
|
|
||||||
// consume it and continue. Note that we'll overwrite
|
|
||||||
// Attributes.RSquareLoc so that it encompasses the entire range.
|
|
||||||
} while (consumeIf(tok::l_square));
|
|
||||||
|
|
||||||
} else {
|
|
||||||
Attributes.AtLoc = Tok.getLoc();
|
|
||||||
do {
|
|
||||||
if (parseToken(tok::at_sign, diag::expected_in_attribute_list) ||
|
|
||||||
parseTypeAttribute(Attributes, OldStyle))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// Attribute lists don't require separating commas.
|
|
||||||
} while (Tok.is(tok::at_sign) || consumeIf(tok::comma));
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -622,8 +622,7 @@ bool SILParser::parseSILType(SILType &Result) {
|
|||||||
|
|
||||||
// Parse attributes.
|
// Parse attributes.
|
||||||
TypeAttributes attrs;
|
TypeAttributes attrs;
|
||||||
P.parseTypeAttributeList(attrs, false);
|
P.parseTypeAttributeList(attrs);
|
||||||
P.parseTypeAttributeList(attrs, true);
|
|
||||||
|
|
||||||
// Handle @local_storage, which changes the SIL value category.
|
// Handle @local_storage, which changes the SIL value category.
|
||||||
if (attrs.has(TAK_local_storage)) {
|
if (attrs.has(TAK_local_storage)) {
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ ParserResult<TypeRepr> Parser::parseTypeAnnotation() {
|
|||||||
ParserResult<TypeRepr> Parser::parseTypeAnnotation(Diag<> message) {
|
ParserResult<TypeRepr> Parser::parseTypeAnnotation(Diag<> message) {
|
||||||
// Parse attributes.
|
// Parse attributes.
|
||||||
TypeAttributes attrs;
|
TypeAttributes attrs;
|
||||||
parseTypeAttributeList(attrs, true);
|
parseTypeAttributeList(attrs);
|
||||||
parseTypeAttributeList(attrs, false);
|
|
||||||
|
|
||||||
// Parse the type.
|
// Parse the type.
|
||||||
ParserResult<TypeRepr> Ty = parseType(message);
|
ParserResult<TypeRepr> Ty = parseType(message);
|
||||||
@@ -928,6 +927,26 @@ bool Parser::canParseTypeComposition() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool canParseAttributes(Parser &P) {
|
||||||
|
while (P.consumeIf(tok::at_sign)) {
|
||||||
|
if (!P.consumeIf(tok::identifier)) return false;
|
||||||
|
|
||||||
|
if (P.consumeIf(tok::equal)) {
|
||||||
|
if (P.Tok.isNot(tok::identifier) &&
|
||||||
|
P.Tok.isNot(tok::integer_literal) &&
|
||||||
|
P.Tok.isNot(tok::floating_literal))
|
||||||
|
return false;
|
||||||
|
P.consumeToken();
|
||||||
|
} else if (P.Tok.is(tok::l_paren)) {
|
||||||
|
// Attributes like cc(x,y,z)
|
||||||
|
P.skipSingle();
|
||||||
|
}
|
||||||
|
|
||||||
|
P.consumeIf(tok::comma);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool Parser::canParseTypeTupleBody() {
|
bool Parser::canParseTypeTupleBody() {
|
||||||
if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::r_brace) &&
|
if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::r_brace) &&
|
||||||
Tok.isNot(tok::ellipsis) && !isStartOfDecl(Tok, peekToken())) {
|
Tok.isNot(tok::ellipsis) && !isStartOfDecl(Tok, peekToken())) {
|
||||||
@@ -938,19 +957,9 @@ bool Parser::canParseTypeTupleBody() {
|
|||||||
consumeToken(tok::identifier);
|
consumeToken(tok::identifier);
|
||||||
consumeToken(tok::colon);
|
consumeToken(tok::colon);
|
||||||
|
|
||||||
// Parse attributes.
|
// Parse attributes then a type.
|
||||||
if (consumeIf(tok::l_square)) {
|
if (!canParseAttributes(*this) ||
|
||||||
while (Tok.isNot(tok::eof) && Tok.isNot(tok::r_brace) &&
|
!canParseType())
|
||||||
Tok.isNot(tok::r_square) && Tok.isNot(tok::r_paren) &&
|
|
||||||
!isStartOfDecl(Tok, peekToken()))
|
|
||||||
skipSingle();
|
|
||||||
|
|
||||||
if (!consumeIf(tok::r_square))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse the type.
|
|
||||||
if (!canParseType())
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Parse default values. This aren't actually allowed, but we recover
|
// Parse default values. This aren't actually allowed, but we recover
|
||||||
@@ -970,15 +979,8 @@ bool Parser::canParseTypeTupleBody() {
|
|||||||
// Otherwise, this has to be a type.
|
// Otherwise, this has to be a type.
|
||||||
|
|
||||||
// Parse attributes.
|
// Parse attributes.
|
||||||
if (consumeIf(tok::l_square)) {
|
if (!canParseAttributes(*this))
|
||||||
while (Tok.isNot(tok::eof) && Tok.isNot(tok::r_brace) &&
|
return false;
|
||||||
Tok.isNot(tok::r_square) && Tok.isNot(tok::r_paren) &&
|
|
||||||
!isStartOfDecl(Tok, peekToken()))
|
|
||||||
skipSingle();
|
|
||||||
|
|
||||||
if (!consumeIf(tok::r_square))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!canParseType())
|
if (!canParseType())
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -1105,19 +1105,19 @@ public:
|
|||||||
|
|
||||||
require(operandFTy.getInput() == resultFTy.getInput(),
|
require(operandFTy.getInput() == resultFTy.getInput(),
|
||||||
"bridge_to_block operand and result types must differ only in "
|
"bridge_to_block operand and result types must differ only in "
|
||||||
"[objc_block]-ness");
|
"@objc_block-ness");
|
||||||
require(operandFTy.getResult() == resultFTy.getResult(),
|
require(operandFTy.getResult() == resultFTy.getResult(),
|
||||||
"bridge_to_block operand and result types must differ only in "
|
"bridge_to_block operand and result types must differ only in "
|
||||||
"[objc_block]-ness");
|
"@objc_block-ness");
|
||||||
require(operandFTy->isAutoClosure() == resultFTy->isAutoClosure(),
|
require(operandFTy->isAutoClosure() == resultFTy->isAutoClosure(),
|
||||||
"bridge_to_block operand and result types must differ only in "
|
"bridge_to_block operand and result types must differ only in "
|
||||||
"[objc_block]-ness");
|
"@objc_block-ness");
|
||||||
require(!operandFTy->isThin(), "bridge_to_block operand cannot be [thin]");
|
require(!operandFTy->isThin(), "bridge_to_block operand cannot be @thin");
|
||||||
require(!resultFTy->isThin(), "bridge_to_block result cannot be [thin]");
|
require(!resultFTy->isThin(), "bridge_to_block result cannot be @thin");
|
||||||
require(!operandFTy->isBlock(),
|
require(!operandFTy->isBlock(),
|
||||||
"bridge_to_block operand cannot be [objc_block]");
|
"bridge_to_block operand cannot be @objc_block");
|
||||||
require(resultFTy->isBlock(),
|
require(resultFTy->isBlock(),
|
||||||
"bridge_to_block result must be [objc_block]");
|
"bridge_to_block result must be @objc_block");
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkThinToThickFunctionInst(ThinToThickFunctionInst *TTFI) {
|
void checkThinToThickFunctionInst(ThinToThickFunctionInst *TTFI) {
|
||||||
|
|||||||
@@ -38,14 +38,14 @@ class C {}
|
|||||||
// \ CHECK: i64 add (i64 ptrtoint ({{.*}}* @_DATA_C to i64), i64 1)
|
// \ CHECK: i64 add (i64 ptrtoint ({{.*}}* @_DATA_C to i64), i64 1)
|
||||||
// \ CHECK: }
|
// \ CHECK: }
|
||||||
|
|
||||||
sil @top_level_code : $[thin] () -> () {
|
sil @top_level_code : $@thin () -> () {
|
||||||
%0 = tuple ()
|
%0 = tuple ()
|
||||||
%1 = return %0 : $()
|
%1 = return %0 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define [[REF]]* @ref_to_object_pointer_cast([[C_CLASS]]*)
|
// CHECK: define [[REF]]* @ref_to_object_pointer_cast([[C_CLASS]]*)
|
||||||
// CHECK: bitcast [[C_CLASS]]* {{%.*}} to [[REF]]*
|
// CHECK: bitcast [[C_CLASS]]* {{%.*}} to [[REF]]*
|
||||||
sil @ref_to_object_pointer_cast : $[thin] C -> Builtin.ObjectPointer {
|
sil @ref_to_object_pointer_cast : $@thin C -> Builtin.ObjectPointer {
|
||||||
entry(%c : $C):
|
entry(%c : $C):
|
||||||
%r = ref_to_object_pointer %c : $C to $Builtin.ObjectPointer
|
%r = ref_to_object_pointer %c : $C to $Builtin.ObjectPointer
|
||||||
return %r : $Builtin.ObjectPointer
|
return %r : $Builtin.ObjectPointer
|
||||||
@@ -53,7 +53,7 @@ entry(%c : $C):
|
|||||||
|
|
||||||
// CHECK: define [[OBJCOBJ]]* @ref_to_objc_pointer_cast([[C_CLASS]]*)
|
// CHECK: define [[OBJCOBJ]]* @ref_to_objc_pointer_cast([[C_CLASS]]*)
|
||||||
// CHECK: bitcast [[C_CLASS]]* %0 to [[OBJCOBJ]]*
|
// CHECK: bitcast [[C_CLASS]]* %0 to [[OBJCOBJ]]*
|
||||||
sil @ref_to_objc_pointer_cast : $[thin] C -> Builtin.ObjCPointer {
|
sil @ref_to_objc_pointer_cast : $@thin C -> Builtin.ObjCPointer {
|
||||||
entry(%c : $C):
|
entry(%c : $C):
|
||||||
%r = ref_to_object_pointer %c : $C to $Builtin.ObjCPointer
|
%r = ref_to_object_pointer %c : $C to $Builtin.ObjCPointer
|
||||||
return %r : $Builtin.ObjCPointer
|
return %r : $Builtin.ObjCPointer
|
||||||
|
|||||||
@@ -17,42 +17,42 @@ class X {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// [objc] t.X.f (t.X)() -> ()
|
// [objc] t.X.f (t.X)() -> ()
|
||||||
sil @_TToC14dynamic_lookup1X1ffS0_FT_T_ : $[cc(objc_method), thin] ((), X) -> () {
|
sil @_TToC14dynamic_lookup1X1ffS0_FT_T_ : $@cc(objc_method) @thin ((), X) -> () {
|
||||||
bb0(%0 : $X):
|
bb0(%0 : $X):
|
||||||
%3 = tuple ()
|
%3 = tuple ()
|
||||||
return %3 : $()
|
return %3 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
// [objc] X.g (ObjectiveC.X.metatype)() -> ()
|
// [objc] X.g (ObjectiveC.X.metatype)() -> ()
|
||||||
sil @_TToC14dynamic_lookup1X1gfMS0_FT_T_ : $[thin] ((), X.metatype) -> () {
|
sil @_TToC14dynamic_lookup1X1gfMS0_FT_T_ : $@thin ((), X.metatype) -> () {
|
||||||
bb0(%0 : $X.metatype):
|
bb0(%0 : $X.metatype):
|
||||||
%14 = tuple () // user: %15
|
%14 = tuple () // user: %15
|
||||||
return %14 : $()
|
return %14 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @_TToC14dynamic_lookup1X9subscriptFT1iSi_Sig : $[cc(objc_method), thin] ((), (i : Int64), X) -> Int64 {
|
sil @_TToC14dynamic_lookup1X9subscriptFT1iSi_Sig : $@cc(objc_method) @thin ((), (i : Int64), X) -> Int64 {
|
||||||
bb0(%0 : $Int64, %1 : $X):
|
bb0(%0 : $Int64, %1 : $X):
|
||||||
%4 = function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi64__Si : $[thin] ((val : Builtin.Int64), Int64.metatype) -> Int64 // user: %7
|
%4 = function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi64__Si : $@thin ((val : Builtin.Int64), Int64.metatype) -> Int64 // user: %7
|
||||||
%5 = metatype $Int64.metatype // user: %7
|
%5 = metatype $Int64.metatype // user: %7
|
||||||
%6 = integer_literal $Builtin.Int64, 5 // user: %7
|
%6 = integer_literal $Builtin.Int64, 5 // user: %7
|
||||||
%7 = apply [transparent] %4(%6, %5) : $[thin] ((val : Builtin.Int64), Int64.metatype) -> Int64 // user: %9
|
%7 = apply [transparent] %4(%6, %5) : $@thin ((val : Builtin.Int64), Int64.metatype) -> Int64 // user: %9
|
||||||
return %7 : $Int64
|
return %7 : $Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi64__Si : $[thin] ((val : Builtin.Int64), Int64.metatype) -> Int64
|
sil @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi64__Si : $@thin ((val : Builtin.Int64), Int64.metatype) -> Int64
|
||||||
|
|
||||||
// [objc] dynamic_lookup.X.value.getter : swift.Int64
|
// [objc] dynamic_lookup.X.value.getter : swift.Int64
|
||||||
sil @_TToC14dynamic_lookup1X5valueSig : $[cc(objc_method), thin] ((), X) -> Int64 {
|
sil @_TToC14dynamic_lookup1X5valueSig : $@cc(objc_method) @thin ((), X) -> Int64 {
|
||||||
bb0(%0 : $X):
|
bb0(%0 : $X):
|
||||||
%4 = function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi64__Si : $[thin] ((val : Builtin.Int64), Int64.metatype) -> Int64 // user: %7
|
%4 = function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi64__Si : $@thin ((val : Builtin.Int64), Int64.metatype) -> Int64 // user: %7
|
||||||
%5 = metatype $Int64.metatype // user: %7
|
%5 = metatype $Int64.metatype // user: %7
|
||||||
%6 = integer_literal $Builtin.Int64, 5 // user: %7
|
%6 = integer_literal $Builtin.Int64, 5 // user: %7
|
||||||
%7 = apply [transparent] %4(%6, %5) : $[thin] ((val : Builtin.Int64), Int64.metatype) -> Int64 // user: %9
|
%7 = apply [transparent] %4(%6, %5) : $@thin ((val : Builtin.Int64), Int64.metatype) -> Int64 // user: %9
|
||||||
return %7 : $Int64
|
return %7 : $Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @dynamic_lookup_br(%objc_object*)
|
// CHECK: define void @dynamic_lookup_br(%objc_object*)
|
||||||
sil @dynamic_lookup_br : $[thin] (obj : DynamicLookup) -> () {
|
sil @dynamic_lookup_br : $@thin (obj : DynamicLookup) -> () {
|
||||||
bb0(%0 : $DynamicLookup):
|
bb0(%0 : $DynamicLookup):
|
||||||
%1 = alloc_box $DynamicLookup
|
%1 = alloc_box $DynamicLookup
|
||||||
store %0 to %1#1 : $*DynamicLookup
|
store %0 to %1#1 : $*DynamicLookup
|
||||||
@@ -67,7 +67,7 @@ bb0(%0 : $DynamicLookup):
|
|||||||
// CHECK: br i1 [[HAS_SEL]]
|
// CHECK: br i1 [[HAS_SEL]]
|
||||||
dynamic_method_br %7 : $Builtin.ObjCPointer, #X.f!1, bb1, bb2
|
dynamic_method_br %7 : $Builtin.ObjCPointer, #X.f!1, bb1, bb2
|
||||||
|
|
||||||
bb1(%8 : $[cc(objc_method), thin] ((), Builtin.ObjCPointer) -> ()):
|
bb1(%8 : $@cc(objc_method) @thin ((), Builtin.ObjCPointer) -> ()):
|
||||||
br bb3
|
br bb3
|
||||||
|
|
||||||
bb2:
|
bb2:
|
||||||
@@ -79,14 +79,14 @@ bb3:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @dynamic_lookup_static_br(%swift.type*)
|
// CHECK: define void @dynamic_lookup_static_br(%swift.type*)
|
||||||
sil @dynamic_lookup_static_br : $[thin] (objMeta : DynamicLookup.metatype) -> () {
|
sil @dynamic_lookup_static_br : $@thin (objMeta : DynamicLookup.metatype) -> () {
|
||||||
bb0(%0 : $DynamicLookup.metatype):
|
bb0(%0 : $DynamicLookup.metatype):
|
||||||
// CHECK: [[SEL:%[0-9]+]] = load i8** @"\01L_selector(g)", align 8
|
// CHECK: [[SEL:%[0-9]+]] = load i8** @"\01L_selector(g)", align 8
|
||||||
// CHECK: [[HAS_SEL:%[0-9]]] = call i1 @swift_objcRespondsToSelector(%objc_object* [[OBJECT:%[0-9]+]], i8* [[SEL]]) #0
|
// CHECK: [[HAS_SEL:%[0-9]]] = call i1 @swift_objcRespondsToSelector(%objc_object* [[OBJECT:%[0-9]+]], i8* [[SEL]]) #0
|
||||||
// CHECK: br i1 [[HAS_SEL]]
|
// CHECK: br i1 [[HAS_SEL]]
|
||||||
dynamic_method_br %0 : $DynamicLookup.metatype, #X.g!1, bb1, bb2
|
dynamic_method_br %0 : $DynamicLookup.metatype, #X.g!1, bb1, bb2
|
||||||
|
|
||||||
bb1(%8 : $[cc(objc_method), thin] ((), Builtin.ObjCPointer) -> ()):
|
bb1(%8 : $@cc(objc_method) @thin ((), Builtin.ObjCPointer) -> ()):
|
||||||
br bb3
|
br bb3
|
||||||
|
|
||||||
bb2:
|
bb2:
|
||||||
@@ -97,7 +97,7 @@ bb3:
|
|||||||
return %43 : $()
|
return %43 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @_T1t23dynamic_lookup_propertyFT1xPSo13DynamicLookup__T_ : $[thin] (x : DynamicLookup) -> () {
|
sil @_T1t23dynamic_lookup_propertyFT1xPSo13DynamicLookup__T_ : $@thin (x : DynamicLookup) -> () {
|
||||||
bb0(%0 : $DynamicLookup):
|
bb0(%0 : $DynamicLookup):
|
||||||
%1 = alloc_box $DynamicLookup
|
%1 = alloc_box $DynamicLookup
|
||||||
store %0 to %1#1 : $*DynamicLookup
|
store %0 to %1#1 : $*DynamicLookup
|
||||||
@@ -107,7 +107,7 @@ sil @_T1t23dynamic_lookup_propertyFT1xPSo13DynamicLookup__T_ : $[thin] (x : Dyna
|
|||||||
%9 = ref_to_object_pointer %8 : $@sil_self DynamicLookup to $Builtin.ObjCPointer
|
%9 = ref_to_object_pointer %8 : $@sil_self DynamicLookup to $Builtin.ObjCPointer
|
||||||
dynamic_method_br %9 : $Builtin.ObjCPointer, #X.value!getter.1.foreign, bb1, bb2
|
dynamic_method_br %9 : $Builtin.ObjCPointer, #X.value!getter.1.foreign, bb1, bb2
|
||||||
|
|
||||||
bb1(%10 : $[cc(objc_method), thin] ((), Builtin.ObjCPointer) -> Int64):
|
bb1(%10 : $@cc(objc_method) @thin ((), Builtin.ObjCPointer) -> Int64):
|
||||||
br bb3
|
br bb3
|
||||||
|
|
||||||
bb2:
|
bb2:
|
||||||
@@ -119,7 +119,7 @@ bb3:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: define void @_T1t16opt_to_subscriptFT3objPSo13DynamicLookup_1iSi_T_(%objc_object*, i64)
|
// CHECK-LABEL: define void @_T1t16opt_to_subscriptFT3objPSo13DynamicLookup_1iSi_T_(%objc_object*, i64)
|
||||||
sil @_T1t16opt_to_subscriptFT3objPSo13DynamicLookup_1iSi_T_ : $[thin] (obj : DynamicLookup, i : Int64) -> () {
|
sil @_T1t16opt_to_subscriptFT3objPSo13DynamicLookup_1iSi_T_ : $@thin (obj : DynamicLookup, i : Int64) -> () {
|
||||||
bb0(%0 : $DynamicLookup, %1 : $Int64):
|
bb0(%0 : $DynamicLookup, %1 : $Int64):
|
||||||
%2 = alloc_box $DynamicLookup
|
%2 = alloc_box $DynamicLookup
|
||||||
%3 = alloc_box $Int64
|
%3 = alloc_box $Int64
|
||||||
@@ -135,8 +135,8 @@ bb0(%0 : $DynamicLookup, %1 : $Int64):
|
|||||||
|
|
||||||
dynamic_method_br %11 : $Builtin.ObjCPointer, #X.subscript!getter.2.foreign, bb1, bb2
|
dynamic_method_br %11 : $Builtin.ObjCPointer, #X.subscript!getter.2.foreign, bb1, bb2
|
||||||
|
|
||||||
bb1(%13 : $[cc(objc_method), thin] ((), (i : Int64), Builtin.ObjCPointer) -> Int64): // Preds: bb0
|
bb1(%13 : $@cc(objc_method) @thin ((), (i : Int64), Builtin.ObjCPointer) -> Int64): // Preds: bb0
|
||||||
%14 = partial_apply %13(%11) : $[cc(objc_method), thin] ((), (i : Int64), Builtin.ObjCPointer) -> Int64
|
%14 = partial_apply %13(%11) : $@cc(objc_method) @thin ((), (i : Int64), Builtin.ObjCPointer) -> Int64
|
||||||
%15 = load %3#1 : $*Int64
|
%15 = load %3#1 : $*Int64
|
||||||
%16 = apply %14(%15) : $Int64 -> Int64
|
%16 = apply %14(%15) : $Int64 -> Int64
|
||||||
br bb3
|
br bb3
|
||||||
@@ -149,7 +149,7 @@ bb3:
|
|||||||
return %30 : $()
|
return %30 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @top_level_code : $[thin] () -> () {
|
sil @top_level_code : $@thin () -> () {
|
||||||
%0 = tuple ()
|
%0 = tuple ()
|
||||||
%1 = return %0 : $()
|
%1 = return %0 : $()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ dest(%u2 : $(Builtin.Int64, Builtin.Int64)):
|
|||||||
// CHECK: phi <{ i64, i64 }>* [ [[ADDR]], %[[PREDEST]] ]
|
// CHECK: phi <{ i64, i64 }>* [ [[ADDR]], %[[PREDEST]] ]
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @singleton_switch_indirect : $([inout] Singleton) -> () {
|
sil @singleton_switch_indirect : $(@inout Singleton) -> () {
|
||||||
entry(%u : $*Singleton):
|
entry(%u : $*Singleton):
|
||||||
destructive_switch_enum_addr %u : $*Singleton, case #Singleton.val!enumelt.1: dest
|
destructive_switch_enum_addr %u : $*Singleton, case #Singleton.val!enumelt.1: dest
|
||||||
dest(%u2 : $*(Builtin.Int64, Builtin.Int64)):
|
dest(%u2 : $*(Builtin.Int64, Builtin.Int64)):
|
||||||
@@ -210,7 +210,7 @@ entry(%0 : $Builtin.Int64, %1 : $Builtin.Int64):
|
|||||||
// CHECK: store i64 %1, i64* [[DATA_1_ADDR]], align 8
|
// CHECK: store i64 %1, i64* [[DATA_1_ADDR]], align 8
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @singleton_inject_indirect : $(Builtin.Int64, Builtin.Int64, [inout] Singleton) -> () {
|
sil @singleton_inject_indirect : $(Builtin.Int64, Builtin.Int64, @inout Singleton) -> () {
|
||||||
entry(%0 : $Builtin.Int64, %1 : $Builtin.Int64, %2 : $*Singleton):
|
entry(%0 : $Builtin.Int64, %1 : $Builtin.Int64, %2 : $*Singleton):
|
||||||
%t = tuple (%0 : $Builtin.Int64, %1 : $Builtin.Int64)
|
%t = tuple (%0 : $Builtin.Int64, %1 : $Builtin.Int64)
|
||||||
%a = enum_data_addr %2 : $*Singleton, #Singleton.val!enumelt.1
|
%a = enum_data_addr %2 : $*Singleton, #Singleton.val!enumelt.1
|
||||||
@@ -227,16 +227,16 @@ enum NoPayloads {
|
|||||||
case z
|
case z
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @a : $[thin] () -> ()
|
sil @a : $@thin () -> ()
|
||||||
sil @b : $[thin] () -> ()
|
sil @b : $@thin () -> ()
|
||||||
sil @c : $[thin] () -> ()
|
sil @c : $@thin () -> ()
|
||||||
sil @d : $[thin] () -> ()
|
sil @d : $@thin () -> ()
|
||||||
sil @e : $[thin] () -> ()
|
sil @e : $@thin () -> ()
|
||||||
sil @f : $[thin] () -> ()
|
sil @f : $@thin () -> ()
|
||||||
|
|
||||||
|
|
||||||
// CHECK: define void @no_payload_switch(i2) {
|
// CHECK: define void @no_payload_switch(i2) {
|
||||||
sil @no_payload_switch : $[thin] (NoPayloads) -> () {
|
sil @no_payload_switch : $@thin (NoPayloads) -> () {
|
||||||
// CHECK: entry:
|
// CHECK: entry:
|
||||||
entry(%u : $NoPayloads):
|
entry(%u : $NoPayloads):
|
||||||
// CHECK: switch i2 %0, label %[[DFLT:[0-9]+]] [
|
// CHECK: switch i2 %0, label %[[DFLT:[0-9]+]] [
|
||||||
@@ -252,22 +252,22 @@ entry(%u : $NoPayloads):
|
|||||||
// CHECK: call void @a()
|
// CHECK: call void @a()
|
||||||
// CHECK: br label %[[END:[0-9]+]]
|
// CHECK: br label %[[END:[0-9]+]]
|
||||||
x_dest:
|
x_dest:
|
||||||
%a = function_ref @a : $[thin] () -> ()
|
%a = function_ref @a : $@thin () -> ()
|
||||||
apply %a() : $[thin] () -> ()
|
apply %a() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
// CHECK: ; <label>:[[Y_DEST]]
|
// CHECK: ; <label>:[[Y_DEST]]
|
||||||
// CHECK: call void @b()
|
// CHECK: call void @b()
|
||||||
// CHECK: br label %[[END]]
|
// CHECK: br label %[[END]]
|
||||||
y_dest:
|
y_dest:
|
||||||
%b = function_ref @b : $[thin] () -> ()
|
%b = function_ref @b : $@thin () -> ()
|
||||||
apply %b() : $[thin] () -> ()
|
apply %b() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
// CHECK: ; <label>:[[Z_DEST]]
|
// CHECK: ; <label>:[[Z_DEST]]
|
||||||
// CHECK: call void @c()
|
// CHECK: call void @c()
|
||||||
// CHECK: br label %[[END]]
|
// CHECK: br label %[[END]]
|
||||||
z_dest:
|
z_dest:
|
||||||
%c = function_ref @c : $[thin] () -> ()
|
%c = function_ref @c : $@thin () -> ()
|
||||||
apply %c() : $[thin] () -> ()
|
apply %c() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[END]]
|
// CHECK: ; <label>:[[END]]
|
||||||
@@ -278,7 +278,7 @@ end:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @no_payload_switch_indirect(%O4enum10NoPayloads*) {
|
// CHECK: define void @no_payload_switch_indirect(%O4enum10NoPayloads*) {
|
||||||
sil @no_payload_switch_indirect : $[thin] ([inout] NoPayloads) -> () {
|
sil @no_payload_switch_indirect : $@thin (@inout NoPayloads) -> () {
|
||||||
entry(%u : $*NoPayloads):
|
entry(%u : $*NoPayloads):
|
||||||
// CHECK: [[TAG_ADDR:%.*]] = getelementptr inbounds %O4enum10NoPayloads* %0, i32 0, i32 0
|
// CHECK: [[TAG_ADDR:%.*]] = getelementptr inbounds %O4enum10NoPayloads* %0, i32 0, i32 0
|
||||||
// CHECK: [[TAG:%.*]] = load i2* [[TAG_ADDR]]
|
// CHECK: [[TAG:%.*]] = load i2* [[TAG_ADDR]]
|
||||||
@@ -332,7 +332,7 @@ entry:
|
|||||||
// CHECK: store i2 -2, i2* [[TAG_ADDR]], align 1
|
// CHECK: store i2 -2, i2* [[TAG_ADDR]], align 1
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @no_payload_inject_z_indirect : $([inout] NoPayloads) -> () {
|
sil @no_payload_inject_z_indirect : $(@inout NoPayloads) -> () {
|
||||||
entry(%0 : $*NoPayloads):
|
entry(%0 : $*NoPayloads):
|
||||||
inject_enum_addr %0 : $*NoPayloads, #NoPayloads.z!enumelt
|
inject_enum_addr %0 : $*NoPayloads, #NoPayloads.z!enumelt
|
||||||
%v = tuple ()
|
%v = tuple ()
|
||||||
@@ -350,7 +350,7 @@ enum NoPayloads2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @no_payload_switch_2(i3) {
|
// CHECK: define void @no_payload_switch_2(i3) {
|
||||||
sil @no_payload_switch_2 : $[thin] (NoPayloads2) -> () {
|
sil @no_payload_switch_2 : $@thin (NoPayloads2) -> () {
|
||||||
// CHECK: entry:
|
// CHECK: entry:
|
||||||
entry(%u : $NoPayloads2):
|
entry(%u : $NoPayloads2):
|
||||||
// CHECK: switch i3 %0, label %[[DEFAULT_DEST:[0-9]+]] [
|
// CHECK: switch i3 %0, label %[[DEFAULT_DEST:[0-9]+]] [
|
||||||
@@ -361,16 +361,16 @@ entry(%u : $NoPayloads2):
|
|||||||
// CHECK: ; <label>:[[U_DEST]]
|
// CHECK: ; <label>:[[U_DEST]]
|
||||||
u_dest:
|
u_dest:
|
||||||
// CHECK: call void @a()
|
// CHECK: call void @a()
|
||||||
%a = function_ref @a : $[thin] () -> ()
|
%a = function_ref @a : $@thin () -> ()
|
||||||
apply %a() : $[thin] () -> ()
|
apply %a() : $@thin () -> ()
|
||||||
// CHECK: br label %[[END:[0-9]+]]
|
// CHECK: br label %[[END:[0-9]+]]
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[DEFAULT_DEST]]
|
// CHECK: ; <label>:[[DEFAULT_DEST]]
|
||||||
default_dest:
|
default_dest:
|
||||||
// CHECK: call void @b()
|
// CHECK: call void @b()
|
||||||
%b = function_ref @b : $[thin] () -> ()
|
%b = function_ref @b : $@thin () -> ()
|
||||||
apply %b() : $[thin] () -> ()
|
apply %b() : $@thin () -> ()
|
||||||
// CHECK: br label %[[END]]
|
// CHECK: br label %[[END]]
|
||||||
br end
|
br end
|
||||||
|
|
||||||
@@ -394,7 +394,7 @@ enum SinglePayloadNoXI2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @single_payload_no_xi_switch(i64, i1) {
|
// CHECK: define void @single_payload_no_xi_switch(i64, i1) {
|
||||||
sil @single_payload_no_xi_switch : $[thin] (SinglePayloadNoXI2) -> () {
|
sil @single_payload_no_xi_switch : $@thin (SinglePayloadNoXI2) -> () {
|
||||||
// CHECK: entry:
|
// CHECK: entry:
|
||||||
entry(%u : $SinglePayloadNoXI2):
|
entry(%u : $SinglePayloadNoXI2):
|
||||||
// CHECK: switch i1 %1, label %[[DFLT:[0-9]+]] [
|
// CHECK: switch i1 %1, label %[[DFLT:[0-9]+]] [
|
||||||
@@ -414,24 +414,24 @@ entry(%u : $SinglePayloadNoXI2):
|
|||||||
// CHECK: call void @a()
|
// CHECK: call void @a()
|
||||||
// CHECK: br label %[[END:[0-9]+]]
|
// CHECK: br label %[[END:[0-9]+]]
|
||||||
x_dest:
|
x_dest:
|
||||||
%a = function_ref @a : $[thin] () -> ()
|
%a = function_ref @a : $@thin () -> ()
|
||||||
apply %a() : $[thin] () -> ()
|
apply %a() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Y_DEST]]
|
// CHECK: ; <label>:[[Y_DEST]]
|
||||||
// CHECK: call void @b()
|
// CHECK: call void @b()
|
||||||
// CHECK: br label %[[END]]
|
// CHECK: br label %[[END]]
|
||||||
y_dest:
|
y_dest:
|
||||||
%b = function_ref @b : $[thin] () -> ()
|
%b = function_ref @b : $@thin () -> ()
|
||||||
apply %b() : $[thin] () -> ()
|
apply %b() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Z_DEST]]
|
// CHECK: ; <label>:[[Z_DEST]]
|
||||||
// CHECK: call void @c()
|
// CHECK: call void @c()
|
||||||
// CHECK: br label %[[END]]
|
// CHECK: br label %[[END]]
|
||||||
z_dest:
|
z_dest:
|
||||||
%c = function_ref @c : $[thin] () -> ()
|
%c = function_ref @c : $@thin () -> ()
|
||||||
apply %c() : $[thin] () -> ()
|
apply %c() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[END]]
|
// CHECK: ; <label>:[[END]]
|
||||||
@@ -442,7 +442,7 @@ end:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @single_payload_no_xi_switch_arg(i64, i1) {
|
// CHECK: define void @single_payload_no_xi_switch_arg(i64, i1) {
|
||||||
sil @single_payload_no_xi_switch_arg : $[thin] (SinglePayloadNoXI2) -> () {
|
sil @single_payload_no_xi_switch_arg : $@thin (SinglePayloadNoXI2) -> () {
|
||||||
// CHECK: entry:
|
// CHECK: entry:
|
||||||
entry(%u : $SinglePayloadNoXI2):
|
entry(%u : $SinglePayloadNoXI2):
|
||||||
// CHECK: switch i1 %1, label %[[DFLT:[0-9]+]] [
|
// CHECK: switch i1 %1, label %[[DFLT:[0-9]+]] [
|
||||||
@@ -465,24 +465,24 @@ entry(%u : $SinglePayloadNoXI2):
|
|||||||
x_dest(%u2 : $Builtin.Int64):
|
x_dest(%u2 : $Builtin.Int64):
|
||||||
// CHECK: call void @a()
|
// CHECK: call void @a()
|
||||||
// CHECK: br label %[[END:[0-9]+]]
|
// CHECK: br label %[[END:[0-9]+]]
|
||||||
%a = function_ref @a : $[thin] () -> ()
|
%a = function_ref @a : $@thin () -> ()
|
||||||
apply %a() : $[thin] () -> ()
|
apply %a() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Y_DEST]]
|
// CHECK: ; <label>:[[Y_DEST]]
|
||||||
y_dest:
|
y_dest:
|
||||||
// CHECK: call void @b()
|
// CHECK: call void @b()
|
||||||
// CHECK: br label %[[END]]
|
// CHECK: br label %[[END]]
|
||||||
%b = function_ref @b : $[thin] () -> ()
|
%b = function_ref @b : $@thin () -> ()
|
||||||
apply %b() : $[thin] () -> ()
|
apply %b() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Z_DEST]]
|
// CHECK: ; <label>:[[Z_DEST]]
|
||||||
z_dest:
|
z_dest:
|
||||||
// CHECK: call void @c()
|
// CHECK: call void @c()
|
||||||
// CHECK: br label %[[END]]
|
// CHECK: br label %[[END]]
|
||||||
%c = function_ref @c : $[thin] () -> ()
|
%c = function_ref @c : $@thin () -> ()
|
||||||
apply %c() : $[thin] () -> ()
|
apply %c() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[END]]
|
// CHECK: ; <label>:[[END]]
|
||||||
@@ -513,7 +513,7 @@ entry(%0 : $Builtin.Int64):
|
|||||||
// CHECK: store i1 false, i1* [[TAG_ADDR]], align 8
|
// CHECK: store i1 false, i1* [[TAG_ADDR]], align 8
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @single_payload_no_xi_inject_x_indirect : $(Builtin.Int64, [inout] SinglePayloadNoXI2) -> () {
|
sil @single_payload_no_xi_inject_x_indirect : $(Builtin.Int64, @inout SinglePayloadNoXI2) -> () {
|
||||||
entry(%0 : $Builtin.Int64, %1 : $*SinglePayloadNoXI2):
|
entry(%0 : $Builtin.Int64, %1 : $*SinglePayloadNoXI2):
|
||||||
%a = enum_data_addr %1 : $*SinglePayloadNoXI2, #SinglePayloadNoXI2.x!enumelt.1
|
%a = enum_data_addr %1 : $*SinglePayloadNoXI2, #SinglePayloadNoXI2.x!enumelt.1
|
||||||
store %0 to %a : $*Builtin.Int64
|
store %0 to %a : $*Builtin.Int64
|
||||||
@@ -541,7 +541,7 @@ entry:
|
|||||||
// CHECK: store i1 true, i1* [[TAG_ADDR]], align 8
|
// CHECK: store i1 true, i1* [[TAG_ADDR]], align 8
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @single_payload_no_xi_inject_y_indirect : $([inout] SinglePayloadNoXI2) -> () {
|
sil @single_payload_no_xi_inject_y_indirect : $(@inout SinglePayloadNoXI2) -> () {
|
||||||
entry(%0 : $*SinglePayloadNoXI2):
|
entry(%0 : $*SinglePayloadNoXI2):
|
||||||
inject_enum_addr %0 : $*SinglePayloadNoXI2, #SinglePayloadNoXI2.y!enumelt
|
inject_enum_addr %0 : $*SinglePayloadNoXI2, #SinglePayloadNoXI2.y!enumelt
|
||||||
%v = tuple ()
|
%v = tuple ()
|
||||||
@@ -568,7 +568,7 @@ enum AggregateSinglePayload {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @aggregate_single_payload_unpack(i128, i1) {
|
// CHECK: define void @aggregate_single_payload_unpack(i128, i1) {
|
||||||
sil @aggregate_single_payload_unpack : $[thin] (AggregateSinglePayload) -> () {
|
sil @aggregate_single_payload_unpack : $@thin (AggregateSinglePayload) -> () {
|
||||||
entry(%u : $AggregateSinglePayload):
|
entry(%u : $AggregateSinglePayload):
|
||||||
switch_enum %u : $AggregateSinglePayload, case #AggregateSinglePayload.x!enumelt.1: x_dest, default end
|
switch_enum %u : $AggregateSinglePayload, case #AggregateSinglePayload.x!enumelt.1: x_dest, default end
|
||||||
|
|
||||||
@@ -611,7 +611,7 @@ enum AggregateSinglePayload2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @aggregate_single_payload_unpack_2(i256, i1) {
|
// CHECK: define void @aggregate_single_payload_unpack_2(i256, i1) {
|
||||||
sil @aggregate_single_payload_unpack_2 : $[thin] (AggregateSinglePayload2) -> () {
|
sil @aggregate_single_payload_unpack_2 : $@thin (AggregateSinglePayload2) -> () {
|
||||||
entry(%u : $AggregateSinglePayload2):
|
entry(%u : $AggregateSinglePayload2):
|
||||||
switch_enum %u : $AggregateSinglePayload2, case #AggregateSinglePayload2.x!enumelt.1: x_dest, default end
|
switch_enum %u : $AggregateSinglePayload2, case #AggregateSinglePayload2.x!enumelt.1: x_dest, default end
|
||||||
|
|
||||||
@@ -661,7 +661,7 @@ enum SinglePayloadSpareBit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @single_payload_spare_bit_switch(i64) {
|
// CHECK: define void @single_payload_spare_bit_switch(i64) {
|
||||||
sil @single_payload_spare_bit_switch : $[thin] (SinglePayloadSpareBit) -> () {
|
sil @single_payload_spare_bit_switch : $@thin (SinglePayloadSpareBit) -> () {
|
||||||
// CHECK: entry:
|
// CHECK: entry:
|
||||||
entry(%u : $SinglePayloadSpareBit):
|
entry(%u : $SinglePayloadSpareBit):
|
||||||
// CHECK: switch i64 %0, label %[[X_DEST:[0-9]+]] [
|
// CHECK: switch i64 %0, label %[[X_DEST:[0-9]+]] [
|
||||||
@@ -675,24 +675,24 @@ entry(%u : $SinglePayloadSpareBit):
|
|||||||
// CHECK: ; <label>:[[X_DEST]]
|
// CHECK: ; <label>:[[X_DEST]]
|
||||||
x_dest:
|
x_dest:
|
||||||
// CHECK: call void @a()
|
// CHECK: call void @a()
|
||||||
%a = function_ref @a : $[thin] () -> ()
|
%a = function_ref @a : $@thin () -> ()
|
||||||
apply %a() : $[thin] () -> ()
|
apply %a() : $@thin () -> ()
|
||||||
// CHECK: br label %[[END:[0-9]+]]
|
// CHECK: br label %[[END:[0-9]+]]
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Y_DEST]]
|
// CHECK: ; <label>:[[Y_DEST]]
|
||||||
y_dest:
|
y_dest:
|
||||||
// CHECK: call void @b()
|
// CHECK: call void @b()
|
||||||
%b = function_ref @b : $[thin] () -> ()
|
%b = function_ref @b : $@thin () -> ()
|
||||||
apply %b() : $[thin] () -> ()
|
apply %b() : $@thin () -> ()
|
||||||
// CHECK: br label %[[END]]
|
// CHECK: br label %[[END]]
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Z_DEST]]
|
// CHECK: ; <label>:[[Z_DEST]]
|
||||||
z_dest:
|
z_dest:
|
||||||
// CHECK: call void @c()
|
// CHECK: call void @c()
|
||||||
%c = function_ref @c : $[thin] () -> ()
|
%c = function_ref @c : $@thin () -> ()
|
||||||
apply %c() : $[thin] () -> ()
|
apply %c() : $@thin () -> ()
|
||||||
// CHECK: br label %[[END]]
|
// CHECK: br label %[[END]]
|
||||||
br end
|
br end
|
||||||
|
|
||||||
@@ -704,7 +704,7 @@ end:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @single_payload_spare_bit_switch_arg(i64) {
|
// CHECK: define void @single_payload_spare_bit_switch_arg(i64) {
|
||||||
sil @single_payload_spare_bit_switch_arg : $[thin] (SinglePayloadSpareBit) -> () {
|
sil @single_payload_spare_bit_switch_arg : $@thin (SinglePayloadSpareBit) -> () {
|
||||||
// CHECK: entry:
|
// CHECK: entry:
|
||||||
entry(%u : $SinglePayloadSpareBit):
|
entry(%u : $SinglePayloadSpareBit):
|
||||||
// CHECK: switch i64 %0, label %[[X_PREDEST:[0-9]+]] [
|
// CHECK: switch i64 %0, label %[[X_PREDEST:[0-9]+]] [
|
||||||
@@ -722,24 +722,24 @@ entry(%u : $SinglePayloadSpareBit):
|
|||||||
// CHECK: {{%.*}} = phi i63 [ [[TRUNC_PAYLOAD]], %[[X_PREDEST]] ]
|
// CHECK: {{%.*}} = phi i63 [ [[TRUNC_PAYLOAD]], %[[X_PREDEST]] ]
|
||||||
x_dest(%u2 : $Builtin.Int63):
|
x_dest(%u2 : $Builtin.Int63):
|
||||||
// CHECK: call void @a()
|
// CHECK: call void @a()
|
||||||
%a = function_ref @a : $[thin] () -> ()
|
%a = function_ref @a : $@thin () -> ()
|
||||||
apply %a() : $[thin] () -> ()
|
apply %a() : $@thin () -> ()
|
||||||
// CHECK: br label %[[END:[0-9]+]]
|
// CHECK: br label %[[END:[0-9]+]]
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Y_DEST]]
|
// CHECK: ; <label>:[[Y_DEST]]
|
||||||
y_dest:
|
y_dest:
|
||||||
// CHECK: call void @b()
|
// CHECK: call void @b()
|
||||||
%b = function_ref @b : $[thin] () -> ()
|
%b = function_ref @b : $@thin () -> ()
|
||||||
apply %b() : $[thin] () -> ()
|
apply %b() : $@thin () -> ()
|
||||||
// CHECK: br label %[[END]]
|
// CHECK: br label %[[END]]
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Z_DEST]]
|
// CHECK: ; <label>:[[Z_DEST]]
|
||||||
z_dest:
|
z_dest:
|
||||||
// CHECK: call void @c()
|
// CHECK: call void @c()
|
||||||
%c = function_ref @c : $[thin] () -> ()
|
%c = function_ref @c : $@thin () -> ()
|
||||||
apply %c() : $[thin] () -> ()
|
apply %c() : $@thin () -> ()
|
||||||
// CHECK: br label %[[END]]
|
// CHECK: br label %[[END]]
|
||||||
br end
|
br end
|
||||||
|
|
||||||
@@ -750,7 +750,7 @@ end:
|
|||||||
return %x : $()
|
return %x : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @single_payload_spare_bit_switch_indirect : $[thin] ([inout] SinglePayloadSpareBit) -> () {
|
sil @single_payload_spare_bit_switch_indirect : $@thin (@inout SinglePayloadSpareBit) -> () {
|
||||||
entry(%u : $*SinglePayloadSpareBit):
|
entry(%u : $*SinglePayloadSpareBit):
|
||||||
// CHECK: [[PAYLOAD_ADDR:%.*]] = bitcast %O4enum21SinglePayloadSpareBit* %0 to i64*
|
// CHECK: [[PAYLOAD_ADDR:%.*]] = bitcast %O4enum21SinglePayloadSpareBit* %0 to i64*
|
||||||
// CHECK: [[PAYLOAD:%.*]] = load i64* [[PAYLOAD_ADDR]]
|
// CHECK: [[PAYLOAD:%.*]] = load i64* [[PAYLOAD_ADDR]]
|
||||||
@@ -763,8 +763,8 @@ entry(%u : $*SinglePayloadSpareBit):
|
|||||||
// CHECK: ; <label>:[[X_DEST]]
|
// CHECK: ; <label>:[[X_DEST]]
|
||||||
// CHECK: phi i63* [ [[DATA_ADDR]], %[[X_PREDEST]] ]
|
// CHECK: phi i63* [ [[DATA_ADDR]], %[[X_PREDEST]] ]
|
||||||
x_dest(%u2 : $*Builtin.Int63):
|
x_dest(%u2 : $*Builtin.Int63):
|
||||||
%a = function_ref @a : $[thin] () -> ()
|
%a = function_ref @a : $@thin () -> ()
|
||||||
apply %a() : $[thin] () -> ()
|
apply %a() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
y_dest:
|
y_dest:
|
||||||
@@ -795,7 +795,7 @@ entry(%0 : $Builtin.Int63):
|
|||||||
// CHECK: store i63 %0, i63* [[DATA_ADDR]], align 8
|
// CHECK: store i63 %0, i63* [[DATA_ADDR]], align 8
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @single_payload_spare_bit_inject_x_indirect : $(Builtin.Int63, [inout] SinglePayloadSpareBit) -> () {
|
sil @single_payload_spare_bit_inject_x_indirect : $(Builtin.Int63, @inout SinglePayloadSpareBit) -> () {
|
||||||
entry(%0 : $Builtin.Int63, %1 : $*SinglePayloadSpareBit):
|
entry(%0 : $Builtin.Int63, %1 : $*SinglePayloadSpareBit):
|
||||||
%a = enum_data_addr %1 : $*SinglePayloadSpareBit, #SinglePayloadSpareBit.x!enumelt.1
|
%a = enum_data_addr %1 : $*SinglePayloadSpareBit, #SinglePayloadSpareBit.x!enumelt.1
|
||||||
store %0 to %a : $*Builtin.Int63
|
store %0 to %a : $*Builtin.Int63
|
||||||
@@ -822,7 +822,7 @@ entry:
|
|||||||
// CHECK: store i64 -9223372036854775808, i64* [[PAYLOAD_ADDR]], align 8
|
// CHECK: store i64 -9223372036854775808, i64* [[PAYLOAD_ADDR]], align 8
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @single_payload_spare_bit_inject_y_indirect : $([inout] SinglePayloadSpareBit) -> () {
|
sil @single_payload_spare_bit_inject_y_indirect : $(@inout SinglePayloadSpareBit) -> () {
|
||||||
entry(%0 : $*SinglePayloadSpareBit):
|
entry(%0 : $*SinglePayloadSpareBit):
|
||||||
inject_enum_addr %0 : $*SinglePayloadSpareBit, #SinglePayloadSpareBit.y!enumelt
|
inject_enum_addr %0 : $*SinglePayloadSpareBit, #SinglePayloadSpareBit.y!enumelt
|
||||||
%v = tuple ()
|
%v = tuple ()
|
||||||
@@ -996,40 +996,40 @@ entry(%u : $MultiPayloadNoSpareBits):
|
|||||||
// CHECK: ; <label>:[[X_DEST]]
|
// CHECK: ; <label>:[[X_DEST]]
|
||||||
// CHECK: phi i64 [ %0, %[[X_PREDEST]] ]
|
// CHECK: phi i64 [ %0, %[[X_PREDEST]] ]
|
||||||
x_dest(%x : $Builtin.Int64):
|
x_dest(%x : $Builtin.Int64):
|
||||||
%a = function_ref @a : $[thin] () -> ()
|
%a = function_ref @a : $@thin () -> ()
|
||||||
apply %a() : $[thin] () -> ()
|
apply %a() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Y_DEST]]
|
// CHECK: ; <label>:[[Y_DEST]]
|
||||||
// CHECK: phi i32 [ [[Y_VALUE]], %[[Y_PREDEST]] ]
|
// CHECK: phi i32 [ [[Y_VALUE]], %[[Y_PREDEST]] ]
|
||||||
y_dest(%y : $Builtin.Int32):
|
y_dest(%y : $Builtin.Int32):
|
||||||
%b = function_ref @b : $[thin] () -> ()
|
%b = function_ref @b : $@thin () -> ()
|
||||||
apply %b() : $[thin] () -> ()
|
apply %b() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Z_DEST]]
|
// CHECK: ; <label>:[[Z_DEST]]
|
||||||
// CHECK: phi i63 [ [[Z_VALUE]], %[[Z_PREDEST]] ]
|
// CHECK: phi i63 [ [[Z_VALUE]], %[[Z_PREDEST]] ]
|
||||||
z_dest(%z : $Builtin.Int63):
|
z_dest(%z : $Builtin.Int63):
|
||||||
%c = function_ref @c : $[thin] () -> ()
|
%c = function_ref @c : $@thin () -> ()
|
||||||
apply %c() : $[thin] () -> ()
|
apply %c() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[A_DEST]]
|
// CHECK: ; <label>:[[A_DEST]]
|
||||||
a_dest:
|
a_dest:
|
||||||
%d = function_ref @d : $[thin] () -> ()
|
%d = function_ref @d : $@thin () -> ()
|
||||||
apply %d() : $[thin] () -> ()
|
apply %d() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[B_DEST]]
|
// CHECK: ; <label>:[[B_DEST]]
|
||||||
b_dest:
|
b_dest:
|
||||||
%e = function_ref @e : $[thin] () -> ()
|
%e = function_ref @e : $@thin () -> ()
|
||||||
apply %e() : $[thin] () -> ()
|
apply %e() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[C_DEST]]
|
// CHECK: ; <label>:[[C_DEST]]
|
||||||
c_dest:
|
c_dest:
|
||||||
%f = function_ref @f : $[thin] () -> ()
|
%f = function_ref @f : $@thin () -> ()
|
||||||
apply %f() : $[thin] () -> ()
|
apply %f() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
end:
|
end:
|
||||||
@@ -1038,7 +1038,7 @@ end:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @multi_payload_no_spare_bits_switch_indirect(%O4enum23MultiPayloadNoSpareBits*) {
|
// CHECK: define void @multi_payload_no_spare_bits_switch_indirect(%O4enum23MultiPayloadNoSpareBits*) {
|
||||||
sil @multi_payload_no_spare_bits_switch_indirect : $([inout] MultiPayloadNoSpareBits) -> () {
|
sil @multi_payload_no_spare_bits_switch_indirect : $(@inout MultiPayloadNoSpareBits) -> () {
|
||||||
entry(%u : $*MultiPayloadNoSpareBits):
|
entry(%u : $*MultiPayloadNoSpareBits):
|
||||||
// CHECK: [[PAYLOAD_ADDR:%.*]] = bitcast %O4enum23MultiPayloadNoSpareBits* %0 to i64*
|
// CHECK: [[PAYLOAD_ADDR:%.*]] = bitcast %O4enum23MultiPayloadNoSpareBits* %0 to i64*
|
||||||
// CHECK: [[PAYLOAD:%.*]] = load i64* [[PAYLOAD_ADDR]], align 8
|
// CHECK: [[PAYLOAD:%.*]] = load i64* [[PAYLOAD_ADDR]], align 8
|
||||||
@@ -1102,7 +1102,7 @@ entry(%0 : $Builtin.Int64):
|
|||||||
// CHECK: store i2 0, i2* [[TAG_ADDR]], align 8
|
// CHECK: store i2 0, i2* [[TAG_ADDR]], align 8
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @multi_payload_no_spare_bit_inject_x_indirect : $(Builtin.Int64, [inout] MultiPayloadNoSpareBits) -> () {
|
sil @multi_payload_no_spare_bit_inject_x_indirect : $(Builtin.Int64, @inout MultiPayloadNoSpareBits) -> () {
|
||||||
entry(%0 : $Builtin.Int64, %1 : $*MultiPayloadNoSpareBits):
|
entry(%0 : $Builtin.Int64, %1 : $*MultiPayloadNoSpareBits):
|
||||||
%a = enum_data_addr %1 : $*MultiPayloadNoSpareBits, #MultiPayloadNoSpareBits.x!enumelt.1
|
%a = enum_data_addr %1 : $*MultiPayloadNoSpareBits, #MultiPayloadNoSpareBits.x!enumelt.1
|
||||||
store %0 to %a : $*Builtin.Int64
|
store %0 to %a : $*Builtin.Int64
|
||||||
@@ -1156,7 +1156,7 @@ entry:
|
|||||||
// CHECK: store i2 -1, i2* [[TAG_ADDR]], align 8
|
// CHECK: store i2 -1, i2* [[TAG_ADDR]], align 8
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @multi_payload_no_spare_bit_inject_a_indirect : $([inout] MultiPayloadNoSpareBits) -> () {
|
sil @multi_payload_no_spare_bit_inject_a_indirect : $(@inout MultiPayloadNoSpareBits) -> () {
|
||||||
entry(%0 : $*MultiPayloadNoSpareBits):
|
entry(%0 : $*MultiPayloadNoSpareBits):
|
||||||
inject_enum_addr %0 : $*MultiPayloadNoSpareBits, #MultiPayloadNoSpareBits.a!enumelt
|
inject_enum_addr %0 : $*MultiPayloadNoSpareBits, #MultiPayloadNoSpareBits.a!enumelt
|
||||||
%v = tuple ()
|
%v = tuple ()
|
||||||
@@ -1237,40 +1237,40 @@ entry(%u : $MultiPayloadOneSpareBit):
|
|||||||
// CHECK: ; <label>:[[X_DEST]]
|
// CHECK: ; <label>:[[X_DEST]]
|
||||||
// CHECK: phi i62 [ [[X_VALUE]], %[[X_PREDEST]] ]
|
// CHECK: phi i62 [ [[X_VALUE]], %[[X_PREDEST]] ]
|
||||||
x_dest(%x : $Builtin.Int62):
|
x_dest(%x : $Builtin.Int62):
|
||||||
%a = function_ref @a : $[thin] () -> ()
|
%a = function_ref @a : $@thin () -> ()
|
||||||
apply %a() : $[thin] () -> ()
|
apply %a() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Y_DEST]]
|
// CHECK: ; <label>:[[Y_DEST]]
|
||||||
// CHECK: phi i63 [ [[Y_VALUE]], %[[Y_PREDEST]] ]
|
// CHECK: phi i63 [ [[Y_VALUE]], %[[Y_PREDEST]] ]
|
||||||
y_dest(%y : $Builtin.Int63):
|
y_dest(%y : $Builtin.Int63):
|
||||||
%b = function_ref @b : $[thin] () -> ()
|
%b = function_ref @b : $@thin () -> ()
|
||||||
apply %b() : $[thin] () -> ()
|
apply %b() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Z_DEST]]
|
// CHECK: ; <label>:[[Z_DEST]]
|
||||||
// CHECK: phi i61 [ [[Z_VALUE]], %[[Z_PREDEST]] ]
|
// CHECK: phi i61 [ [[Z_VALUE]], %[[Z_PREDEST]] ]
|
||||||
z_dest(%z : $Builtin.Int61):
|
z_dest(%z : $Builtin.Int61):
|
||||||
%c = function_ref @c : $[thin] () -> ()
|
%c = function_ref @c : $@thin () -> ()
|
||||||
apply %c() : $[thin] () -> ()
|
apply %c() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[A_DEST]]
|
// CHECK: ; <label>:[[A_DEST]]
|
||||||
a_dest:
|
a_dest:
|
||||||
%d = function_ref @d : $[thin] () -> ()
|
%d = function_ref @d : $@thin () -> ()
|
||||||
apply %d() : $[thin] () -> ()
|
apply %d() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[B_DEST]]
|
// CHECK: ; <label>:[[B_DEST]]
|
||||||
b_dest:
|
b_dest:
|
||||||
%e = function_ref @e : $[thin] () -> ()
|
%e = function_ref @e : $@thin () -> ()
|
||||||
apply %e() : $[thin] () -> ()
|
apply %e() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[C_DEST]]
|
// CHECK: ; <label>:[[C_DEST]]
|
||||||
c_dest:
|
c_dest:
|
||||||
%f = function_ref @f : $[thin] () -> ()
|
%f = function_ref @f : $@thin () -> ()
|
||||||
apply %f() : $[thin] () -> ()
|
apply %f() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
end:
|
end:
|
||||||
@@ -1278,7 +1278,7 @@ end:
|
|||||||
return %v : $()
|
return %v : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @multi_payload_one_spare_bit_switch_indirect : $([inout] MultiPayloadOneSpareBit) -> () {
|
sil @multi_payload_one_spare_bit_switch_indirect : $(@inout MultiPayloadOneSpareBit) -> () {
|
||||||
entry(%u : $*MultiPayloadOneSpareBit):
|
entry(%u : $*MultiPayloadOneSpareBit):
|
||||||
// CHECK: [[PAYLOAD_ADDR:%.*]] = bitcast %O4enum23MultiPayloadOneSpareBit* %0 to i64*
|
// CHECK: [[PAYLOAD_ADDR:%.*]] = bitcast %O4enum23MultiPayloadOneSpareBit* %0 to i64*
|
||||||
// CHECK: [[PAYLOAD:%.*]] = load i64* [[PAYLOAD_ADDR]], align 8
|
// CHECK: [[PAYLOAD:%.*]] = load i64* [[PAYLOAD_ADDR]], align 8
|
||||||
@@ -1355,7 +1355,7 @@ entry(%0 : $Builtin.Int62):
|
|||||||
// CHECK: store i1 false, i1* [[TAG_ADDR]], align 8
|
// CHECK: store i1 false, i1* [[TAG_ADDR]], align 8
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @multi_payload_one_spare_bit_inject_x_indirect : $(Builtin.Int62, [inout] MultiPayloadOneSpareBit) -> () {
|
sil @multi_payload_one_spare_bit_inject_x_indirect : $(Builtin.Int62, @inout MultiPayloadOneSpareBit) -> () {
|
||||||
entry(%0 : $Builtin.Int62, %1 : $*MultiPayloadOneSpareBit):
|
entry(%0 : $Builtin.Int62, %1 : $*MultiPayloadOneSpareBit):
|
||||||
%a = enum_data_addr %1 : $*MultiPayloadOneSpareBit, #MultiPayloadOneSpareBit.x!enumelt.1
|
%a = enum_data_addr %1 : $*MultiPayloadOneSpareBit, #MultiPayloadOneSpareBit.x!enumelt.1
|
||||||
store %0 to %a : $*Builtin.Int62
|
store %0 to %a : $*Builtin.Int62
|
||||||
@@ -1396,7 +1396,7 @@ entry(%0 : $Builtin.Int63):
|
|||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
|
|
||||||
sil @multi_payload_one_spare_bit_inject_y_indirect : $(Builtin.Int63, [inout] MultiPayloadOneSpareBit) -> () {
|
sil @multi_payload_one_spare_bit_inject_y_indirect : $(Builtin.Int63, @inout MultiPayloadOneSpareBit) -> () {
|
||||||
entry(%0 : $Builtin.Int63, %1 : $*MultiPayloadOneSpareBit):
|
entry(%0 : $Builtin.Int63, %1 : $*MultiPayloadOneSpareBit):
|
||||||
%a = enum_data_addr %1 : $*MultiPayloadOneSpareBit, #MultiPayloadOneSpareBit.y!enumelt.1
|
%a = enum_data_addr %1 : $*MultiPayloadOneSpareBit, #MultiPayloadOneSpareBit.y!enumelt.1
|
||||||
store %0 to %a : $*Builtin.Int63
|
store %0 to %a : $*Builtin.Int63
|
||||||
@@ -1439,7 +1439,7 @@ entry:
|
|||||||
// CHECK: store i1 true, i1* [[TAG_ADDR]], align 8
|
// CHECK: store i1 true, i1* [[TAG_ADDR]], align 8
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @multi_payload_one_spare_bit_inject_a_indirect : $([inout] MultiPayloadOneSpareBit) -> () {
|
sil @multi_payload_one_spare_bit_inject_a_indirect : $(@inout MultiPayloadOneSpareBit) -> () {
|
||||||
entry(%0 : $*MultiPayloadOneSpareBit):
|
entry(%0 : $*MultiPayloadOneSpareBit):
|
||||||
inject_enum_addr %0 : $*MultiPayloadOneSpareBit, #MultiPayloadOneSpareBit.a!enumelt
|
inject_enum_addr %0 : $*MultiPayloadOneSpareBit, #MultiPayloadOneSpareBit.a!enumelt
|
||||||
%v = tuple ()
|
%v = tuple ()
|
||||||
@@ -1521,40 +1521,40 @@ entry(%u : $MultiPayloadTwoSpareBits):
|
|||||||
// CHECK: ; <label>:[[X_DEST]]
|
// CHECK: ; <label>:[[X_DEST]]
|
||||||
// CHECK: phi i62 [ [[X_VALUE]], %[[X_PREDEST]] ]
|
// CHECK: phi i62 [ [[X_VALUE]], %[[X_PREDEST]] ]
|
||||||
x_dest(%x : $Builtin.Int62):
|
x_dest(%x : $Builtin.Int62):
|
||||||
%a = function_ref @a : $[thin] () -> ()
|
%a = function_ref @a : $@thin () -> ()
|
||||||
apply %a() : $[thin] () -> ()
|
apply %a() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Y_DEST]]
|
// CHECK: ; <label>:[[Y_DEST]]
|
||||||
// CHECK: phi i60 [ [[Y_VALUE]], %[[Y_PREDEST]] ]
|
// CHECK: phi i60 [ [[Y_VALUE]], %[[Y_PREDEST]] ]
|
||||||
y_dest(%y : $Builtin.Int60):
|
y_dest(%y : $Builtin.Int60):
|
||||||
%b = function_ref @b : $[thin] () -> ()
|
%b = function_ref @b : $@thin () -> ()
|
||||||
apply %b() : $[thin] () -> ()
|
apply %b() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[Z_DEST]]
|
// CHECK: ; <label>:[[Z_DEST]]
|
||||||
// CHECK: phi i61 [ [[Z_VALUE]], %[[Z_PREDEST]] ]
|
// CHECK: phi i61 [ [[Z_VALUE]], %[[Z_PREDEST]] ]
|
||||||
z_dest(%z : $Builtin.Int61):
|
z_dest(%z : $Builtin.Int61):
|
||||||
%c = function_ref @c : $[thin] () -> ()
|
%c = function_ref @c : $@thin () -> ()
|
||||||
apply %c() : $[thin] () -> ()
|
apply %c() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[A_DEST]]
|
// CHECK: ; <label>:[[A_DEST]]
|
||||||
a_dest:
|
a_dest:
|
||||||
%d = function_ref @d : $[thin] () -> ()
|
%d = function_ref @d : $@thin () -> ()
|
||||||
apply %d() : $[thin] () -> ()
|
apply %d() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[B_DEST]]
|
// CHECK: ; <label>:[[B_DEST]]
|
||||||
b_dest:
|
b_dest:
|
||||||
%e = function_ref @e : $[thin] () -> ()
|
%e = function_ref @e : $@thin () -> ()
|
||||||
apply %e() : $[thin] () -> ()
|
apply %e() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
// CHECK: ; <label>:[[C_DEST]]
|
// CHECK: ; <label>:[[C_DEST]]
|
||||||
c_dest:
|
c_dest:
|
||||||
%f = function_ref @f : $[thin] () -> ()
|
%f = function_ref @f : $@thin () -> ()
|
||||||
apply %f() : $[thin] () -> ()
|
apply %f() : $@thin () -> ()
|
||||||
br end
|
br end
|
||||||
|
|
||||||
end:
|
end:
|
||||||
@@ -1584,7 +1584,7 @@ entry(%0 : $Builtin.Int62):
|
|||||||
// CHECK: store i64 [[PAYLOAD_MASKED]], i64* [[PAYLOAD_ADDR]], align 8
|
// CHECK: store i64 [[PAYLOAD_MASKED]], i64* [[PAYLOAD_ADDR]], align 8
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @multi_payload_two_spare_bits_inject_x_indirect : $(Builtin.Int62, [inout] MultiPayloadTwoSpareBits) -> () {
|
sil @multi_payload_two_spare_bits_inject_x_indirect : $(Builtin.Int62, @inout MultiPayloadTwoSpareBits) -> () {
|
||||||
entry(%0 : $Builtin.Int62, %1 : $*MultiPayloadTwoSpareBits):
|
entry(%0 : $Builtin.Int62, %1 : $*MultiPayloadTwoSpareBits):
|
||||||
%a = enum_data_addr %1 : $*MultiPayloadTwoSpareBits, #MultiPayloadTwoSpareBits.x!enumelt.1
|
%a = enum_data_addr %1 : $*MultiPayloadTwoSpareBits, #MultiPayloadTwoSpareBits.x!enumelt.1
|
||||||
store %0 to %a : $*Builtin.Int62
|
store %0 to %a : $*Builtin.Int62
|
||||||
@@ -1619,7 +1619,7 @@ entry(%0 : $Builtin.Int60):
|
|||||||
// CHECK: store i64 [[PAYLOAD_TAGGED]], i64* [[PAYLOAD_ADDR]], align 8
|
// CHECK: store i64 [[PAYLOAD_TAGGED]], i64* [[PAYLOAD_ADDR]], align 8
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @multi_payload_two_spare_bits_inject_y_indirect : $(Builtin.Int60, [inout] MultiPayloadTwoSpareBits) -> () {
|
sil @multi_payload_two_spare_bits_inject_y_indirect : $(Builtin.Int60, @inout MultiPayloadTwoSpareBits) -> () {
|
||||||
entry(%0 : $Builtin.Int60, %1 : $*MultiPayloadTwoSpareBits):
|
entry(%0 : $Builtin.Int60, %1 : $*MultiPayloadTwoSpareBits):
|
||||||
%a = enum_data_addr %1 : $*MultiPayloadTwoSpareBits, #MultiPayloadTwoSpareBits.y!enumelt.1
|
%a = enum_data_addr %1 : $*MultiPayloadTwoSpareBits, #MultiPayloadTwoSpareBits.y!enumelt.1
|
||||||
store %0 to %a : $*Builtin.Int60
|
store %0 to %a : $*Builtin.Int60
|
||||||
@@ -1659,7 +1659,7 @@ entry:
|
|||||||
// CHECK: store i64 -4611686018427387904, i64* [[PAYLOAD_ADDR]], align 8
|
// CHECK: store i64 -4611686018427387904, i64* [[PAYLOAD_ADDR]], align 8
|
||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
sil @multi_payload_two_spare_bits_inject_a_indirect : $([inout] MultiPayloadTwoSpareBits) -> () {
|
sil @multi_payload_two_spare_bits_inject_a_indirect : $(@inout MultiPayloadTwoSpareBits) -> () {
|
||||||
entry(%0 : $*MultiPayloadTwoSpareBits):
|
entry(%0 : $*MultiPayloadTwoSpareBits):
|
||||||
inject_enum_addr %0 : $*MultiPayloadTwoSpareBits, #MultiPayloadTwoSpareBits.a!enumelt
|
inject_enum_addr %0 : $*MultiPayloadTwoSpareBits, #MultiPayloadTwoSpareBits.a!enumelt
|
||||||
%v = tuple ()
|
%v = tuple ()
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ enum GenericFixedLayout<T> {
|
|||||||
case bar(Builtin.ObjectPointer)
|
case bar(Builtin.ObjectPointer)
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @top_level_code : $[thin] () -> () {
|
sil @top_level_code : $@thin () -> () {
|
||||||
entry:
|
entry:
|
||||||
%x = tuple ()
|
%x = tuple ()
|
||||||
return %x : $()
|
return %x : $()
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ entry(%c : $NonGenericInheritsGeneric):
|
|||||||
return %w : $Int
|
return %w : $Int
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @top_level_code : $[thin] () -> () {
|
sil @top_level_code : $@thin () -> () {
|
||||||
entry:
|
entry:
|
||||||
%v = tuple ()
|
%v = tuple ()
|
||||||
return %v : $()
|
return %v : $()
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ struct ComplexDynamic<U, V> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: define void @explode_complex_dynamic
|
// CHECK-LABEL: define void @explode_complex_dynamic
|
||||||
sil @explode_complex_dynamic : $<A, B> (ComplexDynamic<A, B>, [inout] Byteful, [inout] A, [inout] B, [inout] Chareth) -> () {
|
sil @explode_complex_dynamic : $<A, B> (ComplexDynamic<A, B>, @inout Byteful, @inout A, @inout B, @inout Chareth) -> () {
|
||||||
entry(%0 : $*ComplexDynamic<A, B>, %1 : $*Byteful, %2 : $*A, %3 : $*B, %4 : $*Chareth):
|
entry(%0 : $*ComplexDynamic<A, B>, %1 : $*Byteful, %2 : $*A, %3 : $*B, %4 : $*Chareth):
|
||||||
%a = struct_element_addr %0 : $*ComplexDynamic<A, B>, #a2
|
%a = struct_element_addr %0 : $*ComplexDynamic<A, B>, #a2
|
||||||
|
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ bb0:
|
|||||||
return %0 : $()
|
return %0 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @generic_tuple : $[thin] <T> (x : T) -> () {
|
sil @generic_tuple : $@thin <T> (x : T) -> () {
|
||||||
bb0(%x : $*T):
|
bb0(%x : $*T):
|
||||||
%y = alloc_stack $T
|
%y = alloc_stack $T
|
||||||
copy_addr %x to [initialization] %y#1 : $*T
|
copy_addr %x to [initialization] %y#1 : $*T
|
||||||
destroy_addr %y#1 : $*T
|
destroy_addr %y#1 : $*T
|
||||||
dealloc_stack %y#0 : $*[local_storage] T
|
dealloc_stack %y#0 : $*@local_storage T
|
||||||
destroy_addr %x : $*T
|
destroy_addr %x : $*T
|
||||||
%0 = tuple ()
|
%0 = tuple ()
|
||||||
return %0 : $()
|
return %0 : $()
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import Builtin
|
|||||||
|
|
||||||
// Various tests for SIL that doesn't happen to appear in dominance order.
|
// Various tests for SIL that doesn't happen to appear in dominance order.
|
||||||
|
|
||||||
sil @test0 : $[thin] () -> (Builtin.Int8) {
|
sil @test0 : $@thin () -> (Builtin.Int8) {
|
||||||
bb0:
|
bb0:
|
||||||
br bb1
|
br bb1
|
||||||
bb2:
|
bb2:
|
||||||
@@ -22,7 +22,7 @@ bb1:
|
|||||||
// CHECK: }
|
// CHECK: }
|
||||||
|
|
||||||
// Just don't crash on this one.
|
// Just don't crash on this one.
|
||||||
sil @test1 : $[thin] () -> (Builtin.Int8) {
|
sil @test1 : $@thin () -> (Builtin.Int8) {
|
||||||
bb0:
|
bb0:
|
||||||
br bb2
|
br bb2
|
||||||
bb1:
|
bb1:
|
||||||
@@ -32,7 +32,7 @@ bb2:
|
|||||||
return %0 : $Builtin.Int8
|
return %0 : $Builtin.Int8
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @top_level_code : $[thin] () -> () {
|
sil @top_level_code : $@thin () -> () {
|
||||||
%0 = tuple ()
|
%0 = tuple ()
|
||||||
%1 = return %0 : $()
|
%1 = return %0 : $()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,20 +14,20 @@ class [objc] ObjCClass {
|
|||||||
func method(x:Builtin.Int64) {}
|
func method(x:Builtin.Int64) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @_TCSo9ObjCClasscfMS_FT_S_ : $[cc(method), thin] ((), ObjCClass) -> ObjCClass {
|
sil @_TCSo9ObjCClasscfMS_FT_S_ : $@cc(method) @thin ((), ObjCClass) -> ObjCClass {
|
||||||
bb0(%0 : $ObjCClass):
|
bb0(%0 : $ObjCClass):
|
||||||
return %0 : $ObjCClass
|
return %0 : $ObjCClass
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @_TToCSo9ObjCClasscfMS_FT_S_ : $[cc(objc_method), thin] ((), ObjCClass) -> ObjCClass {
|
sil @_TToCSo9ObjCClasscfMS_FT_S_ : $@cc(objc_method) @thin ((), ObjCClass) -> ObjCClass {
|
||||||
bb0(%0 : $ObjCClass):
|
bb0(%0 : $ObjCClass):
|
||||||
// function_ref ObjectiveC.ObjCClass.constructor (ObjectiveC.ObjCClass.metatype)() -> ObjectiveC.ObjCClass
|
// function_ref ObjectiveC.ObjCClass.constructor (ObjectiveC.ObjCClass.metatype)() -> ObjectiveC.ObjCClass
|
||||||
%1 = function_ref @_TCSo9ObjCClasscfMS_FT_S_ : $[cc(method), thin] ((), ObjCClass) -> ObjCClass // user: %2
|
%1 = function_ref @_TCSo9ObjCClasscfMS_FT_S_ : $@cc(method) @thin ((), ObjCClass) -> ObjCClass // user: %2
|
||||||
%2 = apply %1(%0) : $[cc(method), thin] ((), ObjCClass) -> ObjCClass // user: %3
|
%2 = apply %1(%0) : $@cc(method) @thin ((), ObjCClass) -> ObjCClass // user: %3
|
||||||
return %2 : $ObjCClass
|
return %2 : $ObjCClass
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @_TToCSo9ObjCClass6methodfS_FT1xBi64__T_ : $[cc(objc_method), thin] ((x : Builtin.Int64), ObjCClass) -> () {
|
sil @_TToCSo9ObjCClass6methodfS_FT1xBi64__T_ : $@cc(objc_method) @thin ((x : Builtin.Int64), ObjCClass) -> () {
|
||||||
entry(%x : $Builtin.Int64, %c : $ObjCClass):
|
entry(%x : $Builtin.Int64, %c : $ObjCClass):
|
||||||
%v = tuple()
|
%v = tuple()
|
||||||
return %v : $()
|
return %v : $()
|
||||||
@@ -60,7 +60,7 @@ entry(%x : $Builtin.Int64, %c : $ObjCClass):
|
|||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
|
|
||||||
sil @indirect_partial_apply : $[thin] ((Builtin.Int64) -> (), Builtin.Int64) -> () -> () {
|
sil @indirect_partial_apply : $@thin ((Builtin.Int64) -> (), Builtin.Int64) -> () -> () {
|
||||||
entry(%f : $(Builtin.Int64) -> (), %x : $Builtin.Int64):
|
entry(%f : $(Builtin.Int64) -> (), %x : $Builtin.Int64):
|
||||||
%p = partial_apply %f(%x) : $(Builtin.Int64) -> ()
|
%p = partial_apply %f(%x) : $(Builtin.Int64) -> ()
|
||||||
return %p : $() -> ()
|
return %p : $() -> ()
|
||||||
@@ -85,14 +85,14 @@ entry(%f : $(Builtin.Int64) -> (), %x : $Builtin.Int64):
|
|||||||
// CHECK: ret void
|
// CHECK: ret void
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
|
|
||||||
sil @objc_partial_apply : $[thin] ObjCClass -> Builtin.Int64 -> () {
|
sil @objc_partial_apply : $@thin ObjCClass -> Builtin.Int64 -> () {
|
||||||
entry(%c : $ObjCClass):
|
entry(%c : $ObjCClass):
|
||||||
%m = class_method [volatile] %c : $ObjCClass, #ObjCClass.method!1.foreign : $[cc(objc_method), thin] ((x:Builtin.Int64), ObjCClass) -> ()
|
%m = class_method [volatile] %c : $ObjCClass, #ObjCClass.method!1.foreign : $@cc(objc_method) @thin ((x:Builtin.Int64), ObjCClass) -> ()
|
||||||
%p = partial_apply %m(%c) : $[cc(objc_method), thin] ((x:Builtin.Int64), ObjCClass) -> ()
|
%p = partial_apply %m(%c) : $@cc(objc_method) @thin ((x:Builtin.Int64), ObjCClass) -> ()
|
||||||
return %p : $Builtin.Int64 -> ()
|
return %p : $Builtin.Int64 -> ()
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @dummy : $[thin] Builtin.Int64 -> () {
|
sil @dummy : $@thin Builtin.Int64 -> () {
|
||||||
entry(%x : $Builtin.Int64):
|
entry(%x : $Builtin.Int64):
|
||||||
%v = tuple ()
|
%v = tuple ()
|
||||||
return %v : $()
|
return %v : $()
|
||||||
@@ -103,17 +103,17 @@ entry(%x : $Builtin.Int64):
|
|||||||
// CHECK: define internal void [[DYNAMIC_LOOKUP_BR_PARTIAL_APPLY_STUB]](i64, %swift.refcounted*) {
|
// CHECK: define internal void [[DYNAMIC_LOOKUP_BR_PARTIAL_APPLY_STUB]](i64, %swift.refcounted*) {
|
||||||
// CHECK: load i8** @"\01L_selector(method:)", align 8
|
// CHECK: load i8** @"\01L_selector(method:)", align 8
|
||||||
|
|
||||||
sil @dynamic_lookup_br_partial_apply : $[thin] Builtin.ObjCPointer -> Builtin.Int64 -> () {
|
sil @dynamic_lookup_br_partial_apply : $@thin Builtin.ObjCPointer -> Builtin.Int64 -> () {
|
||||||
entry(%o : $Builtin.ObjCPointer):
|
entry(%o : $Builtin.ObjCPointer):
|
||||||
dynamic_method_br %o : $Builtin.ObjCPointer, #ObjCClass.method!1.foreign, yes, no
|
dynamic_method_br %o : $Builtin.ObjCPointer, #ObjCClass.method!1.foreign, yes, no
|
||||||
|
|
||||||
yes(%m : $[cc(objc_method), thin] ((x:Builtin.Int64), Builtin.ObjCPointer) -> ()):
|
yes(%m : $@cc(objc_method) @thin ((x:Builtin.Int64), Builtin.ObjCPointer) -> ()):
|
||||||
%p = partial_apply %m(%o) : $[cc(objc_method), thin] ((x:Builtin.Int64), Builtin.ObjCPointer) -> ()
|
%p = partial_apply %m(%o) : $@cc(objc_method) @thin ((x:Builtin.Int64), Builtin.ObjCPointer) -> ()
|
||||||
br done(%p : $Builtin.Int64 -> ())
|
br done(%p : $Builtin.Int64 -> ())
|
||||||
|
|
||||||
no:
|
no:
|
||||||
%q = function_ref @dummy : $[thin] Builtin.Int64 -> ()
|
%q = function_ref @dummy : $@thin Builtin.Int64 -> ()
|
||||||
%r = thin_to_thick_function %q : $[thin] Builtin.Int64 -> () to $Builtin.Int64 -> ()
|
%r = thin_to_thick_function %q : $@thin Builtin.Int64 -> () to $Builtin.Int64 -> ()
|
||||||
br done(%r : $Builtin.Int64 -> ())
|
br done(%r : $Builtin.Int64 -> ())
|
||||||
|
|
||||||
done(%f : $Builtin.Int64 -> ()):
|
done(%f : $Builtin.Int64 -> ()):
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ struct A {
|
|||||||
var [unowned] x : C
|
var [unowned] x : C
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_weak_rr_class : $[thin] (ref : @sil_unowned C) -> () {
|
sil @test_weak_rr_class : $@thin (ref : @sil_unowned C) -> () {
|
||||||
bb0(%0 : $@sil_unowned C):
|
bb0(%0 : $@sil_unowned C):
|
||||||
%1 = unowned_retain %0 : $@sil_unowned C
|
%1 = unowned_retain %0 : $@sil_unowned C
|
||||||
%2 = unowned_release %0 : $@sil_unowned C
|
%2 = unowned_release %0 : $@sil_unowned C
|
||||||
@@ -28,7 +28,7 @@ bb0(%0 : $@sil_unowned C):
|
|||||||
// CHECK-NEXT: call void bitcast (void ([[REF]]*)* @swift_weakRelease to void ([[C]]*)*)([[C]]* %0)
|
// CHECK-NEXT: call void bitcast (void ([[REF]]*)* @swift_weakRelease to void ([[C]]*)*)([[C]]* %0)
|
||||||
// CHECK-NEXT: ret void
|
// CHECK-NEXT: ret void
|
||||||
|
|
||||||
sil @test_weak_rr_proto : $[thin] (ref : @sil_unowned P) -> () {
|
sil @test_weak_rr_proto : $@thin (ref : @sil_unowned P) -> () {
|
||||||
bb0(%0 : $@sil_unowned P):
|
bb0(%0 : $@sil_unowned P):
|
||||||
%1 = unowned_retain %0 : $@sil_unowned P
|
%1 = unowned_retain %0 : $@sil_unowned P
|
||||||
%2 = unowned_release %0 : $@sil_unowned P
|
%2 = unowned_release %0 : $@sil_unowned P
|
||||||
@@ -40,7 +40,7 @@ bb0(%0 : $@sil_unowned P):
|
|||||||
// CHECK: call void bitcast (void ([[REF]]*)* @swift_unknownWeakRelease to void ([[UNKNOWN]]*)*)([[UNKNOWN]]* %1)
|
// CHECK: call void bitcast (void ([[REF]]*)* @swift_unknownWeakRelease to void ([[UNKNOWN]]*)*)([[UNKNOWN]]* %1)
|
||||||
// CHECK-NEXT: ret void
|
// CHECK-NEXT: ret void
|
||||||
|
|
||||||
sil @top_level_code : $[thin] () -> () {
|
sil @top_level_code : $@thin () -> () {
|
||||||
%0 = tuple ()
|
%0 = tuple ()
|
||||||
%1 = return %0 : $()
|
%1 = return %0 : $()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ struct A {
|
|||||||
@weak var x : C?
|
@weak var x : C?
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_weak_load_store : $[thin] (val : [inout] A, v : C) -> () {
|
sil @test_weak_load_store : $@thin (val : @inout A, v : C) -> () {
|
||||||
bb0(%0 : $*A, %1 : $C):
|
bb0(%0 : $*A, %1 : $C):
|
||||||
%2 = struct_element_addr %0 : $*A, #x
|
%2 = struct_element_addr %0 : $*A, #x
|
||||||
%3 = load_weak %2 : $*@sil_weak C
|
%3 = load_weak %2 : $*@sil_weak C
|
||||||
@@ -40,7 +40,7 @@ struct B {
|
|||||||
var [weak] x : P?
|
var [weak] x : P?
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_weak_load_store_proto : $[thin] (val : [inout] B, ref : P) -> () {
|
sil @test_weak_load_store_proto : $@thin (val : @inout B, ref : P) -> () {
|
||||||
bb0(%0 : $*B, %1 : $P):
|
bb0(%0 : $*B, %1 : $P):
|
||||||
%2 = struct_element_addr %0 : $*B, #x
|
%2 = struct_element_addr %0 : $*B, #x
|
||||||
%3 = load_weak %2 : $*@sil_weak P
|
%3 = load_weak %2 : $*@sil_weak P
|
||||||
@@ -62,7 +62,7 @@ bb0(%0 : $*B, %1 : $P):
|
|||||||
// CHECK-NEXT: call void @objc_release([[UNKNOWN]]* [[T1]])
|
// CHECK-NEXT: call void @objc_release([[UNKNOWN]]* [[T1]])
|
||||||
// CHECK-NEXT: ret void
|
// CHECK-NEXT: ret void
|
||||||
|
|
||||||
sil @test_weak_alloc_stack : $[thin] (val : P) -> () {
|
sil @test_weak_alloc_stack : $@thin (val : P) -> () {
|
||||||
bb0(%0 : $P):
|
bb0(%0 : $P):
|
||||||
%1 = alloc_stack $@sil_weak P
|
%1 = alloc_stack $@sil_weak P
|
||||||
store_weak %0 to [initialization] %1#1 : $*@sil_weak P
|
store_weak %0 to [initialization] %1#1 : $*@sil_weak P
|
||||||
@@ -81,7 +81,7 @@ bb0(%0 : $P):
|
|||||||
// CHECK-NEXT: call void @swift_unknownWeakDestroy([[WEAK]]* [[T0]])
|
// CHECK-NEXT: call void @swift_unknownWeakDestroy([[WEAK]]* [[T0]])
|
||||||
// CHECK-NEXT: ret void
|
// CHECK-NEXT: ret void
|
||||||
|
|
||||||
sil @top_level_code : $[thin] () -> () {
|
sil @top_level_code : $@thin () -> () {
|
||||||
%0 = tuple ()
|
%0 = tuple ()
|
||||||
%1 = return %0 : $()
|
%1 = return %0 : $()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ sil @named_tuple : $() -> (x: Builtin.Int64, Builtin.Int64) {
|
|||||||
%10 = return %9 : $(x: Builtin.Int64, Builtin.Int64)
|
%10 = return %9 : $(x: Builtin.Int64, Builtin.Int64)
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @return_int : $@thin (a: Int64) -> Int64 { // CHECK: $[thin] (a: Int64) -> Int64 {
|
sil @return_int : $@thin (a: Int64) -> Int64 { // CHECK: $@thin (a: Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64): // CHECK: bb0(%0 : $Int64):
|
bb0(%0 : $Int64): // CHECK: bb0(%0 : $Int64):
|
||||||
%1 = alloc_stack $Int64 // CHECK: alloc_stack $Int64
|
%1 = alloc_stack $Int64 // CHECK: alloc_stack $Int64
|
||||||
store %0 to %1#1 : $*Int64 // CHECK: store %0 to %1#1 : $*Int64
|
store %0 to %1#1 : $*Int64 // CHECK: store %0 to %1#1 : $*Int64
|
||||||
@@ -89,7 +89,7 @@ bb0(%0 : $() -> Int64):
|
|||||||
|
|
||||||
sil @return_constant : $@thin () -> Int64 { // CHECK-LABEL: @return_constant
|
sil @return_constant : $@thin () -> Int64 { // CHECK-LABEL: @return_constant
|
||||||
bb0: // CHECK: bb0:
|
bb0: // CHECK: bb0:
|
||||||
// CHECK: function_ref @_TSi25convertFromIntegerLiteralfMSiFT3valBi64__Si : $[thin] ((val: Builtin.Int64), Int64.metatype) -> Int64
|
// CHECK: function_ref @_TSi25convertFromIntegerLiteralfMSiFT3valBi64__Si : $@thin ((val: Builtin.Int64), Int64.metatype) -> Int64
|
||||||
%1 = function_ref @_TSi25convertFromIntegerLiteralfMSiFT3valBi64__Si : $@thin ((val: Builtin.Int64), Int64.metatype) -> Int64
|
%1 = function_ref @_TSi25convertFromIntegerLiteralfMSiFT3valBi64__Si : $@thin ((val: Builtin.Int64), Int64.metatype) -> Int64
|
||||||
|
|
||||||
// CHECK: metatype $Int64.metatype
|
// CHECK: metatype $Int64.metatype
|
||||||
@@ -108,7 +108,7 @@ sil @_TSi25convertFromIntegerLiteralfMSiFT3valBi64__Si : $@thin ((val: Builtin.I
|
|||||||
|
|
||||||
// Parse SIL generated from the following swift program:
|
// Parse SIL generated from the following swift program:
|
||||||
// func x(a : Bool) -> Int { if a { return 4 } else {return 5} }
|
// func x(a : Bool) -> Int { if a { return 4 } else {return 5} }
|
||||||
sil @_TSb13getLogicValuefRSbFT_Bi1_ : $@cc(method) @thin ((), [inout] Bool) -> Builtin.Int1
|
sil @_TSb13getLogicValuefRSbFT_Bi1_ : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
sil @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
sil @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
|
|
||||||
// CHECK-LABEL: @_T4test1xFT1aSb_Si
|
// CHECK-LABEL: @_T4test1xFT1aSb_Si
|
||||||
@@ -119,16 +119,16 @@ bb0(%0 : $Bool):
|
|||||||
%1 = alloc_stack $Bool
|
%1 = alloc_stack $Bool
|
||||||
// CHECK: store
|
// CHECK: store
|
||||||
%2 = store %0 to %1#1 : $*Bool
|
%2 = store %0 to %1#1 : $*Bool
|
||||||
// CHECK: function_ref @_TSb13getLogicValuefRSbFT_Bi1_ : $[cc(method), thin] ((), [inout] Bool) -> Builtin.Int1
|
// CHECK: function_ref @_TSb13getLogicValuefRSbFT_Bi1_ : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
%3 = function_ref @_TSb13getLogicValuefRSbFT_Bi1_ : $@cc(method) @thin ((), [inout] Bool) -> Builtin.Int1
|
%3 = function_ref @_TSb13getLogicValuefRSbFT_Bi1_ : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
// CHECK: apply
|
// CHECK: apply
|
||||||
%4 = apply %3(%1#1) : $@cc(method) @thin ((), [inout] Bool) -> Builtin.Int1
|
%4 = apply %3(%1#1) : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
// CHECK: cond_br
|
// CHECK: cond_br
|
||||||
%5 = cond_br %4, bb1, bb2
|
%5 = cond_br %4, bb1, bb2
|
||||||
|
|
||||||
// CHECK: bb1:
|
// CHECK: bb1:
|
||||||
bb1:
|
bb1:
|
||||||
// CHECK: function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
// CHECK: function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%6 = function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%6 = function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
// CHECK: metatype $Int64.metatype
|
// CHECK: metatype $Int64.metatype
|
||||||
%7 = metatype $Int64.metatype
|
%7 = metatype $Int64.metatype
|
||||||
@@ -143,7 +143,7 @@ bb1:
|
|||||||
|
|
||||||
// CHECK: bb2:
|
// CHECK: bb2:
|
||||||
bb2:
|
bb2:
|
||||||
// CHECK: function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
// CHECK: function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%12 = function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%12 = function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
// CHECK: metatype $Int64.metatype
|
// CHECK: metatype $Int64.metatype
|
||||||
%13 = metatype $Int64.metatype
|
%13 = metatype $Int64.metatype
|
||||||
@@ -171,9 +171,9 @@ bb0(%0 : $*P):
|
|||||||
%1 = project_existential %0 : $*P to $*@sil_self P // CHECK: project_existential %0
|
%1 = project_existential %0 : $*P to $*@sil_self P // CHECK: project_existential %0
|
||||||
|
|
||||||
// CHECK: protocol_method {{.*}} : $*P, #P.doIt!1
|
// CHECK: protocol_method {{.*}} : $*P, #P.doIt!1
|
||||||
%2 = protocol_method %0 : $*P, #P.doIt!1 : $@cc(method) ((), [inout] @sil_self P) -> ()
|
%2 = protocol_method %0 : $*P, #P.doIt!1 : $@cc(method) ((), @inout @sil_self P) -> ()
|
||||||
// CHECK: apply
|
// CHECK: apply
|
||||||
%3 = apply %2(%1) : $@cc(method) ((), [inout] @sil_self P) -> ()
|
%3 = apply %2(%1) : $@cc(method) ((), @inout @sil_self P) -> ()
|
||||||
%4 = tuple () // CHECK: tuple ()
|
%4 = tuple () // CHECK: tuple ()
|
||||||
%5 = destroy_addr %0 : $*P // CHECK: destroy_addr %0 : $*P
|
%5 = destroy_addr %0 : $*P // CHECK: destroy_addr %0 : $*P
|
||||||
%6 = return %4 : $() // CHECK: return
|
%6 = return %4 : $() // CHECK: return
|
||||||
@@ -232,16 +232,16 @@ protocol Runcible {
|
|||||||
static func static_method()
|
static func static_method()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: $[thin] <T : Runcible> (x: T) -> ()
|
// CHECK: $@thin <T : Runcible> (x: T) -> ()
|
||||||
sil @_T4arch20archetype_member_refUS_8Runcible___FT1xQ__T_ : $@thin <T : Runcible> (x: T) -> () {
|
sil @_T4arch20archetype_member_refUS_8Runcible___FT1xQ__T_ : $@thin <T : Runcible> (x: T) -> () {
|
||||||
bb0(%0 : $*T):
|
bb0(%0 : $*T):
|
||||||
// CHECK: archetype_method $*T, #Runcible.free_method!1
|
// CHECK: archetype_method $*T, #Runcible.free_method!1
|
||||||
%1 = archetype_method $*T, #Runcible.free_method!1 : $@cc(method) ((), [inout] T) -> Int64
|
%1 = archetype_method $*T, #Runcible.free_method!1 : $@cc(method) ((), @inout T) -> Int64
|
||||||
%2 = apply %1(%0) : $@cc(method) ((), [inout] T) -> Int64
|
%2 = apply %1(%0) : $@cc(method) ((), @inout T) -> Int64
|
||||||
%3 = alloc_stack $T.U.metatype
|
%3 = alloc_stack $T.U.metatype
|
||||||
// CHECK: archetype_method $*T, #Runcible.associated_method!1
|
// CHECK: archetype_method $*T, #Runcible.associated_method!1
|
||||||
%4 = archetype_method $*T, #Runcible.associated_method!1 : $@cc(method) ((), [inout] T) -> T.U.metatype
|
%4 = archetype_method $*T, #Runcible.associated_method!1 : $@cc(method) ((), @inout T) -> T.U.metatype
|
||||||
%5 = apply %4(%0) : $@cc(method) ((), [inout] T) -> T.U.metatype
|
%5 = apply %4(%0) : $@cc(method) ((), @inout T) -> T.U.metatype
|
||||||
%6 = store %5 to %3#1 : $*T.U.metatype
|
%6 = store %5 to %3#1 : $*T.U.metatype
|
||||||
%7 = metatype $T.metatype
|
%7 = metatype $T.metatype
|
||||||
// CHECK: archetype_method [volatile] $*T, #Runcible.static_method!1
|
// CHECK: archetype_method [volatile] $*T, #Runcible.static_method!1
|
||||||
@@ -255,7 +255,7 @@ bb0(%0 : $*T):
|
|||||||
|
|
||||||
protocol Bendable { }
|
protocol Bendable { }
|
||||||
|
|
||||||
// CHECK: $[thin] (x: protocol<Bendable, Runcible>) -> Runcible
|
// CHECK: $@thin (x: protocol<Bendable, Runcible>) -> Runcible
|
||||||
sil @_T4todo18erasure_from_protoFT1xPS_8RuncibleS_8Bendable__PS0__ : $@thin (x: protocol<Bendable, Runcible>) -> Runcible {
|
sil @_T4todo18erasure_from_protoFT1xPS_8RuncibleS_8Bendable__PS0__ : $@thin (x: protocol<Bendable, Runcible>) -> Runcible {
|
||||||
bb0(%0 : $*Runcible, %1 : $*protocol<Bendable, Runcible>):
|
bb0(%0 : $*Runcible, %1 : $*protocol<Bendable, Runcible>):
|
||||||
// CHECK: alloc_box
|
// CHECK: alloc_box
|
||||||
@@ -283,7 +283,7 @@ protocol [class_protocol] ClassBound {
|
|||||||
func classBoundMethod()
|
func classBoundMethod()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: $[thin] (x: ClassBound) -> ()
|
// CHECK: $@thin (x: ClassBound) -> ()
|
||||||
sil @_T4todo18class_bound_methodFT1xPS_10ClassBound__T_ : $@thin (x: ClassBound) -> () {
|
sil @_T4todo18class_bound_methodFT1xPS_10ClassBound__T_ : $@thin (x: ClassBound) -> () {
|
||||||
bb0(%0 : $ClassBound):
|
bb0(%0 : $ClassBound):
|
||||||
%1 = alloc_box $ClassBound // CHECK: alloc_box
|
%1 = alloc_box $ClassBound // CHECK: alloc_box
|
||||||
@@ -303,7 +303,7 @@ bb0(%0 : $ClassBound):
|
|||||||
struct Val {
|
struct Val {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: $[thin] ((), Val.metatype) -> Val
|
// CHECK: $@thin ((), Val.metatype) -> Val
|
||||||
sil @_TV4todo3ValCfMS0_FT_S0_ : $@thin ((), Val.metatype) -> Val {
|
sil @_TV4todo3ValCfMS0_FT_S0_ : $@thin ((), Val.metatype) -> Val {
|
||||||
bb0(%0 : $Val.metatype):
|
bb0(%0 : $Val.metatype):
|
||||||
%1 = alloc_stack $Val // CHECK: alloc_stack
|
%1 = alloc_stack $Val // CHECK: alloc_stack
|
||||||
@@ -321,7 +321,7 @@ struct Aleph {
|
|||||||
var b:Val
|
var b:Val
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: $[thin] ((a: Ref, b: Val), Aleph.metatype) -> Aleph
|
// CHECK: $@thin ((a: Ref, b: Val), Aleph.metatype) -> Aleph
|
||||||
sil @_TV6struct5AlephCfMS0_FT1aCS_3Ref1bVS_3Val_S0_ : $@thin ((a: Ref, b: Val), Aleph.metatype) -> Aleph {
|
sil @_TV6struct5AlephCfMS0_FT1aCS_3Ref1bVS_3Val_S0_ : $@thin ((a: Ref, b: Val), Aleph.metatype) -> Aleph {
|
||||||
bb0(%0 : $Ref, %1 : $Val, %2 : $Aleph.metatype):
|
bb0(%0 : $Ref, %1 : $Val, %2 : $Aleph.metatype):
|
||||||
// CHECK: struct $Aleph ({{%.*}} : $Ref, {{%.*}} : $Val)
|
// CHECK: struct $Aleph ({{%.*}} : $Ref, {{%.*}} : $Val)
|
||||||
@@ -329,7 +329,7 @@ bb0(%0 : $Ref, %1 : $Val, %2 : $Aleph.metatype):
|
|||||||
%4 = return %3 : $Aleph // CHECK: return
|
%4 = return %3 : $Aleph // CHECK: return
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: $[thin] ((), Aleph.metatype) -> Aleph
|
// CHECK: $@thin ((), Aleph.metatype) -> Aleph
|
||||||
sil @_TV6struct5AlephCfMS0_FT_S0_ : $@thin ((), Aleph.metatype) -> Aleph {
|
sil @_TV6struct5AlephCfMS0_FT_S0_ : $@thin ((), Aleph.metatype) -> Aleph {
|
||||||
bb0(%0 : $Aleph.metatype):
|
bb0(%0 : $Aleph.metatype):
|
||||||
%1 = tuple ()
|
%1 = tuple ()
|
||||||
@@ -399,7 +399,7 @@ bb0(%0 : $*Gimel, %1 : $*Q):
|
|||||||
sil @_T5tuple5floatFT1xSf_T_ : $@thin (x : Float32) -> ()
|
sil @_T5tuple5floatFT1xSf_T_ : $@thin (x : Float32) -> ()
|
||||||
sil @_T5tuple5tupleFT_TSiSf_ : $@thin () -> (Int64, Float32)
|
sil @_T5tuple5tupleFT_TSiSf_ : $@thin () -> (Int64, Float32)
|
||||||
|
|
||||||
// CHECK: $[thin] (x: (Int64, Float32)) -> ()
|
// CHECK: $@thin (x: (Int64, Float32)) -> ()
|
||||||
sil @_T5tuple13tuple_elementFT1xTSiSf__T_ : $@thin (x: (Int64, Float32)) -> () {
|
sil @_T5tuple13tuple_elementFT1xTSiSf__T_ : $@thin (x: (Int64, Float32)) -> () {
|
||||||
bb0(%0 : $Int64, %1 : $Float32):
|
bb0(%0 : $Int64, %1 : $Float32):
|
||||||
%2 = alloc_box $(Int64, Float32)
|
%2 = alloc_box $(Int64, Float32)
|
||||||
@@ -433,7 +433,7 @@ class M {
|
|||||||
var member: Int
|
var member: Int
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: $[cc(method), thin] ((x: Int64), M) -> ()
|
// CHECK: $@cc(method) @thin ((x: Int64), M) -> ()
|
||||||
sil @_TC3ref1C3foofS0_FT1xSi_T_ : $@cc(method) @thin ((x: Int64), M) -> () {
|
sil @_TC3ref1C3foofS0_FT1xSi_T_ : $@cc(method) @thin ((x: Int64), M) -> () {
|
||||||
bb0(%0 : $Int64, %1 : $M):
|
bb0(%0 : $Int64, %1 : $M):
|
||||||
%2 = alloc_box $Int64 // CHECK: alloc_box $Int64
|
%2 = alloc_box $Int64 // CHECK: alloc_box $Int64
|
||||||
@@ -457,8 +457,8 @@ class GenericClass<Q> {
|
|||||||
var member: Q
|
var member: Q
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: sil @bound_generic_class_ref_element_addr : $[thin] GenericClass<Int64> -> Int64 {
|
// CHECK: sil @bound_generic_class_ref_element_addr : $@thin GenericClass<Int64> -> Int64 {
|
||||||
sil @bound_generic_class_ref_element_addr : $[thin] GenericClass<Int64> -> Int64 {
|
sil @bound_generic_class_ref_element_addr : $@thin GenericClass<Int64> -> Int64 {
|
||||||
entry(%0 : $GenericClass<Int64>):
|
entry(%0 : $GenericClass<Int64>):
|
||||||
// CHECK: %1 = ref_element_addr %0 : $GenericClass<Int64>, #member
|
// CHECK: %1 = ref_element_addr %0 : $GenericClass<Int64>, #member
|
||||||
%1 = ref_element_addr %0 : $GenericClass<Int64>, #member
|
%1 = ref_element_addr %0 : $GenericClass<Int64>, #member
|
||||||
@@ -470,7 +470,7 @@ entry(%0 : $GenericClass<Int64>):
|
|||||||
class B { }
|
class B { }
|
||||||
class E : B { }
|
class E : B { }
|
||||||
|
|
||||||
// CHECK: $[thin] (b: B) -> Builtin.Int1
|
// CHECK: $@thin (b: B) -> Builtin.Int1
|
||||||
sil @_T4null3isaFT1bCS_1B_Sb : $@thin (b: B) -> Builtin.Int1 {
|
sil @_T4null3isaFT1bCS_1B_Sb : $@thin (b: B) -> Builtin.Int1 {
|
||||||
bb0(%0 : $B):
|
bb0(%0 : $B):
|
||||||
%1 = alloc_box $B // CHECK: alloc_box
|
%1 = alloc_box $B // CHECK: alloc_box
|
||||||
@@ -493,7 +493,7 @@ isa(%6 : $Builtin.Int1):
|
|||||||
sil @_TSd31_convertFromBuiltinFloatLiteralfMSdFT5valueBf64__Sd : $@thin ((value: Builtin.FPIEEE64), Float64.metatype) -> Float64
|
sil @_TSd31_convertFromBuiltinFloatLiteralfMSdFT5valueBf64__Sd : $@thin ((value: Builtin.FPIEEE64), Float64.metatype) -> Float64
|
||||||
sil @_TSS32_convertFromBuiltinStringLiteralfMSSFT5valueBp8byteSizeBi64_7isASCIIBi1__SS : $@thin ((value: Builtin.RawPointer, byteSize: Builtin.Int64, isASCII: Builtin.Int1), String.metatype) -> String
|
sil @_TSS32_convertFromBuiltinStringLiteralfMSSFT5valueBp8byteSizeBi64_7isASCIIBi1__SS : $@thin ((value: Builtin.RawPointer, byteSize: Builtin.Int64, isASCII: Builtin.Int1), String.metatype) -> String
|
||||||
|
|
||||||
// CHECK: $[thin] () -> ()
|
// CHECK: $@thin () -> ()
|
||||||
sil @_T7literal8literalsFT_T_ : $@thin () -> () {
|
sil @_T7literal8literalsFT_T_ : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = tuple ()
|
%0 = tuple ()
|
||||||
@@ -690,10 +690,10 @@ bb0(%0 : $Bas):
|
|||||||
%5 = struct_extract %3 : $String, #str_value
|
%5 = struct_extract %3 : $String, #str_value
|
||||||
%6 = struct_extract %5 : $StringByteData, #owner
|
%6 = struct_extract %5 : $StringByteData, #owner
|
||||||
strong_retain %6 : $Builtin.ObjectPointer
|
strong_retain %6 : $Builtin.ObjectPointer
|
||||||
%8 = function_ref @swift_StringToNSString : $@thin (string: [inout] String) -> NSString
|
%8 = function_ref @swift_StringToNSString : $@thin (string: @inout String) -> NSString
|
||||||
%9 = alloc_stack $String
|
%9 = alloc_stack $String
|
||||||
store %3 to %9#1 : $*String
|
store %3 to %9#1 : $*String
|
||||||
%11 = apply %8(%9#1) : $@thin (string: [inout] String) -> NSString
|
%11 = apply %8(%9#1) : $@thin (string: @inout String) -> NSString
|
||||||
dealloc_stack %9#0 : $*@local_storage String
|
dealloc_stack %9#0 : $*@local_storage String
|
||||||
%13 = struct_extract %3 : $String, #str_value
|
%13 = struct_extract %3 : $String, #str_value
|
||||||
%14 = struct_extract %13 : $StringByteData, #owner
|
%14 = struct_extract %13 : $StringByteData, #owner
|
||||||
@@ -701,7 +701,7 @@ bb0(%0 : $Bas):
|
|||||||
// CHECK: autorelease_return %11 : $NSString
|
// CHECK: autorelease_return %11 : $NSString
|
||||||
autorelease_return %11 : $NSString
|
autorelease_return %11 : $NSString
|
||||||
}
|
}
|
||||||
sil @swift_StringToNSString : $@thin (string: [inout] String) -> NSString
|
sil @swift_StringToNSString : $@thin (string: @inout String) -> NSString
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_super_method
|
// CHECK-LABEL: sil @test_super_method
|
||||||
sil @test_super_method : $@cc(method) @thin ((), Bas) -> Bas {
|
sil @test_super_method : $@cc(method) @thin ((), Bas) -> Bas {
|
||||||
@@ -748,7 +748,7 @@ bb0(%0 : $Builtin.Int1, %1 : $Builtin.Int1):
|
|||||||
store %0 to %2#1 : $*Builtin.Int1
|
store %0 to %2#1 : $*Builtin.Int1
|
||||||
store %1 to %3#1 : $*Builtin.Int1
|
store %1 to %3#1 : $*Builtin.Int1
|
||||||
%6 = module #Builtin // CHECK: module #Builtin
|
%6 = module #Builtin // CHECK: module #Builtin
|
||||||
// CHECK: builtin_function_ref #Builtin.cmp_eq_Int1 : $[thin] (Builtin.Int1, Builtin.Int1) -> Builtin.Int1
|
// CHECK: builtin_function_ref #Builtin.cmp_eq_Int1 : $@thin (Builtin.Int1, Builtin.Int1) -> Builtin.Int1
|
||||||
%7 = builtin_function_ref #Builtin.cmp_eq_Int1 : $@thin (Builtin.Int1, Builtin.Int1) -> Builtin.Int1
|
%7 = builtin_function_ref #Builtin.cmp_eq_Int1 : $@thin (Builtin.Int1, Builtin.Int1) -> Builtin.Int1
|
||||||
%8 = load %2#1 : $*Builtin.Int1
|
%8 = load %2#1 : $*Builtin.Int1
|
||||||
%9 = load %3#1 : $*Builtin.Int1
|
%9 = load %3#1 : $*Builtin.Int1
|
||||||
@@ -780,16 +780,16 @@ bb0:
|
|||||||
|
|
||||||
// CHECK-LABEL: closure_test
|
// CHECK-LABEL: closure_test
|
||||||
sil @takes_closure : $@thin (x : () -> ()) -> ()
|
sil @takes_closure : $@thin (x : () -> ()) -> ()
|
||||||
sil @closure0 : $@thin ((), (Builtin.ObjectPointer, [inout] Int64)) -> ()
|
sil @closure0 : $@thin ((), (Builtin.ObjectPointer, @inout Int64)) -> ()
|
||||||
|
|
||||||
sil @closure_test : $@thin () -> () {
|
sil @closure_test : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = alloc_box $Int64 // users: %10, %8, %8, %7, %4
|
%0 = alloc_box $Int64 // users: %10, %8, %8, %7, %4
|
||||||
|
|
||||||
%5 = function_ref @takes_closure : $@thin (x : () -> ()) -> ()
|
%5 = function_ref @takes_closure : $@thin (x : () -> ()) -> ()
|
||||||
%6 = function_ref @closure0 : $@thin ((), (Builtin.ObjectPointer, [inout] Int64)) -> ()
|
%6 = function_ref @closure0 : $@thin ((), (Builtin.ObjectPointer, @inout Int64)) -> ()
|
||||||
strong_retain %0#0 : $Builtin.ObjectPointer
|
strong_retain %0#0 : $Builtin.ObjectPointer
|
||||||
%8 = partial_apply %6(%0#0, %0#1) : $@thin ((), (Builtin.ObjectPointer, [inout] Int64)) -> ()
|
%8 = partial_apply %6(%0#0, %0#1) : $@thin ((), (Builtin.ObjectPointer, @inout Int64)) -> ()
|
||||||
%9 = apply %5(%8) : $@thin (x : () -> ()) -> ()
|
%9 = apply %5(%8) : $@thin (x : () -> ()) -> ()
|
||||||
strong_release %0#0 : $Builtin.ObjectPointer
|
strong_release %0#0 : $Builtin.ObjectPointer
|
||||||
|
|
||||||
@@ -842,7 +842,7 @@ sil @_T6switch1aFT_T_ : $@thin () -> ()
|
|||||||
sil @_T6switch1bFT_T_ : $@thin () -> ()
|
sil @_T6switch1bFT_T_ : $@thin () -> ()
|
||||||
sil @_T6switch1cFT_T_ : $@thin () -> ()
|
sil @_T6switch1cFT_T_ : $@thin () -> ()
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_switch_union : $[thin] (u: MaybePair) -> ()
|
// CHECK-LABEL: sil @test_switch_union : $@thin (u: MaybePair) -> ()
|
||||||
sil @test_switch_union : $@thin (u: MaybePair) -> () {
|
sil @test_switch_union : $@thin (u: MaybePair) -> () {
|
||||||
bb0(%0 : $MaybePair):
|
bb0(%0 : $MaybePair):
|
||||||
%1 = alloc_box $MaybePair
|
%1 = alloc_box $MaybePair
|
||||||
@@ -881,7 +881,7 @@ enum MaybeAddressOnlyPair {
|
|||||||
case Left(Q)
|
case Left(Q)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_switch_union_addr : $[thin] (u: MaybeAddressOnlyPair) -> ()
|
// CHECK-LABEL: sil @test_switch_union_addr : $@thin (u: MaybeAddressOnlyPair) -> ()
|
||||||
sil @test_switch_union_addr : $@thin (u: MaybeAddressOnlyPair) -> () {
|
sil @test_switch_union_addr : $@thin (u: MaybeAddressOnlyPair) -> () {
|
||||||
bb0(%0 : $*MaybeAddressOnlyPair):
|
bb0(%0 : $*MaybeAddressOnlyPair):
|
||||||
// CHECK: destructive_switch_enum_addr %{{.*}} : $*MaybeAddressOnlyPair, case #MaybeAddressOnlyPair.Neither!enumelt: bb{{.*}}, case #MaybeAddressOnlyPair.Left!enumelt.1: bb
|
// CHECK: destructive_switch_enum_addr %{{.*}} : $*MaybeAddressOnlyPair, case #MaybeAddressOnlyPair.Neither!enumelt: bb{{.*}}, case #MaybeAddressOnlyPair.Left!enumelt.1: bb
|
||||||
@@ -898,7 +898,7 @@ bb3:
|
|||||||
return %t : $()
|
return %t : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_switch_int : $[thin] (u: Builtin.Int64) -> ()
|
// CHECK-LABEL: sil @test_switch_int : $@thin (u: Builtin.Int64) -> ()
|
||||||
sil @test_switch_int : $@thin (u: Builtin.Int64) -> () {
|
sil @test_switch_int : $@thin (u: Builtin.Int64) -> () {
|
||||||
bb0(%0 : $Builtin.Int64):
|
bb0(%0 : $Builtin.Int64):
|
||||||
// CHECK: switch_int %{{.*}} : $Builtin.Int64, case 1: bb1, case 2: bb2
|
// CHECK: switch_int %{{.*}} : $Builtin.Int64, case 1: bb1, case 2: bb2
|
||||||
@@ -924,7 +924,7 @@ class ConcreteClass : ClassP {
|
|||||||
struct Spoon : Bendable {
|
struct Spoon : Bendable {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_init_existential : $[thin] (x: Spoon) -> Bendable
|
// CHECK-LABEL: sil @test_init_existential : $@thin (x: Spoon) -> Bendable
|
||||||
sil @test_init_existential : $@thin (x: Spoon) -> Bendable {
|
sil @test_init_existential : $@thin (x: Spoon) -> Bendable {
|
||||||
bb0(%0 : $*Bendable, %1 : $Spoon):
|
bb0(%0 : $*Bendable, %1 : $Spoon):
|
||||||
%2 = alloc_box $Spoon
|
%2 = alloc_box $Spoon
|
||||||
@@ -940,7 +940,7 @@ bb0(%0 : $*Bendable, %1 : $Spoon):
|
|||||||
return %8 : $()
|
return %8 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_existential_ref : $[thin] (x: ConcreteClass) -> ClassP
|
// CHECK-LABEL: sil @test_existential_ref : $@thin (x: ConcreteClass) -> ClassP
|
||||||
sil @test_existential_ref : $@thin (x : ConcreteClass) -> ClassP {
|
sil @test_existential_ref : $@thin (x : ConcreteClass) -> ClassP {
|
||||||
bb0(%0 : $ConcreteClass):
|
bb0(%0 : $ConcreteClass):
|
||||||
%1 = alloc_box $ConcreteClass
|
%1 = alloc_box $ConcreteClass
|
||||||
@@ -953,32 +953,32 @@ bb0(%0 : $ConcreteClass):
|
|||||||
return %5 : $ClassP
|
return %5 : $ClassP
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_assign : $(x: Int64, y: [inout] Int64) -> () { // CHECK-LABEL: sil @test_assign
|
sil @test_assign : $(x: Int64, y: @inout Int64) -> () { // CHECK-LABEL: sil @test_assign
|
||||||
bb0(%0 : $Int64, %1 : $*Int64):
|
bb0(%0 : $Int64, %1 : $*Int64):
|
||||||
assign %0 to %1 : $*Int64 // CHECK: assign %0 to %1
|
assign %0 to %1 : $*Int64 // CHECK: assign %0 to %1
|
||||||
unreachable
|
unreachable
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_transparent : $[thin] () -> () {
|
// CHECK-LABEL: sil @test_transparent : $@thin () -> () {
|
||||||
sil @test_transparent : $@thin () -> () {
|
sil @test_transparent : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = function_ref @classes : $@thin () -> ()
|
%0 = function_ref @classes : $@thin () -> ()
|
||||||
// CHECK: apply [transparent] %{{.*}}() : $[thin] () -> ()
|
// CHECK: apply [transparent] %{{.*}}() : $@thin () -> ()
|
||||||
%1 = apply [transparent] %0() : $@thin () -> ()
|
%1 = apply [transparent] %0() : $@thin () -> ()
|
||||||
%2 = tuple ()
|
%2 = tuple ()
|
||||||
%3 = return %2 : $()
|
%3 = return %2 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @takes_unnamed_closure : $[thin] (() -> Int64) -> () -> () -> Int64
|
// CHECK-LABEL: sil @takes_unnamed_closure : $@thin (() -> Int64) -> () -> () -> Int64
|
||||||
sil @takes_unnamed_closure : $@thin (() -> Int64) -> () -> () -> Int64
|
sil @takes_unnamed_closure : $@thin (() -> Int64) -> () -> () -> Int64
|
||||||
|
|
||||||
sil @takes_int64_float32 : $@thin (Int64, Float32) -> ()
|
sil @takes_int64_float32 : $@thin (Int64, Float32) -> ()
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_partial_apply : $[thin] Float32 -> Int64 -> () {
|
// CHECK-LABEL: sil @test_partial_apply : $@thin Float32 -> Int64 -> () {
|
||||||
sil @test_partial_apply : $@thin Float32 -> Int64 -> () {
|
sil @test_partial_apply : $@thin Float32 -> Int64 -> () {
|
||||||
bb0(%0 : $Float32):
|
bb0(%0 : $Float32):
|
||||||
%1 = function_ref @takes_int64_float32 : $@thin (Int64, Float32) -> ()
|
%1 = function_ref @takes_int64_float32 : $@thin (Int64, Float32) -> ()
|
||||||
// CHECK: partial_apply %{{.*}}(%{{.*}}) : $[thin] (Int64, Float32) -> ()
|
// CHECK: partial_apply %{{.*}}(%{{.*}}) : $@thin (Int64, Float32) -> ()
|
||||||
%2 = partial_apply %1(%0) : $@thin (Int64, Float32) -> ()
|
%2 = partial_apply %1(%0) : $@thin (Int64, Float32) -> ()
|
||||||
%3 = return %2 : $Int64 -> ()
|
%3 = return %2 : $Int64 -> ()
|
||||||
}
|
}
|
||||||
@@ -987,7 +987,7 @@ class X {
|
|||||||
func [objc] f() { }
|
func [objc] f() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_dynamic_lookup_br : $[thin] (obj: DynamicLookup) -> ()
|
// CHECK-LABEL: sil @test_dynamic_lookup_br : $@thin (obj: DynamicLookup) -> ()
|
||||||
sil @test_dynamic_lookup_br : $@thin (obj: DynamicLookup) -> () {
|
sil @test_dynamic_lookup_br : $@thin (obj: DynamicLookup) -> () {
|
||||||
bb0(%0 : $DynamicLookup):
|
bb0(%0 : $DynamicLookup):
|
||||||
%1 = alloc_box $DynamicLookup
|
%1 = alloc_box $DynamicLookup
|
||||||
|
|||||||
@@ -90,15 +90,15 @@ bb1(%0 : $Int64):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
sil @callee : $[thin] (a : [inout] Int64) -> ()
|
sil @callee : $@thin (a : @inout Int64) -> ()
|
||||||
|
|
||||||
// CHECK-LABEL: sil @inout_nocapture
|
// CHECK-LABEL: sil @inout_nocapture
|
||||||
sil @inout_nocapture : $[thin] () -> Int64 {
|
sil @inout_nocapture : $@thin () -> Int64 {
|
||||||
bb0:
|
bb0:
|
||||||
// CHECK: alloc_stack
|
// CHECK: alloc_stack
|
||||||
%1 = alloc_box $Int64
|
%1 = alloc_box $Int64
|
||||||
%6 = function_ref @callee : $[thin] (a : [inout] Int64) -> ()
|
%6 = function_ref @callee : $@thin (a : @inout Int64) -> ()
|
||||||
%7 = apply %6(%1#1) : $[thin] (a : [inout] Int64) -> ()
|
%7 = apply %6(%1#1) : $@thin (a : @inout Int64) -> ()
|
||||||
%8 = load %1#1 : $*Int64
|
%8 = load %1#1 : $*Int64
|
||||||
%9 = strong_release %1#0 : $Builtin.ObjectPointer
|
%9 = strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
%10 = return %8 : $Int64
|
%10 = return %8 : $Int64
|
||||||
@@ -109,15 +109,15 @@ bb0:
|
|||||||
protocol P {
|
protocol P {
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @returns_protocol : $[thin] () -> P
|
sil @returns_protocol : $@thin () -> P
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_indirect_return
|
// CHECK-LABEL: sil @test_indirect_return
|
||||||
sil @test_indirect_return : $[thin] () -> () {
|
sil @test_indirect_return : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
// CHECK: alloc_stack
|
// CHECK: alloc_stack
|
||||||
%1 = function_ref @returns_protocol : $[thin] () -> P
|
%1 = function_ref @returns_protocol : $@thin () -> P
|
||||||
%2 = alloc_box $P
|
%2 = alloc_box $P
|
||||||
%3 = apply %1(%2#1) : $[thin] () -> P
|
%3 = apply %1(%2#1) : $@thin () -> P
|
||||||
%5 = strong_release %2#0 : $Builtin.ObjectPointer
|
%5 = strong_release %2#0 : $Builtin.ObjectPointer
|
||||||
%0 = tuple ()
|
%0 = tuple ()
|
||||||
%6 = return %0 : $()
|
%6 = return %0 : $()
|
||||||
@@ -147,14 +147,14 @@ protocol LogicValue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @protocols
|
// CHECK-LABEL: @protocols
|
||||||
sil @protocols : $[thin] ((v : LogicValue), Bool.metatype) -> Bool {
|
sil @protocols : $@thin ((v : LogicValue), Bool.metatype) -> Bool {
|
||||||
bb0(%0 : $*LogicValue, %1 : $Bool.metatype):
|
bb0(%0 : $*LogicValue, %1 : $Bool.metatype):
|
||||||
%2 = alloc_box $LogicValue
|
%2 = alloc_box $LogicValue
|
||||||
// CHECK: %2 = alloc_stack $LogicValue
|
// CHECK: %2 = alloc_stack $LogicValue
|
||||||
copy_addr [take] %0 to [initialization] %2#1 : $*LogicValue
|
copy_addr [take] %0 to [initialization] %2#1 : $*LogicValue
|
||||||
%6 = project_existential %2#1 : $*LogicValue to $*@sil_self LogicValue
|
%6 = project_existential %2#1 : $*LogicValue to $*@sil_self LogicValue
|
||||||
%7 = protocol_method %2#1 : $*LogicValue, #LogicValue.getLogicValue!1 : $[cc(method)] ((), [inout] @sil_self LogicValue) -> Bool
|
%7 = protocol_method %2#1 : $*LogicValue, #LogicValue.getLogicValue!1 : $@cc(method) ((), @inout @sil_self LogicValue) -> Bool
|
||||||
%8 = apply %7(%6) : $[cc(method)] ((), [inout] @sil_self LogicValue) -> Bool
|
%8 = apply %7(%6) : $@cc(method) ((), @inout @sil_self LogicValue) -> Bool
|
||||||
strong_release %2#0 : $Builtin.ObjectPointer
|
strong_release %2#0 : $Builtin.ObjectPointer
|
||||||
// CHECK: destroy_addr %2#1 : $*LogicValue
|
// CHECK: destroy_addr %2#1 : $*LogicValue
|
||||||
// CHECK-NEXT: dealloc_stack %2#0 : $*@local_storage LogicValue
|
// CHECK-NEXT: dealloc_stack %2#0 : $*@local_storage LogicValue
|
||||||
@@ -167,7 +167,7 @@ bb0(%0 : $*LogicValue, %1 : $Bool.metatype):
|
|||||||
class Generic<T> {}
|
class Generic<T> {}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @dealloc_box
|
// CHECK-LABEL: sil @dealloc_box
|
||||||
sil @dealloc_box : $[thin] <T> () -> () {
|
sil @dealloc_box : $@thin <T> () -> () {
|
||||||
%1 = alloc_box $Generic<T>
|
%1 = alloc_box $Generic<T>
|
||||||
dealloc_box $Generic<T>, %1#0 : $Builtin.ObjectPointer
|
dealloc_box $Generic<T>, %1#0 : $Builtin.ObjectPointer
|
||||||
// CHECK: %0 = alloc_stack $Generic<T>
|
// CHECK: %0 = alloc_stack $Generic<T>
|
||||||
@@ -186,19 +186,19 @@ enum SomeUnion {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
sil @_TO1t9SomeUnion1yfMS0_FCS_9SomeClassS0_ : $[thin] (SomeClass, SomeUnion.metatype) -> SomeUnion
|
sil @_TO1t9SomeUnion1yfMS0_FCS_9SomeClassS0_ : $@thin (SomeClass, SomeUnion.metatype) -> SomeUnion
|
||||||
sil @_TC1t9SomeClassCfMS0_FT_S0_ : $[thin] ((), SomeClass.metatype) -> SomeClass
|
sil @_TC1t9SomeClassCfMS0_FT_S0_ : $@thin ((), SomeClass.metatype) -> SomeClass
|
||||||
|
|
||||||
// CHECK-LABEL: sil @union_test
|
// CHECK-LABEL: sil @union_test
|
||||||
sil @union_test : $[thin] () -> () {
|
sil @union_test : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%1 = alloc_box $SomeUnion
|
%1 = alloc_box $SomeUnion
|
||||||
%2 = function_ref @_TO1t9SomeUnion1yfMS0_FCS_9SomeClassS0_ : $[thin] (SomeClass, SomeUnion.metatype) -> SomeUnion // user: %7
|
%2 = function_ref @_TO1t9SomeUnion1yfMS0_FCS_9SomeClassS0_ : $@thin (SomeClass, SomeUnion.metatype) -> SomeUnion // user: %7
|
||||||
%3 = metatype $SomeUnion.metatype
|
%3 = metatype $SomeUnion.metatype
|
||||||
%4 = function_ref @_TC1t9SomeClassCfMS0_FT_S0_ : $[thin] ((), SomeClass.metatype) -> SomeClass // user: %6
|
%4 = function_ref @_TC1t9SomeClassCfMS0_FT_S0_ : $@thin ((), SomeClass.metatype) -> SomeClass // user: %6
|
||||||
%5 = metatype $SomeClass.metatype
|
%5 = metatype $SomeClass.metatype
|
||||||
%6 = apply %4(%5) : $[thin] ((), SomeClass.metatype) -> SomeClass
|
%6 = apply %4(%5) : $@thin ((), SomeClass.metatype) -> SomeClass
|
||||||
%7 = apply %2(%6, %3) : $[thin] (SomeClass, SomeUnion.metatype) -> SomeUnion
|
%7 = apply %2(%6, %3) : $@thin (SomeClass, SomeUnion.metatype) -> SomeUnion
|
||||||
store %7 to %1#1 : $*SomeUnion
|
store %7 to %1#1 : $*SomeUnion
|
||||||
strong_release %1#0 : $Builtin.ObjectPointer
|
strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
%10 = tuple ()
|
%10 = tuple ()
|
||||||
@@ -210,7 +210,7 @@ bb0:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @multiple_release_test
|
// CHECK-LABEL: sil @multiple_release_test
|
||||||
sil @multiple_release_test : $[thin] (x : Bool) -> Bool {
|
sil @multiple_release_test : $@thin (x : Bool) -> Bool {
|
||||||
bb0(%0 : $Bool):
|
bb0(%0 : $Bool):
|
||||||
%1 = alloc_box $Bool
|
%1 = alloc_box $Bool
|
||||||
store %0 to %1#1 : $*Bool
|
store %0 to %1#1 : $*Bool
|
||||||
|
|||||||
@@ -3,18 +3,18 @@ import Builtin
|
|||||||
import swift
|
import swift
|
||||||
|
|
||||||
// Compute an expression using a chain of arithmetic with overflow instructions: 2 * (2 + 3) - 3
|
// Compute an expression using a chain of arithmetic with overflow instructions: 2 * (2 + 3) - 3
|
||||||
sil @fold_arithmetic_with_overflow : $[thin] () -> Builtin.Int64 {
|
sil @fold_arithmetic_with_overflow : $@thin () -> Builtin.Int64 {
|
||||||
bb0:
|
bb0:
|
||||||
%1 = builtin_function_ref #Builtin.int_sadd_with_overflow_Int64 : $[thin] (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1)
|
%1 = builtin_function_ref #Builtin.int_sadd_with_overflow_Int64 : $@thin (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1)
|
||||||
%2 = builtin_function_ref #Builtin.int_smul_with_overflow_Int64 : $[thin] (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1)
|
%2 = builtin_function_ref #Builtin.int_smul_with_overflow_Int64 : $@thin (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1)
|
||||||
%3 = builtin_function_ref #Builtin.int_ssub_with_overflow_Int64 : $[thin] (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1)
|
%3 = builtin_function_ref #Builtin.int_ssub_with_overflow_Int64 : $@thin (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1)
|
||||||
%0 = integer_literal $Builtin.Int64, 2
|
%0 = integer_literal $Builtin.Int64, 2
|
||||||
%110 = integer_literal $Builtin.Int64, 3
|
%110 = integer_literal $Builtin.Int64, 3
|
||||||
%18 = apply %1(%0, %110) : $[thin] (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1)
|
%18 = apply %1(%0, %110) : $@thin (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1)
|
||||||
%19 = tuple_extract %18 : $(Builtin.Int64, Builtin.Int1), 0
|
%19 = tuple_extract %18 : $(Builtin.Int64, Builtin.Int1), 0
|
||||||
%20 = apply %2(%0, %19) : $[thin] (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1)
|
%20 = apply %2(%0, %19) : $@thin (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1)
|
||||||
%21 = tuple_extract %20 : $(Builtin.Int64, Builtin.Int1), 0
|
%21 = tuple_extract %20 : $(Builtin.Int64, Builtin.Int1), 0
|
||||||
%22 = apply %3(%21, %110) : $[thin] (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1)
|
%22 = apply %3(%21, %110) : $@thin (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1)
|
||||||
%23 = tuple_extract %22 : $(Builtin.Int64, Builtin.Int1), 0
|
%23 = tuple_extract %22 : $(Builtin.Int64, Builtin.Int1), 0
|
||||||
return %23 : $Builtin.Int64
|
return %23 : $Builtin.Int64
|
||||||
|
|
||||||
@@ -31,23 +31,23 @@ bb0:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fold casts. (This test assumes that DCE does not run, otherwise the unreachable blocks will get removed.)
|
// Fold casts. (This test assumes that DCE does not run, otherwise the unreachable blocks will get removed.)
|
||||||
sil @fold_trunc : $[thin] () -> Builtin.Int64 {
|
sil @fold_trunc : $@thin () -> Builtin.Int64 {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = integer_literal $Builtin.Int128, 22
|
%0 = integer_literal $Builtin.Int128, 22
|
||||||
%1 = builtin_function_ref #Builtin.trunc_Int128_Int64 : $[thin] Builtin.Int128 -> Builtin.Int64
|
%1 = builtin_function_ref #Builtin.trunc_Int128_Int64 : $@thin Builtin.Int128 -> Builtin.Int64
|
||||||
%2 = apply %1(%0) : $[thin] Builtin.Int128 -> Builtin.Int64
|
%2 = apply %1(%0) : $@thin Builtin.Int128 -> Builtin.Int64
|
||||||
br bb4(%2 : $Builtin.Int64)
|
br bb4(%2 : $Builtin.Int64)
|
||||||
|
|
||||||
bb1:
|
bb1:
|
||||||
%3 = integer_literal $Builtin.Int8, 23
|
%3 = integer_literal $Builtin.Int8, 23
|
||||||
%4 = builtin_function_ref #Builtin.sext_Int8_Int64 : $[thin] Builtin.Int8 -> Builtin.Int64
|
%4 = builtin_function_ref #Builtin.sext_Int8_Int64 : $@thin Builtin.Int8 -> Builtin.Int64
|
||||||
%5 = apply %4(%3) : $[thin] Builtin.Int8 -> Builtin.Int64
|
%5 = apply %4(%3) : $@thin Builtin.Int8 -> Builtin.Int64
|
||||||
br bb4(%5 : $Builtin.Int64)
|
br bb4(%5 : $Builtin.Int64)
|
||||||
|
|
||||||
bb2:
|
bb2:
|
||||||
%6 = integer_literal $Builtin.Int8, 24
|
%6 = integer_literal $Builtin.Int8, 24
|
||||||
%7 = builtin_function_ref #Builtin.zext_Int8_Int64 : $[thin] Builtin.Int8 -> Builtin.Int64
|
%7 = builtin_function_ref #Builtin.zext_Int8_Int64 : $@thin Builtin.Int8 -> Builtin.Int64
|
||||||
%8 = apply %7(%6) : $[thin] Builtin.Int8 -> Builtin.Int64
|
%8 = apply %7(%6) : $@thin Builtin.Int8 -> Builtin.Int64
|
||||||
br bb4(%8 : $Builtin.Int64)
|
br bb4(%8 : $Builtin.Int64)
|
||||||
|
|
||||||
bb4(%100 : $Builtin.Int64):
|
bb4(%100 : $Builtin.Int64):
|
||||||
@@ -61,7 +61,7 @@ bb4(%100 : $Builtin.Int64):
|
|||||||
// CHECK: integer_literal $Builtin.Int64, 24
|
// CHECK: integer_literal $Builtin.Int64, 24
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_tuple_extract_folding : $[thin] () -> Builtin.Int64 {
|
sil @test_tuple_extract_folding : $@thin () -> Builtin.Int64 {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = integer_literal $Builtin.Int64, 5
|
%0 = integer_literal $Builtin.Int64, 5
|
||||||
%1 = integer_literal $Builtin.Int1, 0
|
%1 = integer_literal $Builtin.Int1, 0
|
||||||
@@ -75,7 +75,7 @@ bb0:
|
|||||||
// CHECK-NEXT: }
|
// CHECK-NEXT: }
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_struct_extract_folding_first : $[thin] () -> Builtin.Int64 {
|
sil @test_struct_extract_folding_first : $@thin () -> Builtin.Int64 {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = integer_literal $Builtin.Int64, 2
|
%0 = integer_literal $Builtin.Int64, 2
|
||||||
%1 = struct $Int64 (%0 : $Builtin.Int64)
|
%1 = struct $Int64 (%0 : $Builtin.Int64)
|
||||||
@@ -93,7 +93,7 @@ struct TwoValueStruct {
|
|||||||
var b : Builtin.Int64
|
var b : Builtin.Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_struct_extract_folding_second : $[thin] () -> Builtin.Int64 {
|
sil @test_struct_extract_folding_second : $@thin () -> Builtin.Int64 {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = integer_literal $Builtin.Int64, 2
|
%0 = integer_literal $Builtin.Int64, 2
|
||||||
%1 = integer_literal $Builtin.Int64, 20
|
%1 = integer_literal $Builtin.Int64, 20
|
||||||
@@ -122,13 +122,13 @@ bb0:
|
|||||||
// CHECK-NEXT: }
|
// CHECK-NEXT: }
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @testChainingCCP : $[thin] () -> Builtin.Int1 {
|
sil @testChainingCCP : $@thin () -> Builtin.Int1 {
|
||||||
bb0:
|
bb0:
|
||||||
%1 = builtin_function_ref #Builtin.trunc_Int64_Int1 : $[thin] Builtin.Int64 -> Builtin.Int1
|
%1 = builtin_function_ref #Builtin.trunc_Int64_Int1 : $@thin Builtin.Int64 -> Builtin.Int1
|
||||||
%2 = integer_literal $Builtin.Int64, 0
|
%2 = integer_literal $Builtin.Int64, 0
|
||||||
%3 = struct $Int64 (%2 : $Builtin.Int64)
|
%3 = struct $Int64 (%2 : $Builtin.Int64)
|
||||||
%4 = struct_extract %3 : $Int64, #value
|
%4 = struct_extract %3 : $Int64, #value
|
||||||
%5 = apply %1(%4) : $[thin] Builtin.Int64 -> Builtin.Int1
|
%5 = apply %1(%4) : $@thin Builtin.Int64 -> Builtin.Int1
|
||||||
return %5 : $Builtin.Int1
|
return %5 : $Builtin.Int1
|
||||||
|
|
||||||
// CHECK-LABEL: sil @testChainingCCP
|
// CHECK-LABEL: sil @testChainingCCP
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
import Builtin
|
import Builtin
|
||||||
|
|
||||||
// fold_sadd_with_overflow_Overflow
|
// fold_sadd_with_overflow_Overflow
|
||||||
sil @fold_sadd_with_overflow_Overflow : $[thin] (x: Builtin.RawPointer) -> Builtin.Int64 {
|
sil @fold_sadd_with_overflow_Overflow : $@thin (x: Builtin.RawPointer) -> Builtin.Int64 {
|
||||||
bb0(%0 : $Builtin.RawPointer):
|
bb0(%0 : $Builtin.RawPointer):
|
||||||
%1 = builtin_function_ref #Builtin.int_sadd_with_overflow_Int64 : $[thin] (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1) // user: %4
|
%1 = builtin_function_ref #Builtin.int_sadd_with_overflow_Int64 : $@thin (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1) // user: %4
|
||||||
%2 = integer_literal $Builtin.Int64, 9223372036854775807 // user: %4
|
%2 = integer_literal $Builtin.Int64, 9223372036854775807 // user: %4
|
||||||
%3 = integer_literal $Builtin.Int64, 9223372036854775807 // user: %4
|
%3 = integer_literal $Builtin.Int64, 9223372036854775807 // user: %4
|
||||||
%4 = apply %1(%2, %3) : $[thin] (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1) // users: %8, %5
|
%4 = apply %1(%2, %3) : $@thin (Builtin.Int64, Builtin.Int64) -> (Builtin.Int64, Builtin.Int1) // users: %8, %5
|
||||||
%5 = tuple_extract %4 : $(Builtin.Int64, Builtin.Int1), 1 // users: %7, %7
|
%5 = tuple_extract %4 : $(Builtin.Int64, Builtin.Int1), 1 // users: %7, %7
|
||||||
%6 = builtin_function_ref #Builtin.staticReport : $[thin] (Builtin.Int1, Builtin.Int1, Builtin.RawPointer) -> () // user: %7
|
%6 = builtin_function_ref #Builtin.staticReport : $@thin (Builtin.Int1, Builtin.Int1, Builtin.RawPointer) -> () // user: %7
|
||||||
%7 = apply %6(%5, %5, %0) : $[thin] (Builtin.Int1, Builtin.Int1, Builtin.RawPointer) -> () // expected-error {{static report error}}
|
%7 = apply %6(%5, %5, %0) : $@thin (Builtin.Int1, Builtin.Int1, Builtin.RawPointer) -> () // expected-error {{static report error}}
|
||||||
%8 = tuple_extract %4 : $(Builtin.Int64, Builtin.Int1), 0 // user: %9
|
%8 = tuple_extract %4 : $(Builtin.Int64, Builtin.Int1), 0 // user: %9
|
||||||
return %8 : $Builtin.Int64
|
return %8 : $Builtin.Int64
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ bb2: // Preds: bb1 bb0
|
|||||||
// CHECK-NEXT: return
|
// CHECK-NEXT: return
|
||||||
// CHECK-NEXT: }
|
// CHECK-NEXT: }
|
||||||
|
|
||||||
sil @test2 : $[thin] () -> () {
|
sil @test2 : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%11 = integer_literal $Builtin.Int1, 0
|
%11 = integer_literal $Builtin.Int1, 0
|
||||||
%13 = cond_br %11, bb1, bb2
|
%13 = cond_br %11, bb1, bb2
|
||||||
@@ -47,7 +47,7 @@ bb2: // Preds: bb1 bb0
|
|||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
sil @loopWithFalse : $[thin] () -> () {
|
sil @loopWithFalse : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%6 = br bb1
|
%6 = br bb1
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ bb6:
|
|||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
sil @InfLoop : $[thin] () -> () {
|
sil @InfLoop : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%6 = br bb1
|
%6 = br bb1
|
||||||
|
|
||||||
@@ -129,14 +129,14 @@ bb6:
|
|||||||
class B { }
|
class B { }
|
||||||
class E : B { }
|
class E : B { }
|
||||||
|
|
||||||
sil @exit : $[thin, noreturn] () -> () {
|
sil @exit : $@thin @noreturn () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%1 = tuple ()
|
%1 = tuple ()
|
||||||
return %1 : $()
|
return %1 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @removeTriviallyDeadInstructions
|
// CHECK-LABEL: sil @removeTriviallyDeadInstructions
|
||||||
sil @removeTriviallyDeadInstructions : $[thin] (b : B) -> () {
|
sil @removeTriviallyDeadInstructions : $@thin (b : B) -> () {
|
||||||
bb0(%0 : $B):
|
bb0(%0 : $B):
|
||||||
%1 = alloc_box $B
|
%1 = alloc_box $B
|
||||||
%2 = store %0 to %1#1 : $*B // CHECK: store
|
%2 = store %0 to %1#1 : $*B // CHECK: store
|
||||||
@@ -145,15 +145,15 @@ bb0(%0 : $B):
|
|||||||
%5 = ref_to_object_pointer %3 : $B to $Builtin.ObjectPointer // CHECK-NOT: ref_to_object_pointer
|
%5 = ref_to_object_pointer %3 : $B to $Builtin.ObjectPointer // CHECK-NOT: ref_to_object_pointer
|
||||||
%7 = strong_release %3 : $B // CHECK: strong_release
|
%7 = strong_release %3 : $B // CHECK: strong_release
|
||||||
%8 = strong_release %1#0 : $Builtin.ObjectPointer // CHECK-NEXT: strong_release
|
%8 = strong_release %1#0 : $Builtin.ObjectPointer // CHECK-NEXT: strong_release
|
||||||
%9 = function_ref @exit : $[thin, noreturn] () -> () // ret.exit : () -> ()
|
%9 = function_ref @exit : $@thin @noreturn () -> () // ret.exit : () -> ()
|
||||||
%10 = apply %9() : $[thin, noreturn] () -> ()
|
%10 = apply %9() : $@thin @noreturn () -> ()
|
||||||
%6 = object_pointer_to_ref %5 : $Builtin.ObjectPointer to $B // CHECK-NOT: object_pointer_to_ref
|
%6 = object_pointer_to_ref %5 : $Builtin.ObjectPointer to $B // CHECK-NOT: object_pointer_to_ref
|
||||||
%11 = tuple()
|
%11 = tuple()
|
||||||
%12 = return %11 : $()
|
%12 = return %11 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @removeTriviallyDeadButUsedByUnreachableBlock
|
// CHECK-LABEL: sil @removeTriviallyDeadButUsedByUnreachableBlock
|
||||||
sil @removeTriviallyDeadButUsedByUnreachableBlock : $[thin] (b : B) -> () {
|
sil @removeTriviallyDeadButUsedByUnreachableBlock : $@thin (b : B) -> () {
|
||||||
bb0(%0 : $B):
|
bb0(%0 : $B):
|
||||||
%5 = ref_to_object_pointer %0 : $B to $Builtin.ObjectPointer // CHECK-NOT: ref_to_object_pointer
|
%5 = ref_to_object_pointer %0 : $B to $Builtin.ObjectPointer // CHECK-NOT: ref_to_object_pointer
|
||||||
%11 = integer_literal $Builtin.Int1, 0 // CHECK-NOT: integer_literal
|
%11 = integer_literal $Builtin.Int1, 0 // CHECK-NOT: integer_literal
|
||||||
@@ -167,21 +167,21 @@ bb2:
|
|||||||
} // CHECK: }
|
} // CHECK: }
|
||||||
|
|
||||||
// CHECK-LABEL: sil @removeTriviallyDeadCrossBasicBlocks
|
// CHECK-LABEL: sil @removeTriviallyDeadCrossBasicBlocks
|
||||||
sil @removeTriviallyDeadCrossBasicBlocks : $[thin] (b : B, m : Builtin.Int1) -> () {
|
sil @removeTriviallyDeadCrossBasicBlocks : $@thin (b : B, m : Builtin.Int1) -> () {
|
||||||
bb0(%0: $B, %1: $Builtin.Int1):
|
bb0(%0: $B, %1: $Builtin.Int1):
|
||||||
%5 = ref_to_object_pointer %0 : $B to $Builtin.ObjectPointer // CHECK-NOT: ref_to_object_pointer
|
%5 = ref_to_object_pointer %0 : $B to $Builtin.ObjectPointer // CHECK-NOT: ref_to_object_pointer
|
||||||
%13 = cond_br %1, bb1, bb2 // CHECK: cond_br
|
%13 = cond_br %1, bb1, bb2 // CHECK: cond_br
|
||||||
bb1:
|
bb1:
|
||||||
%22 = br bb2
|
%22 = br bb2
|
||||||
bb2:
|
bb2:
|
||||||
%9 = function_ref @exit : $[thin, noreturn] () -> () // ret.exit : () -> ()
|
%9 = function_ref @exit : $@thin @noreturn () -> () // ret.exit : () -> ()
|
||||||
%10 = apply %9() : $[thin, noreturn] () -> ()
|
%10 = apply %9() : $@thin @noreturn () -> ()
|
||||||
%21 = object_pointer_to_ref %5 : $Builtin.ObjectPointer to $B // CHECK-NOT: object_pointer_to_ref
|
%21 = object_pointer_to_ref %5 : $Builtin.ObjectPointer to $B // CHECK-NOT: object_pointer_to_ref
|
||||||
%32 = tuple ()
|
%32 = tuple ()
|
||||||
%33 = return %32 : $()
|
%33 = return %32 : $()
|
||||||
} // CHECK: }
|
} // CHECK: }
|
||||||
|
|
||||||
sil @testCondBranchBBArgs : $[thin] (i1 : Int64, i2 : Int64) -> Int64 {
|
sil @testCondBranchBBArgs : $@thin (i1 : Int64, i2 : Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64, %1 : $Int64):
|
bb0(%0 : $Int64, %1 : $Int64):
|
||||||
%2 = integer_literal $Builtin.Int1, 0
|
%2 = integer_literal $Builtin.Int1, 0
|
||||||
cond_br %2, bb1(%0 : $Int64), bb2(%1 : $Int64)
|
cond_br %2, bb1(%0 : $Int64), bb2(%1 : $Int64)
|
||||||
@@ -201,7 +201,7 @@ bb3(%5 : $Int64):
|
|||||||
// CHECK-NEXT: return
|
// CHECK-NEXT: return
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
|
|
||||||
sil @removePredecessorWithBBArgs : $[thin] (i1: Int64, i2 :Int64) -> Int64 {
|
sil @removePredecessorWithBBArgs : $@thin (i1: Int64, i2 :Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64, %1 : $Int64):
|
bb0(%0 : $Int64, %1 : $Int64):
|
||||||
%2 = integer_literal $Builtin.Int1, 0
|
%2 = integer_literal $Builtin.Int1, 0
|
||||||
%3 = cond_br %2, bb2(%0 : $Int64), bb3(%1 : $Int64)
|
%3 = cond_br %2, bb2(%0 : $Int64), bb3(%1 : $Int64)
|
||||||
@@ -221,10 +221,10 @@ bb4(%6 : $Int64):
|
|||||||
// CHECK-NEXT: return
|
// CHECK-NEXT: return
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
|
|
||||||
sil @code_removed_after_a_call_to_noreturn : $[thin] (i : Int64, b : Builtin.Int1) -> () {
|
sil @code_removed_after_a_call_to_noreturn : $@thin (i : Int64, b : Builtin.Int1) -> () {
|
||||||
bb0(%0 : $Int64, %1 : $Builtin.Int1):
|
bb0(%0 : $Int64, %1 : $Builtin.Int1):
|
||||||
%6 = function_ref @exit : $[thin, noreturn] () -> () // ret.exit : () -> ()
|
%6 = function_ref @exit : $@thin @noreturn () -> () // ret.exit : () -> ()
|
||||||
%7 = apply %6() : $[thin, noreturn] () -> ()
|
%7 = apply %6() : $@thin @noreturn () -> ()
|
||||||
cond_br %1, bb1, bb2
|
cond_br %1, bb1, bb2
|
||||||
bb1: // Preds: bb0
|
bb1: // Preds: bb0
|
||||||
br bb2
|
br bb2
|
||||||
@@ -240,11 +240,11 @@ bb2: // Preds: bb1 bb0
|
|||||||
// CHECK-NEXT: unreachable
|
// CHECK-NEXT: unreachable
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
|
|
||||||
sil @dead_use_of_alloc_stack : $[thin] () -> () {
|
sil @dead_use_of_alloc_stack : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%1 = alloc_stack $((), (), ())
|
%1 = alloc_stack $((), (), ())
|
||||||
%2 = tuple_element_addr %1#1 : $*((), (), ()), 0
|
%2 = tuple_element_addr %1#1 : $*((), (), ()), 0
|
||||||
dealloc_stack %1#0 : $*[local_storage] ((), (), ())
|
dealloc_stack %1#0 : $*@local_storage ((), (), ())
|
||||||
%3 = tuple ()
|
%3 = tuple ()
|
||||||
return %3 : $()
|
return %3 : $()
|
||||||
}
|
}
|
||||||
@@ -254,7 +254,7 @@ bb0:
|
|||||||
// CHECK: dealloc_stack
|
// CHECK: dealloc_stack
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
|
|
||||||
sil @constant_fold_switch_enum : $[thin] (i : Int64) -> Int64 {
|
sil @constant_fold_switch_enum : $@thin (i : Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
%6 = enum $Bool, #Bool.false!enumelt // user: %9
|
%6 = enum $Bool, #Bool.false!enumelt // user: %9
|
||||||
switch_enum %6 : $Bool, case #Bool.true!enumelt: bb1, case #Bool.false!enumelt: bb2
|
switch_enum %6 : $Bool, case #Bool.true!enumelt: bb1, case #Bool.false!enumelt: bb2
|
||||||
@@ -277,7 +277,7 @@ bb3:
|
|||||||
enum Singleton {
|
enum Singleton {
|
||||||
case x(Int, Char)
|
case x(Int, Char)
|
||||||
};
|
};
|
||||||
sil @constant_fold_switch_enum_with_payload : $[thin] (i : Int64, c : Char) -> (Int64, Char) {
|
sil @constant_fold_switch_enum_with_payload : $@thin (i : Int64, c : Char) -> (Int64, Char) {
|
||||||
bb0(%6 : $Int64, %10 : $Char):
|
bb0(%6 : $Int64, %10 : $Char):
|
||||||
%11 = tuple (%6 : $Int64, %10 : $Char)
|
%11 = tuple (%6 : $Int64, %10 : $Char)
|
||||||
%12 = enum $Singleton, #Singleton.x!enumelt.1, %11 : $(Int64, Char)
|
%12 = enum $Singleton, #Singleton.x!enumelt.1, %11 : $(Int64, Char)
|
||||||
@@ -297,7 +297,7 @@ b2:
|
|||||||
// CHECK: return
|
// CHECK: return
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @constant_fold_switch_int : $[thin] (u : Int64) -> Int64 {
|
sil @constant_fold_switch_int : $@thin (u : Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
%1 = integer_literal $Builtin.Int64, 2
|
%1 = integer_literal $Builtin.Int64, 2
|
||||||
switch_int %1 : $Builtin.Int64, case 1: bb1, case 2: bb2
|
switch_int %1 : $Builtin.Int64, case 1: bb1, case 2: bb2
|
||||||
@@ -316,7 +316,7 @@ bb3:
|
|||||||
// CHECK: }
|
// CHECK: }
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @propagate_BB_args : $[thin] (i : Int64) -> Int64 {
|
sil @propagate_BB_args : $@thin (i : Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
%1 = integer_literal $Builtin.Int1, 0
|
%1 = integer_literal $Builtin.Int1, 0
|
||||||
br bb1(%1 : $Builtin.Int1)
|
br bb1(%1 : $Builtin.Int1)
|
||||||
@@ -342,7 +342,7 @@ bb5:
|
|||||||
// CHECK-NOT: cond_br
|
// CHECK-NOT: cond_br
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @propagate_BB_mult_args : $[thin] () -> Builtin.Int1 {
|
sil @propagate_BB_mult_args : $@thin () -> Builtin.Int1 {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = integer_literal $Builtin.Int1, 0
|
%0 = integer_literal $Builtin.Int1, 0
|
||||||
%1 = integer_literal $Builtin.Int1, 1
|
%1 = integer_literal $Builtin.Int1, 1
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import swift
|
|||||||
|
|
||||||
|
|
||||||
// CHECK-LABEL: sil @simple_reg_promotion
|
// CHECK-LABEL: sil @simple_reg_promotion
|
||||||
sil @simple_reg_promotion : $[thin] (a : Int64) -> Int64 {
|
sil @simple_reg_promotion : $@thin (a : Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64): // CHECK: bb0(%0 : $Int64):
|
bb0(%0 : $Int64): // CHECK: bb0(%0 : $Int64):
|
||||||
%1 = alloc_box $Int64 // CHECK: alloc_box
|
%1 = alloc_box $Int64 // CHECK: alloc_box
|
||||||
store %0 to %1#1 : $*Int64
|
store %0 to %1#1 : $*Int64
|
||||||
@@ -25,7 +25,7 @@ bb0(%0 : $Int64): // CHECK: bb0(%0 : $Int64):
|
|||||||
|
|
||||||
|
|
||||||
// CHECK-LABEL: sil @tuple_reg_promotion
|
// CHECK-LABEL: sil @tuple_reg_promotion
|
||||||
sil @tuple_reg_promotion : $[thin] (a : Int64) -> Int64 {
|
sil @tuple_reg_promotion : $@thin (a : Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64): // CHECK: bb0(%0 : $Int64):
|
bb0(%0 : $Int64): // CHECK: bb0(%0 : $Int64):
|
||||||
%1 = alloc_box $(Int64, Int64) // CHECK: alloc_box
|
%1 = alloc_box $(Int64, Int64) // CHECK: alloc_box
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ bb0(%0 : $Int64): // CHECK: bb0(%0 : $Int64):
|
|||||||
|
|
||||||
|
|
||||||
// CHECK-LABEL: sil @use_before_init
|
// CHECK-LABEL: sil @use_before_init
|
||||||
sil @use_before_init : $[thin] () -> Int64 {
|
sil @use_before_init : $@thin () -> Int64 {
|
||||||
bb0:
|
bb0:
|
||||||
%1 = alloc_box $Int64 // expected-note {{variable defined here}}
|
%1 = alloc_box $Int64 // expected-note {{variable defined here}}
|
||||||
%4 = load %1#1 : $*Int64 // expected-error {{variable '<unknown>' used before being initialized}}
|
%4 = load %1#1 : $*Int64 // expected-error {{variable '<unknown>' used before being initialized}}
|
||||||
@@ -63,15 +63,15 @@ bb0:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sil @takes_Int_inout : $[thin] (a : [inout] Int64) -> ()
|
sil @takes_Int_inout : $@thin (a : @inout Int64) -> ()
|
||||||
|
|
||||||
// CHECK-LABEL: @inout_uninit
|
// CHECK-LABEL: @inout_uninit
|
||||||
sil @inout_uninit : $[thin] () -> () {
|
sil @inout_uninit : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%1 = alloc_box $Int64 // expected-note {{variable defined here}}
|
%1 = alloc_box $Int64 // expected-note {{variable defined here}}
|
||||||
|
|
||||||
%5 = function_ref @takes_Int_inout : $[thin] (a : [inout] Int64) -> ()
|
%5 = function_ref @takes_Int_inout : $@thin (a : @inout Int64) -> ()
|
||||||
%6 = apply %5(%1#1) : $[thin] (a : [inout] Int64) -> () // expected-error {{variable '<unknown>' passed by reference before being initialized}}
|
%6 = apply %5(%1#1) : $@thin (a : @inout Int64) -> () // expected-error {{variable '<unknown>' passed by reference before being initialized}}
|
||||||
|
|
||||||
%0 = tuple ()
|
%0 = tuple ()
|
||||||
strong_release %1#0 : $Builtin.ObjectPointer
|
strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
@@ -89,7 +89,7 @@ bb0:
|
|||||||
// return (t,a)
|
// return (t,a)
|
||||||
//}
|
//}
|
||||||
// CHECK-LABEL: sil @used_by_inout
|
// CHECK-LABEL: sil @used_by_inout
|
||||||
sil @used_by_inout : $[thin] (a : Int64) -> (Int64, Int64) {
|
sil @used_by_inout : $@thin (a : Int64) -> (Int64, Int64) {
|
||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
// This alloc_stack can't be removed since it is used by a inout call.
|
// This alloc_stack can't be removed since it is used by a inout call.
|
||||||
// CHECK: %1 = alloc_box $Int64
|
// CHECK: %1 = alloc_box $Int64
|
||||||
@@ -98,8 +98,8 @@ bb0(%0 : $Int64):
|
|||||||
|
|
||||||
// This load should be eliminated.
|
// This load should be eliminated.
|
||||||
%3 = load %1#1 : $*Int64
|
%3 = load %1#1 : $*Int64
|
||||||
%5 = function_ref @takes_Int_inout : $[thin] (a : [inout] Int64) -> ()
|
%5 = function_ref @takes_Int_inout : $@thin (a : @inout Int64) -> ()
|
||||||
%6 = apply %5(%1#1) : $[thin] (a : [inout] Int64) -> ()
|
%6 = apply %5(%1#1) : $@thin (a : @inout Int64) -> ()
|
||||||
|
|
||||||
// This load is needed in case the callee modifies the allocation.
|
// This load is needed in case the callee modifies the allocation.
|
||||||
// CHECK: [[RES:%[0-9]+]] = load
|
// CHECK: [[RES:%[0-9]+]] = load
|
||||||
@@ -119,15 +119,15 @@ struct AddressOnlyStruct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// returns_generic_struct - This returns a struct by reference.
|
/// returns_generic_struct - This returns a struct by reference.
|
||||||
sil @returns_generic_struct : $[thin] () -> AddressOnlyStruct
|
sil @returns_generic_struct : $@thin () -> AddressOnlyStruct
|
||||||
|
|
||||||
// There should be no error in this function.
|
// There should be no error in this function.
|
||||||
// CHECK-LABEL: sil @call_struct_return_function
|
// CHECK-LABEL: sil @call_struct_return_function
|
||||||
sil @call_struct_return_function : $[thin] () -> Int64 {
|
sil @call_struct_return_function : $@thin () -> Int64 {
|
||||||
bb0:
|
bb0:
|
||||||
%1 = alloc_box $AddressOnlyStruct
|
%1 = alloc_box $AddressOnlyStruct
|
||||||
%2 = function_ref @returns_generic_struct : $[thin] () -> AddressOnlyStruct
|
%2 = function_ref @returns_generic_struct : $@thin () -> AddressOnlyStruct
|
||||||
%3 = apply %2(%1#1) : $[thin] () -> AddressOnlyStruct
|
%3 = apply %2(%1#1) : $@thin () -> AddressOnlyStruct
|
||||||
%4 = struct_element_addr %1#1 : $*AddressOnlyStruct, #b
|
%4 = struct_element_addr %1#1 : $*AddressOnlyStruct, #b
|
||||||
%5 = load %4 : $*Int64
|
%5 = load %4 : $*Int64
|
||||||
strong_release %1#0 : $Builtin.ObjectPointer
|
strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
@@ -136,14 +136,14 @@ bb0:
|
|||||||
|
|
||||||
|
|
||||||
// CHECK-LABEL: sil @tuple_elements1
|
// CHECK-LABEL: sil @tuple_elements1
|
||||||
sil @tuple_elements1 : $[thin] (a : Int64) -> () {
|
sil @tuple_elements1 : $@thin (a : Int64) -> () {
|
||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
%3 = alloc_box $(Int64, Int64) // expected-note 2 {{variable defined here}}
|
%3 = alloc_box $(Int64, Int64) // expected-note 2 {{variable defined here}}
|
||||||
%4 = tuple_element_addr %3#1 : $*(Int64, Int64), 0
|
%4 = tuple_element_addr %3#1 : $*(Int64, Int64), 0
|
||||||
%5 = tuple_element_addr %3#1 : $*(Int64, Int64), 1
|
%5 = tuple_element_addr %3#1 : $*(Int64, Int64), 1
|
||||||
%14 = function_ref @takes_Int_inout : $[thin] (a : [inout] Int64) -> ()
|
%14 = function_ref @takes_Int_inout : $@thin (a : @inout Int64) -> ()
|
||||||
%15 = tuple_element_addr %3#1 : $*(Int64, Int64), 1
|
%15 = tuple_element_addr %3#1 : $*(Int64, Int64), 1
|
||||||
%16 = apply %14(%15) : $[thin] (a : [inout] Int64) -> () // expected-error {{variable '<unknown>.1' passed by reference before being initialized}}
|
%16 = apply %14(%15) : $@thin (a : @inout Int64) -> () // expected-error {{variable '<unknown>.1' passed by reference before being initialized}}
|
||||||
|
|
||||||
strong_release %3#0 : $Builtin.ObjectPointer // expected-error {{variable '<unknown>.0' destroyed without being fully initialized on all paths}}
|
strong_release %3#0 : $Builtin.ObjectPointer // expected-error {{variable '<unknown>.0' destroyed without being fully initialized on all paths}}
|
||||||
%99 = tuple ()
|
%99 = tuple ()
|
||||||
@@ -151,7 +151,7 @@ bb0(%0 : $Int64):
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @tuple_elements2
|
// CHECK-LABEL: sil @tuple_elements2
|
||||||
sil @tuple_elements2 : $[thin] (a : Int64) -> (Int64, Int64) {
|
sil @tuple_elements2 : $@thin (a : Int64) -> (Int64, Int64) {
|
||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
%3 = alloc_box $(Int64, Int64) // expected-note {{variable defined here}}
|
%3 = alloc_box $(Int64, Int64) // expected-note {{variable defined here}}
|
||||||
%18 = tuple_element_addr %3#1 : $*(Int64, Int64), 0
|
%18 = tuple_element_addr %3#1 : $*(Int64, Int64), 0
|
||||||
@@ -168,7 +168,7 @@ struct XYStruct { var x, y : Int }
|
|||||||
|
|
||||||
|
|
||||||
// CHECK-LABEL: sil @copy_addr1
|
// CHECK-LABEL: sil @copy_addr1
|
||||||
sil @copy_addr1 : $[thin] <T> (v : T) -> T {
|
sil @copy_addr1 : $@thin <T> (v : T) -> T {
|
||||||
bb0(%0 : $*T, %1 : $*T):
|
bb0(%0 : $*T, %1 : $*T):
|
||||||
%4 = alloc_box $T
|
%4 = alloc_box $T
|
||||||
copy_addr [take] %1 to [initialization] %4#1 : $*T
|
copy_addr [take] %1 to [initialization] %4#1 : $*T
|
||||||
@@ -179,7 +179,7 @@ bb0(%0 : $*T, %1 : $*T):
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @copy_addr2
|
// CHECK-LABEL: sil @copy_addr2
|
||||||
sil @copy_addr2 : $[thin] <T> (v : T) -> T {
|
sil @copy_addr2 : $@thin <T> (v : T) -> T {
|
||||||
bb0(%0 : $*T, %1 : $*T):
|
bb0(%0 : $*T, %1 : $*T):
|
||||||
%4 = alloc_box $T // expected-note {{variable defined here}}
|
%4 = alloc_box $T // expected-note {{variable defined here}}
|
||||||
copy_addr %4#1 to [initialization] %0 : $*T // expected-error {{variable '<unknown>' used before being initialized}}
|
copy_addr %4#1 to [initialization] %0 : $*T // expected-error {{variable '<unknown>' used before being initialized}}
|
||||||
@@ -189,19 +189,19 @@ bb0(%0 : $*T, %1 : $*T):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sil @takes_closure : $[thin] (x : () -> ()) -> ()
|
sil @takes_closure : $@thin (x : () -> ()) -> ()
|
||||||
sil @closure0 : $[thin] ((), (Builtin.ObjectPointer, [inout] Int64)) -> ()
|
sil @closure0 : $@thin ((), (Builtin.ObjectPointer, @inout Int64)) -> ()
|
||||||
|
|
||||||
// CHECK-LABEL: sil @closure_test
|
// CHECK-LABEL: sil @closure_test
|
||||||
sil @closure_test : $[thin] () -> () {
|
sil @closure_test : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = alloc_box $Int64 // expected-note {{variable defined here}}
|
%0 = alloc_box $Int64 // expected-note {{variable defined here}}
|
||||||
|
|
||||||
%5 = function_ref @takes_closure : $[thin] (x : () -> ()) -> ()
|
%5 = function_ref @takes_closure : $@thin (x : () -> ()) -> ()
|
||||||
%6 = function_ref @closure0 : $[thin] ((), (Builtin.ObjectPointer, [inout] Int64)) -> ()
|
%6 = function_ref @closure0 : $@thin ((), (Builtin.ObjectPointer, @inout Int64)) -> ()
|
||||||
strong_retain %0#0 : $Builtin.ObjectPointer
|
strong_retain %0#0 : $Builtin.ObjectPointer
|
||||||
%8 = partial_apply %6(%0#0, %0#1) : $[thin] ((), (Builtin.ObjectPointer, [inout] Int64)) -> () // expected-error {{variable '<unknown>' captured by a closure before being initialized}}
|
%8 = partial_apply %6(%0#0, %0#1) : $@thin ((), (Builtin.ObjectPointer, @inout Int64)) -> () // expected-error {{variable '<unknown>' captured by a closure before being initialized}}
|
||||||
%9 = apply %5(%8) : $[thin] (x : () -> ()) -> ()
|
%9 = apply %5(%8) : $@thin (x : () -> ()) -> ()
|
||||||
strong_release %0#0 : $Builtin.ObjectPointer
|
strong_release %0#0 : $Builtin.ObjectPointer
|
||||||
|
|
||||||
%11 = tuple ()
|
%11 = tuple ()
|
||||||
@@ -209,16 +209,16 @@ bb0:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @closure_test2
|
// CHECK-LABEL: sil @closure_test2
|
||||||
sil @closure_test2 : $[thin] (a : Int64) -> Int64 {
|
sil @closure_test2 : $@thin (a : Int64) -> Int64 {
|
||||||
bb0(%1 : $Int64):
|
bb0(%1 : $Int64):
|
||||||
%0 = alloc_box $Int64
|
%0 = alloc_box $Int64
|
||||||
store %1 to %0#1 : $*Int64 // CHECK: store
|
store %1 to %0#1 : $*Int64 // CHECK: store
|
||||||
|
|
||||||
%5 = function_ref @takes_closure : $[thin] (x : () -> ()) -> ()
|
%5 = function_ref @takes_closure : $@thin (x : () -> ()) -> ()
|
||||||
%6 = function_ref @closure0 : $[thin] ((), (Builtin.ObjectPointer, [inout] Int64)) -> ()
|
%6 = function_ref @closure0 : $@thin ((), (Builtin.ObjectPointer, @inout Int64)) -> ()
|
||||||
strong_retain %0#0 : $Builtin.ObjectPointer
|
strong_retain %0#0 : $Builtin.ObjectPointer
|
||||||
%8 = partial_apply %6(%0#0, %0#1) : $[thin] ((), (Builtin.ObjectPointer, [inout] Int64)) -> ()
|
%8 = partial_apply %6(%0#0, %0#1) : $@thin ((), (Builtin.ObjectPointer, @inout Int64)) -> ()
|
||||||
%9 = apply %5(%8) : $[thin] (x : () -> ()) -> ()
|
%9 = apply %5(%8) : $@thin (x : () -> ()) -> ()
|
||||||
strong_release %0#0 : $Builtin.ObjectPointer
|
strong_release %0#0 : $Builtin.ObjectPointer
|
||||||
|
|
||||||
store %1 to %0#1 : $*Int64 // CHECK: store
|
store %1 to %0#1 : $*Int64 // CHECK: store
|
||||||
@@ -232,11 +232,11 @@ bb0(%1 : $Int64):
|
|||||||
|
|
||||||
class SomeClass {}
|
class SomeClass {}
|
||||||
|
|
||||||
sil @getSomeClass : $[thin] ((), SomeClass.metatype) -> SomeClass
|
sil @getSomeClass : $@thin ((), SomeClass.metatype) -> SomeClass
|
||||||
|
|
||||||
|
|
||||||
// CHECK-LABEL: sil @assign_test_trivial
|
// CHECK-LABEL: sil @assign_test_trivial
|
||||||
sil @assign_test_trivial : $[thin] (a : Int64) -> Int64 {
|
sil @assign_test_trivial : $@thin (a : Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
%1 = alloc_box $Int64
|
%1 = alloc_box $Int64
|
||||||
|
|
||||||
@@ -256,22 +256,22 @@ bb0(%0 : $Int64):
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @assign_test_nontrivial
|
// CHECK-LABEL: sil @assign_test_nontrivial
|
||||||
sil @assign_test_nontrivial : $[thin] () -> () {
|
sil @assign_test_nontrivial : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
// Assignments of nontrivial types. The first becomes an initialize (i.e.,
|
// Assignments of nontrivial types. The first becomes an initialize (i.e.,
|
||||||
// lone store), the second becomes an assignment (retain/release dance).
|
// lone store), the second becomes an assignment (retain/release dance).
|
||||||
|
|
||||||
%c = alloc_box $SomeClass
|
%c = alloc_box $SomeClass
|
||||||
%f = function_ref @getSomeClass : $[thin] ((), SomeClass.metatype) -> SomeClass
|
%f = function_ref @getSomeClass : $@thin ((), SomeClass.metatype) -> SomeClass
|
||||||
%3 = metatype $SomeClass.metatype
|
%3 = metatype $SomeClass.metatype
|
||||||
|
|
||||||
%4 = apply %f(%3) : $[thin] ((), SomeClass.metatype) -> SomeClass
|
%4 = apply %f(%3) : $@thin ((), SomeClass.metatype) -> SomeClass
|
||||||
// CHECK: [[C1:%[0-9]+]] = apply
|
// CHECK: [[C1:%[0-9]+]] = apply
|
||||||
|
|
||||||
assign %4 to %c#1 : $*SomeClass
|
assign %4 to %c#1 : $*SomeClass
|
||||||
// CHECK-NEXT: store [[C1]]
|
// CHECK-NEXT: store [[C1]]
|
||||||
|
|
||||||
%8 = apply %f(%3) : $[thin] ((), SomeClass.metatype) -> SomeClass
|
%8 = apply %f(%3) : $@thin ((), SomeClass.metatype) -> SomeClass
|
||||||
// CHECK-NEXT: [[C2:%[0-9]+]] = apply
|
// CHECK-NEXT: [[C2:%[0-9]+]] = apply
|
||||||
|
|
||||||
assign %8 to %c#1 : $*SomeClass
|
assign %8 to %c#1 : $*SomeClass
|
||||||
@@ -286,7 +286,7 @@ bb0:
|
|||||||
|
|
||||||
|
|
||||||
// CHECK-LABEL: sil @assign_test_addressonly
|
// CHECK-LABEL: sil @assign_test_addressonly
|
||||||
sil @assign_test_addressonly : $[thin] <T> (v : T) -> T {
|
sil @assign_test_addressonly : $@thin <T> (v : T) -> T {
|
||||||
bb0(%0 : $*T, %1 : $*T):
|
bb0(%0 : $*T, %1 : $*T):
|
||||||
%2 = alloc_box $T
|
%2 = alloc_box $T
|
||||||
// CHECK: alloc_box
|
// CHECK: alloc_box
|
||||||
@@ -310,16 +310,16 @@ bb0(%0 : $*T, %1 : $*T):
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @assign_test_weak
|
// CHECK-LABEL: sil @assign_test_weak
|
||||||
sil @assign_test_weak : $[thin]() -> () {
|
sil @assign_test_weak : $@thin() -> () {
|
||||||
bb0:
|
bb0:
|
||||||
// Assignments of weak pointer. The first becomes an initialize, and the
|
// Assignments of weak pointer. The first becomes an initialize, and the
|
||||||
// second becomes an assignment.
|
// second becomes an assignment.
|
||||||
|
|
||||||
%c = alloc_box $@sil_weak SomeClass
|
%c = alloc_box $@sil_weak SomeClass
|
||||||
%f = function_ref @getSomeClass : $[thin] ((), SomeClass.metatype) -> SomeClass
|
%f = function_ref @getSomeClass : $@thin ((), SomeClass.metatype) -> SomeClass
|
||||||
%3 = metatype $SomeClass.metatype
|
%3 = metatype $SomeClass.metatype
|
||||||
|
|
||||||
%4 = apply %f(%3) : $[thin] ((), SomeClass.metatype) -> SomeClass
|
%4 = apply %f(%3) : $@thin ((), SomeClass.metatype) -> SomeClass
|
||||||
// CHECK: [[C1:%[0-9]+]] = apply
|
// CHECK: [[C1:%[0-9]+]] = apply
|
||||||
|
|
||||||
// THis should become an initialization.
|
// THis should become an initialization.
|
||||||
@@ -329,7 +329,7 @@ bb0:
|
|||||||
strong_release %4 : $SomeClass
|
strong_release %4 : $SomeClass
|
||||||
// CHECK-NEXT: release [[C1]]
|
// CHECK-NEXT: release [[C1]]
|
||||||
|
|
||||||
%8 = apply %f(%3) : $[thin] ((), SomeClass.metatype) -> SomeClass
|
%8 = apply %f(%3) : $@thin ((), SomeClass.metatype) -> SomeClass
|
||||||
// CHECK-NEXT: [[C2:%[0-9]+]] = apply
|
// CHECK-NEXT: [[C2:%[0-9]+]] = apply
|
||||||
|
|
||||||
store_weak %8 to %c#1 : $*@sil_weak SomeClass
|
store_weak %8 to %c#1 : $*@sil_weak SomeClass
|
||||||
@@ -345,17 +345,17 @@ bb0:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @assign_test_unowned
|
// CHECK-LABEL: sil @assign_test_unowned
|
||||||
sil @assign_test_unowned : $[thin]() -> () {
|
sil @assign_test_unowned : $@thin() -> () {
|
||||||
bb0:
|
bb0:
|
||||||
// Assignments of unowned pointer. The first becomes an initialize, and the
|
// Assignments of unowned pointer. The first becomes an initialize, and the
|
||||||
// second becomes an assignment.
|
// second becomes an assignment.
|
||||||
|
|
||||||
%c = alloc_box $@sil_unowned SomeClass
|
%c = alloc_box $@sil_unowned SomeClass
|
||||||
// CHECK: [[BOX:%[0-9]+]] = alloc_box
|
// CHECK: [[BOX:%[0-9]+]] = alloc_box
|
||||||
%f = function_ref @getSomeClass : $[thin] ((), SomeClass.metatype) -> SomeClass
|
%f = function_ref @getSomeClass : $@thin ((), SomeClass.metatype) -> SomeClass
|
||||||
%3 = metatype $SomeClass.metatype
|
%3 = metatype $SomeClass.metatype
|
||||||
|
|
||||||
%4 = apply %f(%3) : $[thin] ((), SomeClass.metatype) -> SomeClass
|
%4 = apply %f(%3) : $@thin ((), SomeClass.metatype) -> SomeClass
|
||||||
// CHECK: [[C1:%[0-9]+]] = apply
|
// CHECK: [[C1:%[0-9]+]] = apply
|
||||||
|
|
||||||
// This should become an initialization.
|
// This should become an initialization.
|
||||||
@@ -368,7 +368,7 @@ bb0:
|
|||||||
// CHECK-NEXT: store [[C1u]] to [[BOX]]#1
|
// CHECK-NEXT: store [[C1u]] to [[BOX]]#1
|
||||||
// CHECK-NEXT: strong_release [[C1]]
|
// CHECK-NEXT: strong_release [[C1]]
|
||||||
|
|
||||||
%8 = apply %f(%3) : $[thin] ((), SomeClass.metatype) -> SomeClass
|
%8 = apply %f(%3) : $@thin ((), SomeClass.metatype) -> SomeClass
|
||||||
// CHECK-NEXT: [[C2:%[0-9]+]] = apply
|
// CHECK-NEXT: [[C2:%[0-9]+]] = apply
|
||||||
|
|
||||||
%9 = ref_to_unowned %8 : $SomeClass to $@sil_unowned SomeClass
|
%9 = ref_to_unowned %8 : $SomeClass to $@sil_unowned SomeClass
|
||||||
@@ -394,7 +394,7 @@ struct ContainsObjectPointer {
|
|||||||
var y : Builtin.ObjectPointer
|
var y : Builtin.ObjectPointer
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_struct : $[thin] (value : [inout] ContainsObjectPointer) -> () {
|
sil @test_struct : $@thin (value : @inout ContainsObjectPointer) -> () {
|
||||||
bb0(%0 : $*ContainsObjectPointer):
|
bb0(%0 : $*ContainsObjectPointer):
|
||||||
%b = alloc_box $ContainsObjectPointer
|
%b = alloc_box $ContainsObjectPointer
|
||||||
%1 = load %0 : $*ContainsObjectPointer
|
%1 = load %0 : $*ContainsObjectPointer
|
||||||
@@ -409,7 +409,7 @@ bb0(%0 : $*ContainsObjectPointer):
|
|||||||
// CHECK-NOT: load
|
// CHECK-NOT: load
|
||||||
// CHECK: store
|
// CHECK: store
|
||||||
// CHECK: return
|
// CHECK: return
|
||||||
sil @non_box_assign_trivial : $[thin] (lhs : [inout] Bool, rhs : Bool) -> () {
|
sil @non_box_assign_trivial : $@thin (lhs : @inout Bool, rhs : Bool) -> () {
|
||||||
bb0(%0 : $*Bool, %1 : $Bool):
|
bb0(%0 : $*Bool, %1 : $Bool):
|
||||||
assign %1 to %0 : $*Bool
|
assign %1 to %0 : $*Bool
|
||||||
%9 = tuple ()
|
%9 = tuple ()
|
||||||
@@ -420,7 +420,7 @@ bb0(%0 : $*Bool, %1 : $Bool):
|
|||||||
// CHECK: load
|
// CHECK: load
|
||||||
// CHECK: store
|
// CHECK: store
|
||||||
// CHECK: return
|
// CHECK: return
|
||||||
sil @non_box_assign : $[thin] (lhs : [inout] SomeClass, rhs : SomeClass) -> () {
|
sil @non_box_assign : $@thin (lhs : @inout SomeClass, rhs : SomeClass) -> () {
|
||||||
bb0(%0 : $*SomeClass, %1 : $SomeClass):
|
bb0(%0 : $*SomeClass, %1 : $SomeClass):
|
||||||
assign %1 to %0 : $*SomeClass
|
assign %1 to %0 : $*SomeClass
|
||||||
%9 = tuple ()
|
%9 = tuple ()
|
||||||
@@ -442,7 +442,7 @@ sil @test_tlc : $() -> () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @promote_alloc_stack
|
// CHECK-LABEL: sil @promote_alloc_stack
|
||||||
sil @promote_alloc_stack : $[thin] (i : Int64) -> Builtin.Int64 {
|
sil @promote_alloc_stack : $@thin (i : Int64) -> Builtin.Int64 {
|
||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
%5 = integer_literal $Builtin.Int64, 1
|
%5 = integer_literal $Builtin.Int64, 1
|
||||||
%18 = struct $Int64 (%5 : $Builtin.Int64)
|
%18 = struct $Int64 (%5 : $Builtin.Int64)
|
||||||
@@ -454,7 +454,7 @@ bb0(%0 : $Int64):
|
|||||||
store %18 to %22#1 : $*Int64
|
store %18 to %22#1 : $*Int64
|
||||||
%24 = struct_element_addr %22#1 : $*Int64, #value
|
%24 = struct_element_addr %22#1 : $*Int64, #value
|
||||||
%25 = load %24 : $*Builtin.Int64
|
%25 = load %24 : $*Builtin.Int64
|
||||||
dealloc_stack %22#0 : $*[local_storage] Int64
|
dealloc_stack %22#0 : $*@local_storage Int64
|
||||||
// CHECK: return [[SE]]
|
// CHECK: return [[SE]]
|
||||||
return %25 : $Builtin.Int64
|
return %25 : $Builtin.Int64
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ struct Triple {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @TripleTest
|
// CHECK-LABEL: sil @TripleTest
|
||||||
sil @TripleTest : $[cc(method), thin] ((s : Int64), [inout] Triple) -> Triple {
|
sil @TripleTest : $@cc(method) @thin ((s : Int64), @inout Triple) -> Triple {
|
||||||
bb0(%0 : $Int64, %1 : $*Triple):
|
bb0(%0 : $Int64, %1 : $*Triple):
|
||||||
%4 = alloc_box $Triple
|
%4 = alloc_box $Triple
|
||||||
%5 = load %1 : $*Triple
|
%5 = load %1 : $*Triple
|
||||||
@@ -31,7 +31,7 @@ struct Single {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @SingleTest
|
// CHECK-LABEL: sil @SingleTest
|
||||||
sil @SingleTest : $[cc(method), thin] (s : [inout] Single, a : Int64) -> Single {
|
sil @SingleTest : $@cc(method) @thin (s : @inout Single, a : Int64) -> Single {
|
||||||
bb0(%0 : $*Single, %1 : $Int64):
|
bb0(%0 : $*Single, %1 : $Int64):
|
||||||
%4 = alloc_box $Single
|
%4 = alloc_box $Single
|
||||||
%5 = load %0 : $*Single
|
%5 = load %0 : $*Single
|
||||||
@@ -53,21 +53,21 @@ enum SomeUnion {
|
|||||||
case y(SomeClass)
|
case y(SomeClass)
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @getSomeClass : $[thin] ((), SomeClass.metatype) -> SomeClass
|
sil @getSomeClass : $@thin ((), SomeClass.metatype) -> SomeClass
|
||||||
sil @getSomeUnion : $[thin] (SomeClass, SomeUnion.metatype) -> SomeUnion
|
sil @getSomeUnion : $@thin (SomeClass, SomeUnion.metatype) -> SomeUnion
|
||||||
|
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_union_release
|
// CHECK-LABEL: sil @test_union_release
|
||||||
sil @test_union_release : $[thin] () -> () {
|
sil @test_union_release : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = tuple ()
|
%0 = tuple ()
|
||||||
%1 = alloc_box $SomeUnion // users: %9, %8
|
%1 = alloc_box $SomeUnion // users: %9, %8
|
||||||
%2 = function_ref @getSomeUnion : $[thin] (SomeClass, SomeUnion.metatype) -> SomeUnion // user: %7
|
%2 = function_ref @getSomeUnion : $@thin (SomeClass, SomeUnion.metatype) -> SomeUnion // user: %7
|
||||||
%3 = metatype $SomeUnion.metatype // user: %7
|
%3 = metatype $SomeUnion.metatype // user: %7
|
||||||
%4 = function_ref @getSomeClass : $[thin] ((), SomeClass.metatype) -> SomeClass // user: %6
|
%4 = function_ref @getSomeClass : $@thin ((), SomeClass.metatype) -> SomeClass // user: %6
|
||||||
%5 = metatype $SomeClass.metatype // user: %6
|
%5 = metatype $SomeClass.metatype // user: %6
|
||||||
%6 = apply %4(%5) : $[thin] ((), SomeClass.metatype) -> SomeClass // user: %7
|
%6 = apply %4(%5) : $@thin ((), SomeClass.metatype) -> SomeClass // user: %7
|
||||||
%7 = apply %2(%6, %3) : $[thin] (SomeClass, SomeUnion.metatype) -> SomeUnion // user: %8
|
%7 = apply %2(%6, %3) : $@thin (SomeClass, SomeUnion.metatype) -> SomeUnion // user: %8
|
||||||
assign %7 to %1#1 : $*SomeUnion
|
assign %7 to %1#1 : $*SomeUnion
|
||||||
strong_release %1#0 : $Builtin.ObjectPointer
|
strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
%10 = tuple () // user: %11
|
%10 = tuple () // user: %11
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ protocol P {
|
|||||||
func foo()
|
func foo()
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @takeInt : $[cc(method), thin] ((), [inout] Int64) -> ()
|
sil @takeInt : $@cc(method) @thin ((), @inout Int64) -> ()
|
||||||
|
|
||||||
sil @TrivialTest : $[thin] (a: [inout] Int64) -> () {
|
sil @TrivialTest : $@thin (a: @inout Int64) -> () {
|
||||||
bb0(%0 : $*Int64):
|
bb0(%0 : $*Int64):
|
||||||
%1 = alloc_stack $Int64 // var a // users: %6, %2, %4, %5
|
%1 = alloc_stack $Int64 // var a // users: %6, %2, %4, %5
|
||||||
copy_addr %0 to [initialization] %1#1 : $*Int64
|
copy_addr %0 to [initialization] %1#1 : $*Int64
|
||||||
%3 = function_ref @takeInt : $[cc(method), thin] ((), [inout] Int64) -> () // user: %4
|
%3 = function_ref @takeInt : $@cc(method) @thin ((), @inout Int64) -> () // user: %4
|
||||||
%4 = apply %3(%1#1) : $[cc(method), thin] ((), [inout] Int64) -> ()
|
%4 = apply %3(%1#1) : $@cc(method) @thin ((), @inout Int64) -> ()
|
||||||
copy_addr %1#1 to %0 : $*Int64
|
copy_addr %1#1 to %0 : $*Int64
|
||||||
dealloc_stack %1#0 : $*@local_storage Int64
|
dealloc_stack %1#0 : $*@local_storage Int64
|
||||||
%7 = tuple () // user: %8
|
%7 = tuple () // user: %8
|
||||||
@@ -25,17 +25,17 @@ bb0(%0 : $*Int64):
|
|||||||
|
|
||||||
|
|
||||||
// CHECK-LABEL: sil @AddressOnlyTest
|
// CHECK-LABEL: sil @AddressOnlyTest
|
||||||
sil @AddressOnlyTest : $[thin] (a: [inout] P) -> () {
|
sil @AddressOnlyTest : $@thin (a: @inout P) -> () {
|
||||||
bb0(%0 : $*P): // CHECK: bb0(%0 : $*P):
|
bb0(%0 : $*P): // CHECK: bb0(%0 : $*P):
|
||||||
%1 = alloc_stack $P
|
%1 = alloc_stack $P
|
||||||
copy_addr %0 to [initialization] %1#1 : $*P
|
copy_addr %0 to [initialization] %1#1 : $*P
|
||||||
|
|
||||||
// CHECK-NEXT: project_existential %0 : $*P
|
// CHECK-NEXT: project_existential %0 : $*P
|
||||||
%3 = project_existential %1#1 : $*P to $*@sil_self P
|
%3 = project_existential %1#1 : $*P to $*@sil_self P
|
||||||
%4 = protocol_method %1#1 : $*P, #P.foo!1 : $[cc(method)] ((), [inout] @sil_self P) -> ()
|
%4 = protocol_method %1#1 : $*P, #P.foo!1 : $@cc(method) ((), @inout @sil_self P) -> ()
|
||||||
|
|
||||||
// CHECK: apply
|
// CHECK: apply
|
||||||
%5 = apply %4(%3) : $[cc(method)] ((), [inout] @sil_self P) -> ()
|
%5 = apply %4(%3) : $@cc(method) ((), @inout @sil_self P) -> ()
|
||||||
|
|
||||||
copy_addr [take] %1#1 to %0 : $*P
|
copy_addr [take] %1#1 to %0 : $*P
|
||||||
dealloc_stack %1#0 : $*@local_storage P
|
dealloc_stack %1#0 : $*@local_storage P
|
||||||
@@ -56,10 +56,10 @@ struct NontrivialStruct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sil @takeNontrivial : $[cc(method), thin] ((), [inout] NontrivialStruct) -> ()
|
sil @takeNontrivial : $@cc(method) @thin ((), @inout NontrivialStruct) -> ()
|
||||||
|
|
||||||
// CHECK-LABEL: sil @NontrivialTest
|
// CHECK-LABEL: sil @NontrivialTest
|
||||||
sil @NontrivialTest : $[thin] (a: [inout] NontrivialStruct) -> () {
|
sil @NontrivialTest : $@thin (a: @inout NontrivialStruct) -> () {
|
||||||
bb0(%0 : $*NontrivialStruct):
|
bb0(%0 : $*NontrivialStruct):
|
||||||
// CHECK: bb0(%0 : $*NontrivialStruct):
|
// CHECK: bb0(%0 : $*NontrivialStruct):
|
||||||
|
|
||||||
@@ -68,10 +68,10 @@ bb0(%0 : $*NontrivialStruct):
|
|||||||
|
|
||||||
// CHECK-NEXT: // function_ref takeNontrivial
|
// CHECK-NEXT: // function_ref takeNontrivial
|
||||||
// CHECK-NEXT: function_ref @takeNontrivial
|
// CHECK-NEXT: function_ref @takeNontrivial
|
||||||
%3 = function_ref @takeNontrivial : $[cc(method), thin] ((), [inout] NontrivialStruct) -> () // user: %4
|
%3 = function_ref @takeNontrivial : $@cc(method) @thin ((), @inout NontrivialStruct) -> () // user: %4
|
||||||
|
|
||||||
// CHECK-NEXT: apply
|
// CHECK-NEXT: apply
|
||||||
%4 = apply %3(%1#1) : $[cc(method), thin] ((), [inout] NontrivialStruct) -> ()
|
%4 = apply %3(%1#1) : $@cc(method) @thin ((), @inout NontrivialStruct) -> ()
|
||||||
copy_addr [take] %1#1 to %0 : $*NontrivialStruct
|
copy_addr [take] %1#1 to %0 : $*NontrivialStruct
|
||||||
dealloc_stack %1#0 : $*@local_storage NontrivialStruct
|
dealloc_stack %1#0 : $*@local_storage NontrivialStruct
|
||||||
|
|
||||||
|
|||||||
@@ -3,27 +3,27 @@
|
|||||||
import Builtin
|
import Builtin
|
||||||
import swift
|
import swift
|
||||||
|
|
||||||
sil @plus : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
sil @plus : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
sil @fromLiteral : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
sil @fromLiteral : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_add : $[thin] (x: Int64) -> Int64 {
|
// CHECK-LABEL: sil @test_add : $@thin (x: Int64) -> Int64 {
|
||||||
sil @test_add : $[thin] (x: Int64) -> Int64 {
|
sil @test_add : $@thin (x: Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
%1 = alloc_box $Int64
|
%1 = alloc_box $Int64
|
||||||
store %0 to %1#1 : $*Int64
|
store %0 to %1#1 : $*Int64
|
||||||
%3 = function_ref @plus : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%3 = function_ref @plus : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
%4 = load %1#1 : $*Int64
|
%4 = load %1#1 : $*Int64
|
||||||
%5 = function_ref @fromLiteral : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%5 = function_ref @fromLiteral : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%6 = metatype $Int64.metatype
|
%6 = metatype $Int64.metatype
|
||||||
%7 = integer_literal $Builtin.Int128, 20
|
%7 = integer_literal $Builtin.Int128, 20
|
||||||
%8 = apply %5(%7, %6) : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%8 = apply %5(%7, %6) : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%9 = apply %3(%4, %8) : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%9 = apply %3(%4, %8) : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
strong_release %1#0 : $Builtin.ObjectPointer
|
strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
return %9 : $Int64
|
return %9 : $Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @inline_test_add : $[thin] (x: Int64) -> Int64 {
|
// CHECK-LABEL: sil @inline_test_add : $@thin (x: Int64) -> Int64 {
|
||||||
sil @inline_test_add : $[thin] (x: Int64) -> Int64 {
|
sil @inline_test_add : $@thin (x: Int64) -> Int64 {
|
||||||
// CHECK: [[BB0:.*]]([[VAL0:%.*]] : $Int64):
|
// CHECK: [[BB0:.*]]([[VAL0:%.*]] : $Int64):
|
||||||
// CHECK: [[VAL1:%.*]] = alloc_box $Int64
|
// CHECK: [[VAL1:%.*]] = alloc_box $Int64
|
||||||
// CHECK: store [[VAL0]] to [[VAL1]]#1
|
// CHECK: store [[VAL0]] to [[VAL1]]#1
|
||||||
@@ -56,27 +56,27 @@ sil @inline_test_add : $[thin] (x: Int64) -> Int64 {
|
|||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
%1 = alloc_box $Int64
|
%1 = alloc_box $Int64
|
||||||
store %0 to %1#1 : $*Int64
|
store %0 to %1#1 : $*Int64
|
||||||
%3 = function_ref @plus : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%3 = function_ref @plus : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
%4 = function_ref @test_add : $[thin] (x: Int64) -> Int64
|
%4 = function_ref @test_add : $@thin (x: Int64) -> Int64
|
||||||
%5 = function_ref @plus : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%5 = function_ref @plus : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
%6 = load %1#1 : $*Int64
|
%6 = load %1#1 : $*Int64
|
||||||
%7 = function_ref @fromLiteral : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%7 = function_ref @fromLiteral : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%8 = metatype $Int64.metatype
|
%8 = metatype $Int64.metatype
|
||||||
%9 = integer_literal $Builtin.Int128, 10
|
%9 = integer_literal $Builtin.Int128, 10
|
||||||
%10 = apply %7(%9, %8) : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%10 = apply %7(%9, %8) : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%11 = apply %5(%6, %10) : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%11 = apply %5(%6, %10) : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
%12 = apply [transparent] %4(%11) : $[thin] (x: Int64) -> Int64
|
%12 = apply [transparent] %4(%11) : $@thin (x: Int64) -> Int64
|
||||||
%13 = function_ref @fromLiteral : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%13 = function_ref @fromLiteral : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%14 = metatype $Int64.metatype
|
%14 = metatype $Int64.metatype
|
||||||
%15 = integer_literal $Builtin.Int128, 30
|
%15 = integer_literal $Builtin.Int128, 30
|
||||||
%16 = apply %13(%15, %14) : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%16 = apply %13(%15, %14) : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%17 = apply %3(%12, %16) : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%17 = apply %3(%12, %16) : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
strong_release %1#0 : $Builtin.ObjectPointer
|
strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
return %17 : $Int64
|
return %17 : $Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @inline_twice_test_add : $[thin] (x: Int64) -> Int64 {
|
// CHECK-LABEL: sil @inline_twice_test_add : $@thin (x: Int64) -> Int64 {
|
||||||
sil @inline_twice_test_add : $[thin] (x: Int64) -> Int64 {
|
sil @inline_twice_test_add : $@thin (x: Int64) -> Int64 {
|
||||||
// CHECK: [[BB0:.*]]([[VAL0:%.*]] : $Int64):
|
// CHECK: [[BB0:.*]]([[VAL0:%.*]] : $Int64):
|
||||||
// CHECK: [[VAL1:%.*]] = alloc_box $Int64
|
// CHECK: [[VAL1:%.*]] = alloc_box $Int64
|
||||||
// CHECK: store [[VAL0]] to [[VAL1]]#1
|
// CHECK: store [[VAL0]] to [[VAL1]]#1
|
||||||
@@ -119,23 +119,23 @@ sil @inline_twice_test_add : $[thin] (x: Int64) -> Int64 {
|
|||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
%1 = alloc_box $Int64
|
%1 = alloc_box $Int64
|
||||||
store %0 to %1#1 : $*Int64
|
store %0 to %1#1 : $*Int64
|
||||||
%3 = function_ref @plus : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%3 = function_ref @plus : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
%4 = function_ref @test_add : $[thin] (x: Int64) -> Int64
|
%4 = function_ref @test_add : $@thin (x: Int64) -> Int64
|
||||||
%5 = function_ref @test_add : $[thin] (x: Int64) -> Int64
|
%5 = function_ref @test_add : $@thin (x: Int64) -> Int64
|
||||||
%6 = function_ref @plus : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%6 = function_ref @plus : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
%7 = load %1#1 : $*Int64
|
%7 = load %1#1 : $*Int64
|
||||||
%8 = function_ref @fromLiteral : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%8 = function_ref @fromLiteral : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%9 = metatype $Int64.metatype
|
%9 = metatype $Int64.metatype
|
||||||
%10 = integer_literal $Builtin.Int128, 10
|
%10 = integer_literal $Builtin.Int128, 10
|
||||||
%11 = apply %8(%10, %9) : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%11 = apply %8(%10, %9) : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%12 = apply %6(%7, %11) : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%12 = apply %6(%7, %11) : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
%13 = apply [transparent] %5(%12) : $[thin] (x: Int64) -> Int64
|
%13 = apply [transparent] %5(%12) : $@thin (x: Int64) -> Int64
|
||||||
%14 = apply [transparent] %4(%13) : $[thin] (x: Int64) -> Int64
|
%14 = apply [transparent] %4(%13) : $@thin (x: Int64) -> Int64
|
||||||
%15 = function_ref @fromLiteral : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%15 = function_ref @fromLiteral : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%16 = metatype $Int64.metatype
|
%16 = metatype $Int64.metatype
|
||||||
%17 = integer_literal $Builtin.Int128, 30
|
%17 = integer_literal $Builtin.Int128, 30
|
||||||
%18 = apply %15(%17, %16) : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%18 = apply %15(%17, %16) : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%19 = apply %3(%14, %18) : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%19 = apply %3(%14, %18) : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
strong_release %1#0 : $Builtin.ObjectPointer
|
strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
return %19 : $Int64
|
return %19 : $Int64
|
||||||
}
|
}
|
||||||
@@ -143,8 +143,8 @@ bb0(%0 : $Int64):
|
|||||||
protocol SomeProtocol {
|
protocol SomeProtocol {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_protocol_metatype : $[thin] (p: SomeProtocol) -> SomeProtocol.metatype
|
// CHECK-LABEL: sil @test_protocol_metatype : $@thin (p: SomeProtocol) -> SomeProtocol.metatype
|
||||||
sil @test_protocol_metatype : $[thin] (p: SomeProtocol) -> SomeProtocol.metatype {
|
sil @test_protocol_metatype : $@thin (p: SomeProtocol) -> SomeProtocol.metatype {
|
||||||
bb0(%0 : $*SomeProtocol):
|
bb0(%0 : $*SomeProtocol):
|
||||||
%1 = alloc_box $SomeProtocol
|
%1 = alloc_box $SomeProtocol
|
||||||
copy_addr [take] %0 to [initialization] %1#1 : $*SomeProtocol
|
copy_addr [take] %0 to [initialization] %1#1 : $*SomeProtocol
|
||||||
@@ -152,13 +152,13 @@ bb0(%0 : $*SomeProtocol):
|
|||||||
copy_addr %1#1 to [initialization] %4#1 : $*SomeProtocol
|
copy_addr %1#1 to [initialization] %4#1 : $*SomeProtocol
|
||||||
%6 = protocol_metatype $SomeProtocol.metatype, %4#1 : $*SomeProtocol
|
%6 = protocol_metatype $SomeProtocol.metatype, %4#1 : $*SomeProtocol
|
||||||
destroy_addr %4#1 : $*SomeProtocol
|
destroy_addr %4#1 : $*SomeProtocol
|
||||||
dealloc_stack %4#0 : $*[local_storage] SomeProtocol
|
dealloc_stack %4#0 : $*@local_storage SomeProtocol
|
||||||
strong_release %1#0 : $Builtin.ObjectPointer
|
strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
return %6 : $SomeProtocol.metatype
|
return %6 : $SomeProtocol.metatype
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @inline_test_protocol_metatype : $[thin] (p: SomeProtocol) -> SomeProtocol.metatype
|
// CHECK-LABEL: sil @inline_test_protocol_metatype : $@thin (p: SomeProtocol) -> SomeProtocol.metatype
|
||||||
sil @inline_test_protocol_metatype : $[thin] (p: SomeProtocol) -> SomeProtocol.metatype {
|
sil @inline_test_protocol_metatype : $@thin (p: SomeProtocol) -> SomeProtocol.metatype {
|
||||||
// CHECK: [[BB0:.*]]([[VAL0:%.*]] : $*SomeProtocol):
|
// CHECK: [[BB0:.*]]([[VAL0:%.*]] : $*SomeProtocol):
|
||||||
// CHECK: [[VAL1:%.*]] = alloc_box $SomeProtocol
|
// CHECK: [[VAL1:%.*]] = alloc_box $SomeProtocol
|
||||||
// CHECK: copy_addr [take] %0 to [initialization] [[VAL1]]#1
|
// CHECK: copy_addr [take] %0 to [initialization] [[VAL1]]#1
|
||||||
@@ -171,8 +171,8 @@ sil @inline_test_protocol_metatype : $[thin] (p: SomeProtocol) -> SomeProtocol.m
|
|||||||
// CHECK: return [[VAL6]]
|
// CHECK: return [[VAL6]]
|
||||||
|
|
||||||
bb0(%0 : $*SomeProtocol):
|
bb0(%0 : $*SomeProtocol):
|
||||||
%1 = function_ref @test_protocol_metatype : $[thin] (p: SomeProtocol) -> SomeProtocol.metatype
|
%1 = function_ref @test_protocol_metatype : $@thin (p: SomeProtocol) -> SomeProtocol.metatype
|
||||||
%2 = apply [transparent] %1(%0) : $[thin] (p: SomeProtocol) -> SomeProtocol.metatype
|
%2 = apply [transparent] %1(%0) : $@thin (p: SomeProtocol) -> SomeProtocol.metatype
|
||||||
%3 = return %2 : $SomeProtocol.metatype
|
%3 = return %2 : $SomeProtocol.metatype
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,30 +182,30 @@ bb0:
|
|||||||
return %0 : $()
|
return %0 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @get_logic_value : $[cc(method), thin] ((), [inout] Bool) -> Builtin.Int1
|
sil @get_logic_value : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
sil @add_floats : $[thin] (lhs: Float32, rhs: Float32) -> Float32
|
sil @add_floats : $@thin (lhs: Float32, rhs: Float32) -> Float32
|
||||||
sil @convertFromBuiltinFloatLiteral : $[thin] ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
sil @convertFromBuiltinFloatLiteral : $@thin ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
||||||
sil @sub_floats : $[thin] (lhs: Float32, rhs: Float32) -> Float32
|
sil @sub_floats : $@thin (lhs: Float32, rhs: Float32) -> Float32
|
||||||
|
|
||||||
sil @foo : $[thin] (x: Float32, y: Float32) -> Bool
|
sil @foo : $@thin (x: Float32, y: Float32) -> Bool
|
||||||
sil @bar : $[thin] (x: Float32) -> Bool
|
sil @bar : $@thin (x: Float32) -> Bool
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_control_flow : $[thin] (x: Float32, y: Float32) -> Float32
|
// CHECK-LABEL: sil @test_control_flow : $@thin (x: Float32, y: Float32) -> Float32
|
||||||
sil @test_control_flow : $[thin] (x: Float32, y: Float32) -> Float32 {
|
sil @test_control_flow : $@thin (x: Float32, y: Float32) -> Float32 {
|
||||||
bb0(%0 : $Float32, %1 : $Float32):
|
bb0(%0 : $Float32, %1 : $Float32):
|
||||||
%2 = alloc_box $Float32
|
%2 = alloc_box $Float32
|
||||||
%3 = alloc_box $Float32
|
%3 = alloc_box $Float32
|
||||||
store %0 to %2#1 : $*Float32
|
store %0 to %2#1 : $*Float32
|
||||||
store %1 to %3#1 : $*Float32
|
store %1 to %3#1 : $*Float32
|
||||||
%6 = function_ref @get_logic_value : $[cc(method), thin] ((), [inout] Bool) -> Builtin.Int1
|
%6 = function_ref @get_logic_value : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
%7 = function_ref @foo : $[thin] (x: Float32, y: Float32) -> Bool
|
%7 = function_ref @foo : $@thin (x: Float32, y: Float32) -> Bool
|
||||||
%8 = load %2#1 : $*Float32
|
%8 = load %2#1 : $*Float32
|
||||||
%9 = load %3#1 : $*Float32
|
%9 = load %3#1 : $*Float32
|
||||||
%10 = apply %7(%8, %9) : $[thin] (x: Float32, y: Float32) -> Bool
|
%10 = apply %7(%8, %9) : $@thin (x: Float32, y: Float32) -> Bool
|
||||||
%11 = alloc_stack $Bool
|
%11 = alloc_stack $Bool
|
||||||
store %10 to %11#1 : $*Bool
|
store %10 to %11#1 : $*Bool
|
||||||
%13 = apply %6(%11#1) : $[cc(method), thin] ((), [inout] Bool) -> Builtin.Int1
|
%13 = apply %6(%11#1) : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
dealloc_stack %11#0 : $*[local_storage] Bool
|
dealloc_stack %11#0 : $*@local_storage Bool
|
||||||
cond_br %13, bb1, bb2
|
cond_br %13, bb1, bb2
|
||||||
|
|
||||||
bb1:
|
bb1:
|
||||||
@@ -216,24 +216,24 @@ bb2:
|
|||||||
br bb3
|
br bb3
|
||||||
|
|
||||||
bb3:
|
bb3:
|
||||||
%19 = function_ref @get_logic_value : $[cc(method), thin] ((), [inout] Bool) -> Builtin.Int1
|
%19 = function_ref @get_logic_value : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
%20 = function_ref @bar : $[thin] (x: Float32) -> Bool
|
%20 = function_ref @bar : $@thin (x: Float32) -> Bool
|
||||||
%21 = load %3#1 : $*Float32
|
%21 = load %3#1 : $*Float32
|
||||||
%22 = apply %20(%21) : $[thin] (x: Float32) -> Bool
|
%22 = apply %20(%21) : $@thin (x: Float32) -> Bool
|
||||||
%23 = alloc_stack $Bool
|
%23 = alloc_stack $Bool
|
||||||
store %22 to %23#1 : $*Bool
|
store %22 to %23#1 : $*Bool
|
||||||
%25 = apply %19(%23#1) : $[cc(method), thin] ((), [inout] Bool) -> Builtin.Int1
|
%25 = apply %19(%23#1) : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
dealloc_stack %23#0 : $*[local_storage] Bool
|
dealloc_stack %23#0 : $*@local_storage Bool
|
||||||
cond_br %25, bb4, bb5
|
cond_br %25, bb4, bb5
|
||||||
|
|
||||||
bb4:
|
bb4:
|
||||||
%28 = function_ref @add_floats : $[thin] (lhs: Float32, rhs: Float32) -> Float32
|
%28 = function_ref @add_floats : $@thin (lhs: Float32, rhs: Float32) -> Float32
|
||||||
%29 = load %3#1 : $*Float32
|
%29 = load %3#1 : $*Float32
|
||||||
%30 = function_ref @convertFromBuiltinFloatLiteral : $[thin] ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
%30 = function_ref @convertFromBuiltinFloatLiteral : $@thin ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
||||||
%31 = metatype $Float32.metatype
|
%31 = metatype $Float32.metatype
|
||||||
%32 = float_literal $Builtin.FPIEEE64, 0x3FF0000000000000
|
%32 = float_literal $Builtin.FPIEEE64, 0x3FF0000000000000
|
||||||
%33 = apply %30(%32, %31) : $[thin] ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
%33 = apply %30(%32, %31) : $@thin ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
||||||
%34 = apply %28(%29, %33) : $[thin] (lhs: Float32, rhs: Float32) -> Float32
|
%34 = apply %28(%29, %33) : $@thin (lhs: Float32, rhs: Float32) -> Float32
|
||||||
store %34 to %3#1 : $*Float32
|
store %34 to %3#1 : $*Float32
|
||||||
br bb3
|
br bb3
|
||||||
|
|
||||||
@@ -247,8 +247,8 @@ bb6(%39 : $Float32):
|
|||||||
return %39 : $Float32
|
return %39 : $Float32
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @inline_test_control_flow : $[thin] (x: Float32) -> Float32
|
// CHECK-LABEL: sil @inline_test_control_flow : $@thin (x: Float32) -> Float32
|
||||||
sil @inline_test_control_flow : $[thin] (x: Float32) -> Float32 {
|
sil @inline_test_control_flow : $@thin (x: Float32) -> Float32 {
|
||||||
|
|
||||||
// CHECK: [[BB0:.*]]([[VAL0:%.*]] : $Float32):
|
// CHECK: [[BB0:.*]]([[VAL0:%.*]] : $Float32):
|
||||||
// CHECK: [[VAL1:%.*]] = alloc_box $Float32
|
// CHECK: [[VAL1:%.*]] = alloc_box $Float32
|
||||||
@@ -330,55 +330,55 @@ sil @inline_test_control_flow : $[thin] (x: Float32) -> Float32 {
|
|||||||
bb0(%0 : $Float32):
|
bb0(%0 : $Float32):
|
||||||
%1 = alloc_box $Float32
|
%1 = alloc_box $Float32
|
||||||
store %0 to %1#1 : $*Float32
|
store %0 to %1#1 : $*Float32
|
||||||
%3 = function_ref @sub_floats : $[thin] (lhs: Float32, rhs: Float32) -> Float32
|
%3 = function_ref @sub_floats : $@thin (lhs: Float32, rhs: Float32) -> Float32
|
||||||
%4 = function_ref @test_control_flow : $[thin] (x: Float32, y: Float32) -> Float32
|
%4 = function_ref @test_control_flow : $@thin (x: Float32, y: Float32) -> Float32
|
||||||
%5 = function_ref @add_floats : $[thin] (lhs: Float32, rhs: Float32) -> Float32
|
%5 = function_ref @add_floats : $@thin (lhs: Float32, rhs: Float32) -> Float32
|
||||||
%6 = load %1#1 : $*Float32
|
%6 = load %1#1 : $*Float32
|
||||||
%7 = function_ref @convertFromBuiltinFloatLiteral : $[thin] ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
%7 = function_ref @convertFromBuiltinFloatLiteral : $@thin ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
||||||
%8 = metatype $Float32.metatype
|
%8 = metatype $Float32.metatype
|
||||||
%9 = float_literal $Builtin.FPIEEE64, 0x3FF0000000000000
|
%9 = float_literal $Builtin.FPIEEE64, 0x3FF0000000000000
|
||||||
%10 = apply %7(%9, %8) : $[thin] ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
%10 = apply %7(%9, %8) : $@thin ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
||||||
%11 = apply %5(%6, %10) : $[thin] (lhs: Float32, rhs: Float32) -> Float32
|
%11 = apply %5(%6, %10) : $@thin (lhs: Float32, rhs: Float32) -> Float32
|
||||||
%12 = function_ref @convertFromBuiltinFloatLiteral : $[thin] ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
%12 = function_ref @convertFromBuiltinFloatLiteral : $@thin ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
||||||
%13 = metatype $Float32.metatype
|
%13 = metatype $Float32.metatype
|
||||||
%14 = float_literal $Builtin.FPIEEE64, 0x4000000000000000
|
%14 = float_literal $Builtin.FPIEEE64, 0x4000000000000000
|
||||||
%15 = apply %12(%14, %13) : $[thin] ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
%15 = apply %12(%14, %13) : $@thin ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
||||||
%16 = apply [transparent] %4(%11, %15) : $[thin] (x: Float32, y: Float32) -> Float32
|
%16 = apply [transparent] %4(%11, %15) : $@thin (x: Float32, y: Float32) -> Float32
|
||||||
%17 = function_ref @convertFromBuiltinFloatLiteral : $[thin] ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
%17 = function_ref @convertFromBuiltinFloatLiteral : $@thin ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
||||||
%18 = metatype $Float32.metatype
|
%18 = metatype $Float32.metatype
|
||||||
%19 = float_literal $Builtin.FPIEEE64, 0x4008000000000000
|
%19 = float_literal $Builtin.FPIEEE64, 0x4008000000000000
|
||||||
%20 = apply %17(%19, %18) : $[thin] ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
%20 = apply %17(%19, %18) : $@thin ((value: Builtin.FPIEEE64), Float32.metatype) -> Float32
|
||||||
%21 = apply %3(%16, %20) : $[thin] (lhs: Float32, rhs: Float32) -> Float32
|
%21 = apply %3(%16, %20) : $@thin (lhs: Float32, rhs: Float32) -> Float32
|
||||||
strong_release %1#0 : $Builtin.ObjectPointer
|
strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
return %21 : $Float32
|
return %21 : $Float32
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @test_recursive_foo : $[thin] (x: Float32) -> Float32
|
// CHECK-LABEL: @test_recursive_foo : $@thin (x: Float32) -> Float32
|
||||||
sil @test_recursive_foo : $[thin] (x: Float32) -> Float32 {
|
sil @test_recursive_foo : $@thin (x: Float32) -> Float32 {
|
||||||
// CHECK-NOT: function_ref
|
// CHECK-NOT: function_ref
|
||||||
// CHECK-NOT: apply
|
// CHECK-NOT: apply
|
||||||
// CHECK: return
|
// CHECK: return
|
||||||
|
|
||||||
bb0(%0 : $Float32):
|
bb0(%0 : $Float32):
|
||||||
%3 = function_ref @test_recursive_bar : $[thin] (x: Float32) -> Float32
|
%3 = function_ref @test_recursive_bar : $@thin (x: Float32) -> Float32
|
||||||
%5 = apply [transparent] %3(%0) : $[thin] (x: Float32) -> Float32
|
%5 = apply [transparent] %3(%0) : $@thin (x: Float32) -> Float32
|
||||||
return %5 : $Float32
|
return %5 : $Float32
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_recursive_bar : $[thin] (x: Float32) -> Float32
|
// CHECK-LABEL: sil @test_recursive_bar : $@thin (x: Float32) -> Float32
|
||||||
sil @test_recursive_bar : $[thin] (x: Float32) -> Float32 {
|
sil @test_recursive_bar : $@thin (x: Float32) -> Float32 {
|
||||||
// CHECK-NOT: function_ref
|
// CHECK-NOT: function_ref
|
||||||
// CHECK-NOT: apply
|
// CHECK-NOT: apply
|
||||||
// CHECK: return
|
// CHECK: return
|
||||||
|
|
||||||
bb0(%0 : $Float32):
|
bb0(%0 : $Float32):
|
||||||
%3 = function_ref @test_recursive_baz : $[thin] (x: Float32) -> Float32
|
%3 = function_ref @test_recursive_baz : $@thin (x: Float32) -> Float32
|
||||||
%5 = apply [transparent] %3(%0) : $[thin] (x: Float32) -> Float32
|
%5 = apply [transparent] %3(%0) : $@thin (x: Float32) -> Float32
|
||||||
return %5 : $Float32
|
return %5 : $Float32
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_recursive_baz : $[thin] (x: Float32) -> Float32
|
// CHECK-LABEL: sil @test_recursive_baz : $@thin (x: Float32) -> Float32
|
||||||
sil @test_recursive_baz : $[thin] (x: Float32) -> Float32 {
|
sil @test_recursive_baz : $@thin (x: Float32) -> Float32 {
|
||||||
// CHECK-NOT: function_ref
|
// CHECK-NOT: function_ref
|
||||||
// CHECK-NOT: apply
|
// CHECK-NOT: apply
|
||||||
// CHECK: return
|
// CHECK: return
|
||||||
@@ -387,50 +387,50 @@ bb0(%0 : $Float32):
|
|||||||
return %0 : $Float32
|
return %0 : $Float32
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_partial_foo : $[thin] Int64 -> Int64 {
|
// CHECK-LABEL: sil @test_partial_foo : $@thin Int64 -> Int64 {
|
||||||
sil @test_partial_foo : $[thin] (Int64) -> Int64 {
|
sil @test_partial_foo : $@thin (Int64) -> Int64 {
|
||||||
// CHECK: [[BB0:.*]]([[VAL0:%.*]] : $Int64):
|
// CHECK: [[BB0:.*]]([[VAL0:%.*]] : $Int64):
|
||||||
// CHECK: [[VAL1:%.*]] = function_ref @plus
|
// CHECK: [[VAL1:%.*]] = function_ref @plus
|
||||||
// CHECK: [[VAL2:%.*]] = apply [[VAL1]]([[VAL0]], [[VAL0]])
|
// CHECK: [[VAL2:%.*]] = apply [[VAL1]]([[VAL0]], [[VAL0]])
|
||||||
// CHECK: return [[VAL2]]
|
// CHECK: return [[VAL2]]
|
||||||
|
|
||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
%2 = function_ref @test_partial_bar : $[thin] (Int64 -> Int64, Int64) -> Int64
|
%2 = function_ref @test_partial_bar : $@thin (Int64 -> Int64, Int64) -> Int64
|
||||||
%3 = function_ref @test_partial_baz : $[thin] (Int64, Int64) -> Int64
|
%3 = function_ref @test_partial_baz : $@thin (Int64, Int64) -> Int64
|
||||||
%5 = partial_apply %3(%0) : $[thin] (Int64, Int64) -> Int64
|
%5 = partial_apply %3(%0) : $@thin (Int64, Int64) -> Int64
|
||||||
%13 = apply [transparent] %2(%5, %0) : $[thin] (Int64 -> Int64, Int64) -> Int64
|
%13 = apply [transparent] %2(%5, %0) : $@thin (Int64 -> Int64, Int64) -> Int64
|
||||||
return %13 : $Int64
|
return %13 : $Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_partial_baz : $[thin] (Int64, Int64) -> Int64 {
|
sil @test_partial_baz : $@thin (Int64, Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64, %1 : $Int64):
|
bb0(%0 : $Int64, %1 : $Int64):
|
||||||
%6 = function_ref @plus : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%6 = function_ref @plus : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
%7 = apply %6(%0, %1) : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%7 = apply %6(%0, %1) : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
return %7 : $Int64
|
return %7 : $Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_partial_bar : $[thin] (Int64 -> Int64, Int64) -> Int64 {
|
sil @test_partial_bar : $@thin (Int64 -> Int64, Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64 -> Int64, %1 : $Int64):
|
bb0(%0 : $Int64 -> Int64, %1 : $Int64):
|
||||||
%7 = apply [transparent] %0(%1) : $Int64 -> Int64
|
%7 = apply [transparent] %0(%1) : $Int64 -> Int64
|
||||||
return %7 : $Int64
|
return %7 : $Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @true_getter : $[thin] () -> Bool
|
sil @true_getter : $@thin () -> Bool
|
||||||
|
|
||||||
sil @short_circuit_or : $[thin] (lhs: Bool, rhs : () -> Bool) -> Bool {
|
sil @short_circuit_or : $@thin (lhs: Bool, rhs : () -> Bool) -> Bool {
|
||||||
bb0(%0 : $Bool, %1 : $() -> Bool):
|
bb0(%0 : $Bool, %1 : $() -> Bool):
|
||||||
%2 = alloc_box $Bool
|
%2 = alloc_box $Bool
|
||||||
%3 = alloc_box $() -> Bool
|
%3 = alloc_box $() -> Bool
|
||||||
store %0 to %2#1 : $*Bool
|
store %0 to %2#1 : $*Bool
|
||||||
store %1 to %3#1 : $*() -> Bool
|
store %1 to %3#1 : $*() -> Bool
|
||||||
%6 = function_ref @get_logic_value : $[cc(method), thin] ((), [inout] Bool) -> Builtin.Int1
|
%6 = function_ref @get_logic_value : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
%7 = apply %6(%2#1) : $[cc(method), thin] ((), [inout] Bool) -> Builtin.Int1
|
%7 = apply %6(%2#1) : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
cond_br %7, bb1, bb2
|
cond_br %7, bb1, bb2
|
||||||
|
|
||||||
bb1:
|
bb1:
|
||||||
|
|
||||||
%9 = function_ref @true_getter : $[thin] () -> Bool
|
%9 = function_ref @true_getter : $@thin () -> Bool
|
||||||
%10 = apply %9() : $[thin] () -> Bool
|
%10 = apply %9() : $@thin () -> Bool
|
||||||
br bb3(%10 : $Bool)
|
br bb3(%10 : $Bool)
|
||||||
|
|
||||||
bb2:
|
bb2:
|
||||||
@@ -445,7 +445,7 @@ bb3(%16 : $Bool):
|
|||||||
return %16 : $Bool
|
return %16 : $Bool
|
||||||
}
|
}
|
||||||
|
|
||||||
sil internal @closure0 : $[thin] ((), (Builtin.ObjectPointer, [inout] Bool)) -> Bool {
|
sil internal @closure0 : $@thin ((), (Builtin.ObjectPointer, @inout Bool)) -> Bool {
|
||||||
bb0(%0 : $Builtin.ObjectPointer, %1 : $*Bool):
|
bb0(%0 : $Builtin.ObjectPointer, %1 : $*Bool):
|
||||||
%2 = tuple ()
|
%2 = tuple ()
|
||||||
%3 = load %1 : $*Bool
|
%3 = load %1 : $*Bool
|
||||||
@@ -453,9 +453,9 @@ bb0(%0 : $Builtin.ObjectPointer, %1 : $*Bool):
|
|||||||
return %3 : $Bool
|
return %3 : $Bool
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_short_circuit : $[thin] (x: Bool, y: Bool) -> Bool {
|
sil @test_short_circuit : $@thin (x: Bool, y: Bool) -> Bool {
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_short_circuit : $[thin] (x: Bool, y: Bool) -> Bool {
|
// CHECK-LABEL: sil @test_short_circuit : $@thin (x: Bool, y: Bool) -> Bool {
|
||||||
|
|
||||||
// CHECK: cond_br {{%.*}}, [[BB1:.*]], [[BB3:.*]]
|
// CHECK: cond_br {{%.*}}, [[BB1:.*]], [[BB3:.*]]
|
||||||
|
|
||||||
@@ -481,12 +481,12 @@ bb0(%0 : $Bool, %1 : $Bool):
|
|||||||
%3 = alloc_box $Bool
|
%3 = alloc_box $Bool
|
||||||
store %0 to %2#1 : $*Bool
|
store %0 to %2#1 : $*Bool
|
||||||
store %1 to %3#1 : $*Bool
|
store %1 to %3#1 : $*Bool
|
||||||
%6 = function_ref @short_circuit_or : $[thin] (lhs: Bool, rhs : () -> Bool) -> Bool
|
%6 = function_ref @short_circuit_or : $@thin (lhs: Bool, rhs : () -> Bool) -> Bool
|
||||||
%7 = load %2#1 : $*Bool
|
%7 = load %2#1 : $*Bool
|
||||||
%8 = function_ref @closure0 : $[thin] ((), (Builtin.ObjectPointer, [inout] Bool)) -> Bool
|
%8 = function_ref @closure0 : $@thin ((), (Builtin.ObjectPointer, @inout Bool)) -> Bool
|
||||||
strong_retain %3#0 : $Builtin.ObjectPointer
|
strong_retain %3#0 : $Builtin.ObjectPointer
|
||||||
%10 = partial_apply %8(%3#0, %3#1) : $[thin] ((), (Builtin.ObjectPointer, [inout] Bool)) -> Bool
|
%10 = partial_apply %8(%3#0, %3#1) : $@thin ((), (Builtin.ObjectPointer, @inout Bool)) -> Bool
|
||||||
%11 = apply [transparent] %6(%7, %10) : $[thin] (lhs: Bool, rhs: () -> Bool) -> Bool
|
%11 = apply [transparent] %6(%7, %10) : $@thin (lhs: Bool, rhs: () -> Bool) -> Bool
|
||||||
strong_release %3#0 : $Builtin.ObjectPointer
|
strong_release %3#0 : $Builtin.ObjectPointer
|
||||||
strong_release %2#0 : $Builtin.ObjectPointer
|
strong_release %2#0 : $Builtin.ObjectPointer
|
||||||
return %11 : $Bool
|
return %11 : $Bool
|
||||||
|
|||||||
@@ -3,24 +3,24 @@
|
|||||||
import Builtin
|
import Builtin
|
||||||
import swift
|
import swift
|
||||||
|
|
||||||
sil @test_circular_foo : $[thin] (x : Float32) -> Float32 {
|
sil @test_circular_foo : $@thin (x : Float32) -> Float32 {
|
||||||
bb0(%0 : $Float32):
|
bb0(%0 : $Float32):
|
||||||
%3 = function_ref @test_circular_bar : $[thin] (x : Float32) -> Float32
|
%3 = function_ref @test_circular_bar : $@thin (x : Float32) -> Float32
|
||||||
%5 = apply [transparent] %3(%0) : $[thin] (x : Float32) -> Float32 // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 2 {{while inlining here}}
|
%5 = apply [transparent] %3(%0) : $@thin (x : Float32) -> Float32 // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 2 {{while inlining here}}
|
||||||
return %5 : $Float32
|
return %5 : $Float32
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_circular_bar : $[thin] (x : Float32) -> Float32 {
|
sil @test_circular_bar : $@thin (x : Float32) -> Float32 {
|
||||||
bb0(%0 : $Float32):
|
bb0(%0 : $Float32):
|
||||||
%3 = function_ref @test_circular_baz : $[thin] (x : Float32) -> Float32
|
%3 = function_ref @test_circular_baz : $@thin (x : Float32) -> Float32
|
||||||
%5 = apply [transparent] %3(%0) : $[thin] (x : Float32) -> Float32 // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 2 {{while inlining here}}
|
%5 = apply [transparent] %3(%0) : $@thin (x : Float32) -> Float32 // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 2 {{while inlining here}}
|
||||||
return %5 : $Float32
|
return %5 : $Float32
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_circular_baz : $[thin] (x : Float32) -> Float32 {
|
sil @test_circular_baz : $@thin (x : Float32) -> Float32 {
|
||||||
bb0(%0 : $Float32):
|
bb0(%0 : $Float32):
|
||||||
%3 = function_ref @test_circular_foo : $[thin] (x : Float32) -> Float32
|
%3 = function_ref @test_circular_foo : $@thin (x : Float32) -> Float32
|
||||||
%5 = apply [transparent] %3(%0) : $[thin] (x : Float32) -> Float32 // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 2 {{while inlining here}}
|
%5 = apply [transparent] %3(%0) : $@thin (x : Float32) -> Float32 // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 2 {{while inlining here}}
|
||||||
return %5 : $Float32
|
return %5 : $Float32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,48 +3,48 @@
|
|||||||
import Builtin
|
import Builtin
|
||||||
import swift
|
import swift
|
||||||
|
|
||||||
sil @plus : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
sil @plus : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
sil @fromLiteral : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
sil @fromLiteral : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
|
|
||||||
// CHECK-LABEL: sil @test_add : $[thin] (x: Int64) -> Int64 {
|
// CHECK-LABEL: sil @test_add : $@thin (x: Int64) -> Int64 {
|
||||||
sil @test_add : $[thin] (x: Int64) -> Int64 {
|
sil @test_add : $@thin (x: Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
%1 = alloc_box $Int64
|
%1 = alloc_box $Int64
|
||||||
store %0 to %1#1 : $*Int64
|
store %0 to %1#1 : $*Int64
|
||||||
%3 = function_ref @plus : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%3 = function_ref @plus : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
%4 = load %1#1 : $*Int64
|
%4 = load %1#1 : $*Int64
|
||||||
%5 = function_ref @fromLiteral : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%5 = function_ref @fromLiteral : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%6 = metatype $Int64.metatype
|
%6 = metatype $Int64.metatype
|
||||||
%7 = integer_literal $Builtin.Int128, 20
|
%7 = integer_literal $Builtin.Int128, 20
|
||||||
%8 = apply %5(%7, %6) : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%8 = apply %5(%7, %6) : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%9 = apply %3(%4, %8) : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%9 = apply %3(%4, %8) : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
strong_release %1#0 : $Builtin.ObjectPointer
|
strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
return %9 : $Int64
|
return %9 : $Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @inline_test_add : $[thin] (x: Int64) -> Int64 {
|
sil @inline_test_add : $@thin (x: Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64):
|
bb0(%0 : $Int64):
|
||||||
%1 = alloc_box $Int64
|
%1 = alloc_box $Int64
|
||||||
store %0 to %1#1 : $*Int64
|
store %0 to %1#1 : $*Int64
|
||||||
%3 = function_ref @plus : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%3 = function_ref @plus : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
%4 = function_ref @test_add : $[thin] (x: Int64) -> Int64
|
%4 = function_ref @test_add : $@thin (x: Int64) -> Int64
|
||||||
%5 = function_ref @plus : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%5 = function_ref @plus : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
%6 = load %1#1 : $*Int64
|
%6 = load %1#1 : $*Int64
|
||||||
%7 = function_ref @fromLiteral : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%7 = function_ref @fromLiteral : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%8 = metatype $Int64.metatype
|
%8 = metatype $Int64.metatype
|
||||||
%9 = integer_literal $Builtin.Int128, 10
|
%9 = integer_literal $Builtin.Int128, 10
|
||||||
%10 = apply %7(%9, %8) : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%10 = apply %7(%9, %8) : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%11 = apply %5(%6, %10) : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%11 = apply %5(%6, %10) : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
%12 = apply [transparent] %4(%11) : $[thin] (x: Int64) -> Int64
|
%12 = apply [transparent] %4(%11) : $@thin (x: Int64) -> Int64
|
||||||
%13 = function_ref @fromLiteral : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%13 = function_ref @fromLiteral : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%14 = metatype $Int64.metatype
|
%14 = metatype $Int64.metatype
|
||||||
%15 = integer_literal $Builtin.Int128, 30
|
%15 = integer_literal $Builtin.Int128, 30
|
||||||
%16 = apply %13(%15, %14) : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%16 = apply %13(%15, %14) : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%17 = apply %3(%12, %16) : $[thin] (lhs: Int64, rhs: Int64) -> Int64
|
%17 = apply %3(%12, %16) : $@thin (lhs: Int64, rhs: Int64) -> Int64
|
||||||
strong_release %1#0 : $Builtin.ObjectPointer
|
strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
return %17 : $Int64
|
return %17 : $Int64
|
||||||
|
|
||||||
// CHECK-LABEL: sil @inline_test_add : $[thin] (x: Int64) -> Int64 {
|
// CHECK-LABEL: sil @inline_test_add : $@thin (x: Int64) -> Int64 {
|
||||||
// CHECK: [[VAL9:%.*]] = apply {{.*}} line:36:9:sil
|
// CHECK: [[VAL9:%.*]] = apply {{.*}} line:36:9:sil
|
||||||
// CHECK: [[VAL10:%.*]] = apply {{.*}} line:37:9:sil
|
// CHECK: [[VAL10:%.*]] = apply {{.*}} line:37:9:sil
|
||||||
// CHECK: [[VAL11:%.*]] = alloc_box $Int64 {{.*}} line:38:9:inlined
|
// CHECK: [[VAL11:%.*]] = alloc_box $Int64 {{.*}} line:38:9:inlined
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ class Class2 { var b : Class1 }
|
|||||||
|
|
||||||
// Instructions
|
// Instructions
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test1 : $[thin] () -> ()
|
// CHECK-LABEL: sil deserialized @test1 : $@thin () -> ()
|
||||||
sil @test1 : $[thin] () -> () {
|
sil @test1 : $@thin () -> () {
|
||||||
bb0: // CHECK: bb0:
|
bb0: // CHECK: bb0:
|
||||||
%0 = tuple () // CHECK: %0 = tuple ()
|
%0 = tuple () // CHECK: %0 = tuple ()
|
||||||
br bb1 // CHECK: br bb1
|
br bb1 // CHECK: br bb1
|
||||||
@@ -26,8 +26,8 @@ bb1:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Forward referenced values.
|
// Forward referenced values.
|
||||||
// CHECK-LABEL: sil deserialized @test2 : $[thin] (x: Int64) -> ()
|
// CHECK-LABEL: sil deserialized @test2 : $@thin (x: Int64) -> ()
|
||||||
sil @test2 : $[thin] (x: Int64) -> () {
|
sil @test2 : $@thin (x: Int64) -> () {
|
||||||
// CHECK: bb1:
|
// CHECK: bb1:
|
||||||
// CHECK: %2 = tuple ()
|
// CHECK: %2 = tuple ()
|
||||||
// CHECK: br bb2
|
// CHECK: br bb2
|
||||||
@@ -48,27 +48,27 @@ bb2:
|
|||||||
br bb1
|
br bb1
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @named_tuple : $[thin] () -> (x: Builtin.Int64, Builtin.Int64)
|
// CHECK-LABEL: @named_tuple : $@thin () -> (x: Builtin.Int64, Builtin.Int64)
|
||||||
sil @named_tuple : $[thin] () -> (x: Builtin.Int64, Builtin.Int64) {
|
sil @named_tuple : $@thin () -> (x: Builtin.Int64, Builtin.Int64) {
|
||||||
%0 = integer_literal $Builtin.Int64, 42
|
%0 = integer_literal $Builtin.Int64, 42
|
||||||
// CHECK: integer_literal $Builtin.Int64, 42
|
// CHECK: integer_literal $Builtin.Int64, 42
|
||||||
%9 = tuple $(x: Builtin.Int64, Builtin.Int64) (%0, %0)
|
%9 = tuple $(x: Builtin.Int64, Builtin.Int64) (%0, %0)
|
||||||
%10 = return %9 : $(x: Builtin.Int64, Builtin.Int64)
|
%10 = return %9 : $(x: Builtin.Int64, Builtin.Int64)
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @return_int : $[thin] (a: Int64) -> Int64 { // CHECK-LABEL: $[thin] (a: Int64) -> Int64 {
|
sil @return_int : $@thin (a: Int64) -> Int64 { // CHECK-LABEL: $@thin (a: Int64) -> Int64 {
|
||||||
bb0(%0 : $Int64): // CHECK: bb0(%0 : $Int64):
|
bb0(%0 : $Int64): // CHECK: bb0(%0 : $Int64):
|
||||||
// CHECK: alloc_stack $Int64
|
// CHECK: alloc_stack $Int64
|
||||||
// CHECK: store
|
// CHECK: store
|
||||||
%1 = alloc_stack $Int64
|
%1 = alloc_stack $Int64
|
||||||
store %0 to %1#1 : $*Int64
|
store %0 to %1#1 : $*Int64
|
||||||
%3 = load %1#1 : $*Int64
|
%3 = load %1#1 : $*Int64
|
||||||
dealloc_stack %1#0 : $*[local_storage] Int64
|
dealloc_stack %1#0 : $*@local_storage Int64
|
||||||
return %3 : $Int64 // CHECK: return {{.*}} : $Int64
|
return %3 : $Int64 // CHECK: return {{.*}} : $Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @call_fn_pointer : $[thin] (a: () -> Int64) -> Int64 {
|
// CHECK-LABEL: @call_fn_pointer : $@thin (a: () -> Int64) -> Int64 {
|
||||||
sil @call_fn_pointer : $[thin] (a : () -> Int64) -> Int64 {
|
sil @call_fn_pointer : $@thin (a : () -> Int64) -> Int64 {
|
||||||
bb0(%0 : $() -> Int64):
|
bb0(%0 : $() -> Int64):
|
||||||
%1 = alloc_stack $() -> Int64
|
%1 = alloc_stack $() -> Int64
|
||||||
store %0 to %1#1 : $*() -> Int64
|
store %0 to %1#1 : $*() -> Int64
|
||||||
@@ -80,14 +80,14 @@ bb0(%0 : $() -> Int64):
|
|||||||
%6 = load %1#1 : $*() -> Int64
|
%6 = load %1#1 : $*() -> Int64
|
||||||
strong_release %3 : $() -> Int64
|
strong_release %3 : $() -> Int64
|
||||||
// CHECK: strong_release {{.*}} : $() -> Int64
|
// CHECK: strong_release {{.*}} : $() -> Int64
|
||||||
dealloc_stack %1#0 : $*[local_storage] () -> Int64
|
dealloc_stack %1#0 : $*@local_storage () -> Int64
|
||||||
return %5 : $Int64 // CHECK: return %{{.*}} : $Int64
|
return %5 : $Int64 // CHECK: return %{{.*}} : $Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @return_constant : $[thin] () -> Int64 { // CHECK-LABEL: @return_constant
|
sil @return_constant : $@thin () -> Int64 { // CHECK-LABEL: @return_constant
|
||||||
bb0: // CHECK: bb0:
|
bb0: // CHECK: bb0:
|
||||||
// CHECK: function_ref @_TSi25convertFromIntegerLiteralfMSiFT3valBi64__Si : $[thin] ((val: Builtin.Int64), Int64.metatype) -> Int64
|
// CHECK: function_ref @_TSi25convertFromIntegerLiteralfMSiFT3valBi64__Si : $@thin ((val: Builtin.Int64), Int64.metatype) -> Int64
|
||||||
%1 = function_ref @_TSi25convertFromIntegerLiteralfMSiFT3valBi64__Si : $[thin] ((val: Builtin.Int64), Int64.metatype) -> Int64
|
%1 = function_ref @_TSi25convertFromIntegerLiteralfMSiFT3valBi64__Si : $@thin ((val: Builtin.Int64), Int64.metatype) -> Int64
|
||||||
|
|
||||||
// CHECK: metatype $Int64.metatype
|
// CHECK: metatype $Int64.metatype
|
||||||
%2 = metatype $Int64.metatype
|
%2 = metatype $Int64.metatype
|
||||||
@@ -96,60 +96,60 @@ bb0: // CHECK: bb0:
|
|||||||
%3 = integer_literal $Builtin.Int64, 1
|
%3 = integer_literal $Builtin.Int64, 1
|
||||||
|
|
||||||
// CHECK: apply
|
// CHECK: apply
|
||||||
%4 = apply %1(%3, %2) : $[thin] ((val: Builtin.Int64), Int64.metatype) -> Int64
|
%4 = apply %1(%3, %2) : $@thin ((val: Builtin.Int64), Int64.metatype) -> Int64
|
||||||
// CHECK: return
|
// CHECK: return
|
||||||
%5 = return %4 : $Int64
|
%5 = return %4 : $Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @_TSi25convertFromIntegerLiteralfMSiFT3valBi64__Si : $[thin] ((val: Builtin.Int64), Int64.metatype) -> Int64
|
sil @_TSi25convertFromIntegerLiteralfMSiFT3valBi64__Si : $@thin ((val: Builtin.Int64), Int64.metatype) -> Int64
|
||||||
|
|
||||||
// Parse SIL generated from the following swift program:
|
// Parse SIL generated from the following swift program:
|
||||||
// func x(a : Bool) -> Int { if a { return 4 } else {return 5} }
|
// func x(a : Bool) -> Int { if a { return 4 } else {return 5} }
|
||||||
sil @_TSb13getLogicValuefRSbFT_Bi1_ : $[cc(method), thin] ((), [inout] Bool) -> Builtin.Int1
|
sil @_TSb13getLogicValuefRSbFT_Bi1_ : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
sil @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
sil @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
|
|
||||||
// CHECK-LABEL: @_T4test1xFT1aSb_Si
|
// CHECK-LABEL: @_T4test1xFT1aSb_Si
|
||||||
sil @_T4test1xFT1aSb_Si : $[thin] (a : Bool) -> Int64 {
|
sil @_T4test1xFT1aSb_Si : $@thin (a : Bool) -> Int64 {
|
||||||
// CHECK: bb0(%0 : $Bool):
|
// CHECK: bb0(%0 : $Bool):
|
||||||
bb0(%0 : $Bool):
|
bb0(%0 : $Bool):
|
||||||
// CHECK: alloc_stack $Bool
|
// CHECK: alloc_stack $Bool
|
||||||
%1 = alloc_stack $Bool
|
%1 = alloc_stack $Bool
|
||||||
// CHECK: store
|
// CHECK: store
|
||||||
%2 = store %0 to %1#1 : $*Bool
|
%2 = store %0 to %1#1 : $*Bool
|
||||||
// CHECK: function_ref @_TSb13getLogicValuefRSbFT_Bi1_ : $[cc(method), thin] ((), [inout] Bool) -> Builtin.Int1
|
// CHECK: function_ref @_TSb13getLogicValuefRSbFT_Bi1_ : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
%3 = function_ref @_TSb13getLogicValuefRSbFT_Bi1_ : $[cc(method), thin] ((), [inout] Bool) -> Builtin.Int1
|
%3 = function_ref @_TSb13getLogicValuefRSbFT_Bi1_ : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
// CHECK: apply
|
// CHECK: apply
|
||||||
%4 = apply %3(%1#1) : $[cc(method), thin] ((), [inout] Bool) -> Builtin.Int1
|
%4 = apply %3(%1#1) : $@cc(method) @thin ((), @inout Bool) -> Builtin.Int1
|
||||||
// CHECK: cond_br
|
// CHECK: cond_br
|
||||||
%5 = cond_br %4, bb1, bb2
|
%5 = cond_br %4, bb1, bb2
|
||||||
|
|
||||||
// CHECK: bb1:
|
// CHECK: bb1:
|
||||||
bb1:
|
bb1:
|
||||||
// CHECK: function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
// CHECK: function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%6 = function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%6 = function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
// CHECK: metatype $Int64.metatype
|
// CHECK: metatype $Int64.metatype
|
||||||
%7 = metatype $Int64.metatype
|
%7 = metatype $Int64.metatype
|
||||||
// CHECK: integer_literal $Builtin.Int128, 4
|
// CHECK: integer_literal $Builtin.Int128, 4
|
||||||
%8 = integer_literal $Builtin.Int128, 4
|
%8 = integer_literal $Builtin.Int128, 4
|
||||||
// CHECK: apply
|
// CHECK: apply
|
||||||
%9 = apply %6(%8, %7) : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%9 = apply %6(%8, %7) : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
// CHECK: dealloc_stack
|
// CHECK: dealloc_stack
|
||||||
%10 = dealloc_stack %1#0 : $*[local_storage] Bool
|
%10 = dealloc_stack %1#0 : $*@local_storage Bool
|
||||||
// CHECK: br
|
// CHECK: br
|
||||||
br bb3(%9 : $Int64)
|
br bb3(%9 : $Int64)
|
||||||
|
|
||||||
// CHECK: bb2:
|
// CHECK: bb2:
|
||||||
bb2:
|
bb2:
|
||||||
// CHECK: function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
// CHECK: function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%12 = function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%12 = function_ref @_TSi33_convertFromBuiltinIntegerLiteralfMSiFT3valBi128__Si : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
// CHECK: metatype $Int64.metatype
|
// CHECK: metatype $Int64.metatype
|
||||||
%13 = metatype $Int64.metatype
|
%13 = metatype $Int64.metatype
|
||||||
// CHECK: integer_literal $Builtin.Int128, 5
|
// CHECK: integer_literal $Builtin.Int128, 5
|
||||||
%14 = integer_literal $Builtin.Int128, 5
|
%14 = integer_literal $Builtin.Int128, 5
|
||||||
// CHECK: apply
|
// CHECK: apply
|
||||||
%15 = apply %12(%14, %13) : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%15 = apply %12(%14, %13) : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
// CHECK: dealloc_stack
|
// CHECK: dealloc_stack
|
||||||
%16 = dealloc_stack %1#0 : $*[local_storage] Bool
|
%16 = dealloc_stack %1#0 : $*@local_storage Bool
|
||||||
// CHECK: br
|
// CHECK: br
|
||||||
br bb3(%15 : $Int64)
|
br bb3(%15 : $Int64)
|
||||||
|
|
||||||
@@ -163,15 +163,15 @@ protocol P {
|
|||||||
func doIt()
|
func doIt()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @existentials : $[thin] (n: P) -> () {
|
// CHECK-LABEL: @existentials : $@thin (n: P) -> () {
|
||||||
sil @existentials : $[thin] (n : P) -> () {
|
sil @existentials : $@thin (n : P) -> () {
|
||||||
bb0(%0 : $*P):
|
bb0(%0 : $*P):
|
||||||
%1 = project_existential %0 : $*P to $*@sil_self P // CHECK: project_existential %0
|
%1 = project_existential %0 : $*P to $*@sil_self P // CHECK: project_existential %0
|
||||||
|
|
||||||
// CHECK: protocol_method {{.*}} : $*P, #P.doIt!1
|
// CHECK: protocol_method {{.*}} : $*P, #P.doIt!1
|
||||||
%2 = protocol_method %0 : $*P, #P.doIt!1 : $[cc(method)] ((), [inout] @sil_self P) -> ()
|
%2 = protocol_method %0 : $*P, #P.doIt!1 : $@cc(method) ((), @inout @sil_self P) -> ()
|
||||||
// CHECK: apply
|
// CHECK: apply
|
||||||
%3 = apply %2(%1) : $[cc(method)] ((), [inout] @sil_self P) -> ()
|
%3 = apply %2(%1) : $@cc(method) ((), @inout @sil_self P) -> ()
|
||||||
%4 = tuple () // CHECK: tuple ()
|
%4 = tuple () // CHECK: tuple ()
|
||||||
%5 = destroy_addr %0 : $*P // CHECK: destroy_addr %0 : $*P
|
%5 = destroy_addr %0 : $*P // CHECK: destroy_addr %0 : $*P
|
||||||
%6 = return %4 : $() // CHECK: return
|
%6 = return %4 : $() // CHECK: return
|
||||||
@@ -188,8 +188,8 @@ class D : C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @classes : $[thin] () -> () {
|
// CHECK-LABEL: @classes : $@thin () -> () {
|
||||||
sil @classes : $[thin] () -> () {
|
sil @classes : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
// CHECK: %0 = alloc_ref $C
|
// CHECK: %0 = alloc_ref $C
|
||||||
%C = alloc_ref $C
|
%C = alloc_ref $C
|
||||||
@@ -199,7 +199,7 @@ bb0:
|
|||||||
%O = ref_to_object_pointer %C : $C to $Builtin.ObjCPointer
|
%O = ref_to_object_pointer %C : $C to $Builtin.ObjCPointer
|
||||||
|
|
||||||
// CHECK: class_method {{.*}} : $C, #C.doIt!1
|
// CHECK: class_method {{.*}} : $C, #C.doIt!1
|
||||||
%2 = class_method %C : $C, #C.doIt!1 : $[cc(method), thin] ((), C) -> ()
|
%2 = class_method %C : $C, #C.doIt!1 : $@cc(method) @thin ((), C) -> ()
|
||||||
|
|
||||||
// CHECK: alloc_ref $D
|
// CHECK: alloc_ref $D
|
||||||
%D = alloc_ref $D
|
%D = alloc_ref $D
|
||||||
@@ -230,18 +230,18 @@ protocol Runcible {
|
|||||||
static func static_method()
|
static func static_method()
|
||||||
}
|
}
|
||||||
|
|
||||||
//sil @_T4arch20archetype_member_refUS_8Runcible___FT1xQ__T_ : $[thin] <T : Runcible> (x : T) -> () {
|
//sil @_T4arch20archetype_member_refUS_8Runcible___FT1xQ__T_ : $@thin <T : Runcible> (x : T) -> () {
|
||||||
//bb0(%0 : $*T):
|
//bb0(%0 : $*T):
|
||||||
//%1 = archetype_method $*T, #Runcible.free_method!1 : $[cc(method)] ((), [inout] T) -> Int64
|
//%1 = archetype_method $*T, #Runcible.free_method!1 : $@cc(method) ((), @inout T) -> Int64
|
||||||
//%2 = apply %1(%0) : $[cc(method)] ((), [inout] T) -> Int64
|
//%2 = apply %1(%0) : $@cc(method) ((), @inout T) -> Int64
|
||||||
//%3 = alloc_stack $T.U.metatype
|
//%3 = alloc_stack $T.U.metatype
|
||||||
//%4 = archetype_method $*T, #Runcible.associated_method!1 : $[cc(method)] ((), [inout] T) -> T.U.metatype
|
//%4 = archetype_method $*T, #Runcible.associated_method!1 : $@cc(method) ((), @inout T) -> T.U.metatype
|
||||||
//%5 = apply %4(%0) : $[cc(method)] ((), [inout] T) -> T.U.metatype
|
//%5 = apply %4(%0) : $@cc(method) ((), @inout T) -> T.U.metatype
|
||||||
//%6 = store %5 to %3#1 : $*T.U.metatype
|
//%6 = store %5 to %3#1 : $*T.U.metatype
|
||||||
//%7 = metatype $T.metatype
|
//%7 = metatype $T.metatype
|
||||||
//%8 = archetype_method [volatile] $*T, #Runcible.static_method!1 : $((), T.metatype) -> ()
|
//%8 = archetype_method [volatile] $*T, #Runcible.static_method!1 : $((), T.metatype) -> ()
|
||||||
//%9 = apply %8(%7) : $((), T.metatype) -> ()
|
//%9 = apply %8(%7) : $((), T.metatype) -> ()
|
||||||
//%10 = dealloc_stack %3#0 : $*[local_storage] T.U.metatype
|
//%10 = dealloc_stack %3#0 : $*@local_storage T.U.metatype
|
||||||
//%11 = tuple ()
|
//%11 = tuple ()
|
||||||
//%12 = destroy_addr %0 : $*T
|
//%12 = destroy_addr %0 : $*T
|
||||||
//%13 = return %11 : $()
|
//%13 = return %11 : $()
|
||||||
@@ -249,8 +249,8 @@ protocol Runcible {
|
|||||||
|
|
||||||
protocol Bendable { }
|
protocol Bendable { }
|
||||||
|
|
||||||
// CHECK-LABEL: $[thin] (x: protocol<Bendable, Runcible>) -> Runcible
|
// CHECK-LABEL: $@thin (x: protocol<Bendable, Runcible>) -> Runcible
|
||||||
sil @_T4todo18erasure_from_protoFT1xPS_8RuncibleS_8Bendable__PS0__ : $[thin] (x: protocol<Bendable, Runcible>) -> Runcible {
|
sil @_T4todo18erasure_from_protoFT1xPS_8RuncibleS_8Bendable__PS0__ : $@thin (x: protocol<Bendable, Runcible>) -> Runcible {
|
||||||
bb0(%0 : $*Runcible, %1 : $*protocol<Bendable, Runcible>):
|
bb0(%0 : $*Runcible, %1 : $*protocol<Bendable, Runcible>):
|
||||||
// CHECK: alloc_box
|
// CHECK: alloc_box
|
||||||
%2 = alloc_box $protocol<Bendable, Runcible>
|
%2 = alloc_box $protocol<Bendable, Runcible>
|
||||||
@@ -266,7 +266,7 @@ bb0(%0 : $*Runcible, %1 : $*protocol<Bendable, Runcible>):
|
|||||||
// CHECK: destroy_addr
|
// CHECK: destroy_addr
|
||||||
%8 = destroy_addr %4#1 : $*protocol<Bendable, Runcible>
|
%8 = destroy_addr %4#1 : $*protocol<Bendable, Runcible>
|
||||||
// CHECK: dealloc_stack
|
// CHECK: dealloc_stack
|
||||||
%9 = dealloc_stack %4#0 : $*[local_storage] protocol<Bendable, Runcible>
|
%9 = dealloc_stack %4#0 : $*@local_storage protocol<Bendable, Runcible>
|
||||||
%10 = strong_release %2#0 : $Builtin.ObjectPointer
|
%10 = strong_release %2#0 : $Builtin.ObjectPointer
|
||||||
// CHECK: return
|
// CHECK: return
|
||||||
%11 = return %7 : $()
|
%11 = return %7 : $()
|
||||||
@@ -276,8 +276,8 @@ protocol [class_protocol] ClassBound {
|
|||||||
func classBoundMethod()
|
func classBoundMethod()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @_T4todo18class_bound_methodFT1xPS_10ClassBound__T_ : $[thin] (x: ClassBound) -> ()
|
// CHECK-LABEL: @_T4todo18class_bound_methodFT1xPS_10ClassBound__T_ : $@thin (x: ClassBound) -> ()
|
||||||
sil @_T4todo18class_bound_methodFT1xPS_10ClassBound__T_ : $[thin] (x: ClassBound) -> () {
|
sil @_T4todo18class_bound_methodFT1xPS_10ClassBound__T_ : $@thin (x: ClassBound) -> () {
|
||||||
bb0(%0 : $ClassBound):
|
bb0(%0 : $ClassBound):
|
||||||
%1 = alloc_box $ClassBound
|
%1 = alloc_box $ClassBound
|
||||||
%2 = store %0 to %1#1 : $*ClassBound
|
%2 = store %0 to %1#1 : $*ClassBound
|
||||||
@@ -286,8 +286,8 @@ bb0(%0 : $ClassBound):
|
|||||||
// CHECK: project_existential_ref {{%.*}} : $ClassBound to $@sil_self ClassBound
|
// CHECK: project_existential_ref {{%.*}} : $ClassBound to $@sil_self ClassBound
|
||||||
%5 = project_existential_ref %3 : $ClassBound to $@sil_self ClassBound
|
%5 = project_existential_ref %3 : $ClassBound to $@sil_self ClassBound
|
||||||
// CHECK: protocol_method
|
// CHECK: protocol_method
|
||||||
%6 = protocol_method %3 : $ClassBound, #ClassBound.classBoundMethod!1 : $[cc(method), thin] ((), @sil_self ClassBound) -> ()
|
%6 = protocol_method %3 : $ClassBound, #ClassBound.classBoundMethod!1 : $@cc(method) @thin ((), @sil_self ClassBound) -> ()
|
||||||
%7 = apply %6(%5) : $[cc(method), thin] ((), @sil_self ClassBound) -> ()
|
%7 = apply %6(%5) : $@cc(method) @thin ((), @sil_self ClassBound) -> ()
|
||||||
%8 = tuple ()
|
%8 = tuple ()
|
||||||
%9 = strong_release %1#0 : $Builtin.ObjectPointer
|
%9 = strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
%10 = return %8 : $()
|
%10 = return %8 : $()
|
||||||
@@ -296,7 +296,7 @@ bb0(%0 : $ClassBound):
|
|||||||
struct Val {
|
struct Val {
|
||||||
}
|
}
|
||||||
|
|
||||||
//sil @_TV4todo3ValCfMS0_FT_S0_ : $[thin] ((), Val.metatype) -> Val {
|
//sil @_TV4todo3ValCfMS0_FT_S0_ : $@thin ((), Val.metatype) -> Val {
|
||||||
//bb0(%0 : $Val.metatype):
|
//bb0(%0 : $Val.metatype):
|
||||||
//%1 = alloc_stack $Val
|
//%1 = alloc_stack $Val
|
||||||
//%2 = initialize_var [no_default_construct] %1#1 : $*Val
|
//%2 = initialize_var [no_default_construct] %1#1 : $*Val
|
||||||
@@ -311,16 +311,16 @@ struct Aleph {
|
|||||||
var b:Val
|
var b:Val
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @_TV6struct5AlephCfMS0_FT1aCS_3Ref1bVS_3Val_S0_ : $[thin] ((a: Ref, b: Val), Aleph.metatype) -> Aleph
|
// CHECK-LABEL: @_TV6struct5AlephCfMS0_FT1aCS_3Ref1bVS_3Val_S0_ : $@thin ((a: Ref, b: Val), Aleph.metatype) -> Aleph
|
||||||
sil @_TV6struct5AlephCfMS0_FT1aCS_3Ref1bVS_3Val_S0_ : $[thin] ((a: Ref, b: Val), Aleph.metatype) -> Aleph {
|
sil @_TV6struct5AlephCfMS0_FT1aCS_3Ref1bVS_3Val_S0_ : $@thin ((a: Ref, b: Val), Aleph.metatype) -> Aleph {
|
||||||
bb0(%0 : $Ref, %1 : $Val, %2 : $Aleph.metatype):
|
bb0(%0 : $Ref, %1 : $Val, %2 : $Aleph.metatype):
|
||||||
// CHECK: struct $Aleph ({{%.*}} : $Ref, {{%.*}} : $Val)
|
// CHECK: struct $Aleph ({{%.*}} : $Ref, {{%.*}} : $Val)
|
||||||
%3 = struct $Aleph (%0 : $Ref, %1 : $Val)
|
%3 = struct $Aleph (%0 : $Ref, %1 : $Val)
|
||||||
%4 = return %3 : $Aleph // CHECK: return
|
%4 = return %3 : $Aleph // CHECK: return
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @_TV6struct5AlephCfMS0_FT_S0_ : $[thin] ((), Aleph.metatype) -> Aleph
|
// CHECK-LABEL: @_TV6struct5AlephCfMS0_FT_S0_ : $@thin ((), Aleph.metatype) -> Aleph
|
||||||
sil @_TV6struct5AlephCfMS0_FT_S0_ : $[thin] ((), Aleph.metatype) -> Aleph {
|
sil @_TV6struct5AlephCfMS0_FT_S0_ : $@thin ((), Aleph.metatype) -> Aleph {
|
||||||
bb0(%0 : $Aleph.metatype):
|
bb0(%0 : $Aleph.metatype):
|
||||||
%1 = tuple ()
|
%1 = tuple ()
|
||||||
%2 = alloc_box $Aleph // CHECK: alloc_box
|
%2 = alloc_box $Aleph // CHECK: alloc_box
|
||||||
@@ -345,16 +345,16 @@ enum Beth {
|
|||||||
case DataCase(Int)
|
case DataCase(Int)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @test_union_empty_case : $[thin] () -> Beth {
|
// CHECK-LABEL: @test_union_empty_case : $@thin () -> Beth {
|
||||||
sil @test_union_empty_case : $[thin] () -> Beth {
|
sil @test_union_empty_case : $@thin () -> Beth {
|
||||||
bb0:
|
bb0:
|
||||||
// CHECK: %0 = enum $Beth, #Beth.EmptyCase!enumelt
|
// CHECK: %0 = enum $Beth, #Beth.EmptyCase!enumelt
|
||||||
%0 = enum $Beth, #Beth.EmptyCase!enumelt
|
%0 = enum $Beth, #Beth.EmptyCase!enumelt
|
||||||
return %0 : $Beth
|
return %0 : $Beth
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @test_union_data_case : $[thin] Int64 -> Beth {
|
// CHECK-LABEL: @test_union_data_case : $@thin Int64 -> Beth {
|
||||||
sil @test_union_data_case : $[thin] Int64 -> Beth {
|
sil @test_union_data_case : $@thin Int64 -> Beth {
|
||||||
bb0(%0 : $Int):
|
bb0(%0 : $Int):
|
||||||
// CHECK: %1 = enum $Beth, #Beth.DataCase!enumelt.1, %0 : $Int64
|
// CHECK: %1 = enum $Beth, #Beth.DataCase!enumelt.1, %0 : $Int64
|
||||||
%1 = enum $Beth, #Beth.DataCase!enumelt.1, %0 : $Int64
|
%1 = enum $Beth, #Beth.DataCase!enumelt.1, %0 : $Int64
|
||||||
@@ -368,8 +368,8 @@ enum Gimel {
|
|||||||
case DataCase(Q)
|
case DataCase(Q)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @test_union_addr_empty_case : $[thin] () -> Gimel {
|
// CHECK-LABEL: @test_union_addr_empty_case : $@thin () -> Gimel {
|
||||||
sil @test_union_addr_empty_case : $[thin] () -> Gimel {
|
sil @test_union_addr_empty_case : $@thin () -> Gimel {
|
||||||
bb0(%0 : $*Gimel):
|
bb0(%0 : $*Gimel):
|
||||||
// CHECK: inject_enum_addr {{%.*}} : $*Gimel, #Gimel.EmptyCase!enumelt
|
// CHECK: inject_enum_addr {{%.*}} : $*Gimel, #Gimel.EmptyCase!enumelt
|
||||||
inject_enum_addr %0 : $*Gimel, #Gimel.EmptyCase!enumelt
|
inject_enum_addr %0 : $*Gimel, #Gimel.EmptyCase!enumelt
|
||||||
@@ -377,8 +377,8 @@ bb0(%0 : $*Gimel):
|
|||||||
return %t : $()
|
return %t : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @test_union_addr_data_case : $[thin] Q -> Gimel {
|
// CHECK-LABEL: @test_union_addr_data_case : $@thin Q -> Gimel {
|
||||||
sil @test_union_addr_data_case : $[thin] (Q) -> Gimel {
|
sil @test_union_addr_data_case : $@thin (Q) -> Gimel {
|
||||||
bb0(%0 : $*Gimel, %1 : $*Q):
|
bb0(%0 : $*Gimel, %1 : $*Q):
|
||||||
// CHECK: {{%.*}} = enum_data_addr {{%.*}} : $*Gimel, #Gimel.DataCase!enumelt.1
|
// CHECK: {{%.*}} = enum_data_addr {{%.*}} : $*Gimel, #Gimel.DataCase!enumelt.1
|
||||||
%p = enum_data_addr %0 : $*Gimel, #Gimel.DataCase!enumelt.1
|
%p = enum_data_addr %0 : $*Gimel, #Gimel.DataCase!enumelt.1
|
||||||
@@ -388,11 +388,11 @@ bb0(%0 : $*Gimel, %1 : $*Q):
|
|||||||
return %t : $()
|
return %t : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @_T5tuple5floatFT1xSf_T_ : $[thin] (x : Float32) -> ()
|
sil @_T5tuple5floatFT1xSf_T_ : $@thin (x : Float32) -> ()
|
||||||
sil @_T5tuple5tupleFT_TSiSf_ : $[thin] () -> (Int64, Float32)
|
sil @_T5tuple5tupleFT_TSiSf_ : $@thin () -> (Int64, Float32)
|
||||||
|
|
||||||
// CHECK-LABEL: @_T5tuple13tuple_elementFT1xTSiSf__T_ : $[thin] (x: (Int64, Float32)) -> ()
|
// CHECK-LABEL: @_T5tuple13tuple_elementFT1xTSiSf__T_ : $@thin (x: (Int64, Float32)) -> ()
|
||||||
sil @_T5tuple13tuple_elementFT1xTSiSf__T_ : $[thin] (x: (Int64, Float32)) -> () {
|
sil @_T5tuple13tuple_elementFT1xTSiSf__T_ : $@thin (x: (Int64, Float32)) -> () {
|
||||||
bb0(%0 : $Int64, %1 : $Float32):
|
bb0(%0 : $Int64, %1 : $Float32):
|
||||||
%2 = alloc_box $(Int64, Float32)
|
%2 = alloc_box $(Int64, Float32)
|
||||||
%3 = tuple (%0 : $Int64, %1 : $Float32)
|
%3 = tuple (%0 : $Int64, %1 : $Float32)
|
||||||
@@ -404,15 +404,15 @@ bb0(%0 : $Int64, %1 : $Float32):
|
|||||||
%10 = tuple_element_addr %2#1 : $*(Int64, Float32), 1
|
%10 = tuple_element_addr %2#1 : $*(Int64, Float32), 1
|
||||||
%11 = load %10 : $*Float32
|
%11 = load %10 : $*Float32
|
||||||
// CHECK: function_ref
|
// CHECK: function_ref
|
||||||
%14 = function_ref @_T5tuple5tupleFT_TSiSf_ : $[thin] () -> (Int64, Float32)
|
%14 = function_ref @_T5tuple5tupleFT_TSiSf_ : $@thin () -> (Int64, Float32)
|
||||||
// CHECK: apply
|
// CHECK: apply
|
||||||
%15 = apply %14() : $[thin] () -> (Int64, Float32)
|
%15 = apply %14() : $@thin () -> (Int64, Float32)
|
||||||
// CHECK: function_ref
|
// CHECK: function_ref
|
||||||
%19 = function_ref @_T5tuple5floatFT1xSf_T_ : $[thin] (x : Float32) -> ()
|
%19 = function_ref @_T5tuple5floatFT1xSf_T_ : $@thin (x : Float32) -> ()
|
||||||
// CHECK: tuple_extract {{%.*}} : $(Int64, Float32), 1
|
// CHECK: tuple_extract {{%.*}} : $(Int64, Float32), 1
|
||||||
%17 = tuple_extract %15 : $(Int64, Float32), 1
|
%17 = tuple_extract %15 : $(Int64, Float32), 1
|
||||||
// CHECK: apply
|
// CHECK: apply
|
||||||
%24 = apply %19(%17) : $[thin] (x : Float32) -> ()
|
%24 = apply %19(%17) : $@thin (x : Float32) -> ()
|
||||||
%25 = tuple ()
|
%25 = tuple ()
|
||||||
%26 = strong_release %2#0 : $Builtin.ObjectPointer
|
%26 = strong_release %2#0 : $Builtin.ObjectPointer
|
||||||
%27 = return %25 : $()
|
%27 = return %25 : $()
|
||||||
@@ -422,8 +422,8 @@ class M {
|
|||||||
var member : Int
|
var member : Int
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @_TC3ref1C3foofS0_FT1xSi_T_ : $[cc(method), thin] ((x: Int64), M) -> ()
|
// CHECK-LABEL: @_TC3ref1C3foofS0_FT1xSi_T_ : $@cc(method) @thin ((x: Int64), M) -> ()
|
||||||
sil @_TC3ref1C3foofS0_FT1xSi_T_ : $[cc(method), thin] ((x: Int64), M) -> () {
|
sil @_TC3ref1C3foofS0_FT1xSi_T_ : $@cc(method) @thin ((x: Int64), M) -> () {
|
||||||
bb0(%0 : $Int64, %1 : $M):
|
bb0(%0 : $Int64, %1 : $M):
|
||||||
%2 = alloc_box $Int64
|
%2 = alloc_box $Int64
|
||||||
%3 = store %0 to %2#1 : $*Int64
|
%3 = store %0 to %2#1 : $*Int64
|
||||||
@@ -445,8 +445,8 @@ bb0(%0 : $Int64, %1 : $M):
|
|||||||
class B { }
|
class B { }
|
||||||
class E : B { }
|
class E : B { }
|
||||||
|
|
||||||
// CHECK-LABEL: @_T4null3isaFT1bCS_1B_Sb : $[thin] (b: B) -> Builtin.Int1
|
// CHECK-LABEL: @_T4null3isaFT1bCS_1B_Sb : $@thin (b: B) -> Builtin.Int1
|
||||||
sil @_T4null3isaFT1bCS_1B_Sb : $[thin] (b: B) -> Builtin.Int1 {
|
sil @_T4null3isaFT1bCS_1B_Sb : $@thin (b: B) -> Builtin.Int1 {
|
||||||
bb0(%0 : $B):
|
bb0(%0 : $B):
|
||||||
%1 = alloc_box $B
|
%1 = alloc_box $B
|
||||||
%2 = store %0 to %1#1 : $*B
|
%2 = store %0 to %1#1 : $*B
|
||||||
@@ -465,22 +465,22 @@ isa(%6 : $Builtin.Int1):
|
|||||||
%9 = return %6 : $Builtin.Int1
|
%9 = return %6 : $Builtin.Int1
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @_TSd31_convertFromBuiltinFloatLiteralfMSdFT5valueBf64__Sd : $[thin] ((value: Builtin.FPIEEE64), Float64.metatype) -> Float64
|
sil @_TSd31_convertFromBuiltinFloatLiteralfMSdFT5valueBf64__Sd : $@thin ((value: Builtin.FPIEEE64), Float64.metatype) -> Float64
|
||||||
sil @_TSS32_convertFromBuiltinStringLiteralfMSSFT5valueBp8byteSizeBi64_7isASCIIBi1__SS : $[thin] ((value: Builtin.RawPointer, byteSize: Builtin.Int64, isASCII: Builtin.Int1), String.metatype) -> String
|
sil @_TSS32_convertFromBuiltinStringLiteralfMSSFT5valueBp8byteSizeBi64_7isASCIIBi1__SS : $@thin ((value: Builtin.RawPointer, byteSize: Builtin.Int64, isASCII: Builtin.Int1), String.metatype) -> String
|
||||||
|
|
||||||
// CHECK-LABEL: @_T7literal8literalsFT_T_ : $[thin] () -> ()
|
// CHECK-LABEL: @_T7literal8literalsFT_T_ : $@thin () -> ()
|
||||||
sil @_T7literal8literalsFT_T_ : $[thin] () -> () {
|
sil @_T7literal8literalsFT_T_ : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = tuple ()
|
%0 = tuple ()
|
||||||
%1 = alloc_stack $Float64
|
%1 = alloc_stack $Float64
|
||||||
%2 = function_ref @_TSd31_convertFromBuiltinFloatLiteralfMSdFT5valueBf64__Sd : $[thin] ((value: Builtin.FPIEEE64), Float64.metatype) -> Float64
|
%2 = function_ref @_TSd31_convertFromBuiltinFloatLiteralfMSdFT5valueBf64__Sd : $@thin ((value: Builtin.FPIEEE64), Float64.metatype) -> Float64
|
||||||
%3 = metatype $Float64.metatype
|
%3 = metatype $Float64.metatype
|
||||||
// CHECK: float_literal $Builtin.FPIEEE64, 0x3FFAB4ACADAB4AAA
|
// CHECK: float_literal $Builtin.FPIEEE64, 0x3FFAB4ACADAB4AAA
|
||||||
%4 = float_literal $Builtin.FPIEEE64, 0x3FFAB4ACADAB4AAA
|
%4 = float_literal $Builtin.FPIEEE64, 0x3FFAB4ACADAB4AAA
|
||||||
%5 = apply %2(%4, %3) : $[thin] ((value: Builtin.FPIEEE64), Float64.metatype) -> Float64
|
%5 = apply %2(%4, %3) : $@thin ((value: Builtin.FPIEEE64), Float64.metatype) -> Float64
|
||||||
%6 = store %5 to %1#1 : $*Float64
|
%6 = store %5 to %1#1 : $*Float64
|
||||||
%7 = alloc_stack $String
|
%7 = alloc_stack $String
|
||||||
%8 = function_ref @_TSS32_convertFromBuiltinStringLiteralfMSSFT5valueBp8byteSizeBi64_7isASCIIBi1__SS : $[thin] ((value: Builtin.RawPointer, byteSize: Builtin.Int64, isASCII: Builtin.Int1), String.metatype) -> String
|
%8 = function_ref @_TSS32_convertFromBuiltinStringLiteralfMSSFT5valueBp8byteSizeBi64_7isASCIIBi1__SS : $@thin ((value: Builtin.RawPointer, byteSize: Builtin.Int64, isASCII: Builtin.Int1), String.metatype) -> String
|
||||||
%9 = metatype $String.metatype
|
%9 = metatype $String.metatype
|
||||||
// CHECK: string_literal $(Builtin.RawPointer, Builtin.Int64, Builtin.Int1), "foo"
|
// CHECK: string_literal $(Builtin.RawPointer, Builtin.Int64, Builtin.Int1), "foo"
|
||||||
%10 = string_literal $(Builtin.RawPointer, Builtin.Int64, Builtin.Int1), "foo"
|
%10 = string_literal $(Builtin.RawPointer, Builtin.Int64, Builtin.Int1), "foo"
|
||||||
@@ -489,20 +489,20 @@ bb0:
|
|||||||
%12 = tuple_extract %11 : $(Builtin.RawPointer, Builtin.Int64, Builtin.Int1), 0
|
%12 = tuple_extract %11 : $(Builtin.RawPointer, Builtin.Int64, Builtin.Int1), 0
|
||||||
%13 = tuple_extract %11 : $(Builtin.RawPointer, Builtin.Int64, Builtin.Int1), 1
|
%13 = tuple_extract %11 : $(Builtin.RawPointer, Builtin.Int64, Builtin.Int1), 1
|
||||||
%14 = tuple_extract %11 : $(Builtin.RawPointer, Builtin.Int64, Builtin.Int1), 2
|
%14 = tuple_extract %11 : $(Builtin.RawPointer, Builtin.Int64, Builtin.Int1), 2
|
||||||
%15 = apply %8(%12, %13, %14, %9) : $[thin] ((value: Builtin.RawPointer, byteSize: Builtin.Int64, isASCII: Builtin.Int1), String.metatype) -> String
|
%15 = apply %8(%12, %13, %14, %9) : $@thin ((value: Builtin.RawPointer, byteSize: Builtin.Int64, isASCII: Builtin.Int1), String.metatype) -> String
|
||||||
%16 = store %15 to %7#1 : $*String
|
%16 = store %15 to %7#1 : $*String
|
||||||
%17 = load %7#1 : $*String
|
%17 = load %7#1 : $*String
|
||||||
%18 = struct_extract %17 : $String, #str_value // CHECK: struct_extract
|
%18 = struct_extract %17 : $String, #str_value // CHECK: struct_extract
|
||||||
%19 = struct_extract %18 : $StringByteData, #owner // CHECK: struct_extract
|
%19 = struct_extract %18 : $StringByteData, #owner // CHECK: struct_extract
|
||||||
%20 = strong_release %19 : $Builtin.ObjectPointer
|
%20 = strong_release %19 : $Builtin.ObjectPointer
|
||||||
%21 = dealloc_stack %7#0 : $*[local_storage] String
|
%21 = dealloc_stack %7#0 : $*@local_storage String
|
||||||
%22 = dealloc_stack %1#0 : $*[local_storage] Float64
|
%22 = dealloc_stack %1#0 : $*@local_storage Float64
|
||||||
%23 = tuple ()
|
%23 = tuple ()
|
||||||
%24 = return %23 : $()
|
%24 = return %23 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @_T5index5gep64FT1pBp1iBi64__Bp : $[thin] (p: Builtin.RawPointer, i: Builtin.Int64) -> Builtin.RawPointer {
|
// CHECK-LABEL: @_T5index5gep64FT1pBp1iBi64__Bp : $@thin (p: Builtin.RawPointer, i: Builtin.Int64) -> Builtin.RawPointer {
|
||||||
sil @_T5index5gep64FT1pBp1iBi64__Bp : $[thin] (p: Builtin.RawPointer, i: Builtin.Int64) -> Builtin.RawPointer {
|
sil @_T5index5gep64FT1pBp1iBi64__Bp : $@thin (p: Builtin.RawPointer, i: Builtin.Int64) -> Builtin.RawPointer {
|
||||||
bb0(%0 : $Builtin.RawPointer, %1 : $Builtin.Int64):
|
bb0(%0 : $Builtin.RawPointer, %1 : $Builtin.Int64):
|
||||||
%2 = alloc_box $Builtin.RawPointer
|
%2 = alloc_box $Builtin.RawPointer
|
||||||
%3 = alloc_box $Builtin.Int64
|
%3 = alloc_box $Builtin.Int64
|
||||||
@@ -519,17 +519,17 @@ bb0(%0 : $Builtin.RawPointer, %1 : $Builtin.Int64):
|
|||||||
}
|
}
|
||||||
|
|
||||||
var x : Int = 0
|
var x : Int = 0
|
||||||
sil @global_callee : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
sil @global_callee : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
|
|
||||||
// CHECK-LABEL: @global_code : $[thin] () -> ()
|
// CHECK-LABEL: @global_code : $@thin () -> ()
|
||||||
sil internal @global_code : $[thin] () -> () {
|
sil internal @global_code : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
// CHECK: global_addr #x : $*Int64
|
// CHECK: global_addr #x : $*Int64
|
||||||
%0 = global_addr #x : $*Int64
|
%0 = global_addr #x : $*Int64
|
||||||
%1 = function_ref @global_callee : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%1 = function_ref @global_callee : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%2 = metatype $Int64.metatype
|
%2 = metatype $Int64.metatype
|
||||||
%3 = integer_literal $Builtin.Int128, 0 // CHECK: integer_literal $Builtin.Int128, 0
|
%3 = integer_literal $Builtin.Int128, 0 // CHECK: integer_literal $Builtin.Int128, 0
|
||||||
%4 = apply %1(%3, %2) : $[thin] ((val: Builtin.Int128), Int64.metatype) -> Int64
|
%4 = apply %1(%3, %2) : $@thin ((val: Builtin.Int128), Int64.metatype) -> Int64
|
||||||
%5 = store %4 to %0 : $*Int64
|
%5 = store %4 to %0 : $*Int64
|
||||||
%6 = tuple ()
|
%6 = tuple ()
|
||||||
%7 = return %6 : $()
|
%7 = return %6 : $()
|
||||||
@@ -541,8 +541,8 @@ class SomeClass : SomeProtocol {
|
|||||||
}
|
}
|
||||||
class SomeSubclass : SomeClass {}
|
class SomeSubclass : SomeClass {}
|
||||||
|
|
||||||
// CHECK-LABEL: @test_class_metatype : $[thin] (c: SomeClass, s: SomeSubclass) -> (SomeClass.metatype, SomeClass.metatype) {
|
// CHECK-LABEL: @test_class_metatype : $@thin (c: SomeClass, s: SomeSubclass) -> (SomeClass.metatype, SomeClass.metatype) {
|
||||||
sil @test_class_metatype : $[thin] (c: SomeClass, s: SomeSubclass) -> (SomeClass.metatype, SomeClass.metatype) {
|
sil @test_class_metatype : $@thin (c: SomeClass, s: SomeSubclass) -> (SomeClass.metatype, SomeClass.metatype) {
|
||||||
bb0(%0 : $SomeClass, %1 : $SomeSubclass):
|
bb0(%0 : $SomeClass, %1 : $SomeSubclass):
|
||||||
%2 = alloc_box $SomeClass
|
%2 = alloc_box $SomeClass
|
||||||
%3 = alloc_box $SomeSubclass
|
%3 = alloc_box $SomeSubclass
|
||||||
@@ -568,8 +568,8 @@ bb0(%0 : $SomeClass, %1 : $SomeSubclass):
|
|||||||
%20 = return %15 : $(SomeClass.metatype, SomeClass.metatype)
|
%20 = return %15 : $(SomeClass.metatype, SomeClass.metatype)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @test_protocol_metatype : $[thin] (p: SomeProtocol) -> SomeProtocol.metatype {
|
// CHECK-LABEL: @test_protocol_metatype : $@thin (p: SomeProtocol) -> SomeProtocol.metatype {
|
||||||
sil @test_protocol_metatype : $[thin] (p: SomeProtocol) -> SomeProtocol.metatype {
|
sil @test_protocol_metatype : $@thin (p: SomeProtocol) -> SomeProtocol.metatype {
|
||||||
bb0(%0 : $*SomeProtocol):
|
bb0(%0 : $*SomeProtocol):
|
||||||
%1 = alloc_box $SomeProtocol
|
%1 = alloc_box $SomeProtocol
|
||||||
// CHECK: copy_addr [take] %0 to [initialization] %1#1 : $*SomeProtocol
|
// CHECK: copy_addr [take] %0 to [initialization] %1#1 : $*SomeProtocol
|
||||||
@@ -581,20 +581,20 @@ bb0(%0 : $*SomeProtocol):
|
|||||||
// CHECK: protocol_metatype $SomeProtocol.metatype, {{%.*}} : $*SomeProtocol
|
// CHECK: protocol_metatype $SomeProtocol.metatype, {{%.*}} : $*SomeProtocol
|
||||||
%6 = protocol_metatype $SomeProtocol.metatype, %4#1 : $*SomeProtocol
|
%6 = protocol_metatype $SomeProtocol.metatype, %4#1 : $*SomeProtocol
|
||||||
%7 = destroy_addr %4#1 : $*SomeProtocol
|
%7 = destroy_addr %4#1 : $*SomeProtocol
|
||||||
%8 = dealloc_stack %4#0 : $*[local_storage] SomeProtocol
|
%8 = dealloc_stack %4#0 : $*@local_storage SomeProtocol
|
||||||
%9 = strong_release %1#0 : $Builtin.ObjectPointer
|
%9 = strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
%10 = return %6 : $SomeProtocol.metatype
|
%10 = return %6 : $SomeProtocol.metatype
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_unreachable
|
// CHECK-LABEL: sil deserialized @test_unreachable
|
||||||
sil @test_unreachable : $[thin] () -> () {
|
sil @test_unreachable : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
unreachable
|
unreachable
|
||||||
// CHECK: unreachable
|
// CHECK: unreachable
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @test_unowned_retain : $[thin] (p: SomeClass) -> () {
|
// CHECK-LABEL: @test_unowned_retain : $@thin (p: SomeClass) -> () {
|
||||||
sil @test_unowned_retain : $[thin] (p: SomeClass) -> () {
|
sil @test_unowned_retain : $@thin (p: SomeClass) -> () {
|
||||||
bb0(%0 : $SomeClass):
|
bb0(%0 : $SomeClass):
|
||||||
%1 = ref_to_unowned %0 : $SomeClass to $@sil_unowned SomeClass
|
%1 = ref_to_unowned %0 : $SomeClass to $@sil_unowned SomeClass
|
||||||
// CHECK: ref_to_unowned %0 : $SomeClass to $@sil_unowned SomeClass
|
// CHECK: ref_to_unowned %0 : $SomeClass to $@sil_unowned SomeClass
|
||||||
@@ -609,7 +609,7 @@ bb0(%0 : $SomeClass):
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_basic_block_arguments
|
// CHECK-LABEL: sil deserialized @test_basic_block_arguments
|
||||||
sil @test_basic_block_arguments : $[thin] (i: Builtin.Int1) -> Builtin.Int64 {
|
sil @test_basic_block_arguments : $@thin (i: Builtin.Int1) -> Builtin.Int64 {
|
||||||
bb0(%0 : $Builtin.Int1):
|
bb0(%0 : $Builtin.Int1):
|
||||||
// CHECK: cond_br
|
// CHECK: cond_br
|
||||||
cond_br %0, bb1, bb2
|
cond_br %0, bb1, bb2
|
||||||
@@ -627,7 +627,7 @@ bb3(%6 : $Builtin.Int64):
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_cond_branch_basic_block_args
|
// CHECK-LABEL: sil deserialized @test_cond_branch_basic_block_args
|
||||||
sil @test_cond_branch_basic_block_args : $[thin] (i: Int64, b: Builtin.Int1) -> Int64 {
|
sil @test_cond_branch_basic_block_args : $@thin (i: Int64, b: Builtin.Int1) -> Int64 {
|
||||||
bb0(%0 : $Int64, %1 : $Builtin.Int1):
|
bb0(%0 : $Int64, %1 : $Builtin.Int1):
|
||||||
cond_br %1, bb1(%0 : $Int64), bb2(%0 : $Int64)
|
cond_br %1, bb1(%0 : $Int64), bb2(%0 : $Int64)
|
||||||
// CHECK: cond_br %1, bb1(%0 : $Int64), bb2(%0 : $Int64)
|
// CHECK: cond_br %1, bb1(%0 : $Int64), bb2(%0 : $Int64)
|
||||||
@@ -651,7 +651,7 @@ class Bas : NSObject {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// CHECK-LABEL: sil deserialized @test_autorelease_return
|
// CHECK-LABEL: sil deserialized @test_autorelease_return
|
||||||
sil @test_autorelease_return : $[cc(objc_method), thin] (Bas, ()) -> NSString {
|
sil @test_autorelease_return : $@cc(objc_method) @thin (Bas, ()) -> NSString {
|
||||||
bb0(%0 : $Bas):
|
bb0(%0 : $Bas):
|
||||||
strong_retain %0 : $Bas
|
strong_retain %0 : $Bas
|
||||||
%2 = ref_element_addr %0 : $Bas, #strRealProp
|
%2 = ref_element_addr %0 : $Bas, #strRealProp
|
||||||
@@ -660,28 +660,28 @@ bb0(%0 : $Bas):
|
|||||||
%5 = struct_extract %3 : $String, #str_value
|
%5 = struct_extract %3 : $String, #str_value
|
||||||
%6 = struct_extract %5 : $StringByteData, #owner
|
%6 = struct_extract %5 : $StringByteData, #owner
|
||||||
strong_retain %6 : $Builtin.ObjectPointer
|
strong_retain %6 : $Builtin.ObjectPointer
|
||||||
%8 = function_ref @swift_StringToNSString : $[thin] (string: [inout] String) -> NSString
|
%8 = function_ref @swift_StringToNSString : $@thin (string: @inout String) -> NSString
|
||||||
%9 = alloc_stack $String
|
%9 = alloc_stack $String
|
||||||
store %3 to %9#1 : $*String
|
store %3 to %9#1 : $*String
|
||||||
%11 = apply %8(%9#1) : $[thin] (string: [inout] String) -> NSString
|
%11 = apply %8(%9#1) : $@thin (string: @inout String) -> NSString
|
||||||
dealloc_stack %9#0 : $*[local_storage] String
|
dealloc_stack %9#0 : $*@local_storage String
|
||||||
%13 = struct_extract %3 : $String, #str_value
|
%13 = struct_extract %3 : $String, #str_value
|
||||||
%14 = struct_extract %13 : $StringByteData, #owner
|
%14 = struct_extract %13 : $StringByteData, #owner
|
||||||
strong_release %14 : $Builtin.ObjectPointer
|
strong_release %14 : $Builtin.ObjectPointer
|
||||||
// CHECK: autorelease_return %{{.*}} : $NSString
|
// CHECK: autorelease_return %{{.*}} : $NSString
|
||||||
autorelease_return %11 : $NSString
|
autorelease_return %11 : $NSString
|
||||||
}
|
}
|
||||||
sil @swift_StringToNSString : $[thin] (string: [inout] String) -> NSString
|
sil @swift_StringToNSString : $@thin (string: @inout String) -> NSString
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_super_method
|
// CHECK-LABEL: sil deserialized @test_super_method
|
||||||
sil @test_super_method : $[cc(method), thin] ((), Bas) -> Bas {
|
sil @test_super_method : $@cc(method) @thin ((), Bas) -> Bas {
|
||||||
bb0(%0 : $Bas):
|
bb0(%0 : $Bas):
|
||||||
%1 = tuple ()
|
%1 = tuple ()
|
||||||
%2 = alloc_box $Bas
|
%2 = alloc_box $Bas
|
||||||
store %0 to %2#1 : $*Bas
|
store %0 to %2#1 : $*Bas
|
||||||
%4 = function_ref @_TSSCfMSSFT_SS : $[thin] ((), String.metatype) -> String
|
%4 = function_ref @_TSSCfMSSFT_SS : $@thin ((), String.metatype) -> String
|
||||||
%5 = metatype $String.metatype
|
%5 = metatype $String.metatype
|
||||||
%6 = apply %4(%5) : $[thin] ((), String.metatype) -> String
|
%6 = apply %4(%5) : $@thin ((), String.metatype) -> String
|
||||||
%7 = load %2#1 : $*Bas
|
%7 = load %2#1 : $*Bas
|
||||||
strong_retain %7 : $Bas
|
strong_retain %7 : $Bas
|
||||||
%9 = ref_element_addr %7 : $Bas, #strRealProp
|
%9 = ref_element_addr %7 : $Bas, #strRealProp
|
||||||
@@ -695,8 +695,8 @@ bb0(%0 : $Bas):
|
|||||||
strong_retain %16 : $Bas
|
strong_retain %16 : $Bas
|
||||||
%18 = upcast %16 : $Bas to $NSObject
|
%18 = upcast %16 : $Bas to $NSObject
|
||||||
// CHECK: super_method [volatile] %{{.*}} : $Bas, #NSObject.init!initializer.1.foreign :
|
// CHECK: super_method [volatile] %{{.*}} : $Bas, #NSObject.init!initializer.1.foreign :
|
||||||
%19 = super_method [volatile] %16 : $Bas, #NSObject.init!initializer.1.foreign : $[cc(objc_method), thin] ((), NSObject) -> NSObject
|
%19 = super_method [volatile] %16 : $Bas, #NSObject.init!initializer.1.foreign : $@cc(objc_method) @thin ((), NSObject) -> NSObject
|
||||||
%20 = apply %19(%18) : $[cc(objc_method), thin] ((), NSObject) -> NSObject
|
%20 = apply %19(%18) : $@cc(objc_method) @thin ((), NSObject) -> NSObject
|
||||||
// CHECK: strong_retain_autoreleased %{{.*}} : $NSObject
|
// CHECK: strong_retain_autoreleased %{{.*}} : $NSObject
|
||||||
strong_retain_autoreleased %20 : $NSObject
|
strong_retain_autoreleased %20 : $NSObject
|
||||||
%22 = unconditional_checked_cast downcast %20 : $NSObject to $Bas
|
%22 = unconditional_checked_cast downcast %20 : $NSObject to $Bas
|
||||||
@@ -709,28 +709,28 @@ bb0(%0 : $Bas):
|
|||||||
strong_release %2#0 : $Builtin.ObjectPointer
|
strong_release %2#0 : $Builtin.ObjectPointer
|
||||||
return %27 : $Bas
|
return %27 : $Bas
|
||||||
}
|
}
|
||||||
sil @_TSSCfMSSFT_SS : $[thin] ((), String.metatype) -> String
|
sil @_TSSCfMSSFT_SS : $@thin ((), String.metatype) -> String
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_builtin_func_ref
|
// CHECK-LABEL: sil deserialized @test_builtin_func_ref
|
||||||
sil @test_builtin_func_ref : $[thin] (x: Builtin.Int1, y: Builtin.Int1) -> Builtin.Int1 {
|
sil @test_builtin_func_ref : $@thin (x: Builtin.Int1, y: Builtin.Int1) -> Builtin.Int1 {
|
||||||
bb0(%0 : $Builtin.Int1, %1 : $Builtin.Int1):
|
bb0(%0 : $Builtin.Int1, %1 : $Builtin.Int1):
|
||||||
%2 = alloc_box $Builtin.Int1
|
%2 = alloc_box $Builtin.Int1
|
||||||
%3 = alloc_box $Builtin.Int1
|
%3 = alloc_box $Builtin.Int1
|
||||||
store %0 to %2#1 : $*Builtin.Int1
|
store %0 to %2#1 : $*Builtin.Int1
|
||||||
store %1 to %3#1 : $*Builtin.Int1
|
store %1 to %3#1 : $*Builtin.Int1
|
||||||
%6 = module #Builtin // CHECK: module #Builtin
|
%6 = module #Builtin // CHECK: module #Builtin
|
||||||
// CHECK: builtin_function_ref #Builtin.cmp_eq_Int1 : $[thin] (Builtin.Int1, Builtin.Int1) -> Builtin.Int1
|
// CHECK: builtin_function_ref #Builtin.cmp_eq_Int1 : $@thin (Builtin.Int1, Builtin.Int1) -> Builtin.Int1
|
||||||
%7 = builtin_function_ref #Builtin.cmp_eq_Int1 : $[thin] (Builtin.Int1, Builtin.Int1) -> Builtin.Int1
|
%7 = builtin_function_ref #Builtin.cmp_eq_Int1 : $@thin (Builtin.Int1, Builtin.Int1) -> Builtin.Int1
|
||||||
%8 = load %2#1 : $*Builtin.Int1
|
%8 = load %2#1 : $*Builtin.Int1
|
||||||
%9 = load %3#1 : $*Builtin.Int1
|
%9 = load %3#1 : $*Builtin.Int1
|
||||||
%10 = apply %7(%8, %9) : $[thin] (Builtin.Int1, Builtin.Int1) -> Builtin.Int1
|
%10 = apply %7(%8, %9) : $@thin (Builtin.Int1, Builtin.Int1) -> Builtin.Int1
|
||||||
strong_release %3#0 : $Builtin.ObjectPointer
|
strong_release %3#0 : $Builtin.ObjectPointer
|
||||||
strong_release %2#0 : $Builtin.ObjectPointer
|
strong_release %2#0 : $Builtin.ObjectPointer
|
||||||
return %10 : $Builtin.Int1
|
return %10 : $Builtin.Int1
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_dealloc_ref
|
// CHECK-LABEL: sil deserialized @test_dealloc_ref
|
||||||
sil @test_dealloc_ref : $[thin] () -> () {
|
sil @test_dealloc_ref : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = alloc_ref $Class1
|
%0 = alloc_ref $Class1
|
||||||
// CHECK: dealloc_ref %{{.*}} : $Class1
|
// CHECK: dealloc_ref %{{.*}} : $Class1
|
||||||
@@ -740,7 +740,7 @@ bb0:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_dealloc_box
|
// CHECK-LABEL: sil deserialized @test_dealloc_box
|
||||||
sil @test_dealloc_box : $[thin] () -> () {
|
sil @test_dealloc_box : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = alloc_box $Class1
|
%0 = alloc_box $Class1
|
||||||
dealloc_box $Class1, %0#0 : $Builtin.ObjectPointer
|
dealloc_box $Class1, %0#0 : $Builtin.ObjectPointer
|
||||||
@@ -749,18 +749,18 @@ bb0:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: @closure_test
|
// CHECK-LABEL: @closure_test
|
||||||
sil @takes_closure : $[thin] (x : () -> ()) -> ()
|
sil @takes_closure : $@thin (x : () -> ()) -> ()
|
||||||
sil @closure0 : $[thin] ((), (Builtin.ObjectPointer, [inout] Int64)) -> ()
|
sil @closure0 : $@thin ((), (Builtin.ObjectPointer, @inout Int64)) -> ()
|
||||||
|
|
||||||
sil @closure_test : $[thin] () -> () {
|
sil @closure_test : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%0 = alloc_box $Int64 // users: %10, %8, %8, %7, %4
|
%0 = alloc_box $Int64 // users: %10, %8, %8, %7, %4
|
||||||
|
|
||||||
%5 = function_ref @takes_closure : $[thin] (x : () -> ()) -> ()
|
%5 = function_ref @takes_closure : $@thin (x : () -> ()) -> ()
|
||||||
%6 = function_ref @closure0 : $[thin] ((), (Builtin.ObjectPointer, [inout] Int64)) -> ()
|
%6 = function_ref @closure0 : $@thin ((), (Builtin.ObjectPointer, @inout Int64)) -> ()
|
||||||
strong_retain %0#0 : $Builtin.ObjectPointer
|
strong_retain %0#0 : $Builtin.ObjectPointer
|
||||||
//%8 = partial_apply %6(%0#0, %0#1) : $[thin] ((), (Builtin.ObjectPointer, [inout] Int64)) -> ()
|
//%8 = partial_apply %6(%0#0, %0#1) : $@thin ((), (Builtin.ObjectPointer, @inout Int64)) -> ()
|
||||||
//%9 = apply %5(%8) : $[thin] (x : () -> ()) -> ()
|
//%9 = apply %5(%8) : $@thin (x : () -> ()) -> ()
|
||||||
//strong_release %0#0 : $Builtin.ObjectPointer
|
//strong_release %0#0 : $Builtin.ObjectPointer
|
||||||
|
|
||||||
%11 = tuple ()
|
%11 = tuple ()
|
||||||
@@ -774,12 +774,12 @@ enum MaybePair {
|
|||||||
case Left(Int)
|
case Left(Int)
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @_T6switch1aFT_T_ : $[thin] () -> ()
|
sil @_T6switch1aFT_T_ : $@thin () -> ()
|
||||||
sil @_T6switch1bFT_T_ : $[thin] () -> ()
|
sil @_T6switch1bFT_T_ : $@thin () -> ()
|
||||||
sil @_T6switch1cFT_T_ : $[thin] () -> ()
|
sil @_T6switch1cFT_T_ : $@thin () -> ()
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_switch_union : $[thin] (u: MaybePair) -> ()
|
// CHECK-LABEL: sil deserialized @test_switch_union : $@thin (u: MaybePair) -> ()
|
||||||
sil @test_switch_union : $[thin] (u: MaybePair) -> () {
|
sil @test_switch_union : $@thin (u: MaybePair) -> () {
|
||||||
bb0(%0 : $MaybePair):
|
bb0(%0 : $MaybePair):
|
||||||
%1 = alloc_box $MaybePair
|
%1 = alloc_box $MaybePair
|
||||||
store %0 to %1#1 : $*MaybePair
|
store %0 to %1#1 : $*MaybePair
|
||||||
@@ -792,21 +792,21 @@ bb1:
|
|||||||
br bb2
|
br bb2
|
||||||
|
|
||||||
bb2:
|
bb2:
|
||||||
%7 = function_ref @_T6switch1aFT_T_ : $[thin] () -> ()
|
%7 = function_ref @_T6switch1aFT_T_ : $@thin () -> ()
|
||||||
%8 = apply %7() : $[thin] () -> ()
|
%8 = apply %7() : $@thin () -> ()
|
||||||
br bb5 // CHECK: br
|
br bb5 // CHECK: br
|
||||||
|
|
||||||
bb3(%10 : $Int64):
|
bb3(%10 : $Int64):
|
||||||
br bb4
|
br bb4
|
||||||
|
|
||||||
bb4:
|
bb4:
|
||||||
%12 = function_ref @_T6switch1bFT_T_ : $[thin] () -> ()
|
%12 = function_ref @_T6switch1bFT_T_ : $@thin () -> ()
|
||||||
%13 = apply %12() : $[thin] () -> ()
|
%13 = apply %12() : $@thin () -> ()
|
||||||
br bb5 // CHECK: br
|
br bb5 // CHECK: br
|
||||||
|
|
||||||
bb5:
|
bb5:
|
||||||
%15 = function_ref @_T6switch1cFT_T_ : $[thin] () -> ()
|
%15 = function_ref @_T6switch1cFT_T_ : $@thin () -> ()
|
||||||
%16 = apply %15() : $[thin] () -> ()
|
%16 = apply %15() : $@thin () -> ()
|
||||||
strong_release %1#0 : $Builtin.ObjectPointer
|
strong_release %1#0 : $Builtin.ObjectPointer
|
||||||
%18 = tuple ()
|
%18 = tuple ()
|
||||||
return %18 : $() // CHECK: return
|
return %18 : $() // CHECK: return
|
||||||
@@ -817,8 +817,8 @@ enum MaybeAddressOnlyPair {
|
|||||||
case Left(Q)
|
case Left(Q)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_switch_union_addr : $[thin] (u: MaybeAddressOnlyPair) -> ()
|
// CHECK-LABEL: sil deserialized @test_switch_union_addr : $@thin (u: MaybeAddressOnlyPair) -> ()
|
||||||
sil @test_switch_union_addr : $[thin] (u: MaybeAddressOnlyPair) -> () {
|
sil @test_switch_union_addr : $@thin (u: MaybeAddressOnlyPair) -> () {
|
||||||
bb0(%0 : $*MaybeAddressOnlyPair):
|
bb0(%0 : $*MaybeAddressOnlyPair):
|
||||||
// CHECK: destructive_switch_enum_addr %{{.*}} : $*MaybeAddressOnlyPair, case #MaybeAddressOnlyPair.Neither!enumelt: bb{{.*}}, case #MaybeAddressOnlyPair.Left!enumelt.1: bb
|
// CHECK: destructive_switch_enum_addr %{{.*}} : $*MaybeAddressOnlyPair, case #MaybeAddressOnlyPair.Neither!enumelt: bb{{.*}}, case #MaybeAddressOnlyPair.Left!enumelt.1: bb
|
||||||
destructive_switch_enum_addr %0 : $*MaybeAddressOnlyPair, case #MaybeAddressOnlyPair.Neither!enumelt: bb1, case #MaybeAddressOnlyPair.Left!enumelt.1: bb2
|
destructive_switch_enum_addr %0 : $*MaybeAddressOnlyPair, case #MaybeAddressOnlyPair.Neither!enumelt: bb1, case #MaybeAddressOnlyPair.Left!enumelt.1: bb2
|
||||||
@@ -834,20 +834,20 @@ bb3:
|
|||||||
return %t : $()
|
return %t : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_switch_int : $[thin] (u: Builtin.Int64) -> ()
|
// CHECK-LABEL: sil deserialized @test_switch_int : $@thin (u: Builtin.Int64) -> ()
|
||||||
sil @test_switch_int : $[thin] (u: Builtin.Int64) -> () {
|
sil @test_switch_int : $@thin (u: Builtin.Int64) -> () {
|
||||||
bb0(%0 : $Builtin.Int64):
|
bb0(%0 : $Builtin.Int64):
|
||||||
// CHECK: switch_int %{{.*}} : $Builtin.Int64, case 1: bb1, case 2: bb2
|
// CHECK: switch_int %{{.*}} : $Builtin.Int64, case 1: bb1, case 2: bb2
|
||||||
switch_int %0 : $Builtin.Int64, case 1: bb1, case 2: bb2
|
switch_int %0 : $Builtin.Int64, case 1: bb1, case 2: bb2
|
||||||
|
|
||||||
bb1:
|
bb1:
|
||||||
%7 = function_ref @_T6switch1aFT_T_ : $[thin] () -> () // CHECK: function_ref
|
%7 = function_ref @_T6switch1aFT_T_ : $@thin () -> () // CHECK: function_ref
|
||||||
%8 = apply %7() : $[thin] () -> ()
|
%8 = apply %7() : $@thin () -> ()
|
||||||
br bb3
|
br bb3
|
||||||
|
|
||||||
bb2:
|
bb2:
|
||||||
%12 = function_ref @_T6switch1bFT_T_ : $[thin] () -> () // CHECK: function_ref
|
%12 = function_ref @_T6switch1bFT_T_ : $@thin () -> () // CHECK: function_ref
|
||||||
%13 = apply %12() : $[thin] () -> ()
|
%13 = apply %12() : $@thin () -> ()
|
||||||
br bb3
|
br bb3
|
||||||
|
|
||||||
bb3:
|
bb3:
|
||||||
@@ -860,8 +860,8 @@ class ConcreteClass : ClassP {
|
|||||||
struct Spoon : Bendable {
|
struct Spoon : Bendable {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_init_existential : $[thin] (x: Spoon) -> Bendable
|
// CHECK-LABEL: sil deserialized @test_init_existential : $@thin (x: Spoon) -> Bendable
|
||||||
sil @test_init_existential : $[thin] (x : Spoon) -> Bendable {
|
sil @test_init_existential : $@thin (x : Spoon) -> Bendable {
|
||||||
bb0(%0 : $*Bendable, %1 : $Spoon):
|
bb0(%0 : $*Bendable, %1 : $Spoon):
|
||||||
%2 = alloc_box $Spoon
|
%2 = alloc_box $Spoon
|
||||||
store %1 to %2#1 : $*Spoon
|
store %1 to %2#1 : $*Spoon
|
||||||
@@ -876,8 +876,8 @@ bb0(%0 : $*Bendable, %1 : $Spoon):
|
|||||||
return %8 : $()
|
return %8 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_existential_ref : $[thin] (x: ConcreteClass) -> ClassP
|
// CHECK-LABEL: sil deserialized @test_existential_ref : $@thin (x: ConcreteClass) -> ClassP
|
||||||
sil @test_existential_ref : $[thin] (x : ConcreteClass) -> ClassP {
|
sil @test_existential_ref : $@thin (x : ConcreteClass) -> ClassP {
|
||||||
bb0(%0 : $ConcreteClass):
|
bb0(%0 : $ConcreteClass):
|
||||||
%1 = alloc_box $ConcreteClass
|
%1 = alloc_box $ConcreteClass
|
||||||
store %0 to %1#1 : $*ConcreteClass
|
store %0 to %1#1 : $*ConcreteClass
|
||||||
@@ -889,33 +889,33 @@ bb0(%0 : $ConcreteClass):
|
|||||||
return %5 : $ClassP
|
return %5 : $ClassP
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @test_assign : $[thin] (x: Int64, y: [inout] Int64) -> () { // CHECK-LABEL: sil deserialized @test_assign
|
sil @test_assign : $@thin (x: Int64, y: @inout Int64) -> () { // CHECK-LABEL: sil deserialized @test_assign
|
||||||
bb0(%0 : $Int64, %1 : $*Int64):
|
bb0(%0 : $Int64, %1 : $*Int64):
|
||||||
assign %0 to %1 : $*Int64 // CHECK: assign
|
assign %0 to %1 : $*Int64 // CHECK: assign
|
||||||
unreachable
|
unreachable
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_transparent : $[thin] () -> () {
|
// CHECK-LABEL: sil deserialized @test_transparent : $@thin () -> () {
|
||||||
sil @test_transparent : $[thin] () -> () {
|
sil @test_transparent : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
// CHECK: function_ref
|
// CHECK: function_ref
|
||||||
// CHECK: apply [transparent]
|
// CHECK: apply [transparent]
|
||||||
%0 = function_ref @classes : $[thin] () -> ()
|
%0 = function_ref @classes : $@thin () -> ()
|
||||||
%1 = apply [transparent] %0() : $[thin] () -> ()
|
%1 = apply [transparent] %0() : $@thin () -> ()
|
||||||
%2 = tuple ()
|
%2 = tuple ()
|
||||||
%3 = return %2 : $()
|
%3 = return %2 : $()
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @takes_unnamed_closure : $[thin] (() -> Int64) -> () -> () -> Int64
|
sil @takes_unnamed_closure : $@thin (() -> Int64) -> () -> () -> Int64
|
||||||
|
|
||||||
sil @takes_int64_float32 : $[thin] (Int64, Float32) -> ()
|
sil @takes_int64_float32 : $@thin (Int64, Float32) -> ()
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_partial_apply : $[thin] Float32 -> Int64 -> () {
|
// CHECK-LABEL: sil deserialized @test_partial_apply : $@thin Float32 -> Int64 -> () {
|
||||||
sil @test_partial_apply : $[thin] Float32 -> Int64 -> () {
|
sil @test_partial_apply : $@thin Float32 -> Int64 -> () {
|
||||||
bb0(%0 : $Float32):
|
bb0(%0 : $Float32):
|
||||||
%1 = function_ref @takes_int64_float32 : $[thin] (Int64, Float32) -> ()
|
%1 = function_ref @takes_int64_float32 : $@thin (Int64, Float32) -> ()
|
||||||
// CHECK: partial_apply %{{.*}}(%{{.*}}) : $[thin] (Int64, Float32) -> ()
|
// CHECK: partial_apply %{{.*}}(%{{.*}}) : $@thin (Int64, Float32) -> ()
|
||||||
%2 = partial_apply %1(%0) : $[thin] (Int64, Float32) -> ()
|
%2 = partial_apply %1(%0) : $@thin (Int64, Float32) -> ()
|
||||||
%3 = return %2 : $Int64 -> ()
|
%3 = return %2 : $Int64 -> ()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -923,8 +923,8 @@ class X {
|
|||||||
func [objc] f() { }
|
func [objc] f() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_dynamic_lookup_br : $[thin] (obj: DynamicLookup) -> ()
|
// CHECK-LABEL: sil deserialized @test_dynamic_lookup_br : $@thin (obj: DynamicLookup) -> ()
|
||||||
sil @test_dynamic_lookup_br : $[thin] (obj: DynamicLookup) -> () {
|
sil @test_dynamic_lookup_br : $@thin (obj: DynamicLookup) -> () {
|
||||||
bb0(%0 : $DynamicLookup):
|
bb0(%0 : $DynamicLookup):
|
||||||
%1 = alloc_box $DynamicLookup
|
%1 = alloc_box $DynamicLookup
|
||||||
store %0 to %1#1 : $*DynamicLookup
|
store %0 to %1#1 : $*DynamicLookup
|
||||||
@@ -948,7 +948,7 @@ bb3:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_mark_fn_escape
|
// CHECK-LABEL: sil deserialized @test_mark_fn_escape
|
||||||
sil @test_mark_fn_escape : $[thin] () -> () {
|
sil @test_mark_fn_escape : $@thin () -> () {
|
||||||
%b = alloc_box $Int64
|
%b = alloc_box $Int64
|
||||||
%c = alloc_box $Int64
|
%c = alloc_box $Int64
|
||||||
|
|
||||||
@@ -960,7 +960,7 @@ sil @test_mark_fn_escape : $[thin] () -> () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: sil deserialized @test_copy_destroy_value
|
// CHECK-LABEL: sil deserialized @test_copy_destroy_value
|
||||||
sil @test_copy_destroy_value : $[thin] (v : Val) -> (Val) {
|
sil @test_copy_destroy_value : $@thin (v : Val) -> (Val) {
|
||||||
bb0(%0 : $Val):
|
bb0(%0 : $Val):
|
||||||
%1 = copy_value %0 : $Val
|
%1 = copy_value %0 : $Val
|
||||||
destroy_value %0 : $Val
|
destroy_value %0 : $Val
|
||||||
@@ -973,60 +973,60 @@ bb0(%0 : $Val):
|
|||||||
func serialize_all() {
|
func serialize_all() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sil @_T9def_basic13serialize_allFT_T_ : $[thin] () -> () {
|
sil @_T9def_basic13serialize_allFT_T_ : $@thin () -> () {
|
||||||
bb0:
|
bb0:
|
||||||
%2 = function_ref @test1 : $[thin] () -> ()
|
%2 = function_ref @test1 : $@thin () -> ()
|
||||||
%4 = function_ref @test2 : $[thin] (x: Int64) -> ()
|
%4 = function_ref @test2 : $@thin (x: Int64) -> ()
|
||||||
%6 = function_ref @named_tuple : $[thin] () -> (x: Builtin.Int64, Builtin.Int64)
|
%6 = function_ref @named_tuple : $@thin () -> (x: Builtin.Int64, Builtin.Int64)
|
||||||
%9 = function_ref @return_int : $[thin] (a: Int64) -> Int64
|
%9 = function_ref @return_int : $@thin (a: Int64) -> Int64
|
||||||
%11 = function_ref @call_fn_pointer : $[thin] (a : () -> Int64) -> Int64
|
%11 = function_ref @call_fn_pointer : $@thin (a : () -> Int64) -> Int64
|
||||||
%13 = function_ref @return_constant : $[thin] () -> Int64
|
%13 = function_ref @return_constant : $@thin () -> Int64
|
||||||
%21 = function_ref @_T4test1xFT1aSb_Si : $[thin] (a : Bool) -> Int64
|
%21 = function_ref @_T4test1xFT1aSb_Si : $@thin (a : Bool) -> Int64
|
||||||
%23 = function_ref @existentials : $[thin] (n : P) -> ()
|
%23 = function_ref @existentials : $@thin (n : P) -> ()
|
||||||
%25 = function_ref @classes : $[thin] () -> ()
|
%25 = function_ref @classes : $@thin () -> ()
|
||||||
%27 = function_ref @_T4todo18erasure_from_protoFT1xPS_8RuncibleS_8Bendable__PS0__ : $[thin] (x : protocol<Bendable, Runcible>) -> Runcible
|
%27 = function_ref @_T4todo18erasure_from_protoFT1xPS_8RuncibleS_8Bendable__PS0__ : $@thin (x : protocol<Bendable, Runcible>) -> Runcible
|
||||||
%29 = function_ref @_T4todo18class_bound_methodFT1xPS_10ClassBound__T_ : $[thin] (x : ClassBound) -> ()
|
%29 = function_ref @_T4todo18class_bound_methodFT1xPS_10ClassBound__T_ : $@thin (x : ClassBound) -> ()
|
||||||
%31 = function_ref @_TV6struct5AlephCfMS0_FT1aCS_3Ref1bVS_3Val_S0_ : $[thin] ((a : Ref, b : Val), Aleph.metatype) -> Aleph
|
%31 = function_ref @_TV6struct5AlephCfMS0_FT1aCS_3Ref1bVS_3Val_S0_ : $@thin ((a : Ref, b : Val), Aleph.metatype) -> Aleph
|
||||||
%33 = function_ref @_TV6struct5AlephCfMS0_FT_S0_ : $[thin] ((), Aleph.metatype) -> Aleph
|
%33 = function_ref @_TV6struct5AlephCfMS0_FT_S0_ : $@thin ((), Aleph.metatype) -> Aleph
|
||||||
%35 = function_ref @test_union_empty_case : $[thin] () -> Beth
|
%35 = function_ref @test_union_empty_case : $@thin () -> Beth
|
||||||
%37 = function_ref @test_union_data_case : $[thin] Int64 -> Beth
|
%37 = function_ref @test_union_data_case : $@thin Int64 -> Beth
|
||||||
%39 = function_ref @test_union_addr_empty_case : $[thin] () -> Gimel
|
%39 = function_ref @test_union_addr_empty_case : $@thin () -> Gimel
|
||||||
%41 = function_ref @test_union_addr_data_case : $[thin] (Q) -> Gimel
|
%41 = function_ref @test_union_addr_data_case : $@thin (Q) -> Gimel
|
||||||
%43 = function_ref @_T5tuple5floatFT1xSf_T_ : $[thin] (x : Float32) -> ()
|
%43 = function_ref @_T5tuple5floatFT1xSf_T_ : $@thin (x : Float32) -> ()
|
||||||
%45 = function_ref @_T5tuple5tupleFT_TSiSf_ : $[thin] () -> (Int64, Float32)
|
%45 = function_ref @_T5tuple5tupleFT_TSiSf_ : $@thin () -> (Int64, Float32)
|
||||||
%47 = function_ref @_T5tuple13tuple_elementFT1xTSiSf__T_ : $[thin] (x : (Int64, Float32)) -> ()
|
%47 = function_ref @_T5tuple13tuple_elementFT1xTSiSf__T_ : $@thin (x : (Int64, Float32)) -> ()
|
||||||
%49 = function_ref @_TC3ref1C3foofS0_FT1xSi_T_ : $[cc(method), thin] ((x: Int64), M) -> ()
|
%49 = function_ref @_TC3ref1C3foofS0_FT1xSi_T_ : $@cc(method) @thin ((x: Int64), M) -> ()
|
||||||
%51 = function_ref @_T4null3isaFT1bCS_1B_Sb : $[thin] (b : B) -> Builtin.Int1
|
%51 = function_ref @_T4null3isaFT1bCS_1B_Sb : $@thin (b : B) -> Builtin.Int1
|
||||||
%53 = function_ref @_TSd31_convertFromBuiltinFloatLiteralfMSdFT5valueBf64__Sd : $[thin] ((value: Builtin.FPIEEE64), Float64.metatype) -> Float64
|
%53 = function_ref @_TSd31_convertFromBuiltinFloatLiteralfMSdFT5valueBf64__Sd : $@thin ((value: Builtin.FPIEEE64), Float64.metatype) -> Float64
|
||||||
%55 = function_ref @_TSS32_convertFromBuiltinStringLiteralfMSSFT5valueBp8byteSizeBi64_7isASCIIBi1__SS : $[thin] ((value: Builtin.RawPointer, byteSize: Builtin.Int64, isASCII: Builtin.Int1), String.metatype) -> String
|
%55 = function_ref @_TSS32_convertFromBuiltinStringLiteralfMSSFT5valueBp8byteSizeBi64_7isASCIIBi1__SS : $@thin ((value: Builtin.RawPointer, byteSize: Builtin.Int64, isASCII: Builtin.Int1), String.metatype) -> String
|
||||||
%57 = function_ref @_T7literal8literalsFT_T_ : $[thin] () -> ()
|
%57 = function_ref @_T7literal8literalsFT_T_ : $@thin () -> ()
|
||||||
%59 = function_ref @_T5index5gep64FT1pBp1iBi64__Bp : $[thin] (p: Builtin.RawPointer, i: Builtin.Int64) -> Builtin.RawPointer
|
%59 = function_ref @_T5index5gep64FT1pBp1iBi64__Bp : $@thin (p: Builtin.RawPointer, i: Builtin.Int64) -> Builtin.RawPointer
|
||||||
%60 = function_ref @global_code : $[thin] () -> ()
|
%60 = function_ref @global_code : $@thin () -> ()
|
||||||
%63 = function_ref @test_class_metatype : $[thin] (c : SomeClass, s : SomeSubclass) -> (SomeClass.metatype, SomeClass.metatype)
|
%63 = function_ref @test_class_metatype : $@thin (c : SomeClass, s : SomeSubclass) -> (SomeClass.metatype, SomeClass.metatype)
|
||||||
%67 = function_ref @test_protocol_metatype : $[thin] (p : SomeProtocol) -> SomeProtocol.metatype
|
%67 = function_ref @test_protocol_metatype : $@thin (p : SomeProtocol) -> SomeProtocol.metatype
|
||||||
%69 = function_ref @test_unreachable : $[thin] () -> ()
|
%69 = function_ref @test_unreachable : $@thin () -> ()
|
||||||
%71 = function_ref @test_unowned_retain : $[thin] (p : SomeClass) -> ()
|
%71 = function_ref @test_unowned_retain : $@thin (p : SomeClass) -> ()
|
||||||
%73 = function_ref @test_basic_block_arguments : $[thin] (i: Builtin.Int1) -> Builtin.Int64
|
%73 = function_ref @test_basic_block_arguments : $@thin (i: Builtin.Int1) -> Builtin.Int64
|
||||||
%75 = function_ref @test_cond_branch_basic_block_args : $[thin] (i: Int64, b: Builtin.Int1) -> Int64
|
%75 = function_ref @test_cond_branch_basic_block_args : $@thin (i: Int64, b: Builtin.Int1) -> Int64
|
||||||
|
|
||||||
%77 = function_ref @test_autorelease_return : $[cc(objc_method), thin] (Bas, ()) -> NSString
|
%77 = function_ref @test_autorelease_return : $@cc(objc_method) @thin (Bas, ()) -> NSString
|
||||||
%79 = function_ref @test_super_method : $[cc(method), thin] ((), Bas) -> Bas
|
%79 = function_ref @test_super_method : $@cc(method) @thin ((), Bas) -> Bas
|
||||||
%81 = function_ref @test_builtin_func_ref : $[thin] (x: Builtin.Int1, y: Builtin.Int1) -> Builtin.Int1
|
%81 = function_ref @test_builtin_func_ref : $@thin (x: Builtin.Int1, y: Builtin.Int1) -> Builtin.Int1
|
||||||
%83 = function_ref @test_dealloc_ref : $[thin] () -> ()
|
%83 = function_ref @test_dealloc_ref : $@thin () -> ()
|
||||||
%85 = function_ref @test_dealloc_box : $[thin] () -> ()
|
%85 = function_ref @test_dealloc_box : $@thin () -> ()
|
||||||
%87 = function_ref @closure_test : $[thin] () -> ()
|
%87 = function_ref @closure_test : $@thin () -> ()
|
||||||
%97 = function_ref @test_switch_union : $[thin] (u: MaybePair) -> ()
|
%97 = function_ref @test_switch_union : $@thin (u: MaybePair) -> ()
|
||||||
%99 = function_ref @test_switch_union_addr : $[thin] (u: MaybeAddressOnlyPair) -> ()
|
%99 = function_ref @test_switch_union_addr : $@thin (u: MaybeAddressOnlyPair) -> ()
|
||||||
%101 = function_ref @test_switch_int : $[thin] (u: Builtin.Int64) -> ()
|
%101 = function_ref @test_switch_int : $@thin (u: Builtin.Int64) -> ()
|
||||||
%103 = function_ref @test_init_existential : $[thin] (x: Spoon) -> Bendable
|
%103 = function_ref @test_init_existential : $@thin (x: Spoon) -> Bendable
|
||||||
%105 = function_ref @test_existential_ref : $[thin] (x: ConcreteClass) -> ClassP
|
%105 = function_ref @test_existential_ref : $@thin (x: ConcreteClass) -> ClassP
|
||||||
|
|
||||||
%107 = function_ref @test_assign : $[thin] (x: Int64, y: [inout] Int64) -> ()
|
%107 = function_ref @test_assign : $@thin (x: Int64, y: @inout Int64) -> ()
|
||||||
%109 = function_ref @test_transparent : $[thin] () -> ()
|
%109 = function_ref @test_transparent : $@thin () -> ()
|
||||||
%111 = function_ref @test_partial_apply : $[thin] Float32 -> Int64 -> ()
|
%111 = function_ref @test_partial_apply : $@thin Float32 -> Int64 -> ()
|
||||||
%113 = function_ref @test_dynamic_lookup_br : $[thin] (obj: DynamicLookup) -> ()
|
%113 = function_ref @test_dynamic_lookup_br : $@thin (obj: DynamicLookup) -> ()
|
||||||
%115 = function_ref @test_mark_fn_escape : $[thin] () -> ()
|
%115 = function_ref @test_mark_fn_escape : $@thin () -> ()
|
||||||
%117 = function_ref @test_copy_destroy_value : $[thin] (v: Val) -> (Val)
|
%117 = function_ref @test_copy_destroy_value : $@thin (v: Val) -> (Val)
|
||||||
|
|
||||||
%119 = tuple ()
|
%119 = tuple ()
|
||||||
return %119 : $()
|
return %119 : $()
|
||||||
|
|||||||
Reference in New Issue
Block a user