fixed the fix of the fix (that was fix)
[libfirm] / ir / ana / interval_analysis.c
index 26a362e..896cd36 100644 (file)
@@ -1,4 +1,27 @@
+/*
+ * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
 
+/**
+ * @file
+ * @brief   Implementation of interval analysis
+ * @version $Id$
+ */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -18,6 +41,7 @@
 #include "irdump_t.h"
 #include "irdom.h"
 #include "irflag.h"
+#include "irprintf.h"
 #include "hashptr.h"
 
 /*------------------------------------------------------------------*/
@@ -188,14 +212,6 @@ static int find_previous_loop(ir_loop *l, ir_loop *pred_l, ir_node *b, ir_node *
     }
   }
 
-  if (!found) {
-    DDMG(current_ir_graph);
-    DDML(l);
-    DDML(pred_l);
-    DDMN(b);
-    DDMN(pred_b);
-  }
-
   return found;
 }
 
@@ -230,7 +246,7 @@ static void construct_interval_block(ir_node *b, ir_loop *l) {
     if (is_backedge(b, i)) {
       if (b != get_loop_element(l, 0).node) {
         if (get_firm_verbosity()) {
-               printf("Loophead not at loop position 0. "); DDMN(b);
+               ir_printf("Loophead not at loop position 0. %+F\n", b);
         }
       }
       /* There are no backedges in the interval decomposition. */
@@ -261,7 +277,7 @@ static void construct_interval_block(ir_node *b, ir_loop *l) {
       if (!found) {
            if (b != get_loop_element(l, 0).node) {
              if (get_firm_verbosity()) {
-               printf("Loop entry not at loop position 0. "); DDMN(b);
+               ir_printf("Loop entry not at loop position 0. %+F\n", b);
              }
            }
            found = find_outer_loop(l, pred_l, pred, cfop);
@@ -271,9 +287,6 @@ static void construct_interval_block(ir_node *b, ir_loop *l) {
         found = find_previous_loop(l, pred_l, b, pred, cfop);
       }
       if (!found) {
-           DDMG(current_ir_graph);
-           DDMN(b);
-           DDMN(pred);
            assert(is_backedge(b, i));
            assert(found && "backedge from inner loop");
       }
@@ -282,10 +295,7 @@ static void construct_interval_block(ir_node *b, ir_loop *l) {
     if (b != get_loop_element(l, 0).node) {
       /* Check for improper region */
       if (has_backedges(b)) {
-           printf("Improper Region!!!!!!\n");
-           DDMG(current_ir_graph);
-           DDMN(b);
-           DDML(l);
+           ir_fprintf(stderr, "Improper Region!!!!!! %+F\n", b);
       }
     }
   }
@@ -364,8 +374,7 @@ void dump_region_edges(FILE *F, void *reg) {
 
     if (is_ir_node(reg)) {
       if (get_Block_n_cfgpreds((ir_node *)reg) != get_region_n_ins(reg)) {
-        printf("n_cfgpreds = %d, n_ins = %d\n", get_Block_n_cfgpreds((ir_node *)reg), get_region_n_ins(reg));
-        DDMN((ir_node *)reg);
+        ir_printf("n_cfgpreds = %d, n_ins = %d\n %+F\n", get_Block_n_cfgpreds((ir_node *)reg), get_region_n_ins(reg), (ir_node*) reg);
       }
     }