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

Unified Diff: runtime/vm/intermediate_language.h

Issue 17101028: Refactor load forwarding pass to use a Place abstraction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | 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 94da04591a7490975cafbeb80f00eb6c4d8e7e15..5c5f2617ef9bbe0e6d04d29b858a03ef1de7de87 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -640,7 +640,7 @@ class Instruction : public ZoneAllocated {
previous_(NULL),
next_(NULL),
env_(NULL),
- expr_id_(kNoExprId) { }
+ place_id_(kNoPlaceId) { }
virtual Tag tag() const = 0;
@@ -731,6 +731,7 @@ class Instruction : public ZoneAllocated {
virtual const char* DebugName() const = 0;
// Printing support.
+ const char* ToCString() const;
virtual void PrintTo(BufferFormatter* f) const;
virtual void PrintOperandsTo(BufferFormatter* f) const;
@@ -823,11 +824,10 @@ FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
// Get the block entry for this instruction.
virtual BlockEntryInstr* GetBlock() const;
- // 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; }
+ // Place identifiers used by the load optimization pass.
+ intptr_t place_id() const { return place_id_; }
+ void set_place_id(intptr_t place_id) { place_id_ = place_id; }
+ bool HasPlaceId() const { return place_id_ != kNoPlaceId; }
// Returns a hash code for use with hash maps.
virtual intptr_t Hashcode() const;
@@ -927,7 +927,7 @@ FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
virtual void RawSetInputAt(intptr_t i, Value* value) = 0;
enum {
- kNoExprId = -1
+ kNoPlaceId = -1
};
intptr_t deopt_id_;
@@ -935,7 +935,7 @@ FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
Instruction* previous_;
Instruction* next_;
Environment* env_;
- intptr_t expr_id_;
+ intptr_t place_id_;
DISALLOW_COPY_AND_ASSIGN(Instruction);
};
@@ -1379,6 +1379,7 @@ class JoinEntryInstr : public BlockEntryInstr {
void RemoveDeadPhis(Definition* replacement);
void InsertPhi(PhiInstr* phi);
+ void RemovePhi(PhiInstr* phi);
virtual void PrintTo(BufferFormatter* f) const;
@@ -1701,6 +1702,7 @@ class PhiInstr : public Definition {
// Phi is alive if it reaches a non-environment use.
bool is_alive() const { return is_alive_; }
void mark_alive() { is_alive_ = true; }
+ void mark_dead() { is_alive_ = false; }
virtual Representation RequiredInputRepresentation(intptr_t i) const {
return representation_;
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698