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

Unified Diff: runtime/vm/flow_graph_allocator.h

Issue 10666026: Simple iterative liveness analysis over SSA. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: runtime/vm/flow_graph_allocator.h
diff --git a/runtime/vm/flow_graph_allocator.h b/runtime/vm/flow_graph_allocator.h
index b70e12205dd23de67e8d27f7f3c411e7243663bd..bb6985fc74153e453cf851f105b96bd2904896d1 100644
--- a/runtime/vm/flow_graph_allocator.h
+++ b/runtime/vm/flow_graph_allocator.h
@@ -12,13 +12,26 @@ namespace dart {
class FlowGraphAllocator : public ValueObject {
public:
- explicit FlowGraphAllocator(const GrowableArray<BlockEntryInstr*>& blocks)
- : blocks_(blocks) { }
+ explicit FlowGraphAllocator(const GrowableArray<BlockEntryInstr*>& postorder,
Florian Schneider 2012/06/25 14:38:29 No explicit necessary.
Vyacheslav Egorov (Google) 2012/06/25 16:58:26 Done.
+ intptr_t max_ssa_temp_index);
void ResolveConstraints();
+ void AnalyzeLiveness();
+
private:
- const GrowableArray<BlockEntryInstr*>& blocks_;
+ void ComputeKillAndGenSets();
+ bool UpdateLiveOut(BlockEntryInstr* instr);
+ bool UpdateLiveIn(BlockEntryInstr* instr);
+ void ComputeLiveInAndLiveOutSets();
+ void DumpLiveness();
+
srdjan 2012/06/25 17:30:05 It woud be nice to have comments describing briefl
+ GrowableArray<BitVector*> live_out_;
+ GrowableArray<BitVector*> kill_;
+ GrowableArray<BitVector*> gen_;
+ GrowableArray<BitVector*> live_in_;
+ const GrowableArray<BlockEntryInstr*>& postorder_;
+ const intptr_t vreg_count_;
DISALLOW_COPY_AND_ASSIGN(FlowGraphAllocator);
};

Powered by Google App Engine
This is Rietveld 408576698