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

Unified Diff: runtime/vm/flow_graph.h

Issue 515913003: Add loop printing to block comments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph.h
===================================================================
--- runtime/vm/flow_graph.h (revision 39664)
+++ runtime/vm/flow_graph.h (working copy)
@@ -222,13 +222,21 @@
// after this point.
void disallow_licm() { licm_allowed_ = false; }
- const ZoneGrowableArray<BlockEntryInstr*>& loop_headers() {
+ const ZoneGrowableArray<BlockEntryInstr*>& LoopHeaders() {
if (loop_headers_ == NULL) {
loop_headers_ = ComputeLoops();
}
return *loop_headers_;
}
+ const ZoneGrowableArray<BlockEntryInstr*>* loop_headers() const {
+ return loop_headers_;
+ }
+
+ // Finds natural loops in the flow graph and attaches a list of loop
+ // body blocks for each loop header.
+ ZoneGrowableArray<BlockEntryInstr*>* ComputeLoops() const;
+
// Per loop header invariant loads sets. Each set contains load id for
// those loads that are not affected by anything in the loop and can be
// hoisted out. Sets are computed by LoadOptimizer.
@@ -295,12 +303,8 @@
// "Advanced Compiler Design & Implementation" (Muchnick) p192.
// Returns a BitVector indexed by block pre-order number where each bit
// indicates membership in the loop.
- BitVector* FindLoop(BlockEntryInstr* m, BlockEntryInstr* n);
+ BitVector* FindLoop(BlockEntryInstr* m, BlockEntryInstr* n) const;
- // Finds natural loops in the flow graph and attaches a list of loop
- // body blocks for each loop header.
- ZoneGrowableArray<BlockEntryInstr*>* ComputeLoops();
-
Isolate* isolate_;
// DiscoverBlocks computes parent_ and assigned_vars_ which are then used
« no previous file with comments | « no previous file | runtime/vm/flow_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698