mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
aco: limit hard clauses to 63 instructions
See https://reviews.llvm.org/D127391 fossil-db (gfx1100): Totals from 4 (0.00% of 161689) affected shaders: Latency: 24545 -> 24539 (-0.02%) InvThroughput: 102867 -> 102835 (-0.03%) fossil-db (navi10): Totals from 4 (0.00% of 161220) affected shaders: Latency: 25969 -> 25959 (-0.04%) InvThroughput: 112917 -> 112869 (-0.04%) Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17710>
This commit is contained in:
parent
a406b36d30
commit
4544490df0
2 changed files with 17 additions and 17 deletions
|
|
@ -248,7 +248,7 @@ form_hard_clauses(Program* program)
|
|||
{
|
||||
for (Block& block : program->blocks) {
|
||||
unsigned num_instrs = 0;
|
||||
aco_ptr<Instruction> current_instrs[64];
|
||||
aco_ptr<Instruction> current_instrs[63];
|
||||
clause_type current_type = clause_other;
|
||||
|
||||
std::vector<aco_ptr<Instruction>> new_instructions;
|
||||
|
|
@ -259,7 +259,7 @@ form_hard_clauses(Program* program)
|
|||
aco_ptr<Instruction>& instr = block.instructions[i];
|
||||
|
||||
clause_type type = get_type(program, instr);
|
||||
if (type != current_type || num_instrs == 64 ||
|
||||
if (type != current_type || num_instrs == 63 ||
|
||||
(num_instrs && !should_form_clause(current_instrs[0].get(), instr.get()))) {
|
||||
emit_clause(bld, num_instrs, current_instrs);
|
||||
num_instrs = 0;
|
||||
|
|
|
|||
|
|
@ -173,30 +173,30 @@ BEGIN_TEST(form_hard_clauses.size)
|
|||
create_smem();
|
||||
|
||||
//>> p_unit_test 1
|
||||
//! s_clause imm:63
|
||||
//; for i in range(64):
|
||||
//! s_clause imm:62
|
||||
//; for i in range(63):
|
||||
//; search_re('s_load_dword')
|
||||
bld.pseudo(aco_opcode::p_unit_test, Operand::c32(1u));
|
||||
for (unsigned i = 0; i < 64; i++)
|
||||
for (unsigned i = 0; i < 63; i++)
|
||||
create_smem();
|
||||
|
||||
//>> p_unit_test 2
|
||||
//! s_clause imm:63
|
||||
//; for i in range(65):
|
||||
//! s_clause imm:62
|
||||
//; for i in range(64):
|
||||
//; search_re('s_load_dword')
|
||||
bld.pseudo(aco_opcode::p_unit_test, Operand::c32(2u));
|
||||
for (unsigned i = 0; i < 65; i++)
|
||||
for (unsigned i = 0; i < 64; i++)
|
||||
create_smem();
|
||||
|
||||
//>> p_unit_test 3
|
||||
//! s_clause imm:63
|
||||
//; for i in range(64):
|
||||
//! s_clause imm:62
|
||||
//; for i in range(63):
|
||||
//; search_re('s_load_dword')
|
||||
//! s_clause imm:1
|
||||
//; search_re('s_load_dword')
|
||||
//; search_re('s_load_dword')
|
||||
bld.pseudo(aco_opcode::p_unit_test, Operand::c32(3u));
|
||||
for (unsigned i = 0; i < 66; i++)
|
||||
for (unsigned i = 0; i < 65; i++)
|
||||
create_smem();
|
||||
|
||||
finish_form_hard_clause_test();
|
||||
|
|
@ -370,22 +370,22 @@ BEGIN_TEST(form_hard_clauses.stores)
|
|||
/* Unimportant pass limitations */
|
||||
//>> p_unit_test 4
|
||||
//; search_re('buffer_store_dword')
|
||||
//! s_clause imm:62
|
||||
//; for i in range(63):
|
||||
//! s_clause imm:61
|
||||
//; for i in range(62):
|
||||
//; search_re('buffer_load_dword')
|
||||
//; search_re('buffer_load_dword')
|
||||
bld.pseudo(aco_opcode::p_unit_test, Operand::c32(4u));
|
||||
create_mubuf_store();
|
||||
for (unsigned i = 0; i < 64; i++)
|
||||
for (unsigned i = 0; i < 63; i++)
|
||||
create_mubuf();
|
||||
|
||||
//>> p_unit_test 5
|
||||
//! s_clause imm:63
|
||||
//; for i in range(64):
|
||||
//! s_clause imm:62
|
||||
//; for i in range(63):
|
||||
//; search_re('buffer_load_dword')
|
||||
//; search_re('buffer_store_dword')
|
||||
bld.pseudo(aco_opcode::p_unit_test, Operand::c32(5u));
|
||||
for (unsigned i = 0; i < 64; i++)
|
||||
for (unsigned i = 0; i < 63; i++)
|
||||
create_mubuf();
|
||||
create_mubuf_store();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue