TODO: Move me to front of series.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/helpers.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/panfrost/midgard/helpers.h b/src/panfrost/midgard/helpers.h
index ac58fd50327..343fad0fea8 100644
--- a/src/panfrost/midga
We don't actually do any scheduling here yet, but add per-tag helpers to
consume an instruction, print it, pop it off the worklist.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 190
1 file changed, 190 insertions(+)
diff --git a/src/pan
This flows naturally from the dependency graph
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/src/panfrost/midgard/midgard_schedule.c
b/src/panfrost/midgard/midgard_schedule.c
index 70fa030390c.
It's not always obvious what the optimal bundle type should be. Let's
break out the logic to decide.
Currently set for purely in-order operation.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 25 +
1 file changed, 25 insertions(+)
diff -
In the future, this routine will implement the core scheduling logic to
decide which instruction out of the worklist will be scheduled next, in
a way that minimizes cycle count and register pressure.
In the present, we are more interested in replicating in-order
scheduling with the much-more-power
This allows node_count to be correct while scheduling.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/panfrost/midgard/midgard_schedule.c
b/src/panfrost/midgard/midgard_schedule.c
index b8d9b5ec9be..2ed25da2e0
After we've chosen an instruction, popped it off, and processed it, it's
time to update the worklist, removing that instruction from the
dependency graph to allow its dependents to be put onto the worklist.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 39 +++
A bit of a kludge but allows setting an implicit dependency of synthetic
conditional moves on the actual condition, fixing code generated like:
vmul.feq r0, ..
sadd.imov r31, .., r0
vadd.fcsel [...]
The imov runs simultaneous with feq so it gets garbage results, but it's
too late to add
This allows ALUs to select for each unit of the bundle separately.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/src/panfrost/midgard/midgard_schedule.c
b/src/panfrost/midgard/midgard_schedule.c
index 4c
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_compile.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/panfrost/midgard/midgard_compile.c
b/src/panfrost/midgard/midgard_compile.c
index 585591d9356..95ec48e9563 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++
In the future, we will want to keep track of which components of
constants of various sizes correspond to which parts of the bundle
constants, like in the old scheduler. For now, let's just stub it out
for a simple rule of one instruction with embedded constants per bundle.
We can eventually do bet
We require chosen instructions to be "close", to avoid ballooning
register pressure. This is a kludge that will go away once we have
proper liveness tracking in the scheduler, but for now it prevents a lot
of needless spilling.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_sc
Based on a given unit.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 24
1 file changed, 24 insertions(+)
diff --git a/src/panfrost/midgard/midgard_schedule.c
b/src/panfrost/midgard/midgard_schedule.c
index e2641ea0180..dea8b023e9d 1006
Conditional instructions (csel and conditional branches) require their
condition to be written to a special condition pipeline register (r31.w
for scalar, r31.xyzw for vector). However, pipeline registers are live
only for the duration of a single bundle. As such, the logic to schedule
conditionals
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/compiler.h | 10 ++
src/panfrost/midgard/midgard_schedule.c | 121
2 files changed, 131 insertions(+)
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h
index 8612bab7686..780e
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 4
1 file changed, 4 insertions(+)
diff --git a/src/panfrost/midgard/midgard_schedule.c
b/src/panfrost/midgard/midgard_schedule.c
index e71f65f6004..094451ceb9d 100644
--- a/src/panfrost/midgard/midgard_schedule
Conditions for branches don't have a swizzle explicitly in the emitted
binary, but they do implicitly get swizzled in whatever instruction
wrote r31, so we need to handle that.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/compiler.h| 4 ++--
src/panfrost/midgard/midgard_comp
We still emit in-order but we switch to using the bundles created from
the new scheduler, which will allow greater flexibility and room for
out-of-order optimization.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/compiler.h | 6 -
src/panfrost/midgard/midgard_compile.c | 1
If an instruction could be scheduled to vmul to satisfy the writeout
conditions, let's do that and save an instruction+cycle per fragment
shader.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 41 -
1 file changed, 40 insertions(+), 1 delet
We can bundle two load/store together. This eliminates the need for
explicit load/store pairing in a prepass, as well.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 67 +
1 file changed, 12 insertions(+), 55 deletions(-)
diff --git a/src/
It's not based on the writemask and it can't be inferred; it's just
intrinsic to the op itself.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/helpers.h | 15 +++--
src/panfrost/midgard/mir.c | 59 ++
2 files changed, 37 insertions(+), 37 deleti
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 4
1 file changed, 4 deletions(-)
diff --git a/src/panfrost/midgard/midgard_schedule.c
b/src/panfrost/midgard/midgard_schedule.c
index f883830cf86..e71f65f6004 100644
--- a/src/panfrost/midgard/midgard_schedule.
We would like to flatten a linked list of midgard_instructions into an
array of midgard_instruction pointers on the heap.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/src/panfrost/midgard/
For each block, we compute an instruction dependency graph, which allows
us to maintain a worklist of instructions able to be scheduled (no
dependencies). We traverse this graph backwards, emitting instructions
backwards and reversing the block at the end, to allow conditionals and
writeout to be e
There's no r32 to save ya after you use up r31 :)
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 16
1 file changed, 16 insertions(+)
diff --git a/src/panfrost/midgard/midgard_schedule.c
b/src/panfrost/midgard/midgard_schedule.c
index 5f271608a3
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/src/panfrost/midgard/midgard_schedule.c
b/src/panfrost/midgard/midgard_schedule.c
index 094451ceb9d..5f271608a30 100644
--- a/src/panfrost/midgard/midgard_schedul
Useful for various operations on both commutative and anticommutative
ops.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/compiler.h | 1 +
src/panfrost/midgard/midgard_opt_invert.c | 13 +++--
src/panfrost/midgard/mir.c| 17 +
3 file
We never had a scheduler good enough to hit this case before! :)
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/compiler.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h
index cf943ea6995..cb7d
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/compiler.h | 1 +
src/panfrost/midgard/midgard_compile.c| 1 +
src/panfrost/midgard/midgard_opt_invert.c | 25 +++
3 files changed, 27 insertions(+)
diff --git a/src/panfrost/midgard/compiler.h b/src/pa
If we can reuse constant slots from other instructions, we would like to
do so to include more instructions per bundle.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 129 +---
1 file changed, 113 insertions(+), 16 deletions(-)
diff --git a/sr
Now that we have constant adjustment logic abstracted, we can do this
safely. Along with the csel inversion patch, this allows many more
common csel ops to inline their condition in the bundle.
Signed-off-by: Alyssa Rosenzweig
---
src/panfrost/midgard/midgard_schedule.c | 14 ++
1 fi
31 matches
Mail list logo