diff options
author | Gert Wollny <[email protected]> | 2020-01-19 18:09:05 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-21 15:10:43 +0000 |
commit | 5e036fef1f48d9946385b7fc13ee64e613e2264d (patch) | |
tree | adea54e09172f29c0b81053e6644251c62105863 /src/gallium/drivers/r600/sfn/sfn_liverange.cpp | |
parent | b51ced7306ea18df1c5ded700608f01db4f01e6d (diff) |
r600/sfn: Implementing instructions blocks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
Diffstat (limited to 'src/gallium/drivers/r600/sfn/sfn_liverange.cpp')
-rw-r--r-- | src/gallium/drivers/r600/sfn/sfn_liverange.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/gallium/drivers/r600/sfn/sfn_liverange.cpp b/src/gallium/drivers/r600/sfn/sfn_liverange.cpp index 1c95c3bc4d1..55159233a14 100644 --- a/src/gallium/drivers/r600/sfn/sfn_liverange.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_liverange.cpp @@ -754,14 +754,16 @@ void LiverangeEvaluator::run(const Shader& shader, sfn_log << SfnLog::merge << "have " << temp_acc.size() << " temps\n"; - for (const auto& ir: shader.m_ir) { - switch (ir->type()) { - case Instruction::cond_if: - case Instruction::cond_else: - case Instruction::loop_begin: - ++n_scopes; - default: - ; + for (const auto& block: shader.m_ir) { + for (const auto& ir: block) { + switch (ir->type()) { + case Instruction::cond_if: + case Instruction::cond_else: + case Instruction::loop_begin: + ++n_scopes; + default: + ; + } } } @@ -783,12 +785,13 @@ void LiverangeEvaluator::run(const Shader& shader, } } - for (const auto& ir: shader.m_ir) { - ir->evalue_liveness(*this); - if (ir->type() != Instruction::alu || - static_cast<const AluInstruction&>(*ir).flag(alu_last_instr)) - ++line; - } + for (const auto& block: shader.m_ir) + for (const auto& ir: block) { + ir->evalue_liveness(*this); + if (ir->type() != Instruction::alu || + static_cast<const AluInstruction&>(*ir).flag(alu_last_instr)) + ++line; + } assert(cur_scope->type() == outer_scope); cur_scope->set_end(line); |