Commit 2bdbc1d3 authored by Milad Farazmand's avatar Milad Farazmand 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: Ia5ecf96ad409705e3d54fc77b081fc4907d0aa1e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649711Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#62142}
parent 6d990aee
......@@ -466,13 +466,14 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
AllowHandleAllocation allow_handle_alloc;
AllowHeapAllocation allow_heap_alloc;
AllowCodeDependencyChange allow_code_dep_change;
CallFrequency frequency = call.frequency();
Handle<Context> native_context =
handle(info_->native_context(), isolate());
BuildGraphFromBytecode(broker(), zone(), bytecode_array.object(),
shared_info.value().object(),
feedback_vector.object(), BailoutId::None(),
jsgraph(), call.frequency(), source_positions_,
jsgraph(), frequency, source_positions_,
native_context, inlining_id, flags);
}
......
......@@ -899,8 +899,10 @@ const Operator* JSOperatorBuilder::ConstructForwardVarargs(
parameters); // parameter
}
// Note: frequency is taken by reference to work around a GCC bug
// on AIX (v8:8193).
const Operator* JSOperatorBuilder::Construct(uint32_t arity,
CallFrequency frequency,
CallFrequency const& frequency,
VectorSlotPair const& feedback) {
ConstructParameters parameters(arity, frequency, feedback);
return new (zone()) Operator1<ConstructParameters>( // --
......@@ -921,7 +923,8 @@ const Operator* JSOperatorBuilder::ConstructWithArrayLike(
}
const Operator* JSOperatorBuilder::ConstructWithSpread(
uint32_t arity, CallFrequency frequency, VectorSlotPair const& feedback) {
uint32_t arity, CallFrequency const& frequency,
VectorSlotPair const& feedback) {
ConstructParameters parameters(arity, frequency, feedback);
return new (zone()) Operator1<ConstructParameters>( // --
IrOpcode::kJSConstructWithSpread, Operator::kNoProperties, // opcode
......
......@@ -768,11 +768,11 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final
const Operator* ConstructForwardVarargs(size_t arity, uint32_t start_index);
const Operator* Construct(uint32_t arity,
CallFrequency frequency = CallFrequency(),
CallFrequency const& frequency = CallFrequency(),
VectorSlotPair const& feedback = VectorSlotPair());
const Operator* ConstructWithArrayLike(CallFrequency frequency);
const Operator* ConstructWithSpread(
uint32_t arity, CallFrequency frequency = CallFrequency(),
uint32_t arity, CallFrequency const& frequency = CallFrequency(),
VectorSlotPair const& feedback = VectorSlotPair());
const Operator* LoadProperty(VectorSlotPair const& feedback);
......
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