[llvm-branch-commits] [clang] [LifetimeSafety][NFC] Add field-labeled child edges to OriginNode and generalize subtree walks (PR #201510)

Zhijie Wang via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jun 11 12:57:27 PDT 2026


================
@@ -365,13 +376,18 @@ void FactsGenerator::VisitUnaryOperator(const UnaryOperator *UO) {
   }
 }
 
+void FactsGenerator::emitReturnEscapes(OriginNode *N, const Expr *RetExpr) {
+  if (!N)
+    return;
+  EscapesInCurrentBlock.push_back(
+      FactMgr.createFact<ReturnEscapeFact>(N->getOriginID(), RetExpr));
+  for (const OriginNode::Edge &E : N->children())
----------------
aeft wrote:

https://llvm-compile-time-tracker.com/?config=Overview&stat=instructions%3Au&remote=aeft   
  
branch: aeft/perf/lifetime-safety-11-Jun  
  
I tested the performance of BFS (i.e., the current implementation). Currently the performance doesn't change much compared to previous DFS (commit [2e0e47c46c](https://github.com/llvm/llvm-project/commit/2e0e47c46cadbfc9c4aa296ffb8c1c633a250a87 "bfs traversal")).

https://github.com/llvm/llvm-project/pull/201510


More information about the llvm-branch-commits mailing list