summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-11-03 11:24:03 -0800
committerMatt Turner <[email protected]>2014-12-01 16:42:13 -0800
commitb449366587b5f3f64c6fb45fe22c39e4bc8a4309 (patch)
tree8cbfd57d2ab4479573ac5c5599531bcd3ec11a4d /src/mesa/drivers/dri
parentb37273b92431a2d986235774f04a9fba2aa1bf74 (diff)
i965/fs: Remove opt_drop_redundant_mov_to_flags().
Dead code elimination now handles this. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp31
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h1
2 files changed, 0 insertions, 32 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 37015ec607b..5ed42339ad8 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -3419,35 +3419,6 @@ fs_visitor::calculate_register_pressure()
}
}
-/**
- * Look for repeated FS_OPCODE_MOV_DISPATCH_TO_FLAGS and drop the later ones.
- *
- * The needs_unlit_centroid_workaround ends up producing one of these per
- * channel of centroid input, so it's good to clean them up.
- *
- * An assumption here is that nothing ever modifies the dispatched pixels
- * value that FS_OPCODE_MOV_DISPATCH_TO_FLAGS reads from, but the hardware
- * dictates that anyway.
- */
-void
-fs_visitor::opt_drop_redundant_mov_to_flags()
-{
- bool flag_mov_found[2] = {false};
-
- foreach_block_and_inst_safe(block, fs_inst, inst, cfg) {
- if (inst->is_control_flow()) {
- memset(flag_mov_found, 0, sizeof(flag_mov_found));
- } else if (inst->opcode == FS_OPCODE_MOV_DISPATCH_TO_FLAGS) {
- if (!flag_mov_found[inst->flag_subreg])
- flag_mov_found[inst->flag_subreg] = true;
- else
- inst->remove(block);
- } else if (inst->writes_flag()) {
- flag_mov_found[inst->flag_subreg] = false;
- }
- }
-}
-
void
fs_visitor::optimize()
{
@@ -3459,8 +3430,6 @@ fs_visitor::optimize()
assign_constant_locations();
demote_pull_constants();
- opt_drop_redundant_mov_to_flags();
-
#define OPT(pass, args...) do { \
pass_num++; \
bool this_progress = pass(args); \
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 1deb7743cea..2e6296d4f23 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -422,7 +422,6 @@ public:
bool try_constant_propagate(fs_inst *inst, acp_entry *entry);
bool opt_copy_propagate_local(void *mem_ctx, bblock_t *block,
exec_list *acp);
- void opt_drop_redundant_mov_to_flags();
bool opt_register_renaming();
bool register_coalesce();
bool compute_to_mrf();