aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2016-03-13 16:41:45 -0700
committerMatt Turner <[email protected]>2020-03-06 10:20:51 -0800
commita9cdc14f602144620c664f7f42ea2ba0eeb58720 (patch)
treee675978b8cf4893c21df9bbfd115b873bc4e54bb
parentd0433971f958be7d38cb96bfe226fbabdd7998e7 (diff)
intel/compiler: Pass single backend_shader argument to the vec4_live_variables constructor
The IR analysis framework requires the analysis result to be constructible with a single argument. Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4012>
-rw-r--r--src/intel/compiler/brw_vec4_live_variables.cpp7
-rw-r--r--src/intel/compiler/brw_vec4_live_variables.h4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/intel/compiler/brw_vec4_live_variables.cpp b/src/intel/compiler/brw_vec4_live_variables.cpp
index c2c66f71a33..200e41c24ac 100644
--- a/src/intel/compiler/brw_vec4_live_variables.cpp
+++ b/src/intel/compiler/brw_vec4_live_variables.cpp
@@ -215,9 +215,8 @@ vec4_live_variables::compute_start_end()
}
}
-vec4_live_variables::vec4_live_variables(const simple_allocator &alloc,
- cfg_t *cfg)
- : alloc(alloc), cfg(cfg)
+vec4_live_variables::vec4_live_variables(const backend_shader *s)
+ : alloc(s->alloc), cfg(s->cfg)
{
mem_ctx = ralloc_context(NULL);
@@ -282,7 +281,7 @@ vec4_visitor::calculate_live_intervals()
* The control flow-aware analysis was done at a channel level, while at
* this point we're distilling it down to vgrfs.
*/
- this->live_intervals = new(mem_ctx) vec4_live_variables(alloc, cfg);
+ this->live_intervals = new(mem_ctx) vec4_live_variables(this);
}
void
diff --git a/src/intel/compiler/brw_vec4_live_variables.h b/src/intel/compiler/brw_vec4_live_variables.h
index fab23ab534f..e2081e02423 100644
--- a/src/intel/compiler/brw_vec4_live_variables.h
+++ b/src/intel/compiler/brw_vec4_live_variables.h
@@ -31,6 +31,8 @@
#include "brw_ir_vec4.h"
#include "util/bitset.h"
+struct backend_shader;
+
namespace brw {
class vec4_live_variables {
@@ -63,7 +65,7 @@ public:
DECLARE_RALLOC_CXX_OPERATORS(vec4_live_variables)
- vec4_live_variables(const simple_allocator &alloc, cfg_t *cfg);
+ vec4_live_variables(const backend_shader *s);
~vec4_live_variables();
int num_vars;