broadcom/compiler: simplify node/temp translation during register allocation
Now that we don't sort our nodes we can arrange them so we can easily translate between nodes and temps without a mapping table, just applying an offset. To do this we have a single array of nodes where twe put first the nodes for accumulators and then the nodes for temps. With this setup we can ensure that for any given temp T, its node is always T + ACC_COUNT. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15168>
This commit is contained in:

committed by
Marge Bot

parent
871b0a7f6a
commit
f761f8fd9e
@@ -592,20 +592,11 @@ struct v3d_interp_input {
|
||||
unsigned mode; /* interpolation mode */
|
||||
};
|
||||
|
||||
/* Data types used during register allocation to map nodes and temps */
|
||||
struct node_to_temp_map {
|
||||
uint32_t temp;
|
||||
uint32_t priority;
|
||||
};
|
||||
|
||||
struct temp_to_node_map {
|
||||
uint32_t node;
|
||||
uint8_t class_bits;
|
||||
};
|
||||
|
||||
struct v3d_ra_temp_node_info {
|
||||
struct node_to_temp_map *node;
|
||||
struct temp_to_node_map *temp;
|
||||
struct v3d_ra_node_info {
|
||||
struct {
|
||||
uint32_t priority;
|
||||
uint8_t class_bits;
|
||||
} *info;
|
||||
uint32_t alloc_count;
|
||||
};
|
||||
|
||||
@@ -807,7 +798,7 @@ struct v3d_compile {
|
||||
|
||||
/* Used during register allocation */
|
||||
int thread_index;
|
||||
struct v3d_ra_temp_node_info ra_map;
|
||||
struct v3d_ra_node_info nodes;
|
||||
struct ra_graph *g;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user