Chromium Code Reviews| 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..5068eff673146adc34078c915c9ad301be40150c 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,10 @@ 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(); |
| + double const call_count = nexus.ExtractCallCount(); |
| + double const invocation_count = feedback_vector()->invocation_count(); |
| + return static_cast<float>(call_count / invocation_count) * |
|
mvstanton
2016/09/14 09:26:09
Here too.
Benedikt Meurer
2016/09/14 10:55:44
Done.
|
| + invocation_frequency_; |
| } |
| return 0.0f; |
| } |