Commit e13a5c7d authored by Ian Romanick's avatar Ian Romanick

intel/fs: Allow cmod propagation across reads and writes of different flags

This also helps a later patch (intel/fs: Improve discard_if code
generation) on about 200 shaders.

v2: Document that other instruction sequences are also valid in
subtract_merge_with_compare_intervening_mismatch_flag_write.  Suggested
by Caio.

All Intel platforms had similar results. (Ice Lake shown)
total instructions in shared programs: 17224438 -> 17224434 (<.01%)
instructions in affected programs: 296 -> 292 (-1.35%)
helped: 4
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.99% max: 1.92% x̄: 1.43% x̃: 1.40%
95% mean confidence interval for instructions value: -1.00 -1.00
95% mean confidence interval for instructions %-change: -2.04% -0.81%
Instructions are helped.

total cycles in shared programs: 361468455 -> 361468458 (<.01%)
cycles in affected programs: 2862 -> 2865 (0.10%)
helped: 2
HURT: 2
helped stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2
helped stats (rel) min: 0.24% max: 0.39% x̄: 0.31% x̃: 0.31%
HURT stats (abs)   min: 3 max: 4 x̄: 3.50 x̃: 3
HURT stats (rel)   min: 0.32% max: 0.70% x̄: 0.51% x̃: 0.51%
95% mean confidence interval for cycles value: -4.34 5.84
95% mean confidence interval for cycles %-change: -0.70% 0.90%
Inconclusive result (value mean confidence interval includes 0).
Reviewed-by: Caio Marcelo de Oliveira Filho's avatarCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
parent 8030cb75
......@@ -114,10 +114,11 @@ cmod_propagate_cmp_to_add(const gen_device_info *devinfo, bblock_t *block,
}
not_match:
if (scan_inst->flags_written())
if ((scan_inst->flags_written() & flags_written) != 0)
break;
read_flag = read_flag || scan_inst->flags_read(devinfo);
read_flag = read_flag ||
(scan_inst->flags_read(devinfo) & flags_written) != 0;
}
return false;
......@@ -180,10 +181,11 @@ cmod_propagate_not(const gen_device_info *devinfo, bblock_t *block,
break;
}
if (scan_inst->flags_written())
if ((scan_inst->flags_written() & flags_written) != 0)
break;
read_flag = read_flag || scan_inst->flags_read(devinfo);
read_flag = read_flag ||
(scan_inst->flags_read(devinfo) & flags_written) != 0;
}
return false;
......@@ -423,10 +425,11 @@ opt_cmod_propagation_local(const gen_device_info *devinfo, bblock_t *block)
break;
}
if (scan_inst->flags_written())
if ((scan_inst->flags_written() & flags_written) != 0)
break;
read_flag = read_flag || scan_inst->flags_read(devinfo);
read_flag = read_flag ||
(scan_inst->flags_read(devinfo) & flags_written) != 0;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment