nir/vtn: add support for phi nodes

This commit is contained in:
Connor Abbott
2015-06-23 10:34:55 -07:00
parent fe1269cf28
commit dee4a94e69
2 changed files with 129 additions and 0 deletions

View File

@@ -60,6 +60,8 @@ struct vtn_function {
nir_function_overload *overload;
struct vtn_block *start_block;
const uint32_t *end;
};
typedef bool (*vtn_instruction_handler)(struct vtn_builder *, uint32_t,
@@ -118,6 +120,12 @@ struct vtn_builder {
*/
struct hash_table *const_table;
/*
* Map from nir_block to the vtn_block which ends with it -- used for
* handling phi nodes.
*/
struct hash_table *block_table;
unsigned value_id_bound;
struct vtn_value *values;