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

Side by Side Diff: src/ia32/lithium-ia32.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/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 V(CmpT) \ 81 V(CmpT) \
82 V(CmpConstantEqAndBranch) \ 82 V(CmpConstantEqAndBranch) \
83 V(ConstantD) \ 83 V(ConstantD) \
84 V(ConstantI) \ 84 V(ConstantI) \
85 V(ConstantS) \ 85 V(ConstantS) \
86 V(ConstantT) \ 86 V(ConstantT) \
87 V(Context) \ 87 V(Context) \
88 V(DebugBreak) \ 88 V(DebugBreak) \
89 V(DeclareGlobals) \ 89 V(DeclareGlobals) \
90 V(DeleteProperty) \ 90 V(DeleteProperty) \
91 V(DeoptCounter) \
92 V(DeoptCounterAdd) \
91 V(Deoptimize) \ 93 V(Deoptimize) \
92 V(DivI) \ 94 V(DivI) \
93 V(DoubleToI) \ 95 V(DoubleToI) \
94 V(DoubleToSmi) \ 96 V(DoubleToSmi) \
95 V(DummyUse) \ 97 V(DummyUse) \
96 V(ElementsKind) \ 98 V(ElementsKind) \
97 V(FixedArrayBaseLength) \ 99 V(FixedArrayBaseLength) \
98 V(FunctionLiteral) \ 100 V(FunctionLiteral) \
99 V(GetCachedArrayIndex) \ 101 V(GetCachedArrayIndex) \
100 V(GlobalObject) \ 102 V(GlobalObject) \
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 414
413 class LDummyUse: public LTemplateInstruction<1, 1, 0> { 415 class LDummyUse: public LTemplateInstruction<1, 1, 0> {
414 public: 416 public:
415 explicit LDummyUse(LOperand* value) { 417 explicit LDummyUse(LOperand* value) {
416 inputs_[0] = value; 418 inputs_[0] = value;
417 } 419 }
418 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") 420 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use")
419 }; 421 };
420 422
421 423
424 class LDeoptCounter: public LTemplateInstruction<0, 0, 0> {
425 public:
426 LDeoptCounter(int id, int initial_value, int max_value)
427 : id_(id),
428 initial_value_(initial_value),
429 max_value_(max_value) {
430 }
431
432 DECLARE_CONCRETE_INSTRUCTION(DeoptCounter, "deopt_counter")
433
434 int id() const { return id_; }
435 int initial_value() const { return initial_value_; }
436 int max_value() const { return max_value_; }
437
438 private:
439 int id_;
440 int initial_value_;
441 int max_value_;
442 };
443
444
445 class LDeoptCounterAdd: public LTemplateInstruction<0, 0, 2> {
446 public:
447 LDeoptCounterAdd(int counter,
448 int delta,
449 LOperand* temp,
450 LOperand* temp2) : counter_(counter),
451 delta_(delta) {
452 temps_[0] = temp;
453 temps_[1] = temp2;
454 }
455
456 DECLARE_CONCRETE_INSTRUCTION(DeoptCounterAdd, "deopt_counter_add")
457
458 LOperand* temp() { return temps_[0]; }
459 LOperand* temp2() { return temps_[1]; }
460 int counter() const { return counter_; }
461 int delta() const { return delta_; }
462
463 private:
464 int counter_;
465 int delta_;
466 };
467
468
422 class LDeoptimize: public LTemplateInstruction<0, 0, 0> { 469 class LDeoptimize: public LTemplateInstruction<0, 0, 0> {
423 public: 470 public:
424 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") 471 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
425 }; 472 };
426 473
427 474
428 class LLabel: public LGap { 475 class LLabel: public LGap {
429 public: 476 public:
430 explicit LLabel(HBasicBlock* block) 477 explicit LLabel(HBasicBlock* block)
431 : LGap(block), replacement_(NULL) { } 478 : LGap(block), replacement_(NULL) { }
(...skipping 2548 matching lines...) Expand 10 before | Expand all | Expand 10 after
2980 3027
2981 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 3028 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2982 }; 3029 };
2983 3030
2984 #undef DECLARE_HYDROGEN_ACCESSOR 3031 #undef DECLARE_HYDROGEN_ACCESSOR
2985 #undef DECLARE_CONCRETE_INSTRUCTION 3032 #undef DECLARE_CONCRETE_INSTRUCTION
2986 3033
2987 } } // namespace v8::internal 3034 } } // namespace v8::internal
2988 3035
2989 #endif // V8_IA32_LITHIUM_IA32_H_ 3036 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698