IR print visitor: Print assignments
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 10 Mar 2010 00:40:45 +0000 (16:40 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 10 Mar 2010 00:40:45 +0000 (16:40 -0800)
ir_print_visitor.cpp

index 8c4271e466aed2be1a4454800caa9f1b27c5ff3c..365ff5933e3b561fea7492cbeab8cf7fe6105a4b 100644 (file)
@@ -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");
 }