projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
intel/compiler: Introduce backend_shader method to propagate IR changes to analysis...
[mesa.git]
/
src
/
intel
/
compiler
/
brw_fs_sel_peephole.cpp
diff --git
a/src/intel/compiler/brw_fs_sel_peephole.cpp
b/src/intel/compiler/brw_fs_sel_peephole.cpp
index 8cd897f72e04acfa440b99a757b7043f64fae716..5343d98d90ed54380a784c293772fa82878019cd 100644
(file)
--- a/
src/intel/compiler/brw_fs_sel_peephole.cpp
+++ b/
src/intel/compiler/brw_fs_sel_peephole.cpp
@@
-68,7
+68,8
@@
count_movs_from_if(fs_inst *then_mov[MAX_MOVS], fs_inst *else_mov[MAX_MOVS],
{
int then_movs = 0;
foreach_inst_in_block(fs_inst, inst, then_block) {
{
int then_movs = 0;
foreach_inst_in_block(fs_inst, inst, then_block) {
- if (then_movs == MAX_MOVS || inst->opcode != BRW_OPCODE_MOV)
+ if (then_movs == MAX_MOVS || inst->opcode != BRW_OPCODE_MOV ||
+ inst->flags_written())
break;
then_mov[then_movs] = inst;
break;
then_mov[then_movs] = inst;
@@
-77,7
+78,8
@@
count_movs_from_if(fs_inst *then_mov[MAX_MOVS], fs_inst *else_mov[MAX_MOVS],
int else_movs = 0;
foreach_inst_in_block(fs_inst, inst, else_block) {
int else_movs = 0;
foreach_inst_in_block(fs_inst, inst, else_block) {
- if (else_movs == MAX_MOVS || inst->opcode != BRW_OPCODE_MOV)
+ if (else_movs == MAX_MOVS || inst->opcode != BRW_OPCODE_MOV ||
+ inst->flags_written())
break;
else_mov[else_movs] = inst;
break;
else_mov[else_movs] = inst;
@@
-196,8
+198,7
@@
fs_visitor::opt_peephole_sel()
*/
fs_reg src0(then_mov[i]->src[0]);
if (src0.file == IMM) {
*/
fs_reg src0(then_mov[i]->src[0]);
if (src0.file == IMM) {
- src0 = vgrf(glsl_type::float_type);
- src0.type = then_mov[i]->src[0].type;
+ src0 = ibld.vgrf(then_mov[i]->src[0].type);
ibld.MOV(src0, then_mov[i]->src[0]);
}
ibld.MOV(src0, then_mov[i]->src[0]);
}
@@
-214,7
+215,7
@@
fs_visitor::opt_peephole_sel()
}
if (progress)
}
if (progress)
- invalidate_
live_intervals(
);
+ invalidate_
analysis(DEPENDENCY_EVERYTHING
);
return progress;
}
return progress;
}