OpDisp: Re add ShouldDump

This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis 2022-06-16 17:38:44 +00:00
parent 18074307f6
commit f05b24636f
3 changed files with 10 additions and 4 deletions

View File

@ -639,7 +639,8 @@ namespace FEXCore::Context {
bool CloseAfter = false;
const auto DumpIRStr = Thread->CTX->Config.DumpIR();
if (DumpIRStr =="stderr") {
// DumpIRStr might be no if not dumping but ShouldDump is set in OpDisp
if (DumpIRStr =="stderr" || DumpIRStr =="no") {
f = stderr;
}
else if (DumpIRStr =="stdout") {
@ -816,9 +817,10 @@ namespace FEXCore::Context {
IR::IREmitter *IREmitter = Thread->OpDispatcher.get();
auto ShouldDump = Thread->CTX->Config.DumpIR() != "no" || Thread->OpDispatcher->ShouldDump;
// Debug
{
if (Thread->CTX->Config.DumpIR() != "no") {
if (ShouldDump) {
IRDumper(Thread, IREmitter, GuestRIP, nullptr);
}
@ -832,7 +834,7 @@ namespace FEXCore::Context {
// Debug
{
if (Thread->CTX->Config.DumpIR() != "no") {
if (ShouldDump) {
IRDumper(Thread, IREmitter, GuestRIP, Thread->PassManager->HasPass("RA") ? Thread->PassManager->GetPass<IR::RegisterAllocationPass>("RA")->GetAllocationData() : nullptr);
}
}

View File

@ -4919,6 +4919,7 @@ void OpDispatchBuilder::ResetWorkingList() {
JumpTargets.clear();
BlockSetRIP = false;
DecodeFailure = false;
ShouldDump = false;
CurrentCodeBlock = nullptr;
}

View File

@ -76,7 +76,10 @@ public:
OrderedNode* flagsOpSrcSigned{};
FEXCore::Context::Context *CTX{};
// Used during new op bringup
bool ShouldDump {false};
struct JumpTargetInfo {
OrderedNode* BlockEntry;
bool HaveEmitted;