diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-04-21 03:28:06 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:28 +0200 |
commit | 4bbe5303376e693d15d7de80b25f5fda783281ce (patch) | |
tree | 6432c932baf63ea9b4c6b7e56d0c5dcb3b3b13ba /src/shader_recompiler/frontend/ir/basic_block.h | |
parent | shader: Use a small_vector for phi blocks (diff) | |
download | yuzu-4bbe5303376e693d15d7de80b25f5fda783281ce.tar yuzu-4bbe5303376e693d15d7de80b25f5fda783281ce.tar.gz yuzu-4bbe5303376e693d15d7de80b25f5fda783281ce.tar.bz2 yuzu-4bbe5303376e693d15d7de80b25f5fda783281ce.tar.lz yuzu-4bbe5303376e693d15d7de80b25f5fda783281ce.tar.xz yuzu-4bbe5303376e693d15d7de80b25f5fda783281ce.tar.zst yuzu-4bbe5303376e693d15d7de80b25f5fda783281ce.zip |
Diffstat (limited to '')
-rw-r--r-- | src/shader_recompiler/frontend/ir/basic_block.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/shader_recompiler/frontend/ir/basic_block.h b/src/shader_recompiler/frontend/ir/basic_block.h index b14a35ec5..6a1d615d9 100644 --- a/src/shader_recompiler/frontend/ir/basic_block.h +++ b/src/shader_recompiler/frontend/ir/basic_block.h @@ -59,15 +59,22 @@ public: /// Gets the end location for this basic block. [[nodiscard]] u32 LocationEnd() const noexcept; + /// Adds a new immediate predecessor to this basic block. + void AddImmediatePredecessor(Block* block); + /// Gets a mutable reference to the instruction list for this basic block. - [[nodiscard]] InstructionList& Instructions() noexcept; + [[nodiscard]] InstructionList& Instructions() noexcept { + return instructions; + } /// Gets an immutable reference to the instruction list for this basic block. - [[nodiscard]] const InstructionList& Instructions() const noexcept; + [[nodiscard]] const InstructionList& Instructions() const noexcept { + return instructions; + } - /// Adds a new immediate predecessor to this basic block. - void AddImmediatePredecessor(Block* block); /// Gets an immutable span to the immediate predecessors. - [[nodiscard]] std::span<Block* const> ImmediatePredecessors() const noexcept; + [[nodiscard]] std::span<Block* const> ImmediatePredecessors() const noexcept { + return imm_predecessors; + } /// Intrusively store the host definition of this instruction. template <typename DefinitionType> |