shader: Implement CAL inlining function calls

This commit is contained in:
ReinUsesLisp 2021-03-14 03:41:05 -03:00 committed by ameerj
parent b9f7bf4472
commit 71f96fa636
24 changed files with 286 additions and 330 deletions

View file

@ -371,9 +371,11 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) {
}
} // Anonymous namespace
void ConstantPropagationPass(IR::Block& block) {
for (IR::Inst& inst : block) {
ConstantPropagation(block, inst);
void ConstantPropagationPass(IR::Program& program) {
for (IR::Block* const block : program.post_order_blocks) {
for (IR::Inst& inst : block->Instructions()) {
ConstantPropagation(*block, inst);
}
}
}