mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 17:00:19 +02:00
JIT: use registers directly from the IR
This is the flag day change from the series, using all the new shiny infrastructre we added. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
1 parent
afce108ed7
commit
49f8332c5b
5 files changed
+113
-81
No files matched your search
@@ -652,6 +652,25 @@ void ConstrainedRAPass::Run(IREmitter* IREmit_) {
|
||||
}
|
||||
|
||||
LOGMAN_THROW_A_FMT(SourceIndex == 0, "Consistent source count in block");
|
||||
|
||||
// Finalize results for the block. This will go away.
|
||||
for (auto [CodeNode, IROp] : IR->GetCode(BlockNode)) {
|
||||
for (auto s = 0; s < IR::GetRAArgs(IROp->Op); ++s) {
|
||||
if (IROp->Args[s].IsInvalid()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto Reg = SSAToReg[IROp->Args[s].ID().Value];
|
||||
|
||||
if (!Reg.IsInvalid()) {
|
||||
IROp->Args[s].SetImmediate(Reg.Raw);
|
||||
}
|
||||
}
|
||||
|
||||
if (GetHasDest(IROp->Op)) {
|
||||
CodeNode->Reg = SSAToReg[IR->GetID(CodeNode).Value].Raw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Now that we're done growing things, we can finalize our results.
|
||||
|
||||
Reference in new issue
Block a user