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

Unified Diff: runtime/vm/intermediate_language.h

Issue 14268019: Basic support for LICM of fully invariant loads. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: review ready 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 | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index e28e5aa919e0e2be2d5d458fedea18d7ddc9d046..2b6ad255e7708577e880a5f834af175601eb505f 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -618,7 +618,7 @@ class Instruction : public ZoneAllocated {
previous_(NULL),
next_(NULL),
env_(NULL),
- expr_id_(-1) { }
+ expr_id_(kNoExprId) { }
virtual Tag tag() const = 0;
@@ -794,9 +794,11 @@ FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
// Get the block entry for this instruction.
virtual BlockEntryInstr* GetBlock() const;
- // Id for instructions used in CSE.
+ // Id for load instructions used during load forwarding pass and later in
+ // LICM.
intptr_t expr_id() const { return expr_id_; }
void set_expr_id(intptr_t expr_id) { expr_id_ = expr_id; }
+ bool HasExprId() const { return expr_id_ != kNoExprId; }
// Returns a hash code for use with hash maps.
virtual intptr_t Hashcode() const;
@@ -888,6 +890,10 @@ FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
virtual void RawSetInputAt(intptr_t i, Value* value) = 0;
+ enum {
+ kNoExprId = -1
+ };
+
intptr_t deopt_id_;
intptr_t lifetime_position_; // Position used by register allocator.
Instruction* previous_;
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698