mirror of
https://github.com/yuzu-emu/sirit
synced 2024-11-22 02:33:34 +00:00
Support variadic arguments for OpPhi
This commit is contained in:
parent
d75e3198d0
commit
18c37509fa
2 changed files with 7 additions and 1 deletions
|
@ -256,6 +256,12 @@ public:
|
|||
*/
|
||||
Id OpPhi(Id result_type, std::span<const Id> operands);
|
||||
|
||||
template <typename... Ts>
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpPhi(Id result_type, Ts&&... operands) {
|
||||
return OpPhi(result_type, std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/**
|
||||
* The SSA phi function. This instruction will be revisited when patching phi nodes.
|
||||
*
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
#pragma once
|
||||
|
||||
#include <bit>
|
||||
#include <span>
|
||||
#include <cassert>
|
||||
#include <concepts>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <span>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
#include <variant>
|
||||
|
|
Loading…
Reference in a new issue