* @file
* @brief modifies schedule so flags dependencies are respected.
* @author Matthias Braun, Christoph Mallon
- * @version $Id: besched.h 14693 2007-06-21 15:35:49Z beck $
*
* Fixup schedule to respect flag constraints by moving and rematerialisation of
* nodes.
#include "beflags.h"
#include "bearch.h"
#include "beirg.h"
+#include "beirgmod.h"
#include "besched.h"
#include "benode.h"
#include "belive.h"
+#include "beabihelper.h"
static const arch_register_class_t *flag_class;
static const arch_register_t *flags_reg;
if (get_irn_mode(copy) == mode_T) {
ir_mode *mode = flag_class->mode;
value = new_rd_Proj(NULL, copy, mode, pn);
+ be_add_missing_keeps_node(copy);
} else {
value = copy;
}
/* test whether the current node needs flags */
arity = get_irn_arity(node);
for (i = 0; i < arity; ++i) {
- const arch_register_class_t *cls = arch_get_irn_reg_class(node, i);
- if (cls == flag_class) {
+ const arch_register_req_t *req
+ = arch_get_irn_register_req_in(node, i);
+ if (req->cls == flag_class) {
assert(new_flags_needed == NULL);
new_flags_needed = get_irn_n(node, i);
}