Revision: 15831
Author: [email protected]
Date: Tue Jul 23 07:29:04 2013
Log: MIPS: Eliminate map checks of constant values.
Port r15819 (a453a0e)
BUG=
Review URL: https://codereview.chromium.org/19876006
Patch from Balazs Kilvady <[email protected]>.
http://code.google.com/p/v8/source/detail?r=15831
Modified:
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Jul 23
06:35:10 2013
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Jul 23
07:29:04 2013
@@ -5187,6 +5187,7 @@
void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
+ if (instr->hydrogen()->CanOmitMapChecks()) return;
Register map_reg = scratch0();
LOperand* input = instr->value();
ASSERT(input->IsRegister());
@@ -5255,6 +5256,8 @@
void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
+ if (instr->hydrogen()->CanOmitPrototypeChecks()) return;
+
Register prototype_reg = ToRegister(instr->temp());
Register map_reg = ToRegister(instr->temp2());
@@ -5263,12 +5266,10 @@
ASSERT(prototypes->length() == maps->length());
- if (!instr->hydrogen()->CanOmitPrototypeChecks()) {
- for (int i = 0; i < prototypes->length(); i++) {
- __ LoadHeapObject(prototype_reg, prototypes->at(i));
- __ lw(map_reg, FieldMemOperand(prototype_reg,
HeapObject::kMapOffset));
- DoCheckMapCommon(map_reg, maps->at(i), instr->environment());
- }
+ for (int i = 0; i < prototypes->length(); i++) {
+ __ LoadHeapObject(prototype_reg, prototypes->at(i));
+ __ lw(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset));
+ DoCheckMapCommon(map_reg, maps->at(i), instr->environment());
}
}
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.cc Tue Jul 23 06:35:10
2013
+++ /branches/bleeding_edge/src/mips/lithium-mips.cc Tue Jul 23 07:29:04
2013
@@ -1951,9 +1951,14 @@
LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps*
instr) {
- LUnallocated* temp1 = TempRegister();
- LOperand* temp2 = TempRegister();
+ LUnallocated* temp1 = NULL;
+ LOperand* temp2 = NULL;
+ if (!instr->CanOmitPrototypeChecks()) {
+ temp1 = TempRegister();
+ temp2 = TempRegister();
+ }
LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp1,
temp2);
+ if (instr->CanOmitPrototypeChecks()) return result;
return AssignEnvironment(result);
}
@@ -1965,8 +1970,10 @@
LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) {
- LOperand* value = UseRegisterAtStart(instr->value());
+ LOperand* value = NULL;
+ if (!instr->CanOmitMapChecks()) value =
UseRegisterAtStart(instr->value());
LInstruction* result = new(zone()) LCheckMaps(value);
+ if (instr->CanOmitMapChecks()) return result;
return AssignEnvironment(result);
}
--
--
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.