mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-12-22 13:55:26 +00:00
Support variadic arguments for OpPhi
This commit is contained in:
parent
d75e3198d0
commit
18c37509fa
|
@ -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