intel/brw: Delay liveness calculations in saturate propagation
Wait and see if we actually have a candidate for saturate propagation before requesting liveness info. Saves the calculation in the case where we have nothing to do. Cuts compile time in Borderlands 3 by -0.304754% +/- 0.194162% (n=25). Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29849>
This commit is contained in:
@@ -45,7 +45,7 @@ using namespace brw;
|
||||
*/
|
||||
|
||||
static bool
|
||||
opt_saturate_propagation_local(const fs_live_variables &live, bblock_t *block)
|
||||
opt_saturate_propagation_local(fs_visitor &s, bblock_t *block)
|
||||
{
|
||||
bool progress = false;
|
||||
int ip = block->end_ip + 1;
|
||||
@@ -61,6 +61,7 @@ opt_saturate_propagation_local(const fs_live_variables &live, bblock_t *block)
|
||||
inst->src[0].abs)
|
||||
continue;
|
||||
|
||||
const fs_live_variables &live = s.live_analysis.require();
|
||||
int src_var = live.var_from_reg(inst->src[0]);
|
||||
int src_end_ip = live.end[src_var];
|
||||
|
||||
@@ -150,11 +151,10 @@ opt_saturate_propagation_local(const fs_live_variables &live, bblock_t *block)
|
||||
bool
|
||||
brw_fs_opt_saturate_propagation(fs_visitor &s)
|
||||
{
|
||||
const fs_live_variables &live = s.live_analysis.require();
|
||||
bool progress = false;
|
||||
|
||||
foreach_block (block, s.cfg) {
|
||||
progress = opt_saturate_propagation_local(live, block) || progress;
|
||||
progress = opt_saturate_propagation_local(s, block) || progress;
|
||||
}
|
||||
|
||||
/* Live intervals are still valid. */
|
||||
|
||||
Reference in New Issue
Block a user