summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-10-18 14:46:35 -0400
committerEmil Velikov <[email protected]>2014-10-29 17:44:39 +0000
commit708ee6f188c1e08e4f90012d8c781e8566849dd1 (patch)
treed2f977a5b75e7b1fa08306acf3753ea13a5fc278 /src
parent971ae04fe68b23c73e8c699e18be28544c5410da (diff)
freedreno/ir3: comment + better fxn name
Signed-off-by: Rob Clark <[email protected]> (cherry picked from commit ab33a240890a7ef147d4b8cf35c27ae1932a1dbe)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_sched.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_sched.c b/src/gallium/drivers/freedreno/ir3/ir3_sched.c
index cf09ceaf54b..24d7c6397c1 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_sched.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_sched.c
@@ -162,7 +162,8 @@ static void schedule(struct ir3_sched_ctx *ctx,
* Delay-slot calculation. Follows fanin/fanout.
*/
-static unsigned delay_calc2(struct ir3_sched_ctx *ctx,
+/* calculate delay for specified src: */
+static unsigned delay_calc_srcn(struct ir3_sched_ctx *ctx,
struct ir3_instruction *assigner,
struct ir3_instruction *consumer, unsigned srcn)
{
@@ -173,7 +174,7 @@ static unsigned delay_calc2(struct ir3_sched_ctx *ctx,
for (i = 1; i < assigner->regs_count; i++) {
struct ir3_register *reg = assigner->regs[i];
if (reg->flags & IR3_REG_SSA) {
- unsigned d = delay_calc2(ctx, reg->instr,
+ unsigned d = delay_calc_srcn(ctx, reg->instr,
consumer, srcn);
delay = MAX2(delay, d);
}
@@ -186,6 +187,7 @@ static unsigned delay_calc2(struct ir3_sched_ctx *ctx,
return delay;
}
+/* calculate delay for instruction (maximum of delay for all srcs): */
static unsigned delay_calc(struct ir3_sched_ctx *ctx,
struct ir3_instruction *instr)
{
@@ -194,7 +196,7 @@ static unsigned delay_calc(struct ir3_sched_ctx *ctx,
for (i = 1; i < instr->regs_count; i++) {
struct ir3_register *reg = instr->regs[i];
if (reg->flags & IR3_REG_SSA) {
- unsigned d = delay_calc2(ctx, reg->instr,
+ unsigned d = delay_calc_srcn(ctx, reg->instr,
instr, i - 1);
delay = MAX2(delay, d);
}