#include "bearch.h"
#include "benode.h"
#include "beutil.h"
-#include "beifg_t.h"
+#include "beifg.h"
#include "beintlive_t.h"
#include "becopyopt_t.h"
#include "becopystat.h"
static void co_collect_units(ir_node *irn, void *env)
{
- const arch_register_req_t *req = arch_get_register_req_out(irn);
+ const arch_register_req_t *req;
copy_opt_t *co = env;
unit_t *unit;
+ if (get_irn_mode(irn) == mode_T)
+ return;
+ req = arch_get_register_req_out(irn);
if (req->cls != co->cls)
return;
if (!co_is_optimizable_root(irn))
static void build_graph_walker(ir_node *irn, void *env)
{
- const arch_register_req_t *req = arch_get_register_req_out(irn);
+ const arch_register_req_t *req;
copy_opt_t *co = env;
int pos, max;
const arch_register_t *reg;
+ if (get_irn_mode(irn) == mode_T)
+ return;
+ req = arch_get_register_req_out(irn);
if (req->cls != co->cls || arch_irn_is_ignore(irn))
return;
int *node_map = XMALLOCN(int, get_irg_last_idx(co->irg) + 1);
ir_node *irn;
- void *it, *nit;
+ nodes_iter_t it;
+ neighbours_iter_t nit;
int n, n_regs;
unsigned i;
* the values below n are the pre-colored register nodes
*/
- it = be_ifg_nodes_iter_alloca(ifg);
- nit = be_ifg_neighbours_iter_alloca(ifg);
-
n = n_regs;
- be_ifg_foreach_node(ifg, it, irn) {
+ be_ifg_foreach_node(ifg, &it, irn) {
if (arch_irn_is_ignore(irn))
continue;
node_map[get_irn_idx(irn)] = n++;
fprintf(f, "%d %d\n", n, n_regs);
- be_ifg_foreach_node(ifg, it, irn) {
+ be_ifg_foreach_node(ifg, &it, irn) {
if (!arch_irn_is_ignore(irn)) {
int idx = node_map[get_irn_idx(irn)];
affinity_node_t *a = get_affinity_info(co, irn);
}
}
- be_ifg_foreach_neighbour(ifg, nit, irn, adj) {
+ be_ifg_foreach_neighbour(ifg, &nit, irn, adj) {
if (!arch_irn_is_ignore(adj) &&
!co_dump_appel_disjoint_constraints(co, irn, adj)) {
int adj_idx = node_map[get_irn_idx(adj)];