vec4_visitor::dead_code_eliminate()
{
bool progress = false;
- bool seen_control_flow = false;
int pc = -1;
calculate_live_intervals();
pc++;
- seen_control_flow = inst->is_control_flow() || seen_control_flow;
-
bool inst_writes_flag = false;
if (inst->dst.file != GRF) {
if (inst->dst.is_null() && inst->writes_flag()) {
progress;
}
- if (seen_control_flow || inst->predicate || inst->prev == NULL)
+ if (inst->predicate || inst->prev == NULL)
continue;
int dead_channels;
node = prev, prev = prev->prev) {
vec4_instruction *scan_inst = (vec4_instruction *)node;
+ if (scan_inst->is_control_flow())
+ break;
+
if (inst_writes_flag) {
if (scan_inst->dst.is_null() && scan_inst->writes_flag()) {
scan_inst->remove();