#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"
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);
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);
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];
}
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