Mesa (master): r300/compiler: Don't continue copy propagation inside loops.
Marek Olšák
mareko at kemper.freedesktop.org
Sat Jul 3 02:35:21 UTC 2010
Module: Mesa
Branch: master
Commit: 0dbdcb43215c13dd7d7f83c1f1cdbfe6706109f0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0dbdcb43215c13dd7d7f83c1f1cdbfe6706109f0
Author: Tom Stellard <tstellar at gmail.com>
Date: Fri Jun 18 20:42:33 2010 -0700
r300/compiler: Don't continue copy propagation inside loops.
---
.../drivers/dri/r300/compiler/radeon_optimize.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
index e760b59..eca0651 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
@@ -162,6 +162,11 @@ static void peephole(struct radeon_compiler * c, struct rc_instruction * inst_mo
for(struct rc_instruction * inst = inst_mov->Next;
inst != &c->Program.Instructions;
inst = inst->Next) {
+ /* XXX In the future we might be able to make the optimizer
+ * smart enough to handle loops. */
+ if(inst->U.I.Opcode == RC_OPCODE_BGNLOOP){
+ return;
+ }
rc_for_all_reads_mask(inst, peephole_scan_read, &s);
rc_for_all_writes_mask(inst, peephole_scan_write, &s);
if (s.Conflict)
More information about the mesa-commit
mailing list