summaryrefslogtreecommitdiffstats
path: root/src/util/register_allocate.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-24 11:19:21 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-25 06:14:12 -0700
commitb2a3ca6bd5008638acb3c0797a5658be67b96d86 (patch)
treec55a5b0c879991ca0756739fbc8102f4414c658f /src/util/register_allocate.c
parent688d9b4fb7377466222be68b498ea9f151a54db3 (diff)
util/ra: Add a getter for a node class
Complements the existing getters and the setter for node class. To be used in the Panfrost RA refactor. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/util/register_allocate.c')
-rw-r--r--src/util/register_allocate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c
index fe00af67283..b23bb377292 100644
--- a/src/util/register_allocate.c
+++ b/src/util/register_allocate.c
@@ -558,6 +558,13 @@ ra_set_node_class(struct ra_graph *g,
}
unsigned int
+ra_get_node_class(struct ra_graph *g,
+ unsigned int n)
+{
+ return g->nodes[n].class;
+}
+
+unsigned int
ra_add_node(struct ra_graph *g, unsigned int class)
{
unsigned int n = g->count;