Make debug macros "more useful"
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 12 Feb 2003 16:06:05 +0000 (16:06 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 12 Feb 2003 16:06:05 +0000 (16:06 +0000)
[r762]

ir/ir/iropt.c
ir/ir/iropt_dbg.h

index 8ac6aad..ebfac86 100644 (file)
@@ -386,15 +386,15 @@ equivalent_node (ir_node *n)
   case iro_Minus: /* --x == x */  /* ??? Is this possible or can --x raise an
                                         out of bounds exception if min =! max? */
     if (get_irn_op(get_unop_op(n)) == get_irn_op(n)) {
-      n = get_unop_op(get_unop_op(n));                                    DBG_OPT_ALGSIM2
+      n = get_unop_op(get_unop_op(n));                                    DBG_OPT_ALGSIM2;
     }
     break;
   case iro_Mul:
     /* Mul is commutative and has again an other neutral element. */
     if (tarval_classify (computed_value (a)) == 1) {
-      n = b;                                                              DBG_OPT_ALGSIM1
+      n = b;                                                              DBG_OPT_ALGSIM1;
     } else if (tarval_classify (computed_value (b)) == 1) {
-      n = a;                                                              DBG_OPT_ALGSIM1
+      n = a;                                                              DBG_OPT_ALGSIM1;
     }
     break;
   case iro_Div:
index 87473b1..680d90d 100644 (file)
@@ -4,86 +4,87 @@
    update the debug information after a transformation. */
 
 #define DBG_OPT_STG                                                \
-        {                                                          \
+  do {                                                       \
          ir_node *ons[2];                                         \
          ons[0] = oldn;                                           \
          ons[1] = get_Block_cfgpred(oldn, 0);                     \
          __dbg_info_merge_sets(&n, 1, ons, 2, dbg_straightening); \
-       }
+       } while(0)
 
 #define DBG_OPT_IFSIM                                                 \
-        {                                                             \
+  do {                                                          \
          ir_node *ons[4];                                            \
          ons[0] = oldn;                                                 \
          ons[1] = a;                                                 \
          ons[2] = b;                                                 \
          ons[3] = get_Proj_pred(a);                                  \
          __dbg_info_merge_sets(&n, 1, ons, 4, dbg_if_simplification); \
-       }
+       } while(0)
 
 #define DBG_OPT_ALGSIM1                                               \
-        {                                                             \
+  do {                                                          \
          ir_node *ons[3];                                            \
          ons[0] = oldn;                                              \
          ons[1] = a;                                                 \
          ons[2] = b;                                                 \
          __dbg_info_merge_sets(&n, 1, ons, 3, dbg_algebraic_simplification); \
-       }
+       } while(0)
 
 #define DBG_OPT_ALGSIM2                                               \
-        {                                                             \
+  do {                                                          \
          ir_node *ons[3];                                            \
          ons[0] = oldn;                                              \
          ons[1] = get_unop_op(n);                                    \
           ons[2] = n;                                                 \
          __dbg_info_merge_sets(&n, 1, ons, 3, dbg_algebraic_simplification); \
-       }
+       } while(0)
 
 #define DBG_OPT_ALGSIM3                                               \
-        {                                                             \
+  do {                                                          \
          ir_node *ons[2];                                            \
          ons[0] = oldn;                                              \
          ons[1] = a;                                                 \
          __dbg_info_merge_sets(&n, 1, ons, 2, dbg_algebraic_simplification); \
-       }
+       } while(0)
 
 #define DBG_OPT_PHI                                                   \
-        {                                                             \
+  do {                                                          \
          ir_node *ons[2];                                            \
          ons[0] = oldn;                                              \
          ons[1] = first_val;                                         \
          __dbg_info_merge_sets(&n, 1, ons, 2, dbg_opt_ssa);          \
-       }
+       } while(0)
 
 
 #define DBG_OPT_WAW                                                   \
-        {                                                             \
+  do {                                                          \
          ir_node *ons[2];                                            \
          ons[0] = oldn;                                              \
          ons[1] = n;                                                 \
          __dbg_info_merge_sets(&n, 1, ons, 2, dbg_write_after_write);\
-       }
+       } while(0)
 
 #define DBG_OPT_WAR                                                   \
-        {                                                             \
+  do {                                                          \
          ir_node *ons[2];                                            \
          ons[0] = oldn;                                              \
          ons[1] = c;                                                 \
          __dbg_info_merge_sets(&c, 1, ons, 2, dbg_write_after_read); \
-       }
+       } while(0)
 
 #define DBG_OPT_TUPLE                                                 \
-        {                                                             \
+  do {                                                          \
          ir_node *ons[3];                                            \
          ons[0] = oldn;                                              \
          ons[1] = a;                                                 \
          ons[2] = n;                                                 \
          __dbg_info_merge_sets(&n, 1, ons, 3, dbg_opt_auxnode);      \
-       }
+       } while(0)
+
 #define DBG_OPT_ID                                                \
-        {                                                             \
+  do {                                                          \
          ir_node *ons[2];                                            \
          ons[0] = oldn;                                              \
          ons[1] = n;                                                 \
          __dbg_info_merge_sets(&n, 1, ons, 2, dbg_opt_auxnode);      \
-       }
+       } while(0)