2 * Copyright © 2012 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 * Eric Anholt <eric@anholt.net>
28 #include "brw_shader.h"
32 class bblock_link
: public exec_node
{
34 bblock_link(bblock_t
*block
)
44 DECLARE_RALLOC_CXX_OPERATORS(bblock_t
)
48 void add_successor(void *mem_ctx
, bblock_t
*successor
);
49 void dump(backend_visitor
*v
);
51 backend_instruction
*start
;
52 backend_instruction
*end
;
61 /* If the current basic block ends in an IF, ELSE, or ENDIF instruction,
62 * these pointers will hold the locations of the other associated control
65 * Otherwise they are NULL.
67 backend_instruction
*if_inst
;
68 backend_instruction
*else_inst
;
69 backend_instruction
*endif_inst
;
74 DECLARE_RALLOC_CXX_OPERATORS(cfg_t
)
76 cfg_t(exec_list
*instructions
);
79 bblock_t
*new_block();
80 void set_next_block(bblock_t
**cur
, bblock_t
*block
, int ip
);
81 void make_block_array();
83 void dump(backend_visitor
*v
);
87 /** Ordered list (by ip) of basic blocks */