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

Unified Diff: src/compiler/bytecode-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/bytecode-graph-builder.h ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 39c0397181346f1ccba477059b9905a5a420c99d..7df8e62bf293125f090fab7e9513398410ac6bb2 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -571,9 +571,11 @@ bool BytecodeGraphBuilder::Environment::StateValuesAreUpToDate(
BytecodeGraphBuilder::BytecodeGraphBuilder(Zone* local_zone,
CompilationInfo* info,
- JSGraph* jsgraph)
+ JSGraph* jsgraph,
+ float invocation_frequency)
: local_zone_(local_zone),
jsgraph_(jsgraph),
+ invocation_frequency_(invocation_frequency),
bytecode_array_(handle(info->shared_info()->bytecode_array())),
exception_handler_table_(
handle(HandlerTable::cast(bytecode_array()->handler_table()))),
@@ -1354,7 +1356,7 @@ CompareOperationHint BytecodeGraphBuilder::GetCompareOperationHint() {
float BytecodeGraphBuilder::ComputeCallFrequency(int slot_id) const {
if (slot_id >= TypeFeedbackVector::kReservedIndexCount) {
CallICNexus nexus(feedback_vector(), feedback_vector()->ToSlot(slot_id));
- return nexus.ExtractCallCount();
+ return nexus.ComputeCallFrequency() * invocation_frequency_;
}
return 0.0f;
}
« no previous file with comments | « src/compiler/bytecode-graph-builder.h ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698