Commit 9b81e4a8 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Pass CallFrequency by reference to work around GCC bug

This work-around got lost in the recent refactorings.

Bug: v8:8193
Change-Id: I81d22e0702666d1d8ef954cd3d074e22c89378cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1609806
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#61468}
parent ae26b34e
...@@ -36,7 +36,7 @@ class BytecodeGraphBuilder { ...@@ -36,7 +36,7 @@ class BytecodeGraphBuilder {
Handle<SharedFunctionInfo> shared, Handle<SharedFunctionInfo> shared,
Handle<FeedbackVector> feedback_vector, Handle<FeedbackVector> feedback_vector,
BailoutId osr_offset, JSGraph* jsgraph, BailoutId osr_offset, JSGraph* jsgraph,
CallFrequency invocation_frequency, CallFrequency const& invocation_frequency,
SourcePositionTable* source_positions, SourcePositionTable* source_positions,
Handle<Context> native_context, int inlining_id, Handle<Context> native_context, int inlining_id,
BytecodeGraphBuilderFlags flags); BytecodeGraphBuilderFlags flags);
...@@ -942,7 +942,7 @@ BytecodeGraphBuilder::BytecodeGraphBuilder( ...@@ -942,7 +942,7 @@ BytecodeGraphBuilder::BytecodeGraphBuilder(
Handle<BytecodeArray> bytecode_array, Handle<BytecodeArray> bytecode_array,
Handle<SharedFunctionInfo> shared_info, Handle<SharedFunctionInfo> shared_info,
Handle<FeedbackVector> feedback_vector, BailoutId osr_offset, Handle<FeedbackVector> feedback_vector, BailoutId osr_offset,
JSGraph* jsgraph, CallFrequency invocation_frequency, JSGraph* jsgraph, CallFrequency const& invocation_frequency,
SourcePositionTable* source_positions, Handle<Context> native_context, SourcePositionTable* source_positions, Handle<Context> native_context,
int inlining_id, BytecodeGraphBuilderFlags flags) int inlining_id, BytecodeGraphBuilderFlags flags)
: broker_(broker), : broker_(broker),
...@@ -4037,7 +4037,7 @@ void BuildGraphFromBytecode(JSHeapBroker* broker, Zone* local_zone, ...@@ -4037,7 +4037,7 @@ void BuildGraphFromBytecode(JSHeapBroker* broker, Zone* local_zone,
Handle<SharedFunctionInfo> shared, Handle<SharedFunctionInfo> shared,
Handle<FeedbackVector> feedback_vector, Handle<FeedbackVector> feedback_vector,
BailoutId osr_offset, JSGraph* jsgraph, BailoutId osr_offset, JSGraph* jsgraph,
CallFrequency invocation_frequency, CallFrequency const& invocation_frequency,
SourcePositionTable* source_positions, SourcePositionTable* source_positions,
Handle<Context> native_context, int inlining_id, Handle<Context> native_context, int inlining_id,
BytecodeGraphBuilderFlags flags) { BytecodeGraphBuilderFlags flags) {
......
...@@ -30,12 +30,14 @@ enum class BytecodeGraphBuilderFlag : uint8_t { ...@@ -30,12 +30,14 @@ enum class BytecodeGraphBuilderFlag : uint8_t {
}; };
using BytecodeGraphBuilderFlags = base::Flags<BytecodeGraphBuilderFlag>; using BytecodeGraphBuilderFlags = base::Flags<BytecodeGraphBuilderFlag>;
// Note: {invocation_frequency} is taken by reference to work around a GCC bug
// on AIX (v8:8193).
void BuildGraphFromBytecode(JSHeapBroker* broker, Zone* local_zone, void BuildGraphFromBytecode(JSHeapBroker* broker, Zone* local_zone,
Handle<BytecodeArray> bytecode_array, Handle<BytecodeArray> bytecode_array,
Handle<SharedFunctionInfo> shared, Handle<SharedFunctionInfo> shared,
Handle<FeedbackVector> feedback_vector, Handle<FeedbackVector> feedback_vector,
BailoutId osr_offset, JSGraph* jsgraph, BailoutId osr_offset, JSGraph* jsgraph,
CallFrequency invocation_frequency, CallFrequency const& invocation_frequency,
SourcePositionTable* source_positions, SourcePositionTable* source_positions,
Handle<Context> native_context, int inlining_id, Handle<Context> native_context, int inlining_id,
BytecodeGraphBuilderFlags flags); BytecodeGraphBuilderFlags flags);
......
...@@ -74,7 +74,7 @@ class JSCallAccessor { ...@@ -74,7 +74,7 @@ class JSCallAccessor {
return call_->op()->ValueInputCount() - 2; return call_->op()->ValueInputCount() - 2;
} }
CallFrequency frequency() const { CallFrequency const& frequency() const {
return (call_->opcode() == IrOpcode::kJSCall) return (call_->opcode() == IrOpcode::kJSCall)
? CallParametersOf(call_->op()).frequency() ? CallParametersOf(call_->op()).frequency()
: ConstructParametersOf(call_->op()).frequency(); : ConstructParametersOf(call_->op()).frequency();
......
...@@ -106,7 +106,7 @@ class ConstructParameters final { ...@@ -106,7 +106,7 @@ class ConstructParameters final {
: arity_(arity), frequency_(frequency), feedback_(feedback) {} : arity_(arity), frequency_(frequency), feedback_(feedback) {}
uint32_t arity() const { return arity_; } uint32_t arity() const { return arity_; }
CallFrequency frequency() const { return frequency_; } CallFrequency const& frequency() const { return frequency_; }
VectorSlotPair const& feedback() const { return feedback_; } VectorSlotPair const& feedback() const { return feedback_; }
private: private:
......
...@@ -1071,11 +1071,12 @@ struct GraphBuilderPhase { ...@@ -1071,11 +1071,12 @@ struct GraphBuilderPhase {
if (data->info()->is_bailout_on_uninitialized()) { if (data->info()->is_bailout_on_uninitialized()) {
flags |= BytecodeGraphBuilderFlag::kBailoutOnUninitialized; flags |= BytecodeGraphBuilderFlag::kBailoutOnUninitialized;
} }
CallFrequency frequency(1.0f);
BuildGraphFromBytecode( BuildGraphFromBytecode(
data->broker(), temp_zone, data->info()->bytecode_array(), data->broker(), temp_zone, data->info()->bytecode_array(),
data->info()->shared_info(), data->info()->shared_info(),
handle(data->info()->closure()->feedback_vector(), data->isolate()), handle(data->info()->closure()->feedback_vector(), data->isolate()),
data->info()->osr_offset(), data->jsgraph(), CallFrequency(1.0f), data->info()->osr_offset(), data->jsgraph(), frequency,
data->source_positions(), data->native_context(), data->source_positions(), data->native_context(),
SourcePosition::kNotInlined, flags); SourcePosition::kNotInlined, flags);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment