diff options
author | Kenneth Graunke <[email protected]> | 2014-09-03 23:29:04 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-09-05 09:52:38 -0700 |
commit | 6ff5bb24658c55c28e462c657816fda2d8e53a65 (patch) | |
tree | f067945d2067725e7988b0c39e9b55c4b8f11be9 /src | |
parent | 88d673bde685b07cf68829f54c5d5d4e28ba7c4e (diff) |
i965: Mark cfg dumping functions const.
The dump() methods don't alter the CFG or basic blocks, so we should
mark them as const. This lets you call them even if you have a const
cfg_t - which is the case in certain portions of the code (such as live
interval handling).
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_cfg.cpp | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_cfg.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mesa/drivers/dri/i965/brw_cfg.cpp index 8714b682be0..e67b13a86ef 100644 --- a/src/mesa/drivers/dri/i965/brw_cfg.cpp +++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp @@ -145,7 +145,7 @@ bblock_t::combine_with(bblock_t *that) } void -bblock_t::dump(backend_visitor *v) +bblock_t::dump(backend_visitor *v) const { int ip = this->start_ip; for (backend_instruction *inst = (backend_instruction *)this->start; @@ -420,7 +420,7 @@ cfg_t::make_block_array() } void -cfg_t::dump(backend_visitor *v) +cfg_t::dump(backend_visitor *v) const { foreach_block (block, this) { fprintf(stderr, "START B%d", block->num); diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h b/src/mesa/drivers/dri/i965/brw_cfg.h index ca6a2ac2d66..7985a9795ac 100644 --- a/src/mesa/drivers/dri/i965/brw_cfg.h +++ b/src/mesa/drivers/dri/i965/brw_cfg.h @@ -62,7 +62,7 @@ struct bblock_t { bool is_successor_of(const bblock_t *block) const; bool can_combine_with(const bblock_t *that) const; void combine_with(bblock_t *that); - void dump(backend_visitor *v); + void dump(backend_visitor *v) const; #endif struct exec_node link; @@ -100,7 +100,7 @@ struct cfg_t { void set_next_block(bblock_t **cur, bblock_t *block, int ip); void make_block_array(); - void dump(backend_visitor *v); + void dump(backend_visitor *v) const; #endif void *mem_ctx; |