ShaderCache: Order Phi Arguments from farthest away to nearest.

This commit is contained in:
Fernando Sahmkow 2021-10-31 17:46:46 +01:00
parent a3a353edf2
commit c50ad56bf5
5 changed files with 37 additions and 0 deletions

View file

@ -27,9 +27,11 @@ IR::BlockList GenerateBlocks(const IR::AbstractSyntaxList& syntax_list) {
}
IR::BlockList blocks;
blocks.reserve(num_syntax_blocks);
u32 order_index{};
for (const auto& node : syntax_list) {
if (node.type == IR::AbstractSyntaxNode::Type::Block) {
blocks.push_back(node.data.block);
blocks.back()->SetOrder(order_index++);
}
}
return blocks;