* spilled. So in some situations (for example 2 adc-nodes that use the flags of
* a single add node on x86) operations have to be repeated to work correctly.
*/
* spilled. So in some situations (for example 2 adc-nodes that use the flags of
* a single add node on x86) operations have to be repeated to work correctly.
*/
static const arch_register_class_t *flag_class = NULL;
static const arch_register_t *flags_reg = NULL;
static func_rematerialize remat = NULL;
static const arch_register_class_t *flag_class = NULL;
static const arch_register_t *flags_reg = NULL;
static func_rematerialize remat = NULL;
* (only works for nodes in same block)
*/
static int can_move(ir_node *node, ir_node *after)
* (only works for nodes in same block)
*/
static int can_move(ir_node *node, ir_node *after)
for(i = 0; i < arity; ++i) {
ir_node *in = get_irn_n(node, i);
in = skip_Proj(in);
for(i = 0; i < arity; ++i) {
ir_node *in = get_irn_n(node, i);
in = skip_Proj(in);
/* test whether the current node needs flags */
arity = get_irn_arity(node);
for(i = 0; i < arity; ++i) {
/* 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(arch_env, node, i);
+ const arch_register_class_t *cls = arch_get_irn_reg_class(node, i);
if(cls == flag_class) {
assert(new_flags_needed == NULL);
new_flags_needed = get_irn_n(node, i);
if(cls == flag_class) {
assert(new_flags_needed == NULL);
new_flags_needed = get_irn_n(node, i);
if(is_Proj(flags_needed)) {
pn = get_Proj_proj(flags_needed);
flags_needed = get_Proj_pred(flags_needed);
}
flag_consumers = node;
set_irn_link(flag_consumers, NULL);
if(is_Proj(flags_needed)) {
pn = get_Proj_proj(flags_needed);
flags_needed = get_Proj_pred(flags_needed);
}
flag_consumers = node;
set_irn_link(flag_consumers, NULL);
} else {
/* link all consumers in a list */
set_irn_link(node, flag_consumers);
} else {
/* link all consumers in a list */
set_irn_link(node, flag_consumers);
irg_block_walk_graph(irg, fix_flags_walker, NULL, birg->lv);
irg_block_walk_graph(irg, fix_flags_walker, NULL, birg->lv);