mirror of
https://github.com/yuzu-emu/sirit
synced 2024-11-22 08:33:35 +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);
|
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 a new issue