util/ra: move NO_REG to header
In the select_reg callback, I want to be able to determine if a given node is already assigned, and if so what physical register has been assigned. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4071>
This commit is contained in:
parent
36aed70b59
commit
dd2e050a84
|
@ -78,8 +78,6 @@
|
|||
#include "util/bitset.h"
|
||||
#include "register_allocate.h"
|
||||
|
||||
#define NO_REG ~0U
|
||||
|
||||
struct ra_reg {
|
||||
BITSET_WORD *conflicts;
|
||||
unsigned int *conflict_list;
|
||||
|
|
|
@ -114,6 +114,10 @@ void ra_reset_node_interference(struct ra_graph *g, unsigned int n);
|
|||
/** @{ Graph-coloring register allocation */
|
||||
bool ra_allocate(struct ra_graph *g);
|
||||
|
||||
#define NO_REG ~0U
|
||||
/**
|
||||
* Returns NO_REG for a node that has not (yet) been assigned.
|
||||
*/
|
||||
unsigned int ra_get_node_reg(struct ra_graph *g, unsigned int n);
|
||||
void ra_set_node_reg(struct ra_graph * g, unsigned int n, unsigned int reg);
|
||||
void ra_set_node_spill_cost(struct ra_graph *g, unsigned int n, float cost);
|
||||
|
|
Loading…
Reference in New Issue