mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1009603: Automatically stop register allocation tracelogging on error; r=h4writer
This commit is contained in:
parent
d2053b443f
commit
d27ab5aa52
@ -1567,71 +1567,71 @@ GenerateLIR(MIRGenerator *mir)
|
||||
|
||||
AllocationIntegrityState integrity(*lir);
|
||||
|
||||
TraceLogStartEvent(logger, TraceLogger::RegisterAllocation);
|
||||
{
|
||||
AutoTraceLog log(logger, TraceLogger::RegisterAllocation);
|
||||
|
||||
switch (mir->optimizationInfo().registerAllocator()) {
|
||||
case RegisterAllocator_LSRA: {
|
||||
switch (mir->optimizationInfo().registerAllocator()) {
|
||||
case RegisterAllocator_LSRA: {
|
||||
#ifdef DEBUG
|
||||
if (!integrity.record())
|
||||
return nullptr;
|
||||
if (!integrity.record())
|
||||
return nullptr;
|
||||
#endif
|
||||
|
||||
LinearScanAllocator regalloc(mir, &lirgen, *lir);
|
||||
if (!regalloc.go())
|
||||
return nullptr;
|
||||
LinearScanAllocator regalloc(mir, &lirgen, *lir);
|
||||
if (!regalloc.go())
|
||||
return nullptr;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (!integrity.check(false))
|
||||
return nullptr;
|
||||
if (!integrity.check(false))
|
||||
return nullptr;
|
||||
#endif
|
||||
|
||||
IonSpewPass("Allocate Registers [LSRA]", ®alloc);
|
||||
break;
|
||||
}
|
||||
IonSpewPass("Allocate Registers [LSRA]", ®alloc);
|
||||
break;
|
||||
}
|
||||
|
||||
case RegisterAllocator_Backtracking: {
|
||||
case RegisterAllocator_Backtracking: {
|
||||
#ifdef DEBUG
|
||||
if (!integrity.record())
|
||||
return nullptr;
|
||||
if (!integrity.record())
|
||||
return nullptr;
|
||||
#endif
|
||||
|
||||
BacktrackingAllocator regalloc(mir, &lirgen, *lir);
|
||||
if (!regalloc.go())
|
||||
return nullptr;
|
||||
BacktrackingAllocator regalloc(mir, &lirgen, *lir);
|
||||
if (!regalloc.go())
|
||||
return nullptr;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (!integrity.check(false))
|
||||
return nullptr;
|
||||
if (!integrity.check(false))
|
||||
return nullptr;
|
||||
#endif
|
||||
|
||||
IonSpewPass("Allocate Registers [Backtracking]");
|
||||
break;
|
||||
}
|
||||
IonSpewPass("Allocate Registers [Backtracking]");
|
||||
break;
|
||||
}
|
||||
|
||||
case RegisterAllocator_Stupid: {
|
||||
// Use the integrity checker to populate safepoint information, so
|
||||
// run it in all builds.
|
||||
if (!integrity.record())
|
||||
return nullptr;
|
||||
case RegisterAllocator_Stupid: {
|
||||
// Use the integrity checker to populate safepoint information, so
|
||||
// run it in all builds.
|
||||
if (!integrity.record())
|
||||
return nullptr;
|
||||
|
||||
StupidAllocator regalloc(mir, &lirgen, *lir);
|
||||
if (!regalloc.go())
|
||||
return nullptr;
|
||||
if (!integrity.check(true))
|
||||
return nullptr;
|
||||
IonSpewPass("Allocate Registers [Stupid]");
|
||||
break;
|
||||
}
|
||||
StupidAllocator regalloc(mir, &lirgen, *lir);
|
||||
if (!regalloc.go())
|
||||
return nullptr;
|
||||
if (!integrity.check(true))
|
||||
return nullptr;
|
||||
IonSpewPass("Allocate Registers [Stupid]");
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad regalloc");
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad regalloc");
|
||||
}
|
||||
|
||||
if (mir->shouldCancel("Allocate Registers"))
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (mir->shouldCancel("Allocate Registers"))
|
||||
return nullptr;
|
||||
|
||||
TraceLogStopEvent(logger, TraceLogger::RegisterAllocation);
|
||||
|
||||
{
|
||||
AutoTraceLog log(logger, TraceLogger::UnsplitEdges);
|
||||
// Now that all optimization and register allocation is done, re-introduce
|
||||
|
Loading…
Reference in New Issue
Block a user