shader: Support SSA loops on IR
This commit is contained in:
parent
8af9297f09
commit
cbfb7d182a
12 changed files with 150 additions and 46 deletions
|
@ -4,14 +4,16 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <span>
|
||||
|
||||
#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) {
|
||||
void PostOrderInvoke(Func&& func, IR::Function& function) {
|
||||
for (const auto& block : function.post_order_blocks) {
|
||||
func(*block);
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +22,7 @@ void ConstantPropagationPass(IR::Block& block);
|
|||
void DeadCodeEliminationPass(IR::Block& block);
|
||||
void GlobalMemoryToStorageBufferPass(IR::Block& block);
|
||||
void IdentityRemovalPass(IR::Function& function);
|
||||
void SsaRewritePass(IR::Function& function);
|
||||
void SsaRewritePass(std::span<IR::Block* const> post_order_blocks);
|
||||
void VerificationPass(const IR::Function& function);
|
||||
|
||||
} // namespace Shader::Optimization
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue