mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 10:00:16 +02:00
I had to change how blocks are represented to make it easier to parse This required a fairly substantial refactor that makes it so blocks are represented differently and we can walk them sequentially. This will make future analysis easier to deal with. Had to rewrite the passes and core's parsing of the IR afterwards. Moved RA in to a optimization pass to be shared between the JIT backends This works because x86-64 and AArch64 RA can be identical. Still doesn't support PHI nodes or spilling correctly, this is the first step in the process of getting there.
31 lines
508 B
C++
31 lines
508 B
C++
#pragma once
|
|
|
|
#include <FEXCore/IR/IntrusiveIRList.h>
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
namespace FEXCore::IR {
|
|
class OpDispatchBuilder;
|
|
|
|
class Pass {
|
|
public:
|
|
virtual ~Pass() = default;
|
|
virtual bool Run(OpDispatchBuilder *Disp) = 0;
|
|
};
|
|
|
|
class PassManager final {
|
|
public:
|
|
void AddDefaultPasses();
|
|
void AddDefaultValidationPasses();
|
|
void InsertPass(Pass *Pass) {
|
|
Passes.emplace_back(Pass);
|
|
}
|
|
bool Run(OpDispatchBuilder *Disp);
|
|
|
|
private:
|
|
std::vector<std::unique_ptr<Pass>> Passes;
|
|
};
|
|
}
|
|
|