@@ -246,7 +246,7 @@ CONSTANT_OR_NONE_OWNERSHIP_INST(Owned, LifetimeEnding, DeinitExistentialValue)
246246#define ACCEPTS_ANY_OWNERSHIP_INST (INST ) \
247247 OwnershipConstraint OwnershipConstraintClassifier::visit##INST##Inst( \
248248 INST##Inst *i) { \
249- return OwnershipConstraint::anyValueAcceptingConstraint (); \
249+ return OwnershipConstraint::any (); \
250250 }
251251ACCEPTS_ANY_OWNERSHIP_INST (BeginBorrow)
252252ACCEPTS_ANY_OWNERSHIP_INST(CopyValue)
@@ -342,13 +342,13 @@ OwnershipConstraint OwnershipConstraintClassifier::visitDeallocPartialRefInst(
342342 return {OwnershipKind::Owned, UseLifetimeConstraint::LifetimeEnding};
343343 }
344344
345- return OwnershipConstraint::anyValueAcceptingConstraint ();
345+ return OwnershipConstraint::any ();
346346}
347347
348348OwnershipConstraint
349349OwnershipConstraintClassifier::visitSelectEnumInst (SelectEnumInst *i) {
350350 if (getValue () == i->getEnumOperand ()) {
351- return OwnershipConstraint::anyValueAcceptingConstraint ();
351+ return OwnershipConstraint::any ();
352352 }
353353
354354 auto kind = i->getOwnershipKind ();
@@ -360,14 +360,14 @@ OwnershipConstraint
360360OwnershipConstraintClassifier::visitAllocRefInst (AllocRefInst *i) {
361361 assert (i->getNumOperands () != 0 &&
362362 " If we reach this point, we must have a tail operand" );
363- return OwnershipConstraint::anyValueAcceptingConstraint ();
363+ return OwnershipConstraint::any ();
364364}
365365
366366OwnershipConstraint OwnershipConstraintClassifier::visitAllocRefDynamicInst (
367367 AllocRefDynamicInst *i) {
368368 assert (i->getNumOperands () != 0 &&
369369 " If we reach this point, we must have a tail operand" );
370- return OwnershipConstraint::anyValueAcceptingConstraint ();
370+ return OwnershipConstraint::any ();
371371}
372372
373373OwnershipConstraint
@@ -401,7 +401,7 @@ OwnershipConstraint
401401OwnershipConstraintClassifier::visitCondBranchInst (CondBranchInst *cbi) {
402402 // In ossa, cond_br insts are not allowed to take non-trivial values. Thus, we
403403 // just accept anything since we know all of our operands will be trivial.
404- return OwnershipConstraint::anyValueAcceptingConstraint ();
404+ return OwnershipConstraint::any ();
405405}
406406
407407OwnershipConstraint
@@ -444,7 +444,7 @@ OwnershipConstraintClassifier::visitThrowInst(ThrowInst *i) {
444444 /* but it does not touch the strong reference count of the value. We */ \
445445 /* also just care about liveness for the dest. So just match everything */ \
446446 /* as must be live. */ \
447- return OwnershipConstraint::anyValueAcceptingConstraint (); \
447+ return OwnershipConstraint::any (); \
448448 }
449449#define SOMETIMES_LOADABLE_CHECKED_REF_STORAGE (Name, ...) \
450450 NEVER_LOADABLE_CHECKED_REF_STORAGE (Name, " ..." )
@@ -456,7 +456,7 @@ OwnershipConstraintClassifier::visitStoreBorrowInst(StoreBorrowInst *i) {
456456 return {OwnershipKind::Guaranteed,
457457 UseLifetimeConstraint::NonLifetimeEnding};
458458 }
459- return OwnershipConstraint::anyValueAcceptingConstraint ();
459+ return OwnershipConstraint::any ();
460460}
461461
462462// FIXME: Why not use SILArgumentConvention here?
@@ -478,12 +478,12 @@ OwnershipConstraintClassifier::visitCallee(CanSILFunctionType substCalleeType) {
478478 case ParameterConvention::Indirect_InoutAliasable:
479479 llvm_unreachable (" Illegal convention for callee" );
480480 case ParameterConvention::Direct_Unowned:
481- return OwnershipConstraint::anyValueAcceptingConstraint ();
481+ return OwnershipConstraint::any ();
482482 case ParameterConvention::Direct_Owned:
483483 return {OwnershipKind::Owned, UseLifetimeConstraint::LifetimeEnding};
484484 case ParameterConvention::Direct_Guaranteed:
485485 if (substCalleeType->isNoEscape ())
486- return OwnershipConstraint::anyValueAcceptingConstraint ();
486+ return OwnershipConstraint::any ();
487487 return {OwnershipKind::Guaranteed,
488488 UseLifetimeConstraint::NonLifetimeEnding};
489489 }
@@ -509,7 +509,7 @@ OwnershipConstraintClassifier::visitFullApply(FullApplySite apply) {
509509
510510 // Indirect return arguments are address types.
511511 if (apply.isIndirectResultOperand (op)) {
512- return OwnershipConstraint::anyValueAcceptingConstraint ();
512+ return OwnershipConstraint::any ();
513513 }
514514
515515 // We should have early exited if we saw a type dependent operand, so we
@@ -527,12 +527,12 @@ OwnershipConstraintClassifier::visitFullApply(FullApplySite apply) {
527527 return visitApplyParameter (OwnershipKind::Owned,
528528 UseLifetimeConstraint::LifetimeEnding);
529529 case ParameterConvention::Direct_Unowned:
530- return OwnershipConstraint::anyValueAcceptingConstraint ();
530+ return OwnershipConstraint::any ();
531531
532532 case ParameterConvention::Indirect_In: {
533533 // This expects an @trivial if we have lowered addresses and @
534534 if (conv.useLoweredAddresses ()) {
535- return OwnershipConstraint::anyValueAcceptingConstraint ();
535+ return OwnershipConstraint::any ();
536536 }
537537 // TODO: Once trivial is subsumed in any, this goes away.
538538 auto map = visitApplyParameter (OwnershipKind::Owned,
@@ -543,7 +543,7 @@ OwnershipConstraintClassifier::visitFullApply(FullApplySite apply) {
543543 case ParameterConvention::Indirect_In_Guaranteed: {
544544 // This expects an @trivial if we have lowered addresses and @
545545 if (conv.useLoweredAddresses ()) {
546- return OwnershipConstraint::anyValueAcceptingConstraint ();
546+ return OwnershipConstraint::any ();
547547 }
548548 return visitApplyParameter (OwnershipKind::Guaranteed,
549549 UseLifetimeConstraint::NonLifetimeEnding);
@@ -554,7 +554,7 @@ OwnershipConstraintClassifier::visitFullApply(FullApplySite apply) {
554554 case ParameterConvention::Indirect_In_Constant:
555555 case ParameterConvention::Indirect_Inout:
556556 case ParameterConvention::Indirect_InoutAliasable:
557- return OwnershipConstraint::anyValueAcceptingConstraint ();
557+ return OwnershipConstraint::any ();
558558
559559 case ParameterConvention::Direct_Guaranteed:
560560 // A +1 value may be passed to a guaranteed argument. From the caller's
@@ -586,7 +586,7 @@ OwnershipConstraint
586586OwnershipConstraintClassifier::visitPartialApplyInst (PartialApplyInst *i) {
587587 // partial_apply [stack] does not take ownership of its operands.
588588 if (i->isOnStack ())
589- return OwnershipConstraint::anyValueAcceptingConstraint ();
589+ return OwnershipConstraint::any ();
590590
591591 // All non-trivial types should be captured.
592592 return {OwnershipKind::Owned, UseLifetimeConstraint::LifetimeEnding};
@@ -599,7 +599,7 @@ OwnershipConstraintClassifier::visitYieldInst(YieldInst *i) {
599599 //
600600 // TODO: Change this to check if this operand is an indirect result
601601 if (isAddressOrTrivialType ())
602- return OwnershipConstraint::anyValueAcceptingConstraint ();
602+ return OwnershipConstraint::any ();
603603
604604 auto fnType = i->getFunction ()->getLoweredFunctionType ();
605605 auto yieldInfo = fnType->getYields ()[getOperandIndex ()];
@@ -611,7 +611,7 @@ OwnershipConstraintClassifier::visitYieldInst(YieldInst *i) {
611611 case ParameterConvention::Indirect_In_Constant:
612612 case ParameterConvention::Direct_Unowned:
613613 // We accept unowned, owned, and guaranteed in unowned positions.
614- return OwnershipConstraint::anyValueAcceptingConstraint ();
614+ return OwnershipConstraint::any ();
615615 case ParameterConvention::Indirect_In_Guaranteed:
616616 case ParameterConvention::Direct_Guaranteed:
617617 return visitApplyParameter (OwnershipKind::Guaranteed,
@@ -627,7 +627,7 @@ OwnershipConstraintClassifier::visitYieldInst(YieldInst *i) {
627627OwnershipConstraint
628628OwnershipConstraintClassifier::visitAssignInst (AssignInst *i) {
629629 if (getValue () != i->getSrc ()) {
630- return OwnershipConstraint::anyValueAcceptingConstraint ();
630+ return OwnershipConstraint::any ();
631631 }
632632
633633 return {OwnershipKind::Owned, UseLifetimeConstraint::LifetimeEnding};
@@ -636,7 +636,7 @@ OwnershipConstraintClassifier::visitAssignInst(AssignInst *i) {
636636OwnershipConstraint OwnershipConstraintClassifier::visitAssignByWrapperInst (
637637 AssignByWrapperInst *i) {
638638 if (getValue () != i->getSrc ()) {
639- return OwnershipConstraint::anyValueAcceptingConstraint ();
639+ return OwnershipConstraint::any ();
640640 }
641641
642642 return {OwnershipKind::Owned, UseLifetimeConstraint::LifetimeEnding};
@@ -645,7 +645,7 @@ OwnershipConstraint OwnershipConstraintClassifier::visitAssignByWrapperInst(
645645OwnershipConstraint
646646OwnershipConstraintClassifier::visitStoreInst (StoreInst *i) {
647647 if (getValue () != i->getSrc ()) {
648- return OwnershipConstraint::anyValueAcceptingConstraint ();
648+ return OwnershipConstraint::any ();
649649 }
650650
651651 return {OwnershipKind::Owned, UseLifetimeConstraint::LifetimeEnding};
@@ -659,7 +659,7 @@ OwnershipConstraintClassifier::visitCopyBlockWithoutEscapingInst(
659659 return {OwnershipKind::Owned, UseLifetimeConstraint::LifetimeEnding};
660660 }
661661
662- return OwnershipConstraint::anyValueAcceptingConstraint ();
662+ return OwnershipConstraint::any ();
663663}
664664
665665OwnershipConstraint OwnershipConstraintClassifier::visitMarkDependenceInst (
@@ -668,7 +668,7 @@ OwnershipConstraint OwnershipConstraintClassifier::visitMarkDependenceInst(
668668 if (getValue () == mdi->getValue ()) {
669669 auto kind = mdi->getOwnershipKind ();
670670 if (kind == OwnershipKind::None)
671- return OwnershipConstraint::anyValueAcceptingConstraint ();
671+ return OwnershipConstraint::any ();
672672 auto lifetimeConstraint = kind.getForwardingLifetimeConstraint ();
673673 return {kind, lifetimeConstraint};
674674 }
@@ -677,7 +677,7 @@ OwnershipConstraint OwnershipConstraintClassifier::visitMarkDependenceInst(
677677 // "base". This means that any use that would destroy "value" can not be moved
678678 // before any uses of "base". We treat this as non-consuming and rely on the
679679 // rest of the optimizer to respect the movement restrictions.
680- return OwnershipConstraint::anyValueAcceptingConstraint ();
680+ return OwnershipConstraint::any ();
681681}
682682
683683OwnershipConstraint
@@ -702,7 +702,7 @@ struct OperandOwnershipKindBuiltinClassifier
702702 llvm::Intrinsic::ID id) {
703703 // LLVM intrinsics do not traffic in ownership, so if we have a result, it
704704 // must be trivial.
705- return OwnershipConstraint::anyValueAcceptingConstraint ();
705+ return OwnershipConstraint::any ();
706706 }
707707
708708 // BUILTIN_TYPE_CHECKER_OPERATION does not live past the type checker.
@@ -720,7 +720,7 @@ struct OperandOwnershipKindBuiltinClassifier
720720#define ANY_OWNERSHIP_BUILTIN (ID ) \
721721 OwnershipConstraint OperandOwnershipKindBuiltinClassifier::visit##ID( \
722722 BuiltinInst *, StringRef) { \
723- return OwnershipConstraint::anyValueAcceptingConstraint (); \
723+ return OwnershipConstraint::any (); \
724724 }
725725ANY_OWNERSHIP_BUILTIN (ErrorInMain)
726726ANY_OWNERSHIP_BUILTIN(UnexpectedError)
0 commit comments