aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-12-06 11:36:46 -0500
committerAlyssa Rosenzweig <[email protected]>2019-12-12 11:42:06 -0500
commite985ae25a6a19108e078260575f23c9cd0277632 (patch)
treee4668c231f8df5c454646cb71b506951a64b34ec
parentcacb4bc022ba7e4c0e61adcac9d77aa9c906f761 (diff)
pan/midgard: Remove spill cost heuristic
We do need some sort of a cost heuristic, but this one is just causing spilling to behave worse on shaders I'm looking at, and I don't need more noise in the spill implementation right now. Get it working first. We can optimize this later. Signed-off-by: Alyssa Rosenzweig <[email protected]>
-rw-r--r--src/panfrost/midgard/midgard_ra.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c
index d73d745213e..2e00aefb385 100644
--- a/src/panfrost/midgard/midgard_ra.c
+++ b/src/panfrost/midgard/midgard_ra.c
@@ -685,25 +685,6 @@ mir_choose_spill_node(
compiler_context *ctx,
struct lcra_state *l)
{
- /* Our first step is to calculate spill cost to figure out the best
- * spill node. All nodes are equal in spill cost, but we can't spill
- * nodes written to from an unspill */
-
- unsigned *cost = calloc(ctx->temp_count, sizeof(cost[0]));
-
- mir_foreach_instr_global(ctx, ins) {
- if (ins->dest < ctx->temp_count)
- cost[ins->dest]++;
-
- mir_foreach_src(ins, s) {
- if (ins->src[s] < ctx->temp_count)
- cost[ins->src[s]]++;
- }
- }
-
- for (unsigned i = 0; i < ctx->temp_count; ++i)
- lcra_set_node_spill_cost(l, i, cost[i]);
-
/* We can't spill a previously spilled value or an unspill */
mir_foreach_instr_global(ctx, ins) {
@@ -720,8 +701,6 @@ mir_choose_spill_node(
}
}
- free(cost);
-
return lcra_get_best_spill_node(l);
}