summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir/basic_block.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-04-20 22:28:06 -0300
committerGravatar ameerj2021-07-22 21:51:28 -0400
commit4bbe5303376e693d15d7de80b25f5fda783281ce (patch)
tree6432c932baf63ea9b4c6b7e56d0c5dcb3b3b13ba /src/shader_recompiler/frontend/ir/basic_block.cpp
parentshader: Use a small_vector for phi blocks (diff)
downloadyuzu-4bbe5303376e693d15d7de80b25f5fda783281ce.tar.gz
yuzu-4bbe5303376e693d15d7de80b25f5fda783281ce.tar.xz
yuzu-4bbe5303376e693d15d7de80b25f5fda783281ce.zip
shader: Inline common IR::Block methods
Diffstat (limited to 'src/shader_recompiler/frontend/ir/basic_block.cpp')
-rw-r--r--src/shader_recompiler/frontend/ir/basic_block.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/shader_recompiler/frontend/ir/basic_block.cpp b/src/shader_recompiler/frontend/ir/basic_block.cpp
index e1f0191f4..f92fc2571 100644
--- a/src/shader_recompiler/frontend/ir/basic_block.cpp
+++ b/src/shader_recompiler/frontend/ir/basic_block.cpp
@@ -69,24 +69,12 @@ u32 Block::LocationEnd() const noexcept {
69 return location_end; 69 return location_end;
70} 70}
71 71
72Block::InstructionList& Block::Instructions() noexcept {
73 return instructions;
74}
75
76const Block::InstructionList& Block::Instructions() const noexcept {
77 return instructions;
78}
79
80void Block::AddImmediatePredecessor(Block* block) { 72void Block::AddImmediatePredecessor(Block* block) {
81 if (std::ranges::find(imm_predecessors, block) == imm_predecessors.end()) { 73 if (std::ranges::find(imm_predecessors, block) == imm_predecessors.end()) {
82 imm_predecessors.push_back(block); 74 imm_predecessors.push_back(block);
83 } 75 }
84} 76}
85 77
86std::span<IR::Block* const> Block::ImmediatePredecessors() const noexcept {
87 return imm_predecessors;
88}
89
90static std::string BlockToIndex(const std::map<const Block*, size_t>& block_to_index, 78static std::string BlockToIndex(const std::map<const Block*, size_t>& block_to_index,
91 Block* block) { 79 Block* block) {
92 if (const auto it{block_to_index.find(block)}; it != block_to_index.end()) { 80 if (const auto it{block_to_index.find(block)}; it != block_to_index.end()) {