aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/ir3/ir3_sched.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-12-18 14:04:36 -0800
committerMarge Bot <[email protected]>2020-02-01 02:40:22 +0000
commit304b50c9f8f57a115ac251f022093c8adfb0823d (patch)
tree3ed5106c595b1e0f369961b97d76e48d8bcffd1f /src/freedreno/ir3/ir3_sched.c
parent093c94456bc99308bd80bcc952d1f77ea71a831c (diff)
freedreno/ir3: move block-scheduling into legalize
We want to do this only once. If we have post-RA sched pass, then we don't want to do it pre-RA. Since legalize is where we resolve the branch/jumps, we might as well move this into legalize. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3569>
Diffstat (limited to 'src/freedreno/ir3/ir3_sched.c')
-rw-r--r--src/freedreno/ir3/ir3_sched.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/freedreno/ir3/ir3_sched.c b/src/freedreno/ir3/ir3_sched.c
index 13ec6e023ac..986c80e4940 100644
--- a/src/freedreno/ir3/ir3_sched.c
+++ b/src/freedreno/ir3/ir3_sched.c
@@ -761,48 +761,6 @@ sched_block(struct ir3_sched_ctx *ctx, struct ir3_block *block)
}
}
}
-
- /* And lastly, insert branch/jump instructions to take us to
- * the next block. Later we'll strip back out the branches
- * that simply jump to next instruction.
- */
- if (block->successors[1]) {
- /* if/else, conditional branches to "then" or "else": */
- struct ir3_instruction *br;
-
- debug_assert(ctx->pred);
- debug_assert(block->condition);
-
- /* create "else" branch first (since "then" block should
- * frequently/always end up being a fall-thru):
- */
- br = ir3_BR(block);
- br->cat0.inv = true;
- br->cat0.target = block->successors[1];
-
- /* NOTE: we have to hard code delay of 6 above, since
- * we want to insert the nop's before constructing the
- * branch. Throw in an assert so we notice if this
- * ever breaks on future generation:
- */
- debug_assert(ir3_delayslots(ctx->pred, br, 0) == 6);
-
- br = ir3_BR(block);
- br->cat0.target = block->successors[0];
-
- } else if (block->successors[0]) {
- /* otherwise unconditional jump to next block: */
- struct ir3_instruction *jmp;
-
- jmp = ir3_JUMP(block);
- jmp->cat0.target = block->successors[0];
- }
-
- /* NOTE: if we kept track of the predecessors, we could do a better
- * job w/ (jp) flags.. every node w/ > predecessor is a join point.
- * Note that as we eliminate blocks which contain only an unconditional
- * jump we probably need to propagate (jp) flag..
- */
}
int ir3_sched(struct ir3 *ir)