@@ -822,7 +822,8 @@ bool ClosureArgDataflowState::process(
822
822
for (unsigned i : indices (livenessWorklist)) {
823
823
if (auto *ptr = livenessWorklist[i]) {
824
824
LLVM_DEBUG (llvm::dbgs ()
825
- << " ClosureArgLivenessDataflow. Liveness User: " << *ptr);
825
+ << " ClosureArgLivenessDataflow. Final: Liveness User: "
826
+ << *ptr);
826
827
state.pairedUseInsts .push_back (ptr);
827
828
}
828
829
}
@@ -1350,6 +1351,7 @@ bool GatherLexicalLifetimeUseVisitor::visitUse(Operand *op,
1350
1351
auto *func = fas.getCalleeFunction ();
1351
1352
if (!func || !func->isDefer ())
1352
1353
return false ;
1354
+ LLVM_DEBUG (llvm::dbgs () << " Found closure use: " << *op->getUser ());
1353
1355
useState.insertClosureOperand (op);
1354
1356
return true ;
1355
1357
}
@@ -1595,12 +1597,14 @@ bool DataflowState::process(
1595
1597
bool emittedSingleDiagnostic = false ;
1596
1598
1597
1599
LLVM_DEBUG (llvm::dbgs () << " Checking Multi Block Dataflow for: " << *mvi);
1600
+ LLVM_DEBUG (llvm::dbgs () << " Parent Block: bb"
1601
+ << mvi->getParent ()->getDebugID () << " \n " );
1598
1602
1599
1603
BasicBlockWorklist worklist (fn);
1600
1604
BasicBlockSetVector visitedBlocks (fn);
1601
1605
for (auto *succBlock : mvi->getParent ()->getSuccessorBlocks ()) {
1602
1606
LLVM_DEBUG (llvm::dbgs ()
1603
- << " SuccBlocks: " << succBlock->getDebugID () << " \n " );
1607
+ << " SuccBlocks: bb " << succBlock->getDebugID () << " \n " );
1604
1608
worklist.pushIfNotVisited (succBlock);
1605
1609
visitedBlocks.insert (succBlock);
1606
1610
}
@@ -1644,7 +1648,8 @@ bool DataflowState::process(
1644
1648
{
1645
1649
auto iter = closureUseBlocks.find (next);
1646
1650
if (iter != closureUseBlocks.end ()) {
1647
- LLVM_DEBUG (llvm::dbgs () << " Is Use Block! Emitting Error!\n " );
1651
+ LLVM_DEBUG (llvm::dbgs ()
1652
+ << " Is Use Block From Closure! Emitting Error!\n " );
1648
1653
// We found one! Emit the diagnostic and continue and see if we can
1649
1654
// get more diagnostics.
1650
1655
auto &astContext = fn->getASTContext ();
@@ -1825,7 +1830,7 @@ void DataflowState::init() {
1825
1830
}
1826
1831
}
1827
1832
1828
- for (auto closureUse : useState.closureUses ) {
1833
+ for (auto & closureUse : useState.closureUses ) {
1829
1834
auto *use = closureUse.first ;
1830
1835
auto &state = closureUse.second ;
1831
1836
auto *user = use->getUser ();
0 commit comments