aco: Move is_dead to aco_ir.h to allow it to get inlined.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18103>
This commit is contained in:
@@ -80,18 +80,6 @@ process_block(dce_ctx& ctx, Block& block)
|
||||
|
||||
} /* end namespace */
|
||||
|
||||
bool
|
||||
is_dead(const std::vector<uint16_t>& uses, Instruction* instr)
|
||||
{
|
||||
if (instr->definitions.empty() || instr->isBranch() ||
|
||||
instr->opcode == aco_opcode::p_init_scratch)
|
||||
return false;
|
||||
if (std::any_of(instr->definitions.begin(), instr->definitions.end(),
|
||||
[&uses](const Definition& def) { return !def.isTemp() || uses[def.tempId()]; }))
|
||||
return false;
|
||||
return !(get_sync_info(instr).semantics & (semantic_volatile | semantic_acqrel));
|
||||
}
|
||||
|
||||
std::vector<uint16_t>
|
||||
dead_code_analysis(Program* program)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user