Mesa (master): i965: Don' t make instructions with a null dest a barrier to scheduling.
Matt Turner
mattst88 at kemper.freedesktop.org
Thu Apr 17 05:44:56 UTC 2014
Module: Mesa
Branch: master
Commit: 42a26cb5e441a01d5288b299980f23affaad53fe
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=42a26cb5e441a01d5288b299980f23affaad53fe
Author: Matt Turner <mattst88 at gmail.com>
Date: Wed Apr 9 13:38:14 2014 -0700
i965: Don't make instructions with a null dest a barrier to scheduling.
Now that we properly track accumulator dependencies, the scheduler is
able to schedule instructions between the mach and mov in the common
the integer multiplication pattern:
mul acc0, x, y
mach null, x, y
mov dest, acc0
Since a null destination implies no dependency on the destination, we
can also safely schedule instructions (that don't write the accumulator)
between the mul and mach.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
index 5e4f2fe..8cc6908 100644
--- a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
@@ -870,7 +870,8 @@ fs_instruction_scheduler::calculate_deps()
} else if (inst->dst.is_accumulator() && gen6plus) {
add_dep(last_accumulator_write, n);
last_accumulator_write = n;
- } else if (inst->dst.file != BAD_FILE) {
+ } else if (inst->dst.file != BAD_FILE &&
+ !inst->dst.is_null()) {
add_barrier_deps(n);
}
@@ -997,7 +998,8 @@ fs_instruction_scheduler::calculate_deps()
}
} else if (inst->dst.is_accumulator() && gen6plus) {
last_accumulator_write = n;
- } else if (inst->dst.file != BAD_FILE) {
+ } else if (inst->dst.file != BAD_FILE &&
+ !inst->dst.is_null()) {
add_barrier_deps(n);
}
@@ -1113,7 +1115,8 @@ vec4_instruction_scheduler::calculate_deps()
} else if (inst->dst.is_accumulator() && gen6plus) {
add_dep(last_accumulator_write, n);
last_accumulator_write = n;
- } else if (inst->dst.file != BAD_FILE) {
+ } else if (inst->dst.file != BAD_FILE &&
+ !inst->dst.is_null()) {
add_barrier_deps(n);
}
@@ -1205,7 +1208,8 @@ vec4_instruction_scheduler::calculate_deps()
last_fixed_grf_write = n;
} else if (inst->dst.is_accumulator() && gen6plus) {
last_accumulator_write = n;
- } else if (inst->dst.file != BAD_FILE) {
+ } else if (inst->dst.file != BAD_FILE &&
+ !inst->dst.is_null()) {
add_barrier_deps(n);
}
More information about the mesa-commit
mailing list