aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/ir3/ir3_ra.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-12-13 14:09:39 -0800
committerMarge Bot <[email protected]>2020-02-01 02:40:22 +0000
commit0f78c32492ed096649b015a4967d6d56c18dd14a (patch)
tree1912b19e653107713582762f3116fa8992a7eb73 /src/freedreno/ir3/ir3_ra.c
parent3369406e44b0226295e7475e189da2e42efd7f22 (diff)
freedreno/ir3: post-RA sched pass
After RA, we can schedule to increase parallelism (reduce nop's) without worrying about increasing register pressure. This pass lets us cut down the instruction count ~10%, and prioritize bary.f, kill, etc, which would tend to increase register pressure if we tried to do that before RA. It should be more useful if RA round-robin'd register choices. 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_ra.c')
-rw-r--r--src/freedreno/ir3/ir3_ra.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c
index 823968a5cec..0d1028a76d7 100644
--- a/src/freedreno/ir3/ir3_ra.c
+++ b/src/freedreno/ir3/ir3_ra.c
@@ -385,14 +385,11 @@ size_to_class(unsigned sz, bool half, bool high)
static bool
writes_gpr(struct ir3_instruction *instr)
{
- if (is_store(instr))
- return false;
- if (instr->regs_count == 0)
+ if (dest_regs(instr) == 0)
return false;
/* is dest a normal temp register: */
struct ir3_register *reg = instr->regs[0];
- if (reg->flags & (IR3_REG_CONST | IR3_REG_IMMED))
- return false;
+ debug_assert(!(reg->flags & (IR3_REG_CONST | IR3_REG_IMMED)));
if ((reg->num == regid(REG_A0, 0)) ||
(reg->num == regid(REG_P0, 0)))
return false;