mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
freedreno/ir3: make foreach_ssa_src declar cursor ptr
Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048>
This commit is contained in:
parent
65f604e3b3
commit
c1d33eed41
8 changed files with 4 additions and 16 deletions
|
|
@ -1201,8 +1201,6 @@ ir3_find_ssa_uses(struct ir3 *ir, void *mem_ctx, bool falsedeps)
|
|||
|
||||
foreach_block (block, &ir->block_list) {
|
||||
foreach_instr (instr, &block->instr_list) {
|
||||
struct ir3_instruction *src;
|
||||
|
||||
foreach_ssa_src_n (src, n, instr) {
|
||||
if (__is_false_dep(instr, n) && !falsedeps)
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -1110,8 +1110,9 @@ static inline bool __is_false_dep(struct ir3_instruction *instr, unsigned n)
|
|||
|
||||
/* iterator for an instruction's SSA sources (instr), also returns src #: */
|
||||
#define foreach_ssa_src_n(__srcinst, __n, __instr) \
|
||||
foreach_ssa_srcp_n(__srcp, __n, __instr) \
|
||||
if ((__srcinst = *__srcp))
|
||||
for (struct ir3_instruction *__srcinst = (void *)~0; __srcinst; __srcinst = NULL) \
|
||||
foreach_ssa_srcp_n(__srcp, __n, __instr) \
|
||||
if ((__srcinst = *__srcp))
|
||||
|
||||
/* iterator for an instruction's SSA sources (instr): */
|
||||
#define foreach_ssa_src(__srcinst, __instr) \
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ static void
|
|||
rewrite_uses(struct ir3_instruction *conv, struct ir3_instruction *replace)
|
||||
{
|
||||
foreach_ssa_use (use, conv) {
|
||||
struct ir3_instruction *src;
|
||||
foreach_ssa_src_n (src, n, use) {
|
||||
if (src == conv)
|
||||
use->regs[n]->instr = replace;
|
||||
|
|
|
|||
|
|
@ -772,7 +772,6 @@ ir3_cp(struct ir3 *ir, struct ir3_shader_variant *so)
|
|||
*/
|
||||
foreach_block (block, &ir->block_list) {
|
||||
foreach_instr (instr, &block->instr_list) {
|
||||
struct ir3_instruction *src;
|
||||
|
||||
/* by the way, we don't account for false-dep's, so the CP
|
||||
* pass should always happen before false-dep's are inserted
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@
|
|||
static void
|
||||
instr_dce(struct ir3_instruction *instr, bool falsedep)
|
||||
{
|
||||
struct ir3_instruction *src;
|
||||
|
||||
/* don't mark falsedep's as used, but otherwise process them normally: */
|
||||
if (!falsedep)
|
||||
instr->flags &= ~IR3_INSTR_UNUSED;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,6 @@ restart:
|
|||
static bool
|
||||
instr_find_neighbors(struct ir3_instruction *instr)
|
||||
{
|
||||
struct ir3_instruction *src;
|
||||
bool progress = false;
|
||||
|
||||
if (ir3_instr_check_mark(instr))
|
||||
|
|
|
|||
|
|
@ -536,7 +536,6 @@ sched_dag_init(struct ir3_postsched_ctx *ctx)
|
|||
*/
|
||||
foreach_instr (instr, &ctx->unscheduled_list) {
|
||||
struct ir3_postsched_node *n = instr->data;
|
||||
struct ir3_instruction *src;
|
||||
|
||||
foreach_ssa_src_n (src, i, instr) {
|
||||
if (src->block != instr->block)
|
||||
|
|
|
|||
|
|
@ -195,7 +195,6 @@ schedule(struct ir3_sched_ctx *ctx, struct ir3_instruction *instr)
|
|||
* collect srcs as partially live.
|
||||
*/
|
||||
if (n->collect) {
|
||||
struct ir3_instruction *src;
|
||||
foreach_ssa_src (src, n->collect) {
|
||||
if (src->block != instr->block)
|
||||
continue;
|
||||
|
|
@ -248,7 +247,6 @@ struct ir3_sched_notes {
|
|||
static bool
|
||||
could_sched(struct ir3_instruction *instr, struct ir3_instruction *src)
|
||||
{
|
||||
struct ir3_instruction *other_src;
|
||||
foreach_ssa_src (other_src, instr) {
|
||||
/* if dependency not scheduled, we aren't ready yet: */
|
||||
if ((src != other_src) && !is_scheduled(other_src)) {
|
||||
|
|
@ -413,7 +411,6 @@ static int
|
|||
live_effect(struct ir3_instruction *instr)
|
||||
{
|
||||
struct ir3_sched_node *n = instr->data;
|
||||
struct ir3_instruction *src;
|
||||
int new_live = n->partially_live ? 0 : dest_regs(instr);
|
||||
int freed_live = 0;
|
||||
|
||||
|
|
@ -875,7 +872,7 @@ mark_kill_path(struct ir3_instruction *instr)
|
|||
{
|
||||
struct ir3_sched_node *n = instr->data;
|
||||
n->kill_path = true;
|
||||
struct ir3_instruction *src;
|
||||
|
||||
foreach_ssa_src (src, instr) {
|
||||
if (src->block != instr->block)
|
||||
continue;
|
||||
|
|
@ -919,8 +916,6 @@ is_output_only(struct ir3_instruction *instr)
|
|||
static void
|
||||
sched_node_add_deps(struct ir3_instruction *instr)
|
||||
{
|
||||
struct ir3_instruction *src;
|
||||
|
||||
/* Since foreach_ssa_src() already handles false-dep's we can construct
|
||||
* the DAG easily in a single pass.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue