mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
aco/lower_phis: simplify check for uniform predecessors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28661>
This commit is contained in:
parent
d6c9b1d03f
commit
3b832fe2ab
1 changed files with 1 additions and 13 deletions
|
|
@ -25,8 +25,6 @@ enum class pred_defined : uint8_t {
|
|||
MESA_DEFINE_CPP_ENUM_BITFIELD_OPERATORS(pred_defined);
|
||||
|
||||
struct ssa_state {
|
||||
bool checked_preds_for_uniform;
|
||||
bool all_preds_uniform;
|
||||
unsigned loop_nest_depth;
|
||||
|
||||
std::vector<pred_defined> any_pred_defined;
|
||||
|
|
@ -302,16 +300,7 @@ void
|
|||
lower_divergent_bool_phi(Program* program, ssa_state* state, Block* block,
|
||||
aco_ptr<Instruction>& phi)
|
||||
{
|
||||
if (!state->checked_preds_for_uniform) {
|
||||
state->all_preds_uniform = !(block->kind & block_kind_merge) &&
|
||||
block->linear_preds.size() == block->logical_preds.size();
|
||||
for (unsigned pred : block->logical_preds)
|
||||
state->all_preds_uniform =
|
||||
state->all_preds_uniform && (program->blocks[pred].kind & block_kind_uniform);
|
||||
state->checked_preds_for_uniform = true;
|
||||
}
|
||||
|
||||
if (state->all_preds_uniform) {
|
||||
if (block->linear_preds == block->logical_preds) {
|
||||
phi->opcode = aco_opcode::p_linear_phi;
|
||||
return;
|
||||
}
|
||||
|
|
@ -377,7 +366,6 @@ lower_phis(Program* program)
|
|||
ssa_state state;
|
||||
|
||||
for (Block& block : program->blocks) {
|
||||
state.checked_preds_for_uniform = false;
|
||||
for (aco_ptr<Instruction>& phi : block.instructions) {
|
||||
if (phi->opcode == aco_opcode::p_phi) {
|
||||
assert(program->wave_size == 64 ? phi->definitions[0].regClass() != s1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue