Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(618)

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 2337123003: [turbofan] Collect invocation counts and compute relative call frequencies. (Closed)
Patch Set: Address feedback. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/compiler/bytecode-graph-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index fda3c7ad44cb90803a44c5faf3ef55711ec3316f..5eafd06fa03f07420ec729a63cb3d9bf59f058dc 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -411,14 +411,15 @@ class AstGraphBuilder::ControlScopeForFinally : public ControlScope {
TryFinallyBuilder* control_;
};
-
AstGraphBuilder::AstGraphBuilder(Zone* local_zone, CompilationInfo* info,
- JSGraph* jsgraph, LoopAssignmentAnalysis* loop,
+ JSGraph* jsgraph, float invocation_frequency,
+ LoopAssignmentAnalysis* loop,
TypeHintAnalysis* type_hint_analysis)
: isolate_(info->isolate()),
local_zone_(local_zone),
info_(info),
jsgraph_(jsgraph),
+ invocation_frequency_(invocation_frequency),
environment_(nullptr),
ast_context_(nullptr),
globals_(0, local_zone),
@@ -3104,7 +3105,7 @@ float AstGraphBuilder::ComputeCallFrequency(FeedbackVectorSlot slot) const {
Handle<TypeFeedbackVector> feedback_vector(
info()->closure()->feedback_vector(), isolate());
CallICNexus nexus(feedback_vector, slot);
- return nexus.ExtractCallCount();
+ return nexus.ComputeCallFrequency() * invocation_frequency_;
}
Node* AstGraphBuilder::ProcessArguments(const Operator* op, int arity) {
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/compiler/bytecode-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698