mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 17:00:19 +02:00
There's no reasonable way to keep this around without adding significant complexity to RA. This series prefers to drop complexity from RA, lessening the need for validation in the first place. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
32 lines
695 B
C++
32 lines
695 B
C++
// SPDX-License-Identifier: MIT
|
|
#pragma once
|
|
|
|
#include "Common/BitSet.h"
|
|
#include <FEXCore/IR/IR.h>
|
|
#include <FEXCore/fextl/unordered_map.h>
|
|
#include <FEXCore/fextl/vector.h>
|
|
|
|
namespace FEXCore::IR::Validation {
|
|
|
|
struct BlockInfo {
|
|
bool HasExit;
|
|
const OrderedNode* BlockNode;
|
|
|
|
fextl::vector<OrderedNode*> Predecessors;
|
|
fextl::vector<OrderedNode*> Successors;
|
|
};
|
|
|
|
class IRValidation final : public FEXCore::IR::Pass {
|
|
public:
|
|
~IRValidation();
|
|
void Run(IREmitter* IREmit) override;
|
|
|
|
private:
|
|
|
|
BitSet<uint64_t> NodeIsLive {};
|
|
OrderedNode* EntryBlock {};
|
|
fextl::unordered_map<IR::NodeID, BlockInfo> OffsetToBlockMap;
|
|
size_t MaxNodes {};
|
|
};
|
|
} // namespace FEXCore::IR::Validation
|