diff --git a/src/intel/compiler/brw_opt_copy_propagation.cpp b/src/intel/compiler/brw_opt_copy_propagation.cpp index f8ac1c53183..9e6e83513f0 100644 --- a/src/intel/compiler/brw_opt_copy_propagation.cpp +++ b/src/intel/compiler/brw_opt_copy_propagation.cpp @@ -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(); diff --git a/src/intel/compiler/elk/elk_fs_copy_propagation.cpp b/src/intel/compiler/elk/elk_fs_copy_propagation.cpp index 9d388d8dae9..b3632a9db81 100644 --- a/src/intel/compiler/elk/elk_fs_copy_propagation.cpp +++ b/src/intel/compiler/elk/elk_fs_copy_propagation.cpp @@ -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();