@@ -10993,7 +10993,8 @@ class TryApplyInstBase : public TermInst {
1099310993
1099410994protected:
1099510995 TryApplyInstBase (SILInstructionKind valueKind, SILDebugLocation Loc,
10996- SILBasicBlock *normalBB, SILBasicBlock *errorBB);
10996+ SILBasicBlock *normalBB, SILBasicBlock *errorBB,
10997+ ProfileCounter normalCount, ProfileCounter errorCount);
1099710998
1099810999public:
1099911000 SuccessorListTy getSuccessors () {
@@ -11013,6 +11014,11 @@ class TryApplyInstBase : public TermInst {
1101311014 const SILBasicBlock *getNormalBB () const { return DestBBs[NormalIdx]; }
1101411015 SILBasicBlock *getErrorBB () { return DestBBs[ErrorIdx]; }
1101511016 const SILBasicBlock *getErrorBB () const { return DestBBs[ErrorIdx]; }
11017+
11018+ // / The number of times the Normal branch was executed
11019+ ProfileCounter getNormalBBCount () const { return DestBBs[NormalIdx].getCount (); }
11020+ // / The number of times the Error branch was executed
11021+ ProfileCounter getErrorBBCount () const { return DestBBs[ErrorIdx].getCount (); }
1101611022};
1101711023
1101811024// / TryApplyInst - Represents the full application of a function that
@@ -11030,15 +11036,19 @@ class TryApplyInst final
1103011036 SILBasicBlock *normalBB, SILBasicBlock *errorBB,
1103111037 ApplyOptions options,
1103211038 const GenericSpecializationInformation *specializationInfo,
11033- std::optional<ApplyIsolationCrossing> isolationCrossing);
11039+ std::optional<ApplyIsolationCrossing> isolationCrossing,
11040+ ProfileCounter normalCount,
11041+ ProfileCounter errorCount);
1103411042
1103511043 static TryApplyInst *
1103611044 create (SILDebugLocation debugLoc, SILValue callee,
1103711045 SubstitutionMap substitutions, ArrayRef<SILValue> args,
1103811046 SILBasicBlock *normalBB, SILBasicBlock *errorBB, ApplyOptions options,
1103911047 SILFunction &parentFunction,
1104011048 const GenericSpecializationInformation *specializationInfo,
11041- std::optional<ApplyIsolationCrossing> isolationCrossing);
11049+ std::optional<ApplyIsolationCrossing> isolationCrossing,
11050+ ProfileCounter normalCount,
11051+ ProfileCounter errorCount);
1104211052};
1104311053
1104411054// / DifferentiableFunctionInst - creates a `@differentiable` function-typed
0 commit comments