diff options
author | Matt Turner <[email protected]> | 2013-11-26 15:25:44 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2013-12-04 20:05:42 -0800 |
commit | c6450fa963b7eefbbc0ba5e00d42f1a4efba092b (patch) | |
tree | c714417690db50cf8a0ef7af51cd9a44e3bb9de3 /src/mesa | |
parent | f3bce19f6c85e2b38c5562e6f4f9d71521fa369f (diff) |
i965/cfg: Throw out confusing make_list method.
make_list is just a one-line wrapper and was confusingly called by
NULL objects. E.g., cur_if == NULL; cur_if->make_list(mem_ctx).
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_cfg.cpp | 20 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_cfg.h | 2 |
2 files changed, 7 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mesa/drivers/dri/i965/brw_cfg.cpp index 0bd3ce3bdf5..7468c5bbde9 100644 --- a/src/mesa/drivers/dri/i965/brw_cfg.cpp +++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp @@ -60,14 +60,8 @@ bblock_t::bblock_t() : void bblock_t::add_successor(void *mem_ctx, bblock_t *successor) { - successor->parents.push_tail(this->make_list(mem_ctx)); - children.push_tail(successor->make_list(mem_ctx)); -} - -bblock_link * -bblock_t::make_list(void *mem_ctx) -{ - return new(mem_ctx) bblock_link(this); + successor->parents.push_tail(new(mem_ctx) bblock_link(this)); + children.push_tail(new(mem_ctx) bblock_link(successor)); } void @@ -126,8 +120,8 @@ cfg_t::create(void *parent_mem_ctx, exec_list *instructions) /* Push our information onto a stack so we can recover from * nested ifs. */ - if_stack.push_tail(cur_if->make_list(mem_ctx)); - else_stack.push_tail(cur_else->make_list(mem_ctx)); + if_stack.push_tail(new(mem_ctx) bblock_link(cur_if)); + else_stack.push_tail(new(mem_ctx) bblock_link(cur_else)); cur_if = cur; cur_else = NULL; @@ -205,8 +199,8 @@ cfg_t::create(void *parent_mem_ctx, exec_list *instructions) /* Push our information onto a stack so we can recover from * nested loops. */ - do_stack.push_tail(cur_do->make_list(mem_ctx)); - while_stack.push_tail(cur_while->make_list(mem_ctx)); + do_stack.push_tail(new(mem_ctx) bblock_link(cur_do)); + while_stack.push_tail(new(mem_ctx) bblock_link(cur_while)); /* Set up the block just after the while. Don't know when exactly * it will start, yet. @@ -290,7 +284,7 @@ cfg_t::set_next_block(bblock_t *block) block->start_ip = ip; block->block_num = num_blocks++; - block_list.push_tail(block->make_list(mem_ctx)); + block_list.push_tail(new(mem_ctx) bblock_link(block)); cur = block; } diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h b/src/mesa/drivers/dri/i965/brw_cfg.h index f6b793445c6..4b87089d106 100644 --- a/src/mesa/drivers/dri/i965/brw_cfg.h +++ b/src/mesa/drivers/dri/i965/brw_cfg.h @@ -43,8 +43,6 @@ class bblock_t { public: DECLARE_RALLOC_CXX_OPERATORS(bblock_t) - bblock_link *make_list(void *mem_ctx); - bblock_t(); void add_successor(void *mem_ctx, bblock_t *successor); |