diff options
Diffstat (limited to 'src/shader_recompiler/frontend/ir/microinstruction.cpp')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/microinstruction.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/shader_recompiler/frontend/ir/microinstruction.cpp b/src/shader_recompiler/frontend/ir/microinstruction.cpp index 631446cf7..468782eb1 100644 --- a/src/shader_recompiler/frontend/ir/microinstruction.cpp +++ b/src/shader_recompiler/frontend/ir/microinstruction.cpp | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | 1 | // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | // Refer to the license.txt file included. | ||
| 4 | 3 | ||
| 5 | #include <algorithm> | 4 | #include <algorithm> |
| 6 | #include <memory> | 5 | #include <memory> |
| @@ -326,6 +325,11 @@ void Inst::AddPhiOperand(Block* predecessor, const Value& value) { | |||
| 326 | phi_args.emplace_back(predecessor, value); | 325 | phi_args.emplace_back(predecessor, value); |
| 327 | } | 326 | } |
| 328 | 327 | ||
| 328 | void Inst::ErasePhiOperand(size_t index) { | ||
| 329 | const auto operand_it{phi_args.begin() + static_cast<ptrdiff_t>(index)}; | ||
| 330 | phi_args.erase(operand_it); | ||
| 331 | } | ||
| 332 | |||
| 329 | void Inst::OrderPhiArgs() { | 333 | void Inst::OrderPhiArgs() { |
| 330 | if (op != Opcode::Phi) { | 334 | if (op != Opcode::Phi) { |
| 331 | throw LogicError("{} is not a Phi instruction", op); | 335 | throw LogicError("{} is not a Phi instruction", op); |