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

Unified Diff: runtime/vm/flow_graph_allocator.h

Issue 10829218: Add hints when resolving phies and register constraints. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | « no previous file | runtime/vm/flow_graph_allocator.cc » ('j') | runtime/vm/flow_graph_allocator.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_allocator.h
diff --git a/runtime/vm/flow_graph_allocator.h b/runtime/vm/flow_graph_allocator.h
index 2df90d8273f4b9779847e29b1d51034a944176a2..959ef139bd5a390ae43b6e4deb869cc819ce4510 100644
--- a/runtime/vm/flow_graph_allocator.h
+++ b/runtime/vm/flow_graph_allocator.h
@@ -265,30 +265,36 @@ class BlockInfo : public ZoneAllocated {
class UsePosition : public ZoneAllocated {
public:
UsePosition(intptr_t pos, UsePosition* next, Location* location_slot)
- : pos_(pos), location_slot_(location_slot), next_(next) { }
+ : pos_(pos), location_slot_(location_slot), hint_(NULL), next_(next) { }
Location* location_slot() const { return location_slot_; }
void set_location_slot(Location* location_slot) {
location_slot_ = location_slot;
}
- void set_next(UsePosition* next) { next_ = next; }
- UsePosition* next() const { return next_; }
+ Location hint() const {
+ ASSERT(HasHint());
+ return *hint_;
+ }
- intptr_t pos() const { return pos_; }
+ void set_hint(Location* hint) {
+ hint_ = hint;
+ }
bool HasHint() const {
- return (location_slot() != NULL) && (location_slot()->IsRegister());
+ return (hint_ != NULL) && !hint_->IsUnallocated();
}
- Location hint() const {
- ASSERT(HasHint());
- return *location_slot();
- }
+
+ void set_next(UsePosition* next) { next_ = next; }
+ UsePosition* next() const { return next_; }
+
+ intptr_t pos() const { return pos_; }
private:
const intptr_t pos_;
Location* location_slot_;
+ Location* hint_;
UsePosition* next_;
DISALLOW_COPY_AND_ASSIGN(UsePosition);
@@ -406,6 +412,8 @@ class LiveRange : public ZoneAllocated {
void DefineAt(intptr_t pos);
void AddUse(intptr_t pos, Location* location_slot);
+ void AddHintedUse(intptr_t pos, Location* location_slot, Location* hint);
+
void AddUseInterval(intptr_t start, intptr_t end);
void Print();
« no previous file with comments | « no previous file | runtime/vm/flow_graph_allocator.cc » ('j') | runtime/vm/flow_graph_allocator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698