mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-11-21 23:35:38 +01: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);
|
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.
|
* The SSA phi function. This instruction will be revisited when patching phi nodes.
|
||||||
*
|
*
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <bit>
|
#include <bit>
|
||||||
#include <span>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <concepts>
|
#include <concepts>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <span>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <variant>
|
#include <variant>
|
||||||
|
Loading…
Reference in New Issue
Block a user