Commit d2e0166d authored by Vasili Skurydzin's avatar Vasili Skurydzin Committed by Commit Bot

ppc64, aix: Pass CallFrequency object by const reference to avoid value copy error.

Bug: v8:8193
GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61976

Change-Id: I0d4efca4da03ef82651325e15ddf2160022bc8de
Reviewed-on: https://chromium-review.googlesource.com/1228633Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56275}
parent 77147c8e
...@@ -516,7 +516,7 @@ Node* BytecodeGraphBuilder::Environment::Checkpoint( ...@@ -516,7 +516,7 @@ Node* BytecodeGraphBuilder::Environment::Checkpoint(
BytecodeGraphBuilder::BytecodeGraphBuilder( BytecodeGraphBuilder::BytecodeGraphBuilder(
Zone* local_zone, Handle<SharedFunctionInfo> shared_info, Zone* local_zone, 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& invocation_frequency,
SourcePositionTable* source_positions, Handle<Context> native_context, SourcePositionTable* source_positions, Handle<Context> native_context,
int inlining_id, JSTypeHintLowering::Flags flags, bool stack_check, int inlining_id, JSTypeHintLowering::Flags flags, bool stack_check,
bool analyze_environment_liveness) bool analyze_environment_liveness)
......
...@@ -31,7 +31,7 @@ class BytecodeGraphBuilder { ...@@ -31,7 +31,7 @@ class BytecodeGraphBuilder {
BytecodeGraphBuilder( BytecodeGraphBuilder(
Zone* local_zone, Handle<SharedFunctionInfo> shared, Zone* local_zone, Handle<SharedFunctionInfo> shared,
Handle<FeedbackVector> feedback_vector, BailoutId osr_offset, Handle<FeedbackVector> feedback_vector, BailoutId osr_offset,
JSGraph* jsgraph, CallFrequency invocation_frequency, JSGraph* jsgraph, CallFrequency& invocation_frequency,
SourcePositionTable* source_positions, Handle<Context> native_context, SourcePositionTable* source_positions, Handle<Context> native_context,
int inlining_id = SourcePosition::kNotInlined, int inlining_id = SourcePosition::kNotInlined,
JSTypeHintLowering::Flags flags = JSTypeHintLowering::kNoFlags, JSTypeHintLowering::Flags flags = JSTypeHintLowering::kNoFlags,
......
...@@ -485,9 +485,10 @@ Reduction JSInliner::ReduceJSCall(Node* node) { ...@@ -485,9 +485,10 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
if (info_->is_bailout_on_uninitialized()) { if (info_->is_bailout_on_uninitialized()) {
flags |= JSTypeHintLowering::kBailoutOnUninitialized; flags |= JSTypeHintLowering::kBailoutOnUninitialized;
} }
CallFrequency frequency = call.frequency();
BytecodeGraphBuilder graph_builder( BytecodeGraphBuilder graph_builder(
zone(), shared_info, feedback_vector, BailoutId::None(), jsgraph(), zone(), shared_info, feedback_vector, BailoutId::None(), jsgraph(),
call.frequency(), source_positions_, native_context(), inlining_id, frequency, source_positions_, native_context(), inlining_id,
flags, false, info_->is_analyze_environment_liveness()); flags, false, info_->is_analyze_environment_liveness());
graph_builder.CreateGraph(); graph_builder.CreateGraph();
......
...@@ -819,7 +819,8 @@ const Operator* JSOperatorBuilder::CallForwardVarargs(size_t arity, ...@@ -819,7 +819,8 @@ const Operator* JSOperatorBuilder::CallForwardVarargs(size_t arity,
parameters); // parameter parameters); // parameter
} }
const Operator* JSOperatorBuilder::Call(size_t arity, CallFrequency frequency, const Operator* JSOperatorBuilder::Call(size_t arity,
CallFrequency const& frequency,
VectorSlotPair const& feedback, VectorSlotPair const& feedback,
ConvertReceiverMode convert_mode, ConvertReceiverMode convert_mode,
SpeculationMode speculation_mode) { SpeculationMode speculation_mode) {
...@@ -843,8 +844,8 @@ const Operator* JSOperatorBuilder::CallWithArrayLike(CallFrequency frequency) { ...@@ -843,8 +844,8 @@ const Operator* JSOperatorBuilder::CallWithArrayLike(CallFrequency frequency) {
} }
const Operator* JSOperatorBuilder::CallWithSpread( const Operator* JSOperatorBuilder::CallWithSpread(
uint32_t arity, CallFrequency frequency, VectorSlotPair const& feedback, uint32_t arity, CallFrequency const& frequency,
SpeculationMode speculation_mode) { VectorSlotPair const& feedback, SpeculationMode speculation_mode) {
DCHECK_IMPLIES(speculation_mode == SpeculationMode::kAllowSpeculation, DCHECK_IMPLIES(speculation_mode == SpeculationMode::kAllowSpeculation,
feedback.IsValid()); feedback.IsValid());
CallParameters parameters(arity, frequency, feedback, CallParameters parameters(arity, frequency, feedback,
......
...@@ -162,7 +162,7 @@ CallForwardVarargsParameters const& CallForwardVarargsParametersOf( ...@@ -162,7 +162,7 @@ CallForwardVarargsParameters const& CallForwardVarargsParametersOf(
// used as a parameter by JSCall and JSCallWithSpread operators. // used as a parameter by JSCall and JSCallWithSpread operators.
class CallParameters final { class CallParameters final {
public: public:
CallParameters(size_t arity, CallFrequency frequency, CallParameters(size_t arity, CallFrequency const& frequency,
VectorSlotPair const& feedback, VectorSlotPair const& feedback,
ConvertReceiverMode convert_mode, ConvertReceiverMode convert_mode,
SpeculationMode speculation_mode) SpeculationMode speculation_mode)
...@@ -173,7 +173,7 @@ class CallParameters final { ...@@ -173,7 +173,7 @@ class CallParameters final {
feedback_(feedback) {} feedback_(feedback) {}
size_t arity() const { return ArityField::decode(bit_field_); } size_t arity() const { return ArityField::decode(bit_field_); }
CallFrequency frequency() const { return frequency_; } CallFrequency const& frequency() const { return frequency_; }
ConvertReceiverMode convert_mode() const { ConvertReceiverMode convert_mode() const {
return ConvertReceiverModeField::decode(bit_field_); return ConvertReceiverModeField::decode(bit_field_);
} }
...@@ -749,13 +749,13 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final ...@@ -749,13 +749,13 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final
const Operator* CallForwardVarargs(size_t arity, uint32_t start_index); const Operator* CallForwardVarargs(size_t arity, uint32_t start_index);
const Operator* Call( const Operator* Call(
size_t arity, CallFrequency frequency = CallFrequency(), size_t arity, CallFrequency const& frequency = CallFrequency(),
VectorSlotPair const& feedback = VectorSlotPair(), VectorSlotPair const& feedback = VectorSlotPair(),
ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny, ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny,
SpeculationMode speculation_mode = SpeculationMode::kDisallowSpeculation); SpeculationMode speculation_mode = SpeculationMode::kDisallowSpeculation);
const Operator* CallWithArrayLike(CallFrequency frequency); const Operator* CallWithArrayLike(CallFrequency frequency);
const Operator* CallWithSpread( const Operator* CallWithSpread(
uint32_t arity, CallFrequency frequency = CallFrequency(), uint32_t arity, CallFrequency const& frequency = CallFrequency(),
VectorSlotPair const& feedback = VectorSlotPair(), VectorSlotPair const& feedback = VectorSlotPair(),
SpeculationMode speculation_mode = SpeculationMode::kDisallowSpeculation); SpeculationMode speculation_mode = SpeculationMode::kDisallowSpeculation);
const Operator* CallRuntime(Runtime::FunctionId id); const Operator* CallRuntime(Runtime::FunctionId id);
......
...@@ -1161,10 +1161,11 @@ struct GraphBuilderPhase { ...@@ -1161,10 +1161,11 @@ struct GraphBuilderPhase {
if (data->info()->is_bailout_on_uninitialized()) { if (data->info()->is_bailout_on_uninitialized()) {
flags |= JSTypeHintLowering::kBailoutOnUninitialized; flags |= JSTypeHintLowering::kBailoutOnUninitialized;
} }
CallFrequency frequency = CallFrequency(1.0f);
BytecodeGraphBuilder graph_builder( BytecodeGraphBuilder graph_builder(
temp_zone, data->info()->shared_info(), temp_zone, 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, true, SourcePosition::kNotInlined, flags, true,
data->info()->is_analyze_environment_liveness()); data->info()->is_analyze_environment_liveness());
......
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