Revision: 13315
Author: [email protected]
Date: Mon Jan 7 00:49:52 2013
Log: MIPS: Enable type feedback for branch statement and function call
Port r13288 (5fa2c889)
Original commit message:
This change associates TypeFeedbackIds with ToBoolean stubs in
full-compiled code on ARM, allowing their information to be used in
Crankshaft. This eliminates unnecessary checks, especially in
DoBranch.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/11801003
Patch from Akos Palfi <[email protected]>.
http://code.google.com/p/v8/source/detail?r=13315
Modified:
/branches/bleeding_edge/src/mips/full-codegen-mips.cc
/branches/bleeding_edge/src/mips/macro-assembler-mips.cc
/branches/bleeding_edge/src/mips/macro-assembler-mips.h
=======================================
--- /branches/bleeding_edge/src/mips/full-codegen-mips.cc Tue Dec 18
04:00:50 2012
+++ /branches/bleeding_edge/src/mips/full-codegen-mips.cc Mon Jan 7
00:49:52 2013
@@ -675,7 +675,7 @@
Label* fall_through) {
if (CpuFeatures::IsSupported(FPU)) {
ToBooleanStub stub(result_register());
- __ CallStub(&stub);
+ __ CallStub(&stub, condition->test_id());
__ mov(at, zero_reg);
} else {
// Call the runtime to find the boolean value of the source and then
@@ -2353,7 +2353,7 @@
CallFunctionStub stub(arg_count, flags);
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
- __ CallStub(&stub);
+ __ CallStub(&stub, expr->CallFeedbackId());
RecordJSReturnSite(expr);
// Restore context register.
__ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Thu Nov 29
06:04:27 2012
+++ /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Mon Jan 7
00:49:52 2013
@@ -3935,12 +3935,13 @@
// Runtime calls.
void MacroAssembler::CallStub(CodeStub* stub,
+ TypeFeedbackId ast_id,
Condition cond,
Register r1,
const Operand& r2,
BranchDelaySlot bd) {
ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some
stubs.
- Call(stub->GetCode(), RelocInfo::CODE_TARGET, TypeFeedbackId::None(),
+ Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id,
cond, r1, r2, bd);
}
@@ -4266,7 +4267,7 @@
PrepareCEntryFunction(ext);
CEntryStub stub(1);
- CallStub(&stub, al, zero_reg, Operand(zero_reg), bd);
+ CallStub(&stub, TypeFeedbackId::None(), al, zero_reg, Operand(zero_reg),
bd);
}
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.h Thu Nov 29
01:12:31 2012
+++ /branches/bleeding_edge/src/mips/macro-assembler-mips.h Mon Jan 7
00:49:52 2013
@@ -1141,6 +1141,7 @@
// Call a code stub.
void CallStub(CodeStub* stub,
+ TypeFeedbackId ast_id = TypeFeedbackId::None(),
Condition cond = cc_always,
Register r1 = zero_reg,
const Operand& r2 = Operand(zero_reg),
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev