ShaderCache: Order Phi Arguments from farthest away to nearest.
This commit is contained in:
parent
a3a353edf2
commit
c50ad56bf5
5 changed files with 37 additions and 0 deletions
|
@ -378,6 +378,13 @@ void SsaRewritePass(IR::Program& program) {
|
|||
for (auto block = program.post_order_blocks.rbegin(); block != end; ++block) {
|
||||
VisitBlock(pass, *block);
|
||||
}
|
||||
for (auto block = program.post_order_blocks.rbegin(); block != end; ++block) {
|
||||
for (IR::Inst& inst : (*block)->Instructions()) {
|
||||
if (inst.GetOpcode() == IR::Opcode::Phi) {
|
||||
inst.OrderPhiArgs();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Shader::Optimization
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue