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

Unified Diff: src/arm/lithium-arm.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, 7 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/full-codegen-arm.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-arm.h
diff --git a/src/arm/lithium-arm.h b/src/arm/lithium-arm.h
index 6ae65e8096b89554d4cae2b67bb9f1bd3c09f2dd..d4b0d9a9f1fffa482db316e29eed6469a727c1ab 100644
--- a/src/arm/lithium-arm.h
+++ b/src/arm/lithium-arm.h
@@ -93,6 +93,8 @@ class LCodeGen;
V(DebugBreak) \
V(DeclareGlobals) \
V(DeleteProperty) \
+ V(DeoptCounter) \
+ V(DeoptCounterAdd) \
V(Deoptimize) \
V(DivI) \
V(DoubleToI) \
@@ -432,6 +434,51 @@ class LDummyUse: public LTemplateInstruction<1, 1, 0> {
};
+class LDeoptCounter: public LTemplateInstruction<0, 0, 0> {
+ public:
+ LDeoptCounter(int id, int initial_value, int max_value)
+ : id_(id),
+ initial_value_(initial_value),
+ max_value_(max_value) {
+ }
+
+ DECLARE_CONCRETE_INSTRUCTION(DeoptCounter, "deopt_counter")
+
+ int id() const { return id_; }
+ int initial_value() const { return initial_value_; }
+ int max_value() const { return max_value_; }
+
+ private:
+ int id_;
+ int initial_value_;
+ int max_value_;
+};
+
+
+class LDeoptCounterAdd: public LTemplateInstruction<0, 0, 2> {
+ public:
+ LDeoptCounterAdd(int counter,
+ int delta,
+ LOperand* temp,
+ LOperand* temp2) : counter_(counter),
+ delta_(delta) {
+ temps_[0] = temp;
+ temps_[1] = temp2;
+ }
+
+ DECLARE_CONCRETE_INSTRUCTION(DeoptCounterAdd, "deopt_counter_add")
+
+ LOperand* temp() { return temps_[0]; }
+ LOperand* temp2() { return temps_[1]; }
+ int counter() const { return counter_; }
+ int delta() const { return delta_; }
+
+ private:
+ int counter_;
+ int delta_;
+};
+
+
class LDeoptimize: public LTemplateInstruction<0, 0, 0> {
public:
DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698