Commit 001926cd authored by bmeurer's avatar bmeurer Committed by Commit bot

[fullcodegen] Don't count CallIC calls as patching ICs.

In fullcodegen we used to count CallICs as patching ICs, and thus the
heuristics are currently off by the number of calls in a code object.

R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2408103002
Cr-Commit-Position: refs/heads/master@{#40163}
parent 9192db20
...@@ -2382,14 +2382,12 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { ...@@ -2382,14 +2382,12 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
// not return to this function. // not return to this function.
EmitProfilingCounterHandlingForReturnSequence(true); EmitProfilingCounterHandlingForReturnSequence(true);
} }
Handle<Code> ic = Handle<Code> code =
CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode())
.code(); .code();
__ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackICSlot()))); __ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
__ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize)); __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
// Don't assign a type feedback id to the IC, since type feedback is provided __ Call(code, RelocInfo::CODE_TARGET);
// by the vector above.
CallIC(ic);
OperandStackDepthDecrement(arg_count + 1); OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr); RecordJSReturnSite(expr);
......
...@@ -2284,14 +2284,12 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { ...@@ -2284,14 +2284,12 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
// not return to this function. // not return to this function.
EmitProfilingCounterHandlingForReturnSequence(true); EmitProfilingCounterHandlingForReturnSequence(true);
} }
Handle<Code> ic = Handle<Code> code =
CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode())
.code(); .code();
__ Mov(x3, SmiFromSlot(expr->CallFeedbackICSlot())); __ Mov(x3, SmiFromSlot(expr->CallFeedbackICSlot()));
__ Peek(x1, (arg_count + 1) * kXRegSize); __ Peek(x1, (arg_count + 1) * kXRegSize);
// Don't assign a type feedback id to the IC, since type feedback is provided __ Call(code, RelocInfo::CODE_TARGET);
// by the vector above.
CallIC(ic);
OperandStackDepthDecrement(arg_count + 1); OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr); RecordJSReturnSite(expr);
......
...@@ -2281,14 +2281,12 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { ...@@ -2281,14 +2281,12 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
// not return to this function. // not return to this function.
EmitProfilingCounterHandlingForReturnSequence(true); EmitProfilingCounterHandlingForReturnSequence(true);
} }
Handle<Code> ic = Handle<Code> code =
CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode())
.code(); .code();
__ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot())));
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
// Don't assign a type feedback id to the IC, since type feedback is provided __ call(code, RelocInfo::CODE_TARGET);
// by the vector above.
CallIC(ic);
OperandStackDepthDecrement(arg_count + 1); OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr); RecordJSReturnSite(expr);
......
...@@ -2392,14 +2392,12 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { ...@@ -2392,14 +2392,12 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
// not return to this function. // not return to this function.
EmitProfilingCounterHandlingForReturnSequence(true); EmitProfilingCounterHandlingForReturnSequence(true);
} }
Handle<Code> ic = Handle<Code> code =
CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode())
.code(); .code();
__ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot()))); __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
// Don't assign a type feedback id to the IC, since type feedback is provided __ Call(code, RelocInfo::CODE_TARGET);
// by the vector above.
CallIC(ic);
OperandStackDepthDecrement(arg_count + 1); OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr); RecordJSReturnSite(expr);
......
...@@ -2391,14 +2391,12 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { ...@@ -2391,14 +2391,12 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
// not return to this function. // not return to this function.
EmitProfilingCounterHandlingForReturnSequence(true); EmitProfilingCounterHandlingForReturnSequence(true);
} }
Handle<Code> ic = Handle<Code> code =
CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode())
.code(); .code();
__ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot()))); __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
__ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); __ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
// Don't assign a type feedback id to the IC, since type feedback is provided __ Call(code, RelocInfo::CODE_TARGET);
// by the vector above.
CallIC(ic);
OperandStackDepthDecrement(arg_count + 1); OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr); RecordJSReturnSite(expr);
......
...@@ -2270,14 +2270,12 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { ...@@ -2270,14 +2270,12 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
// not return to this function. // not return to this function.
EmitProfilingCounterHandlingForReturnSequence(true); EmitProfilingCounterHandlingForReturnSequence(true);
} }
Handle<Code> ic = Handle<Code> code =
CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode())
.code(); .code();
__ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot())); __ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot()));
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize));
// Don't assign a type feedback id to the IC, since type feedback is provided __ call(code, RelocInfo::CODE_TARGET);
// by the vector above.
CallIC(ic);
OperandStackDepthDecrement(arg_count + 1); OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr); RecordJSReturnSite(expr);
......
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