intel/compiler: Use linear allocator for ACP trees in copy-prop
Replace usage of variable length array. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Antonio Ospite <None> Reviewed-by: Kenneth Graunke <None> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32916>
This commit is contained in:
@@ -143,6 +143,8 @@ private:
|
||||
};
|
||||
|
||||
struct acp {
|
||||
DECLARE_LINEAR_ALLOC_CXX_OPERATORS(acp);
|
||||
|
||||
struct rb_tree by_dst;
|
||||
struct rb_tree by_src;
|
||||
|
||||
@@ -1420,7 +1422,7 @@ brw_opt_copy_propagation(fs_visitor &s)
|
||||
bool progress = false;
|
||||
void *copy_prop_ctx = ralloc_context(NULL);
|
||||
linear_ctx *lin_ctx = linear_context(copy_prop_ctx);
|
||||
struct acp out_acp[s.cfg->num_blocks];
|
||||
struct acp *out_acp = new (lin_ctx) acp[s.cfg->num_blocks];
|
||||
|
||||
const fs_live_variables &live = s.live_analysis.require();
|
||||
|
||||
|
@@ -143,6 +143,8 @@ private:
|
||||
};
|
||||
|
||||
struct acp {
|
||||
DECLARE_LINEAR_ALLOC_CXX_OPERATORS(acp);
|
||||
|
||||
struct rb_tree by_dst;
|
||||
struct rb_tree by_src;
|
||||
|
||||
@@ -1350,7 +1352,7 @@ elk_fs_visitor::opt_copy_propagation()
|
||||
bool progress = false;
|
||||
void *copy_prop_ctx = ralloc_context(NULL);
|
||||
linear_ctx *lin_ctx = linear_context(copy_prop_ctx);
|
||||
struct acp out_acp[cfg->num_blocks];
|
||||
struct acp *out_acp = new (lin_ctx) acp[cfg->num_blocks];
|
||||
|
||||
const fs_live_variables &live = live_analysis.require();
|
||||
|
||||
|
Reference in New Issue
Block a user