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

Unified Diff: vm/intermediate_language.h

Issue 10446116: Add flow graph printing into a .cfg file with flag --print-flow-graph-file. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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: vm/intermediate_language.h
===================================================================
--- vm/intermediate_language.h (revision 8145)
+++ vm/intermediate_language.h (working copy)
@@ -1347,7 +1347,8 @@
virtual type##Instr* As##type() { return this; } \
virtual intptr_t InputCount() const; \
virtual const char* DebugName() const { return #type; } \
- virtual void PrintTo(BufferFormatter* f) const;
+ virtual void PrintTo(BufferFormatter* f) const; \
+ virtual void PrintToVisualizer(BufferFormatter* f) const;
class Instruction : public ZoneAllocated {
@@ -1381,6 +1382,12 @@
virtual Instruction* StraightLineSuccessor() const = 0;
virtual void SetSuccessor(Instruction* instr) = 0;
+ // Normal instructions can have 0 (inside a block) or 1 (last instruction in
+ // a block) successors. Branch instruction with >1 successors override this
+ // function.
+ virtual intptr_t SuccessorCount() const;
+ virtual BlockEntryInstr* SuccessorAt(intptr_t index) const;
+
virtual void replace_computation(Computation* value) {
UNREACHABLE();
}
@@ -1414,6 +1421,7 @@
// Printing support.
virtual void PrintTo(BufferFormatter* f) const = 0;
+ virtual void PrintToVisualizer(BufferFormatter* f) const = 0;
#define INSTRUCTION_TYPE_CHECK(type) \
virtual bool Is##type() const { return false; } \
@@ -1519,6 +1527,9 @@
virtual Instruction* StraightLineSuccessor() const { return NULL; }
virtual void SetSuccessor(Instruction* instr) { UNREACHABLE(); }
+ virtual intptr_t SuccessorCount() const;
+ virtual BlockEntryInstr* SuccessorAt(intptr_t index) const;
+
virtual void DiscoverBlocks(
BlockEntryInstr* current_block,
GrowableArray<BlockEntryInstr*>* preorder,
@@ -1834,6 +1845,9 @@
virtual Instruction* StraightLineSuccessor() const { return NULL; }
virtual void SetSuccessor(Instruction* instr) { UNREACHABLE(); }
+ virtual intptr_t SuccessorCount() const;
+ virtual BlockEntryInstr* SuccessorAt(intptr_t index) const;
+
virtual void DiscoverBlocks(
BlockEntryInstr* current_block,
GrowableArray<BlockEntryInstr*>* preorder,
« vm/flow_graph_builder.cc ('K') | « vm/il_printer.cc ('k') | vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698