#include "bechordal_t.h"
#include "besched_t.h"
#include "bestat.h"
+#include "benodesets.h"
#include "irgmod.h"
#include "iredges_t.h"
const arch_register_class_t *reg_class;
const arch_env_t *arch_env;
lower_env_t *env = walk_env;
- int real_size = 0;
- int n, i, pn, do_copy, j, n_ops;
+ int real_size = 0;
+ int keep_perm = 0;
+ int n, i, pn, do_copy, j, n_ops;
reg_pair_t *pairs;
const ir_edge_t *edge;
perm_cycle_t *cycle;
*/
if (n == 2 && cycle->type == PERM_CYCLE) {
free(cycle);
+ keep_perm = 1;
continue;
}
free(cycle);
}
-
-
/* remove the perm from schedule */
- sched_remove(irn);
+ if (! keep_perm)
+ sched_remove(irn);
}
/* insert the other different and it's copies into the set */
key.op = other_different;
key.copies = NULL;
- entry = pset_find(op_set, &key, HASH_PTR(other_different));
+ entry = pset_find(op_set, &key, nodeset_hash(other_different));
if (! entry) {
entry = obstack_alloc(&env->obst, sizeof(*entry));
if (be_is_CopyKeep(keep))
pset_insert_ptr(entry->copies, keep);
- pset_insert(op_set, entry, HASH_PTR(other_different));
+ pset_insert(op_set, entry, nodeset_hash(other_different));
DBG((mod, LEVEL_1, "created %+F for %+F to assure should_be_different\n", keep, irn));
}