mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 23:42:43 +00:00
22 lines
759 B
C++
22 lines
759 B
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <unordered_set>
|
|
#include <boost/container/flat_map.hpp>
|
|
#include "shader_recompiler/ir/compute_value/imm_value.h"
|
|
#include "shader_recompiler/ir/value.h"
|
|
|
|
// Given a value (inmediate or not), compute all the possible inmediate values
|
|
// that can represent. If the value can't be computed statically, the list will
|
|
// be empty.
|
|
|
|
namespace Shader::IR::ComputeValue {
|
|
|
|
using ImmValueList = std::unordered_set<ImmValue>;
|
|
using ComputeImmValuesCache = boost::container::flat_map<Inst*, ImmValueList>;
|
|
|
|
void Compute(const Value& value, ImmValueList& values, ComputeImmValuesCache& cache);
|
|
|
|
} // namespace Shader::IR::ComputeValue
|