On Monday, January 19, 2015 03:31:09 PM Matt Turner wrote:
> ---
> src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
> b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
> index 81be4de..d66808b 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
> @@ -85,6 +85,17 @@ fs_visitor::dead_code_eliminate()
> }
> }
>
> + if ((inst->opcode != BRW_OPCODE_IF &&
> + inst->opcode != BRW_OPCODE_WHILE) &&
> + inst->dst.is_null() &&
> + !inst->has_side_effects() &&
> + !inst->writes_flag() &&
> + !inst->writes_accumulator) {
> + inst->opcode = BRW_OPCODE_NOP;
> + progress = true;
> + continue;
> + }
> +
> if (inst->dst.file == GRF) {
> if (!inst->is_partial_write()) {
> int var = live_intervals->var_from_reg(inst->dst);
> Seems like these should be handled too... - BRW_OPCODE_ELSE - FS_OPCODE_DISCARD_JUMP - FS_OPCODE_PLACEHOLDER_HALT - SHADER_OPCODE_SHADER_TIME_ADD - SHADER_OPCODE_GEN4_SCRATCH_READ - SHADER_OPCODE_GEN4_SCRATCH_WRITE - SHADER_OPCODE_GEN7_SCRATCH_READ Maybe some of these should be added to has_side_effects()? I'm kind of surprised you didn't see regressions in Piglit...maybe I'm missing something.
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
