diff options
author | Connor Abbott <[email protected]> | 2014-07-31 18:57:20 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-08-13 11:43:05 -0700 |
commit | 9a0b52e7c1c0d7668e1acd7bb806432bb449a9c7 (patch) | |
tree | 0700c2e5e02864cd055f4c91827106b21940e49d /src/mesa/program/register_allocate.c | |
parent | d72d67832bd7a5f2aa0c402333a7de6804ad35ef (diff) |
ra: cleanup the public API
Previously, there were 3 entrypoints into parts of the actual allocator,
and an API called ra_allocate_no_spills() that called all 3. Nobody
would ever want to call any of the 3 entrypoints by themselves, so
everybody just used ra_allocate_no_spills(). So just make them static
functions, and while we're at it rename ra_allocate_no_spills() to
ra_allocate() since there's no equivalent "with spills," because the
backend is supposed to handle spilling.
Signed-off-by: Connor Abbott <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/program/register_allocate.c')
-rw-r--r-- | src/mesa/program/register_allocate.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/program/register_allocate.c b/src/mesa/program/register_allocate.c index 549154e8a93..e0f04cf6269 100644 --- a/src/mesa/program/register_allocate.c +++ b/src/mesa/program/register_allocate.c @@ -440,7 +440,7 @@ pq_test(struct ra_graph *g, unsigned int n) * means that either spilling will be required, or optimistic coloring * should be applied. */ -bool +static bool ra_simplify(struct ra_graph *g) { bool progress = true; @@ -477,7 +477,7 @@ ra_simplify(struct ra_graph *g) * If all nodes were trivially colorable, then this must succeed. If * not (optimistic coloring), then it may return false; */ -bool +static bool ra_select(struct ra_graph *g) { int i; @@ -530,7 +530,7 @@ ra_select(struct ra_graph *g) * locally-colorable and the rest of the register allocation * will succeed. */ -void +static void ra_optimistic_color(struct ra_graph *g) { unsigned int i; @@ -547,7 +547,7 @@ ra_optimistic_color(struct ra_graph *g) } bool -ra_allocate_no_spills(struct ra_graph *g) +ra_allocate(struct ra_graph *g) { if (!ra_simplify(g)) { ra_optimistic_color(g); @@ -618,11 +618,11 @@ ra_get_best_spill_node(struct ra_graph *g) /* For any registers not in the stack to be colored, consider them for * spilling. This will mostly collect nodes that were being optimistally - * colored as part of ra_allocate_no_spills() if we didn't successfully + * colored as part of ra_allocate() if we didn't successfully * optimistically color. * * It also includes nodes not trivially colorable by ra_simplify() if it - * was used directly instead of as part of ra_allocate_no_spills(). + * was used directly instead of as part of ra_allocate(). */ for (n = 0; n < g->count; n++) { float cost = g->nodes[n].spill_cost; |