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

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

Issue 16128004: Reorder switch clauses using newly-introduced execution counters in (Closed) Base URL: gh:v8/v8.git@master
Patch Set: tweak heuristic Created 7 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
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 V(CmpMapAndBranch) \ 86 V(CmpMapAndBranch) \
87 V(CmpT) \ 87 V(CmpT) \
88 V(ConstantD) \ 88 V(ConstantD) \
89 V(ConstantI) \ 89 V(ConstantI) \
90 V(ConstantS) \ 90 V(ConstantS) \
91 V(ConstantT) \ 91 V(ConstantT) \
92 V(Context) \ 92 V(Context) \
93 V(DebugBreak) \ 93 V(DebugBreak) \
94 V(DeclareGlobals) \ 94 V(DeclareGlobals) \
95 V(DeleteProperty) \ 95 V(DeleteProperty) \
96 V(DeoptCounter) \
97 V(DeoptCounterAdd) \
96 V(Deoptimize) \ 98 V(Deoptimize) \
97 V(DivI) \ 99 V(DivI) \
98 V(DoubleToI) \ 100 V(DoubleToI) \
99 V(DoubleToSmi) \ 101 V(DoubleToSmi) \
100 V(DummyUse) \ 102 V(DummyUse) \
101 V(ElementsKind) \ 103 V(ElementsKind) \
102 V(FixedArrayBaseLength) \ 104 V(FixedArrayBaseLength) \
103 V(MapEnumLength) \ 105 V(MapEnumLength) \
104 V(FunctionLiteral) \ 106 V(FunctionLiteral) \
105 V(GetCachedArrayIndex) \ 107 V(GetCachedArrayIndex) \
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 427
426 class LDummyUse: public LTemplateInstruction<1, 1, 0> { 428 class LDummyUse: public LTemplateInstruction<1, 1, 0> {
427 public: 429 public:
428 explicit LDummyUse(LOperand* value) { 430 explicit LDummyUse(LOperand* value) {
429 inputs_[0] = value; 431 inputs_[0] = value;
430 } 432 }
431 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") 433 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use")
432 }; 434 };
433 435
434 436
437 class LDeoptCounter: public LTemplateInstruction<0, 0, 0> {
438 public:
439 LDeoptCounter(int id, int initial_value, int max_value)
440 : id_(id),
441 initial_value_(initial_value),
442 max_value_(max_value) {
443 }
444
445 DECLARE_CONCRETE_INSTRUCTION(DeoptCounter, "deopt_counter")
446
447 int id() const { return id_; }
448 int initial_value() const { return initial_value_; }
449 int max_value() const { return max_value_; }
450
451 private:
452 int id_;
453 int initial_value_;
454 int max_value_;
455 };
456
457
458 class LDeoptCounterAdd: public LTemplateInstruction<0, 0, 2> {
459 public:
460 LDeoptCounterAdd(int counter,
461 int delta,
462 LOperand* temp,
463 LOperand* temp2) : counter_(counter),
464 delta_(delta) {
465 temps_[0] = temp;
466 temps_[1] = temp2;
467 }
468
469 DECLARE_CONCRETE_INSTRUCTION(DeoptCounterAdd, "deopt_counter_add")
470
471 LOperand* temp() { return temps_[0]; }
472 LOperand* temp2() { return temps_[1]; }
473 int counter() const { return counter_; }
474 int delta() const { return delta_; }
475
476 private:
477 int counter_;
478 int delta_;
479 };
480
481
435 class LDeoptimize: public LTemplateInstruction<0, 0, 0> { 482 class LDeoptimize: public LTemplateInstruction<0, 0, 0> {
436 public: 483 public:
437 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") 484 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
438 }; 485 };
439 486
440 487
441 class LLabel: public LGap { 488 class LLabel: public LGap {
442 public: 489 public:
443 explicit LLabel(HBasicBlock* block) 490 explicit LLabel(HBasicBlock* block)
444 : LGap(block), replacement_(NULL) { } 491 : LGap(block), replacement_(NULL) { }
(...skipping 2304 matching lines...) Expand 10 before | Expand all | Expand 10 after
2749 2796
2750 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2797 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2751 }; 2798 };
2752 2799
2753 #undef DECLARE_HYDROGEN_ACCESSOR 2800 #undef DECLARE_HYDROGEN_ACCESSOR
2754 #undef DECLARE_CONCRETE_INSTRUCTION 2801 #undef DECLARE_CONCRETE_INSTRUCTION
2755 2802
2756 } } // namespace v8::int 2803 } } // namespace v8::int
2757 2804
2758 #endif // V8_X64_LITHIUM_X64_H_ 2805 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698