diff options
author | Francisco Jerez <[email protected]> | 2016-03-09 16:56:29 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2020-03-06 10:20:23 -0800 |
commit | 06c5c4964621268f2dedd63a614ff89f4307057b (patch) | |
tree | 8eb5d25688d223dcca5a8bc533d01d8f8c67be6f /src/intel/compiler/brw_vec4_live_variables.cpp | |
parent | 310aef6b590d3d129b285ff8c50565af8cebacbc (diff) |
intel/compiler: Nest definition of live variables block_data structures
When this commit was originally written, these two structures had the
exact same name. Subsequently in commit 12a8f2616a2f (intel/compiler:
Fix C++ one definition rule violations) they were renamed.
Original commit message:
> These two structures have exactly the same name which prevents the two
> files from being included at the same time and could cause serious
> trouble in the future if it ever leads to a (silent) violation of the
> C++ one definition rule.
Reviewed-by: Matt Turner <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4012>
Diffstat (limited to 'src/intel/compiler/brw_vec4_live_variables.cpp')
-rw-r--r-- | src/intel/compiler/brw_vec4_live_variables.cpp | 11 |
1 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 6c38e8dcae3..5e3ab6c29e7 100644 --- a/src/intel/compiler/brw_vec4_live_variables.cpp +++ b/src/intel/compiler/brw_vec4_live_variables.cpp @@ -71,7 +71,7 @@ vec4_live_variables::setup_def_use() assert(cfg->blocks[block->num - 1]->end_ip == ip - 1); foreach_inst_in_block(vec4_instruction, inst, block) { - struct vec4_block_data *bd = &block_data[block->num]; + struct block_data *bd = &block_data[block->num]; /* Set use[] for this instruction */ for (unsigned int i = 0; i < 3; i++) { @@ -137,11 +137,11 @@ vec4_live_variables::compute_live_variables() cont = false; foreach_block_reverse (block, cfg) { - struct vec4_block_data *bd = &block_data[block->num]; + struct block_data *bd = &block_data[block->num]; /* Update liveout */ foreach_list_typed(bblock_link, child_link, link, &block->children) { - struct vec4_block_data *child_bd = &block_data[child_link->block->num]; + struct block_data *child_bd = &block_data[child_link->block->num]; for (int i = 0; i < bitset_words; i++) { BITSET_WORD new_liveout = (child_bd->livein[i] & @@ -187,7 +187,7 @@ vec4_live_variables::vec4_live_variables(const simple_allocator &alloc, mem_ctx = ralloc_context(NULL); num_vars = alloc.total_size * 8; - block_data = rzalloc_array(mem_ctx, struct vec4_block_data, cfg->num_blocks); + block_data = rzalloc_array(mem_ctx, struct block_data, cfg->num_blocks); bitset_words = BITSET_WORDS(num_vars); for (int i = 0; i < cfg->num_blocks; i++) { @@ -288,7 +288,8 @@ vec4_visitor::calculate_live_intervals() this->live_intervals = new(mem_ctx) vec4_live_variables(alloc, cfg); foreach_block (block, cfg) { - struct vec4_block_data *bd = &live_intervals->block_data[block->num]; + const struct vec4_live_variables::block_data *bd = + &live_intervals->block_data[block->num]; for (int i = 0; i < live_intervals->num_vars; i++) { if (BITSET_TEST(bd->livein, i)) { |