Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: src/arm/lithium-arm.cc

Issue 11412129: Fix performance regression in DXT5Decoder.js. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: MIPS and ARM need the same fix as x64. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/mips/lithium-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-arm.cc
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
index 5cd691461f6308949bb47ef62e66fc5f4edcd355..91077cd259b011cb2e820410325085cf4307235f 100644
--- a/src/arm/lithium-arm.cc
+++ b/src/arm/lithium-arm.cc
@@ -1934,27 +1934,26 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
ElementsKind elements_kind = instr->elements_kind();
- bool needs_write_barrier = instr->NeedsWriteBarrier();
- LOperand* key = needs_write_barrier
- ? UseTempRegister(instr->key())
- : UseRegisterOrConstantAtStart(instr->key());
- bool val_is_temp_register =
- elements_kind == EXTERNAL_PIXEL_ELEMENTS ||
- elements_kind == EXTERNAL_FLOAT_ELEMENTS;
- LOperand* val = val_is_temp_register || needs_write_barrier
- ? UseTempRegister(instr->value())
- : UseRegister(instr->value());
-
LStoreKeyed* result = NULL;
+
if (!instr->is_external()) {
ASSERT(instr->elements()->representation().IsTagged());
-
+ bool needs_write_barrier = instr->NeedsWriteBarrier();
LOperand* object = NULL;
+ LOperand* key = NULL;
+ LOperand* val = NULL;
+
if (instr->value()->representation().IsDouble()) {
object = UseRegisterAtStart(instr->elements());
+ val = UseTempRegister(instr->value());
+ key = UseRegisterOrConstantAtStart(instr->key());
} else {
ASSERT(instr->value()->representation().IsTagged());
object = UseTempRegister(instr->elements());
+ val = needs_write_barrier ? UseTempRegister(instr->value())
+ : UseRegisterAtStart(instr->value());
+ key = needs_write_barrier ? UseTempRegister(instr->key())
+ : UseRegisterOrConstantAtStart(instr->key());
}
result = new(zone()) LStoreKeyed(object, key, val);
Sven Panne 2012/11/21 13:30:51 Directly returning here and below without any temp
mvstanton 2012/11/21 13:59:18 Thanks, that is true! I've adjusted the ia32 file
@@ -1967,7 +1966,12 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
((elements_kind == EXTERNAL_FLOAT_ELEMENTS) ||
(elements_kind == EXTERNAL_DOUBLE_ELEMENTS))));
ASSERT(instr->elements()->representation().IsExternal());
-
+ bool val_is_temp_register =
+ elements_kind == EXTERNAL_PIXEL_ELEMENTS ||
+ elements_kind == EXTERNAL_FLOAT_ELEMENTS;
+ LOperand* val = val_is_temp_register ? UseTempRegister(instr->value())
+ : UseRegister(instr->value());
+ LOperand* key = UseRegisterOrConstantAtStart(instr->key());
LOperand* external_pointer = UseRegister(instr->elements());
result = new(zone()) LStoreKeyed(external_pointer, key, val);
}
« no previous file with comments | « no previous file | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698