@@ -110,6 +110,9 @@ bool SILGenCleanup::completeOSSALifetimes(SILFunction *function) {
110
110
if (!getModule ()->getOptions ().OSSACompleteLifetimes )
111
111
return false ;
112
112
113
+ LLVM_DEBUG (llvm::dbgs () << " Completing lifetimes in " << function->getName ()
114
+ << " \n " );
115
+
113
116
bool changed = false ;
114
117
115
118
// Lifetimes must be completed inside out (bottom-up in the CFG).
@@ -118,20 +121,26 @@ bool SILGenCleanup::completeOSSALifetimes(SILFunction *function) {
118
121
DeadEndBlocks *deb = getAnalysis<DeadEndBlocksAnalysis>()->get (function);
119
122
OSSALifetimeCompletion completion (function, /* DomInfo*/ nullptr , *deb);
120
123
for (auto *block : postOrder->getPostOrder ()) {
124
+ LLVM_DEBUG (llvm::dbgs ()
125
+ << " Completing lifetimes in bb" << block->getDebugID () << " \n " );
121
126
for (SILInstruction &inst : reverse (*block)) {
122
127
for (auto result : inst.getResults ()) {
128
+ LLVM_DEBUG (llvm::dbgs () << " completing " << result << " \n " );
123
129
if (completion.completeOSSALifetime (
124
130
result, OSSALifetimeCompletion::Boundary::Availability) ==
125
131
LifetimeCompletion::WasCompleted) {
132
+ LLVM_DEBUG (llvm::dbgs () << " \t completed!\n " );
126
133
changed = true ;
127
134
}
128
135
}
129
136
}
130
137
for (SILArgument *arg : block->getArguments ()) {
138
+ LLVM_DEBUG (llvm::dbgs () << " completing " << *arg << " \n " );
131
139
assert (!arg->isReborrow () && " reborrows not legal at this SIL stage" );
132
140
if (completion.completeOSSALifetime (
133
141
arg, OSSALifetimeCompletion::Boundary::Availability) ==
134
142
LifetimeCompletion::WasCompleted) {
143
+ LLVM_DEBUG (llvm::dbgs () << " \t completed!\n " );
135
144
changed = true ;
136
145
}
137
146
}
0 commit comments