diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-09 16:40:45 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-09 16:40:45 -0800 |
commit | 6044ae79a013ba6067ffd968cee97c0d29b728c2 (patch) | |
tree | 28ce42ca949f3b4ab617038fd236c003757ee8d9 /ir_print_visitor.cpp | |
parent | 6652af36fe8994b1621d882fcc230d320908a2a3 (diff) |
IR print visitor: Print assignments
Diffstat (limited to 'ir_print_visitor.cpp')
-rw-r--r-- | ir_print_visitor.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/ir_print_visitor.cpp b/ir_print_visitor.cpp index 8c4271e466..365ff5933e 100644 --- a/ir_print_visitor.cpp +++ b/ir_print_visitor.cpp @@ -77,8 +77,22 @@ void ir_print_visitor::visit(ir_dereference *ir) void ir_print_visitor::visit(ir_assignment *ir) { - printf("%s:%d:\n", __func__, __LINE__); - (void) ir; + printf("(assign\n"); + + printf(" ("); + if (ir->condition) + ir->condition->accept(this); + else + printf("true"); + printf(")\n"); + + printf(" ("); + ir->lhs->accept(this); + printf(")\n"); + + printf(" ("); + ir->rhs->accept(this); + printf(")\n"); } |