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

Side by Side Diff: src/arm64/lithium-arm64.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm64/lithium-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_ARM64_LITHIUM_ARM64_H_ 5 #ifndef V8_ARM64_LITHIUM_ARM64_H_
6 #define V8_ARM64_LITHIUM_ARM64_H_ 6 #define V8_ARM64_LITHIUM_ARM64_H_
7 7
8 #include "src/hydrogen.h" 8 #include "src/hydrogen.h"
9 #include "src/lithium-allocator.h" 9 #include "src/lithium-allocator.h"
10 #include "src/lithium.h" 10 #include "src/lithium.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 V(CmpT) \ 57 V(CmpT) \
58 V(CompareMinusZeroAndBranch) \ 58 V(CompareMinusZeroAndBranch) \
59 V(CompareNumericAndBranch) \ 59 V(CompareNumericAndBranch) \
60 V(ConstantD) \ 60 V(ConstantD) \
61 V(ConstantE) \ 61 V(ConstantE) \
62 V(ConstantI) \ 62 V(ConstantI) \
63 V(ConstantS) \ 63 V(ConstantS) \
64 V(ConstantT) \ 64 V(ConstantT) \
65 V(ConstructDouble) \ 65 V(ConstructDouble) \
66 V(Context) \ 66 V(Context) \
67 V(CopyElements) \
67 V(DateField) \ 68 V(DateField) \
68 V(DebugBreak) \ 69 V(DebugBreak) \
69 V(DeclareGlobals) \ 70 V(DeclareGlobals) \
70 V(Deoptimize) \ 71 V(Deoptimize) \
71 V(DivByConstI) \ 72 V(DivByConstI) \
72 V(DivByPowerOf2I) \ 73 V(DivByPowerOf2I) \
73 V(DivI) \ 74 V(DivI) \
74 V(DoubleBits) \ 75 V(DoubleBits) \
75 V(DoubleToIntOrSmi) \ 76 V(DoubleToIntOrSmi) \
76 V(Drop) \ 77 V(Drop) \
77 V(Dummy) \ 78 V(Dummy) \
78 V(DummyUse) \ 79 V(DummyUse) \
80 V(FillElements) \
79 V(FlooringDivByConstI) \ 81 V(FlooringDivByConstI) \
80 V(FlooringDivByPowerOf2I) \ 82 V(FlooringDivByPowerOf2I) \
81 V(FlooringDivI) \ 83 V(FlooringDivI) \
82 V(ForInCacheArray) \ 84 V(ForInCacheArray) \
83 V(ForInPrepareMap) \ 85 V(ForInPrepareMap) \
84 V(FunctionLiteral) \ 86 V(FunctionLiteral) \
85 V(GetCachedArrayIndex) \ 87 V(GetCachedArrayIndex) \
86 V(Goto) \ 88 V(Goto) \
87 V(HasCachedArrayIndexAndBranch) \ 89 V(HasCachedArrayIndexAndBranch) \
88 V(HasInstanceTypeAndBranch) \ 90 V(HasInstanceTypeAndBranch) \
(...skipping 2331 matching lines...) Expand 10 before | Expand all | Expand 10 after
2420 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") 2422 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check")
2421 DECLARE_HYDROGEN_ACCESSOR(StackCheck) 2423 DECLARE_HYDROGEN_ACCESSOR(StackCheck)
2422 2424
2423 Label* done_label() { return &done_label_; } 2425 Label* done_label() { return &done_label_; }
2424 2426
2425 private: 2427 private:
2426 Label done_label_; 2428 Label done_label_;
2427 }; 2429 };
2428 2430
2429 2431
2432 class LFillElements V8_FINAL : public LTemplateInstruction<0, 4, 0> {
2433 public:
2434 LFillElements(LOperand* object, LOperand* from, LOperand* to,
2435 LOperand* value) {
2436 inputs_[0] = object;
2437 inputs_[1] = from;
2438 inputs_[2] = to;
2439 inputs_[3] = value;
2440 }
2441 LOperand* elements() { return inputs_[0]; }
2442 LOperand* from() { return inputs_[1]; }
2443 LOperand* to() { return inputs_[2]; }
2444 LOperand* value() { return inputs_[3]; }
2445
2446 DECLARE_CONCRETE_INSTRUCTION(FillElements, "fill-elements")
2447 DECLARE_HYDROGEN_ACCESSOR(FillElements)
2448
2449 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2450
2451 // Max size for unroll (choosen to generate the smallest code size).
2452 static const int32_t kMaxUnrolledSize = 8;
2453 };
2454
2455
2456 class LCopyElements V8_FINAL : public LTemplateInstruction<0, 3, 0> {
2457 public:
2458 LCopyElements(LOperand* src, LOperand* dst, LOperand* length) {
2459 inputs_[0] = src;
2460 inputs_[1] = dst;
2461 inputs_[2] = length;
2462 }
2463 LOperand* src() { return inputs_[0]; }
2464 LOperand* dst() { return inputs_[1]; }
2465 LOperand* length() { return inputs_[2]; }
2466
2467 DECLARE_CONCRETE_INSTRUCTION(CopyElements, "copy-elements")
2468 DECLARE_HYDROGEN_ACCESSOR(CopyElements)
2469
2470 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2471 };
2472
2473
2430 template<int T> 2474 template<int T>
2431 class LStoreKeyed : public LTemplateInstruction<0, 3, T> { 2475 class LStoreKeyed : public LTemplateInstruction<0, 3, T> {
2432 public: 2476 public:
2433 LStoreKeyed(LOperand* elements, LOperand* key, LOperand* value) { 2477 LStoreKeyed(LOperand* elements, LOperand* key, LOperand* value) {
2434 this->inputs_[0] = elements; 2478 this->inputs_[0] = elements;
2435 this->inputs_[1] = key; 2479 this->inputs_[1] = key;
2436 this->inputs_[2] = value; 2480 this->inputs_[2] = value;
2437 } 2481 }
2438 2482
2439 bool is_external() const { return this->hydrogen()->is_external(); } 2483 bool is_external() const { return this->hydrogen()->is_external(); }
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
3134 MUST_USE_RESULT LOperand* UseRegisterAndClobber(HValue* value); 3178 MUST_USE_RESULT LOperand* UseRegisterAndClobber(HValue* value);
3135 3179
3136 // The operand created by UseRegisterAtStart is guaranteed to be live only at 3180 // The operand created by UseRegisterAtStart is guaranteed to be live only at
3137 // instruction start. The register allocator is free to assign the same 3181 // instruction start. The register allocator is free to assign the same
3138 // register to some other operand used inside instruction (i.e. temporary or 3182 // register to some other operand used inside instruction (i.e. temporary or
3139 // output). 3183 // output).
3140 MUST_USE_RESULT LOperand* UseRegisterAtStart(HValue* value); 3184 MUST_USE_RESULT LOperand* UseRegisterAtStart(HValue* value);
3141 3185
3142 // An input operand in a register or a constant operand. 3186 // An input operand in a register or a constant operand.
3143 MUST_USE_RESULT LOperand* UseRegisterOrConstant(HValue* value); 3187 MUST_USE_RESULT LOperand* UseRegisterOrConstant(HValue* value);
3188 MUST_USE_RESULT LOperand* UseRegisterAndClobberOrConstant(HValue* value);
3144 MUST_USE_RESULT LOperand* UseRegisterOrConstantAtStart(HValue* value); 3189 MUST_USE_RESULT LOperand* UseRegisterOrConstantAtStart(HValue* value);
3145 3190
3146 // A constant operand. 3191 // A constant operand.
3147 MUST_USE_RESULT LConstantOperand* UseConstant(HValue* value); 3192 MUST_USE_RESULT LConstantOperand* UseConstant(HValue* value);
3148 3193
3149 // An input operand in register, stack slot or a constant operand. 3194 // An input operand in register, stack slot or a constant operand.
3150 // Will not be moved to a register even if one is freely available. 3195 // Will not be moved to a register even if one is freely available.
3151 virtual MUST_USE_RESULT LOperand* UseAny(HValue* value); 3196 virtual MUST_USE_RESULT LOperand* UseAny(HValue* value);
3152 3197
3153 // Temporary operand that must be in a register. 3198 // Temporary operand that must be in a register.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
3239 3284
3240 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 3285 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
3241 }; 3286 };
3242 3287
3243 #undef DECLARE_HYDROGEN_ACCESSOR 3288 #undef DECLARE_HYDROGEN_ACCESSOR
3244 #undef DECLARE_CONCRETE_INSTRUCTION 3289 #undef DECLARE_CONCRETE_INSTRUCTION
3245 3290
3246 } } // namespace v8::internal 3291 } } // namespace v8::internal
3247 3292
3248 #endif // V8_ARM64_LITHIUM_ARM64_H_ 3293 #endif // V8_ARM64_LITHIUM_ARM64_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm64/lithium-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698