shader: SSA and dominance
This commit is contained in:
parent
2d48a7b4d0
commit
6c4cc0cd06
24 changed files with 569 additions and 76 deletions
25
src/shader_recompiler/frontend/ir/function.h
Normal file
25
src/shader_recompiler/frontend/ir/function.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2021 yuzu Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "shader_recompiler/frontend/ir/basic_block.h"
|
||||
|
||||
namespace Shader::IR {
|
||||
|
||||
struct Function {
|
||||
struct InplaceDelete {
|
||||
void operator()(IR::Block* block) const noexcept {
|
||||
std::destroy_at(block);
|
||||
}
|
||||
};
|
||||
using UniqueBlock = std::unique_ptr<IR::Block, InplaceDelete>;
|
||||
|
||||
std::vector<UniqueBlock> blocks;
|
||||
};
|
||||
|
||||
} // namespace Shader::IR
|
Loading…
Add table
Add a link
Reference in a new issue