13
13
#define DEBUG_TYPE " sil-escape"
14
14
#include " swift/SILOptimizer/Analysis/EscapeAnalysis.h"
15
15
#include " swift/SIL/DebugUtils.h"
16
+ #include " swift/SIL/PrettyStackTrace.h"
16
17
#include " swift/SIL/SILArgument.h"
17
18
#include " swift/SILOptimizer/Analysis/ArraySemantic.h"
18
19
#include " swift/SILOptimizer/Analysis/BasicCalleeAnalysis.h"
@@ -2345,6 +2346,8 @@ void EscapeAnalysis::recompute(FunctionInfo *Initial) {
2345
2346
LLVM_DEBUG (llvm::dbgs () << " create summary graph for "
2346
2347
<< FInfo->Graph .F ->getName () << ' \n ' );
2347
2348
2349
+ PrettyStackTraceSILFunction
2350
+ callerTraceRAII (" merging escape summary" , FInfo->Graph .F );
2348
2351
FInfo->Graph .propagateEscapeStates ();
2349
2352
2350
2353
// Derive the summary graph of the current function. Even if the
@@ -2365,7 +2368,11 @@ void EscapeAnalysis::recompute(FunctionInfo *Initial) {
2365
2368
2366
2369
// Only include callers which we are actually recomputing.
2367
2370
if (BottomUpOrder.wasRecomputedWithCurrentUpdateID (E.Caller )) {
2368
- LLVM_DEBUG (llvm::dbgs () << " merge "
2371
+ PrettyStackTraceSILFunction
2372
+ calleeTraceRAII (" merging escape graph" , FInfo->Graph .F );
2373
+ PrettyStackTraceSILFunction
2374
+ callerTraceRAII (" ...into" , E.Caller ->Graph .F );
2375
+ LLVM_DEBUG (llvm::dbgs () << " merge "
2369
2376
<< FInfo->Graph .F ->getName ()
2370
2377
<< " into "
2371
2378
<< E.Caller ->Graph .F ->getName () << ' \n ' );
0 commit comments