shader: SSA and dominance

This commit is contained in:
ReinUsesLisp 2021-02-02 21:07:00 -03:00 committed by ameerj
parent 2d48a7b4d0
commit 6c4cc0cd06
24 changed files with 569 additions and 76 deletions

View file

@ -5,12 +5,21 @@
#pragma once
#include "shader_recompiler/frontend/ir/basic_block.h"
#include "shader_recompiler/frontend/ir/function.h"
namespace Shader::Optimization {
template <typename Func>
void Invoke(Func&& func, IR::Function& function) {
for (const auto& block : function.blocks) {
func(*block);
}
}
void DeadCodeEliminationPass(IR::Block& block);
void GetSetElimination(IR::Block& block);
void IdentityRemovalPass(IR::Block& block);
void SsaRewritePass(IR::Function& function);
void VerificationPass(const IR::Block& block);
} // namespace Shader::Optimization