((!read_flag && scan_inst->conditional_mod == BRW_CONDITIONAL_NONE) ||
scan_inst->conditional_mod == cond)) {
scan_inst->conditional_mod = cond;
- inst->remove(block);
+ inst->remove(block, true);
return true;
}
break;
((!read_flag && scan_inst->conditional_mod == BRW_CONDITIONAL_NONE) ||
scan_inst->conditional_mod == cond)) {
scan_inst->conditional_mod = cond;
- inst->remove(block);
+ inst->remove(block, true);
return true;
}
break;
if (inst->conditional_mod == BRW_CONDITIONAL_NZ &&
scan_inst->opcode == BRW_OPCODE_CMP &&
brw_reg_type_is_integer(inst->dst.type)) {
- inst->remove(block);
+ inst->remove(block, true);
progress = true;
break;
}
inst->src[0].type == BRW_REGISTER_TYPE_UD) ||
(inst->conditional_mod == BRW_CONDITIONAL_L &&
inst->src[0].type == BRW_REGISTER_TYPE_D)) {
- inst->remove(block);
+ inst->remove(block, true);
progress = true;
break;
}
} else if (scan_inst->conditional_mod == inst->conditional_mod) {
- inst->remove(block);
+ inst->remove(block, true);
progress = true;
break;
} else if (!read_flag) {
scan_inst->conditional_mod = inst->conditional_mod;
- inst->remove(block);
+ inst->remove(block, true);
progress = true;
break;
}
scan_inst->conditional_mod == cond)) {
scan_inst->conditional_mod = cond;
scan_inst->flag_subreg = inst->flag_subreg;
- inst->remove(block);
+ inst->remove(block, true);
progress = true;
}
break;
}
}
+ /* There is progress if and only if instructions were removed. */
+ assert(progress == (block->end_ip_delta != 0));
+
return progress;
}
progress = opt_cmod_propagation_local(devinfo, block) || progress;
}
- if (progress)
+ if (progress) {
+ cfg->adjust_block_ips();
+
invalidate_analysis(DEPENDENCY_INSTRUCTIONS);
+ }
return progress;
}