diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-25 17:38:13 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-25 18:40:36 -0700 |
commit | 8c70a621939e55a81a363f04dee3333772339cbe (patch) | |
tree | 0e54585385d44cbbb9b00c271e13af47d6eac61e /ir_print_visitor.h | |
parent | 6e7c278e243e506dd10cc7e0ca5768c187c33b27 (diff) |
IR print visitor: print ir_dereference instructions
Also make a slight change to ir_variable. The ir_dereference tracks
the number of nested dereferences. If an ir_variable is visited and
the count is non-zero, just print the name of the variable.
Diffstat (limited to 'ir_print_visitor.h')
-rw-r--r-- | ir_print_visitor.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ir_print_visitor.h b/ir_print_visitor.h index 121b7e8bb6..a4309c4f2a 100644 --- a/ir_print_visitor.h +++ b/ir_print_visitor.h @@ -35,6 +35,7 @@ class ir_print_visitor : public ir_visitor { public: ir_print_visitor() + : deref_depth(0) { /* empty */ } @@ -63,6 +64,9 @@ public: virtual void visit(ir_call *); virtual void visit(ir_return *); /*@}*/ + +private: + int deref_depth; }; #endif /* IR_PRINT_VISITOR_H */ |