+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "irgraph_t.h"
#include "irmode_t.h"
#include "besched_t.h"
#include "beinsn_t.h"
+#include "beabi.h"
be_insn_t *be_scan_insn(const be_insn_env_t *env, ir_node *irn)
{
insn->next_insn = p;
}
-
else if(arch_irn_consider_in_reg_alloc(arch_env, env->cls, irn)) {
arch_get_register_req(arch_env, &o.req, irn, -1);
o.carrier = irn;
op->req.limited(op->req.limited_env, op->regs);
else {
arch_put_non_ignore_regs(arch_env, env->cls, op->regs);
- bitset_andnot(op->regs, env->ignore_colors);
+ if(env->ignore_colors)
+ bitset_andnot(op->regs, env->ignore_colors);
}
}
return insn;
}
+
+be_insn_env_t *be_insn_env_init(be_insn_env_t *ie, const be_irg_t *birg, const arch_register_class_t *cls, struct obstack *obst)
+{
+ ie->aenv = birg->main_env->arch_env;
+ ie->cls = cls;
+ ie->obst = obst;
+ ie->ignore_colors = bitset_obstack_alloc(obst, cls->n_regs);
+ be_abi_put_ignore_regs(birg->abi, cls, ie->ignore_colors);
+ return ie;
+}