case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_LOGICAL:
case FS_OPCODE_LINTERP:
case SHADER_OPCODE_FIND_LIVE_CHANNEL:
+ case FS_OPCODE_LOAD_LIVE_CHANNELS:
case SHADER_OPCODE_BROADCAST:
case SHADER_OPCODE_MOV_INDIRECT:
case SHADER_OPCODE_TEX_LOGICAL:
}
bool
-fs_visitor::opt_cse_local(bblock_t *block, int &ip)
+fs_visitor::opt_cse_local(const fs_live_variables &live, bblock_t *block, int &ip)
{
bool progress = false;
exec_list aeb;
/* Kill any AEB entries using registers that don't get reused any
* more -- a sure sign they'll fail operands_match().
*/
- if (src_reg->file == VGRF && virtual_grf_end[src_reg->nr] < ip) {
+ if (src_reg->file == VGRF && live.vgrf_end[src_reg->nr] < ip) {
entry->remove();
ralloc_free(entry);
break;
bool
fs_visitor::opt_cse()
{
+ const fs_live_variables &live = live_analysis.require();
bool progress = false;
int ip = 0;
- calculate_live_intervals();
-
foreach_block (block, cfg) {
- progress = opt_cse_local(block, ip) || progress;
+ progress = opt_cse_local(live, block, ip) || progress;
}
if (progress)
- invalidate_live_intervals();
+ invalidate_analysis(DEPENDENCY_INSTRUCTIONS | DEPENDENCY_VARIABLES);
return progress;
}