mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Stats] Flush Stats profiles and tracers at SILModule lifecycle boundary.
This commit is contained in:
@@ -1353,6 +1353,16 @@ static bool performCompileStepsPostSILGen(
|
||||
|
||||
runSILLoweringPasses(*SM);
|
||||
|
||||
// TODO: at this point we need to flush any the _tracing and profiling_
|
||||
// in the UnifiedStatsReporter, because the those subsystems of the USR
|
||||
// retain _pointers into_ the SILModule, and the SILModule's lifecycle is
|
||||
// not presently such that it will outlive the USR (indeed, as it's
|
||||
// destroyed on a separate thread, this fact isn't even _deterministic_
|
||||
// after this point). If future plans require the USR tracing or
|
||||
// profiling entities after this point, more rearranging will be required.
|
||||
if (Stats)
|
||||
Stats->flushTracesAndProfiles();
|
||||
|
||||
if (Action == FrontendOptions::ActionType::DumpTypeInfo)
|
||||
return performDumpTypeInfo(IRGenOpts, *SM, getGlobalLLVMContext());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user