Revision: 15890
Author: [email protected]
Date: Thu Jul 25 12:55:55 2013
Log: MIPS: New array bounds check elimination pass (focused on
induction variables and bitwise operations).
Port r15866 (52e8581c)
BUG=
Review URL: https://codereview.chromium.org/20393002
http://code.google.com/p/v8/source/detail?r=15890
Modified:
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-codegen-mips.h
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Wed Jul 24
23:37:25 2013
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Thu Jul 25
12:55:55 2013
@@ -4161,6 +4161,21 @@
: isolate()->builtins()->StoreIC_Initialize();
CallCode(ic, RelocInfo::CODE_TARGET, instr);
}
+
+
+void LCodeGen::ApplyCheckIf(Condition cc,
+ LBoundsCheck* check,
+ Register src1,
+ const Operand& src2) {
+ if (FLAG_debug_code && check->hydrogen()->skip_check()) {
+ Label done;
+ __ Branch(&done, NegateCondition(cc), src1, src2);
+ __ stop("eliminated bounds check failed");
+ __ bind(&done);
+ } else {
+ DeoptimizeIf(cc, check->environment(), src1, src2);
+ }
+}
void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
@@ -4175,13 +4190,13 @@
} else {
__ li(at, Operand(constant_index));
}
- DeoptimizeIf(condition,
- instr->environment(),
+ ApplyCheckIf(condition,
+ instr,
at,
Operand(ToRegister(instr->length())));
} else {
- DeoptimizeIf(condition,
- instr->environment(),
+ ApplyCheckIf(condition,
+ instr,
ToRegister(instr->index()),
Operand(ToRegister(instr->length())));
}
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.h Tue Jul 23
06:35:10 2013
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.h Thu Jul 25
12:55:55 2013
@@ -284,6 +284,10 @@
LEnvironment* environment,
Register src1 = zero_reg,
const Operand& src2 = Operand(zero_reg));
+ void ApplyCheckIf(Condition cc,
+ LBoundsCheck* check,
+ Register src1 = zero_reg,
+ const Operand& src2 = Operand(zero_reg));
void AddToTranslation(Translation* translation,
LOperand* op,
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.