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

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

Issue 330053002: ARM, ARM64: Optimize array copy (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months 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 | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.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 93dc830dab30e3630bac62966133e5c35f3e8843..d0cfe95dc212f191a1b7aadf8099a2e42cc84833 100644
--- a/src/arm/lithium-arm.cc
+++ b/src/arm/lithium-arm.cc
@@ -344,6 +344,29 @@ void LLoadKeyed::PrintDataTo(StringStream* stream) {
}
+void LFillElements::PrintDataTo(StringStream* stream) {
+ elements()->PrintTo(stream);
+ stream->Add("[");
+ from()->PrintTo(stream);
+ stream->Add("-");
+ to()->PrintTo(stream);
+ stream->Add("] <- ");
+ value()->PrintTo(stream);
+}
+
+
+void LCopyElements::PrintDataTo(StringStream* stream) {
+ dst()->PrintTo(stream);
+ stream->Add("[0-");
+ length()->PrintTo(stream);
+ stream->Add("] <- ");
+ src()->PrintTo(stream);
+ stream->Add("[0-");
+ length()->PrintTo(stream);
+ stream->Add("]");
+}
+
+
void LStoreKeyed::PrintDataTo(StringStream* stream) {
elements()->PrintTo(stream);
stream->Add("[");
@@ -2207,6 +2230,34 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
}
+LInstruction* LChunkBuilder::DoFillElements(HFillElements* instr) {
+ LOperand* elements = UseRegister(instr->elements());
+ LOperand* from = UseRegisterOrConstant(instr->from());
+ LOperand* to = UseRegisterOrConstant(instr->to());
+ LOperand* value = UseRegister(instr->value());
+ LOperand* scratch;
+ if (instr->from()->IsConstant() && instr->to()->IsConstant()) {
+ HConstant* from = HConstant::cast(instr->from());
+ HConstant* to = HConstant::cast(instr->to());
+ scratch =
+ (to->Integer32Value() - from->Integer32Value() <=
+ LFillElements::kMaxUnrolledSize) ?
+ NULL : TempRegister();
+ } else {
+ scratch = TempRegister();
+ }
+ return new(zone()) LFillElements(elements, from, to, value, scratch);
+}
+
+
+LInstruction* LChunkBuilder::DoCopyElements(HCopyElements* instr) {
+ LOperand* src = UseTempRegister(instr->src());
+ LOperand* dst = UseTempRegister(instr->dst());
+ LOperand* length = UseTempRegister(instr->length());
+ return new(zone()) LCopyElements(src, dst, length);
+}
+
+
LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
if (!instr->is_typed_elements()) {
ASSERT(instr->elements()->representation().IsTagged());
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698