diff options
author | Francisco Jerez <[email protected]> | 2016-03-13 16:41:23 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2020-03-06 10:20:49 -0800 |
commit | d0433971f958be7d38cb96bfe226fbabdd7998e7 (patch) | |
tree | 8a10da244038825773a1d3d19396240e9ca640c5 /src/intel | |
parent | d7e84cbb0f0530bb3e065bd522e5e1814373f589 (diff) |
intel/compiler: Pass single backend_shader argument to the fs_live_variables constructor
This removes the dependency of fs_live_variables on fs_visitor. The
IR analysis framework requires the analysis result to be constructible
with a single argument -- The second argument was redundant anyway.
Reviewed-by: Matt Turner <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4012>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/compiler/brw_fs_live_variables.cpp | 14 | ||||
-rw-r--r-- | src/intel/compiler/brw_fs_live_variables.h | 7 |
2 files changed, 10 insertions, 11 deletions
diff --git a/src/intel/compiler/brw_fs_live_variables.cpp b/src/intel/compiler/brw_fs_live_variables.cpp index 1befc5a8429..8554296f230 100644 --- a/src/intel/compiler/brw_fs_live_variables.cpp +++ b/src/intel/compiler/brw_fs_live_variables.cpp @@ -126,7 +126,7 @@ fs_live_variables::setup_def_use() } } - bd->flag_use[0] |= inst->flags_read(v->devinfo) & ~bd->flag_def[0]; + bd->flag_use[0] |= inst->flags_read(devinfo) & ~bd->flag_def[0]; /* Set def[] for this instruction */ if (inst->dst.file == VGRF) { @@ -255,22 +255,22 @@ fs_live_variables::compute_start_end() } } -fs_live_variables::fs_live_variables(fs_visitor *v, const cfg_t *cfg) - : v(v), cfg(cfg) +fs_live_variables::fs_live_variables(const backend_shader *s) + : devinfo(s->devinfo), cfg(s->cfg) { mem_ctx = ralloc_context(NULL); - num_vgrfs = v->alloc.count; + num_vgrfs = s->alloc.count; num_vars = 0; var_from_vgrf = rzalloc_array(mem_ctx, int, num_vgrfs); for (int i = 0; i < num_vgrfs; i++) { var_from_vgrf[i] = num_vars; - num_vars += v->alloc.sizes[i]; + num_vars += s->alloc.sizes[i]; } vgrf_from_var = rzalloc_array(mem_ctx, int, num_vars); for (int i = 0; i < num_vgrfs; i++) { - for (unsigned j = 0; j < v->alloc.sizes[i]; j++) { + for (unsigned j = 0; j < s->alloc.sizes[i]; j++) { vgrf_from_var[var_from_vgrf[i] + j] = i; } } @@ -342,7 +342,7 @@ fs_visitor::calculate_live_intervals() if (this->live_intervals) return; - this->live_intervals = new(mem_ctx) fs_live_variables(this, cfg); + this->live_intervals = new(mem_ctx) fs_live_variables(this); } bool diff --git a/src/intel/compiler/brw_fs_live_variables.h b/src/intel/compiler/brw_fs_live_variables.h index 655245cd74a..9d59620aed5 100644 --- a/src/intel/compiler/brw_fs_live_variables.h +++ b/src/intel/compiler/brw_fs_live_variables.h @@ -32,7 +32,7 @@ #include "util/bitset.h" struct cfg_t; -class fs_visitor; +struct backend_shader; namespace brw { @@ -78,7 +78,7 @@ public: DECLARE_RALLOC_CXX_OPERATORS(fs_live_variables) - fs_live_variables(fs_visitor *v, const cfg_t *cfg); + fs_live_variables(const backend_shader *s); ~fs_live_variables(); bool vars_interfere(int a, int b) const; @@ -130,10 +130,9 @@ protected: void compute_live_variables(); void compute_start_end(); - fs_visitor *v; + const struct gen_device_info *devinfo; const cfg_t *cfg; void *mem_ctx; - }; } /* namespace brw */ |