aco: use bit vectors for liveness sets
This seems to be much faster than hash sets. When compiling pipelines from 5 games, live_var_analysis takes about a third the time it used to and fossilize-replay is ~1.77% faster. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6733>
This commit is contained in:
@@ -739,7 +739,8 @@ bool validate_ra(Program *program, const struct radv_nir_compiler_options *optio
|
||||
regs.fill(0);
|
||||
|
||||
std::set<Temp> live;
|
||||
live.insert(live_vars.live_out[block.index].begin(), live_vars.live_out[block.index].end());
|
||||
for (unsigned id : live_vars.live_out[block.index])
|
||||
live.insert(Temp(id, program->temp_rc[id]));
|
||||
/* remove killed p_phi sgpr operands */
|
||||
for (Temp tmp : phi_sgpr_ops[block.index])
|
||||
live.erase(tmp);
|
||||
|
||||
Reference in New Issue
Block a user