Skip to content

Commit 06855f7

Browse files
committed
AST: Remove a couple of redundant statistics
1 parent d47d5e9 commit 06855f7

File tree

4 files changed

+2
-14
lines changed

4 files changed

+2
-14
lines changed

include/swift/Basic/Statistics.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,6 @@ FRONTEND_STATISTIC(Sema, NumAccessorsSynthesized)
224224
/// Number of synthesized accessor bodies.
225225
FRONTEND_STATISTIC(Sema, NumAccessorBodiesSynthesized)
226226

227-
/// Number of full function bodies typechecked.
228-
FRONTEND_STATISTIC(Sema, NumFunctionsTypechecked)
229-
230227
/// Number of generic signature builders constructed. Rough proxy for
231228
/// amount of work the GSB does analyzing type signatures.
232229
FRONTEND_STATISTIC(Sema, NumGenericSignatureBuilders)

lib/Sema/TypeCheckStmt.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,15 +1932,6 @@ TypeCheckFunctionBodyUntilRequest::evaluate(Evaluator &evaluator,
19321932
SourceLoc endTypeCheckLoc) const {
19331933
ASTContext &ctx = AFD->getASTContext();
19341934

1935-
// Accounting for type checking of function bodies.
1936-
// FIXME: We could probably take this away, given that the request-evaluator
1937-
// does much of it for us.
1938-
FrontendStatsTracer StatsTracer(ctx.Stats, "typecheck-fn", AFD);
1939-
PrettyStackTraceDecl StackEntry("type-checking", AFD);
1940-
1941-
if (ctx.Stats)
1942-
ctx.Stats->getFrontendCounters().NumFunctionsTypechecked++;
1943-
19441935
Optional<FunctionBodyTimer> timer;
19451936
const auto &tyOpts = ctx.TypeCheckerOpts;
19461937
if (tyOpts.DebugTimeFunctionBodies || tyOpts.WarnLongFunctionBodies)

test/Misc/stats_dir_profiler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// RUN: %FileCheck -check-prefix=ENTITIES -input-file %t/stats-entities/*.dir/Time.User.entities %s
88

99
// EVENTS: {{perform-sema;.*;typecheck-decl.* [0-9]+}}
10-
// ENTITIES: {{perform-sema;.*;typecheck-fn bar\(\);typecheck-stmt.* [0-9]+}}
10+
// ENTITIES: {{perform-sema;.*;TypeCheckFunctionBodyUntilRequest bar\(\);typecheck-stmt.* [0-9]+}}
1111

1212
public func foo() {
1313
print("hello")

validation-test/compiler_scale/scale_neighbouring_getset.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %scale-test --sum-multi --begin 5 --end 16 --step 5 --select NumFunctionsTypechecked %s
1+
// RUN: %scale-test --sum-multi --begin 5 --end 16 --step 5 --select TypeCheckFunctionBodyUntilRequest %s
22
// REQUIRES: asserts
33

44
struct Struct${N} {

0 commit comments

Comments
 (0)