Merged with checked in stuff.
authorSebastian Hack <hack@ipd.info.uni-karlsruhe.de>
Wed, 5 Jan 2005 14:06:30 +0000 (14:06 +0000)
committerSebastian Hack <hack@ipd.info.uni-karlsruhe.de>
Wed, 5 Jan 2005 14:06:30 +0000 (14:06 +0000)
ir/be/bemain.c
ir/be/benumb_t.h
ir/be/beutil.h

index 2f43b0a..7679c9d 100644 (file)
@@ -22,6 +22,8 @@
 #include "belistsched.h"
 #include "belive_t.h"
 #include "beutil.h"
+#include "bephicongr_t.h"
+#include "bechordal.h"
 #include "bechordal.h"
 #include "bephiopt.h"
 #include "phistat.h"
@@ -95,7 +97,8 @@ void be_init(void)
        be_liveness_init();
        be_numbering_init();
        be_ra_init();
-       be_phi_opt_init();
+       be_ra_chordal_init();
+       be_phi_congr_class_init();
 }
 
 extern void be_ra_chordal(ir_graph *irg);
@@ -107,14 +110,14 @@ static void be_main_loop(void)
        for(i = 0, n = get_irp_n_irgs(); i < n; ++i) {
                ir_graph *irg = get_irp_irg(i);
 
+               localize_consts(irg);
                be_numbering(irg);
                list_sched(irg, trivial_selector, NULL);
                be_liveness(irg);
                be_ra_chordal(irg);
                be_phi_opt(irg);
 
-
-               //dump_allocated_irg(irg);
+               // dump_allocated_irg(irg);
 
 #ifndef DO_STATISTICS
                be_ra_chordal_done(irg);
index 0c9dd48..8318e10 100644 (file)
@@ -71,7 +71,7 @@ static INLINE int __get_graph_node_count(const ir_graph *irg)
 static INLINE ir_node *__get_irn_for_graph_nr(const ir_graph *irg, int nr)
 {
        ir_node **map = get_irg_numbering_const(irg)->reverse_map;
-       assert(nr >= 0 && nr < __get_graph_node_count(irg) && map[nr] != NULL);
+       assert(nr >= 0 && nr <= __get_graph_node_count(irg) && map[nr] != NULL);
        return map[nr];
 }
 
index 3c2c50e..a32cc59 100644 (file)
@@ -37,7 +37,20 @@ static INLINE int is_data_node(const ir_node *irn)
        return 0;
 }
 
+/**
+ * Make each constant local to its use.
+ * This duplicates all constants in order to simulate a realistic
+ * register pressure.
+ * @param irg The graph.
+ */
+void localize_consts(ir_graph *irg);
 
+/**
+ * Dump a vcg graph containing the controlflow graph, the schedule and
+ * allocated registers.
+ * @param irg The irg. Note that scheduling, register allocation must
+ * have been performed.
+ */
 void dump_allocated_irg(ir_graph *irg);
 
 #endif