diff options
author | Matt Turner <[email protected]> | 2014-07-12 17:49:32 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-08-22 10:23:34 -0700 |
commit | e0aa45768c6bda947b645ae6962054673937a55f (patch) | |
tree | 3d564178ac99869ade3d77a719da45f28384ccfd /src/mesa | |
parent | 3d6d4dc6f7f90d65982073294a41afac8397f68a (diff) |
i965: Add invalidate_cfg parameter to invalidate_live_intervals().
Will let us avoid invalidating the CFG if the optimization pass has
removed instructions using the new basic block methods.
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp | 5 |
5 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index d0422c3d413..e42b93ad901 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -328,7 +328,7 @@ public: void move_uniform_array_access_to_pull_constants(); void assign_constant_locations(); void demote_pull_constants(); - void invalidate_live_intervals(); + void invalidate_live_intervals(bool invalidate_cfg = true); void calculate_live_intervals(); void calculate_register_pressure(); bool opt_algebraic(); diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp index c964505c414..e7ecb0fefda 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp @@ -290,12 +290,13 @@ fs_live_variables::~fs_live_variables() } void -fs_visitor::invalidate_live_intervals() +fs_visitor::invalidate_live_intervals(bool __invalidate_cfg) { ralloc_free(live_intervals); live_intervals = NULL; - invalidate_cfg(); + if (__invalidate_cfg) + invalidate_cfg(); } /** diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h index 35a2b9635a3..342cdb3d635 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.h +++ b/src/mesa/drivers/dri/i965/brw_shader.h @@ -182,7 +182,7 @@ public: void assign_common_binding_table_offsets(uint32_t next_binding_table_offset); - virtual void invalidate_live_intervals() = 0; + virtual void invalidate_live_intervals(bool invalidate_cfg = true) = 0; }; uint32_t brw_texture_offset(struct gl_context *ctx, ir_constant *offset); diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index f0239cb998a..f8313c1cfce 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -378,7 +378,7 @@ public: void split_uniform_registers(); void pack_uniform_registers(); void calculate_live_intervals(); - void invalidate_live_intervals(); + void invalidate_live_intervals(bool invalidate_cfg = true); void split_virtual_grfs(); bool opt_reduce_swizzle(); bool dead_code_eliminate(); diff --git a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp index 5bc5d7737de..7cd1dd65bd3 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp @@ -268,11 +268,12 @@ vec4_visitor::calculate_live_intervals() } void -vec4_visitor::invalidate_live_intervals() +vec4_visitor::invalidate_live_intervals(bool __invalidate_cfg) { live_intervals_valid = false; - invalidate_cfg(); + if (__invalidate_cfg) + invalidate_cfg(); } bool |