Skip to content

Conversation

@usx95
Copy link
Contributor

@usx95 usx95 commented Oct 30, 2025

Summary

Optimizes the lifetime analysis loan propagation by preventing block-local origins from participating in expensive join operations at block boundaries.

Problem

The lifetime analysis currently performs join operations on all origins at every block boundary. However, many origins are block-local: they exist only to propagate loans between persistent origins across temporary declarations and expressions within a single block. Including them in joins is unnecessary and expensive.

Solution

This PR classifies origins into two categories:

  • Persistent origins: referenced in multiple basic blocks, must participate in joins
  • Block-local origins: confined to a single block, can be discarded at block boundaries

Implementation

  1. Pre-pass (computePersistentOrigins): Analyzes all facts in the CFG to identify which origins appear in multiple blocks
  2. Split lattice: Maintains two separate OriginLoanMaps:
    • PersistentOrigins: participates in join operations
    • BlockLocalOrigins: used during block execution, discarded at boundaries
  3. Optimized join: Only merges persistent origins; block-local map is reset to empty

Benefits

  • Significantly reduces join complexity, especially in functions with many temporary locals
  • Performance scales with the ratio of temporary to persistent origins
  • Correctness preserved: block-local loan propagation still works within blocks

Fixes: #165780

Fixes: #164625. It brings down regression from 150% to 2%.


Copy link
Contributor Author

usx95 commented Oct 30, 2025

@usx95 usx95 changed the title persistent-origin-optimisation Optimize loan propagation by separating persistent and block-local origins Oct 30, 2025
@usx95 usx95 requested review from Xazax-hun and ymand October 30, 2025 23:02
@usx95 usx95 self-assigned this Oct 30, 2025
@usx95 usx95 marked this pull request as ready for review October 30, 2025 23:05
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:analysis clang:temporal-safety Issue/FR relating to the lifetime analysis in Clang (-Wdangling, -Wreturn-local-addr) labels Oct 30, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 30, 2025

@llvm/pr-subscribers-clang-temporal-safety

Author: Utkarsh Saxena (usx95)

Changes

Summary

Optimizes the lifetime analysis loan propagation by preventing block-local origins from participating in expensive join operations at block boundaries.

Problem

The lifetime analysis currently performs join operations on all origins at every block boundary. However, many origins are block-local: they exist only to propagate loans between persistent origins across temporary declarations within a single block. Including them in joins is unnecessary and expensive.

Solution

This PR classifies origins into two categories:

  • Persistent origins: referenced in multiple basic blocks, must participate in joins
  • Block-local origins: confined to a single block, can be discarded at block boundaries

Implementation

  1. Pre-pass (computePersistentOrigins): Analyzes all facts in the CFG to identify which origins appear in multiple blocks
  2. Split lattice: Maintains two separate OriginLoanMaps:
    • PersistentOrigins: participates in join operations
    • BlockLocalOrigins: used during block execution, discarded at boundaries
  3. Optimized join: Only merges persistent origins; block-local map is reset to empty

Benefits

  • Significantly reduces join complexity, especially in functions with many temporary locals
  • Performance scales with the ratio of temporary to persistent origins
  • Correctness preserved: block-local loan propagation still works within blocks

Fixes #165780



Full diff: https://github.com/llvm/llvm-project/pull/165789.diff

2 Files Affected:

  • (modified) clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp (+93-14)
  • (modified) clang/unittests/Analysis/LifetimeSafetyTest.cpp (-1)
diff --git a/clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp b/clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
index 387097e705f94..3ee48facfeb57 100644
--- a/clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
+++ b/clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
@@ -7,10 +7,60 @@
 //===----------------------------------------------------------------------===//
 #include "clang/Analysis/Analyses/LifetimeSafety/LoanPropagation.h"
 #include "Dataflow.h"
+#include "llvm/Support/TimeProfiler.h"
 #include <memory>
 
 namespace clang::lifetimes::internal {
+
+// Pre-pass to find persistent origins. An origin is persistent if it is
+// referenced in more than one basic block.
+static llvm::DenseSet<OriginID> computePersistentOrigins(FactManager &FactMgr,
+                                                         const CFG &C) {
+  llvm::TimeTraceScope("ComputePersistentOrigins");
+  llvm::DenseSet<OriginID> PersistentOrigins;
+
+  llvm::DenseMap<OriginID, const CFGBlock *> OriginToBlock;
+  for (const CFGBlock *B : C) {
+    for (const Fact *F : FactMgr.getFacts(B)) {
+      auto CheckOrigin = [&](OriginID OID) {
+        if (PersistentOrigins.count(OID))
+          return;
+        auto It = OriginToBlock.find(OID);
+        if (It == OriginToBlock.end()) {
+          OriginToBlock[OID] = B;
+        } else if (It->second != B) {
+          // We saw this origin in more than one block.
+          PersistentOrigins.insert(OID);
+        }
+      };
+
+      switch (F->getKind()) {
+      case Fact::Kind::Issue:
+        CheckOrigin(F->getAs<IssueFact>()->getOriginID());
+        break;
+      case Fact::Kind::OriginFlow: {
+        const auto *OF = F->getAs<OriginFlowFact>();
+        CheckOrigin(OF->getDestOriginID());
+        CheckOrigin(OF->getSrcOriginID());
+        break;
+      }
+      case Fact::Kind::ReturnOfOrigin:
+        CheckOrigin(F->getAs<ReturnOfOriginFact>()->getReturnedOriginID());
+        break;
+      case Fact::Kind::Use:
+        CheckOrigin(F->getAs<UseFact>()->getUsedOrigin(FactMgr.getOriginMgr()));
+        break;
+      case Fact::Kind::Expire:
+      case Fact::Kind::TestPoint:
+        break;
+      }
+    }
+  }
+  return PersistentOrigins;
+}
+
 namespace {
+
 /// Represents the dataflow lattice for loan propagation.
 ///
 /// This lattice tracks which loans each origin may hold at a given program
@@ -20,21 +70,35 @@ namespace {
 /// not expressions, because expressions are not visible across blocks.
 struct Lattice {
   /// The map from an origin to the set of loans it contains.
-  OriginLoanMap Origins = OriginLoanMap(nullptr);
+  OriginLoanMap PersistentOrigins = OriginLoanMap(nullptr);
+  OriginLoanMap BlockLocalOrigins = OriginLoanMap(nullptr);
 
-  explicit Lattice(const OriginLoanMap &S) : Origins(S) {}
+  explicit Lattice(const OriginLoanMap &Persistent,
+                   const OriginLoanMap &BlockLocal)
+      : PersistentOrigins(Persistent), BlockLocalOrigins(BlockLocal) {}
   Lattice() = default;
 
   bool operator==(const Lattice &Other) const {
-    return Origins == Other.Origins;
+    return PersistentOrigins == Other.PersistentOrigins &&
+           BlockLocalOrigins == Other.BlockLocalOrigins;
   }
   bool operator!=(const Lattice &Other) const { return !(*this == Other); }
 
   void dump(llvm::raw_ostream &OS) const {
     OS << "LoanPropagationLattice State:\n";
-    if (Origins.isEmpty())
+    OS << " Persistent Origins:\n";
+    if (PersistentOrigins.isEmpty())
       OS << "  <empty>\n";
-    for (const auto &Entry : Origins) {
+    for (const auto &Entry : PersistentOrigins) {
+      if (Entry.second.isEmpty())
+        OS << "  Origin " << Entry.first << " contains no loans\n";
+      for (const LoanID &LID : Entry.second)
+        OS << "  Origin " << Entry.first << " contains Loan " << LID << "\n";
+    }
+    OS << " Block-Local Origins:\n";
+    if (BlockLocalOrigins.isEmpty())
+      OS << "  <empty>\n";
+    for (const auto &Entry : BlockLocalOrigins) {
       if (Entry.second.isEmpty())
         OS << "  Origin " << Entry.first << " contains no loans\n";
       for (const LoanID &LID : Entry.second)
@@ -50,7 +114,8 @@ class AnalysisImpl
                OriginLoanMap::Factory &OriginLoanMapFactory,
                LoanSet::Factory &LoanSetFactory)
       : DataflowAnalysis(C, AC, F), OriginLoanMapFactory(OriginLoanMapFactory),
-        LoanSetFactory(LoanSetFactory) {}
+        LoanSetFactory(LoanSetFactory),
+        PersistentOrigins(computePersistentOrigins(F, C)) {}
 
   using Base::transfer;
 
@@ -59,10 +124,9 @@ class AnalysisImpl
   Lattice getInitialState() { return Lattice{}; }
 
   /// Merges two lattices by taking the union of loans for each origin.
-  // TODO(opt): Keep the state small by removing origins which become dead.
   Lattice join(Lattice A, Lattice B) {
     OriginLoanMap JoinedOrigins = utils::join(
-        A.Origins, B.Origins, OriginLoanMapFactory,
+        A.PersistentOrigins, B.PersistentOrigins, OriginLoanMapFactory,
         [&](const LoanSet *S1, const LoanSet *S2) {
           assert((S1 || S2) && "unexpectedly merging 2 empty sets");
           if (!S1)
@@ -74,16 +138,15 @@ class AnalysisImpl
         // Asymmetric join is a performance win. For origins present only on one
         // branch, the loan set can be carried over as-is.
         utils::JoinKind::Asymmetric);
-    return Lattice(JoinedOrigins);
+    return Lattice(JoinedOrigins, OriginLoanMapFactory.getEmptyMap());
   }
 
   /// A new loan is issued to the origin. Old loans are erased.
   Lattice transfer(Lattice In, const IssueFact &F) {
     OriginID OID = F.getOriginID();
     LoanID LID = F.getLoanID();
-    return Lattice(OriginLoanMapFactory.add(
-        In.Origins, OID,
-        LoanSetFactory.add(LoanSetFactory.getEmptySet(), LID)));
+    LoanSet NewLoans = LoanSetFactory.add(LoanSetFactory.getEmptySet(), LID);
+    return setLoans(In, OID, NewLoans);
   }
 
   /// A flow from source to destination. If `KillDest` is true, this replaces
@@ -98,7 +161,7 @@ class AnalysisImpl
     LoanSet SrcLoans = getLoans(In, SrcOID);
     LoanSet MergedLoans = utils::join(DestLoans, SrcLoans, LoanSetFactory);
 
-    return Lattice(OriginLoanMapFactory.add(In.Origins, DestOID, MergedLoans));
+    return setLoans(In, DestOID, MergedLoans);
   }
 
   LoanSet getLoans(OriginID OID, ProgramPoint P) const {
@@ -106,14 +169,30 @@ class AnalysisImpl
   }
 
 private:
+  bool isPersistent(OriginID OID) const {
+    return PersistentOrigins.contains(OID);
+  }
+
+  Lattice setLoans(Lattice L, OriginID OID, LoanSet Loans) {
+    if (isPersistent(OID)) {
+      return Lattice(OriginLoanMapFactory.add(L.PersistentOrigins, OID, Loans),
+                     L.BlockLocalOrigins);
+    }
+    return Lattice(L.PersistentOrigins,
+                   OriginLoanMapFactory.add(L.BlockLocalOrigins, OID, Loans));
+  }
+
   LoanSet getLoans(Lattice L, OriginID OID) const {
-    if (auto *Loans = L.Origins.lookup(OID))
+    const OriginLoanMap *Map =
+        isPersistent(OID) ? &L.PersistentOrigins : &L.BlockLocalOrigins;
+    if (auto *Loans = Map->lookup(OID))
       return *Loans;
     return LoanSetFactory.getEmptySet();
   }
 
   OriginLoanMap::Factory &OriginLoanMapFactory;
   LoanSet::Factory &LoanSetFactory;
+  llvm::DenseSet<OriginID> PersistentOrigins;
 };
 } // namespace
 
diff --git a/clang/unittests/Analysis/LifetimeSafetyTest.cpp b/clang/unittests/Analysis/LifetimeSafetyTest.cpp
index 0c051847f4d47..40205b9a8fd19 100644
--- a/clang/unittests/Analysis/LifetimeSafetyTest.cpp
+++ b/clang/unittests/Analysis/LifetimeSafetyTest.cpp
@@ -543,7 +543,6 @@ TEST_F(LifetimeAnalysisTest, PointersInACycle) {
   EXPECT_THAT(Origin("p1"), HasLoansTo({"v1", "v2", "v3"}, "after_loop"));
   EXPECT_THAT(Origin("p2"), HasLoansTo({"v1", "v2", "v3"}, "after_loop"));
   EXPECT_THAT(Origin("p3"), HasLoansTo({"v1", "v2", "v3"}, "after_loop"));
-  EXPECT_THAT(Origin("temp"), HasLoansTo({"v1", "v2", "v3"}, "after_loop"));
 }
 
 TEST_F(LifetimeAnalysisTest, PointersAndExpirationInACycle) {

@llvmbot
Copy link
Member

llvmbot commented Oct 30, 2025

@llvm/pr-subscribers-clang-analysis

Author: Utkarsh Saxena (usx95)

Changes

Summary

Optimizes the lifetime analysis loan propagation by preventing block-local origins from participating in expensive join operations at block boundaries.

Problem

The lifetime analysis currently performs join operations on all origins at every block boundary. However, many origins are block-local: they exist only to propagate loans between persistent origins across temporary declarations within a single block. Including them in joins is unnecessary and expensive.

Solution

This PR classifies origins into two categories:

  • Persistent origins: referenced in multiple basic blocks, must participate in joins
  • Block-local origins: confined to a single block, can be discarded at block boundaries

Implementation

  1. Pre-pass (computePersistentOrigins): Analyzes all facts in the CFG to identify which origins appear in multiple blocks
  2. Split lattice: Maintains two separate OriginLoanMaps:
    • PersistentOrigins: participates in join operations
    • BlockLocalOrigins: used during block execution, discarded at boundaries
  3. Optimized join: Only merges persistent origins; block-local map is reset to empty

Benefits

  • Significantly reduces join complexity, especially in functions with many temporary locals
  • Performance scales with the ratio of temporary to persistent origins
  • Correctness preserved: block-local loan propagation still works within blocks

Fixes #165780



Full diff: https://github.com/llvm/llvm-project/pull/165789.diff

2 Files Affected:

  • (modified) clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp (+93-14)
  • (modified) clang/unittests/Analysis/LifetimeSafetyTest.cpp (-1)
diff --git a/clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp b/clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
index 387097e705f94..3ee48facfeb57 100644
--- a/clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
+++ b/clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
@@ -7,10 +7,60 @@
 //===----------------------------------------------------------------------===//
 #include "clang/Analysis/Analyses/LifetimeSafety/LoanPropagation.h"
 #include "Dataflow.h"
+#include "llvm/Support/TimeProfiler.h"
 #include <memory>
 
 namespace clang::lifetimes::internal {
+
+// Pre-pass to find persistent origins. An origin is persistent if it is
+// referenced in more than one basic block.
+static llvm::DenseSet<OriginID> computePersistentOrigins(FactManager &FactMgr,
+                                                         const CFG &C) {
+  llvm::TimeTraceScope("ComputePersistentOrigins");
+  llvm::DenseSet<OriginID> PersistentOrigins;
+
+  llvm::DenseMap<OriginID, const CFGBlock *> OriginToBlock;
+  for (const CFGBlock *B : C) {
+    for (const Fact *F : FactMgr.getFacts(B)) {
+      auto CheckOrigin = [&](OriginID OID) {
+        if (PersistentOrigins.count(OID))
+          return;
+        auto It = OriginToBlock.find(OID);
+        if (It == OriginToBlock.end()) {
+          OriginToBlock[OID] = B;
+        } else if (It->second != B) {
+          // We saw this origin in more than one block.
+          PersistentOrigins.insert(OID);
+        }
+      };
+
+      switch (F->getKind()) {
+      case Fact::Kind::Issue:
+        CheckOrigin(F->getAs<IssueFact>()->getOriginID());
+        break;
+      case Fact::Kind::OriginFlow: {
+        const auto *OF = F->getAs<OriginFlowFact>();
+        CheckOrigin(OF->getDestOriginID());
+        CheckOrigin(OF->getSrcOriginID());
+        break;
+      }
+      case Fact::Kind::ReturnOfOrigin:
+        CheckOrigin(F->getAs<ReturnOfOriginFact>()->getReturnedOriginID());
+        break;
+      case Fact::Kind::Use:
+        CheckOrigin(F->getAs<UseFact>()->getUsedOrigin(FactMgr.getOriginMgr()));
+        break;
+      case Fact::Kind::Expire:
+      case Fact::Kind::TestPoint:
+        break;
+      }
+    }
+  }
+  return PersistentOrigins;
+}
+
 namespace {
+
 /// Represents the dataflow lattice for loan propagation.
 ///
 /// This lattice tracks which loans each origin may hold at a given program
@@ -20,21 +70,35 @@ namespace {
 /// not expressions, because expressions are not visible across blocks.
 struct Lattice {
   /// The map from an origin to the set of loans it contains.
-  OriginLoanMap Origins = OriginLoanMap(nullptr);
+  OriginLoanMap PersistentOrigins = OriginLoanMap(nullptr);
+  OriginLoanMap BlockLocalOrigins = OriginLoanMap(nullptr);
 
-  explicit Lattice(const OriginLoanMap &S) : Origins(S) {}
+  explicit Lattice(const OriginLoanMap &Persistent,
+                   const OriginLoanMap &BlockLocal)
+      : PersistentOrigins(Persistent), BlockLocalOrigins(BlockLocal) {}
   Lattice() = default;
 
   bool operator==(const Lattice &Other) const {
-    return Origins == Other.Origins;
+    return PersistentOrigins == Other.PersistentOrigins &&
+           BlockLocalOrigins == Other.BlockLocalOrigins;
   }
   bool operator!=(const Lattice &Other) const { return !(*this == Other); }
 
   void dump(llvm::raw_ostream &OS) const {
     OS << "LoanPropagationLattice State:\n";
-    if (Origins.isEmpty())
+    OS << " Persistent Origins:\n";
+    if (PersistentOrigins.isEmpty())
       OS << "  <empty>\n";
-    for (const auto &Entry : Origins) {
+    for (const auto &Entry : PersistentOrigins) {
+      if (Entry.second.isEmpty())
+        OS << "  Origin " << Entry.first << " contains no loans\n";
+      for (const LoanID &LID : Entry.second)
+        OS << "  Origin " << Entry.first << " contains Loan " << LID << "\n";
+    }
+    OS << " Block-Local Origins:\n";
+    if (BlockLocalOrigins.isEmpty())
+      OS << "  <empty>\n";
+    for (const auto &Entry : BlockLocalOrigins) {
       if (Entry.second.isEmpty())
         OS << "  Origin " << Entry.first << " contains no loans\n";
       for (const LoanID &LID : Entry.second)
@@ -50,7 +114,8 @@ class AnalysisImpl
                OriginLoanMap::Factory &OriginLoanMapFactory,
                LoanSet::Factory &LoanSetFactory)
       : DataflowAnalysis(C, AC, F), OriginLoanMapFactory(OriginLoanMapFactory),
-        LoanSetFactory(LoanSetFactory) {}
+        LoanSetFactory(LoanSetFactory),
+        PersistentOrigins(computePersistentOrigins(F, C)) {}
 
   using Base::transfer;
 
@@ -59,10 +124,9 @@ class AnalysisImpl
   Lattice getInitialState() { return Lattice{}; }
 
   /// Merges two lattices by taking the union of loans for each origin.
-  // TODO(opt): Keep the state small by removing origins which become dead.
   Lattice join(Lattice A, Lattice B) {
     OriginLoanMap JoinedOrigins = utils::join(
-        A.Origins, B.Origins, OriginLoanMapFactory,
+        A.PersistentOrigins, B.PersistentOrigins, OriginLoanMapFactory,
         [&](const LoanSet *S1, const LoanSet *S2) {
           assert((S1 || S2) && "unexpectedly merging 2 empty sets");
           if (!S1)
@@ -74,16 +138,15 @@ class AnalysisImpl
         // Asymmetric join is a performance win. For origins present only on one
         // branch, the loan set can be carried over as-is.
         utils::JoinKind::Asymmetric);
-    return Lattice(JoinedOrigins);
+    return Lattice(JoinedOrigins, OriginLoanMapFactory.getEmptyMap());
   }
 
   /// A new loan is issued to the origin. Old loans are erased.
   Lattice transfer(Lattice In, const IssueFact &F) {
     OriginID OID = F.getOriginID();
     LoanID LID = F.getLoanID();
-    return Lattice(OriginLoanMapFactory.add(
-        In.Origins, OID,
-        LoanSetFactory.add(LoanSetFactory.getEmptySet(), LID)));
+    LoanSet NewLoans = LoanSetFactory.add(LoanSetFactory.getEmptySet(), LID);
+    return setLoans(In, OID, NewLoans);
   }
 
   /// A flow from source to destination. If `KillDest` is true, this replaces
@@ -98,7 +161,7 @@ class AnalysisImpl
     LoanSet SrcLoans = getLoans(In, SrcOID);
     LoanSet MergedLoans = utils::join(DestLoans, SrcLoans, LoanSetFactory);
 
-    return Lattice(OriginLoanMapFactory.add(In.Origins, DestOID, MergedLoans));
+    return setLoans(In, DestOID, MergedLoans);
   }
 
   LoanSet getLoans(OriginID OID, ProgramPoint P) const {
@@ -106,14 +169,30 @@ class AnalysisImpl
   }
 
 private:
+  bool isPersistent(OriginID OID) const {
+    return PersistentOrigins.contains(OID);
+  }
+
+  Lattice setLoans(Lattice L, OriginID OID, LoanSet Loans) {
+    if (isPersistent(OID)) {
+      return Lattice(OriginLoanMapFactory.add(L.PersistentOrigins, OID, Loans),
+                     L.BlockLocalOrigins);
+    }
+    return Lattice(L.PersistentOrigins,
+                   OriginLoanMapFactory.add(L.BlockLocalOrigins, OID, Loans));
+  }
+
   LoanSet getLoans(Lattice L, OriginID OID) const {
-    if (auto *Loans = L.Origins.lookup(OID))
+    const OriginLoanMap *Map =
+        isPersistent(OID) ? &L.PersistentOrigins : &L.BlockLocalOrigins;
+    if (auto *Loans = Map->lookup(OID))
       return *Loans;
     return LoanSetFactory.getEmptySet();
   }
 
   OriginLoanMap::Factory &OriginLoanMapFactory;
   LoanSet::Factory &LoanSetFactory;
+  llvm::DenseSet<OriginID> PersistentOrigins;
 };
 } // namespace
 
diff --git a/clang/unittests/Analysis/LifetimeSafetyTest.cpp b/clang/unittests/Analysis/LifetimeSafetyTest.cpp
index 0c051847f4d47..40205b9a8fd19 100644
--- a/clang/unittests/Analysis/LifetimeSafetyTest.cpp
+++ b/clang/unittests/Analysis/LifetimeSafetyTest.cpp
@@ -543,7 +543,6 @@ TEST_F(LifetimeAnalysisTest, PointersInACycle) {
   EXPECT_THAT(Origin("p1"), HasLoansTo({"v1", "v2", "v3"}, "after_loop"));
   EXPECT_THAT(Origin("p2"), HasLoansTo({"v1", "v2", "v3"}, "after_loop"));
   EXPECT_THAT(Origin("p3"), HasLoansTo({"v1", "v2", "v3"}, "after_loop"));
-  EXPECT_THAT(Origin("temp"), HasLoansTo({"v1", "v2", "v3"}, "after_loop"));
 }
 
 TEST_F(LifetimeAnalysisTest, PointersAndExpirationInACycle) {

@llvmbot
Copy link
Member

llvmbot commented Oct 30, 2025

@llvm/pr-subscribers-clang

Author: Utkarsh Saxena (usx95)

Changes

Summary

Optimizes the lifetime analysis loan propagation by preventing block-local origins from participating in expensive join operations at block boundaries.

Problem

The lifetime analysis currently performs join operations on all origins at every block boundary. However, many origins are block-local: they exist only to propagate loans between persistent origins across temporary declarations within a single block. Including them in joins is unnecessary and expensive.

Solution

This PR classifies origins into two categories:

  • Persistent origins: referenced in multiple basic blocks, must participate in joins
  • Block-local origins: confined to a single block, can be discarded at block boundaries

Implementation

  1. Pre-pass (computePersistentOrigins): Analyzes all facts in the CFG to identify which origins appear in multiple blocks
  2. Split lattice: Maintains two separate OriginLoanMaps:
    • PersistentOrigins: participates in join operations
    • BlockLocalOrigins: used during block execution, discarded at boundaries
  3. Optimized join: Only merges persistent origins; block-local map is reset to empty

Benefits

  • Significantly reduces join complexity, especially in functions with many temporary locals
  • Performance scales with the ratio of temporary to persistent origins
  • Correctness preserved: block-local loan propagation still works within blocks

Fixes #165780



Full diff: https://github.com/llvm/llvm-project/pull/165789.diff

2 Files Affected:

  • (modified) clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp (+93-14)
  • (modified) clang/unittests/Analysis/LifetimeSafetyTest.cpp (-1)
diff --git a/clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp b/clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
index 387097e705f94..3ee48facfeb57 100644
--- a/clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
+++ b/clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
@@ -7,10 +7,60 @@
 //===----------------------------------------------------------------------===//
 #include "clang/Analysis/Analyses/LifetimeSafety/LoanPropagation.h"
 #include "Dataflow.h"
+#include "llvm/Support/TimeProfiler.h"
 #include <memory>
 
 namespace clang::lifetimes::internal {
+
+// Pre-pass to find persistent origins. An origin is persistent if it is
+// referenced in more than one basic block.
+static llvm::DenseSet<OriginID> computePersistentOrigins(FactManager &FactMgr,
+                                                         const CFG &C) {
+  llvm::TimeTraceScope("ComputePersistentOrigins");
+  llvm::DenseSet<OriginID> PersistentOrigins;
+
+  llvm::DenseMap<OriginID, const CFGBlock *> OriginToBlock;
+  for (const CFGBlock *B : C) {
+    for (const Fact *F : FactMgr.getFacts(B)) {
+      auto CheckOrigin = [&](OriginID OID) {
+        if (PersistentOrigins.count(OID))
+          return;
+        auto It = OriginToBlock.find(OID);
+        if (It == OriginToBlock.end()) {
+          OriginToBlock[OID] = B;
+        } else if (It->second != B) {
+          // We saw this origin in more than one block.
+          PersistentOrigins.insert(OID);
+        }
+      };
+
+      switch (F->getKind()) {
+      case Fact::Kind::Issue:
+        CheckOrigin(F->getAs<IssueFact>()->getOriginID());
+        break;
+      case Fact::Kind::OriginFlow: {
+        const auto *OF = F->getAs<OriginFlowFact>();
+        CheckOrigin(OF->getDestOriginID());
+        CheckOrigin(OF->getSrcOriginID());
+        break;
+      }
+      case Fact::Kind::ReturnOfOrigin:
+        CheckOrigin(F->getAs<ReturnOfOriginFact>()->getReturnedOriginID());
+        break;
+      case Fact::Kind::Use:
+        CheckOrigin(F->getAs<UseFact>()->getUsedOrigin(FactMgr.getOriginMgr()));
+        break;
+      case Fact::Kind::Expire:
+      case Fact::Kind::TestPoint:
+        break;
+      }
+    }
+  }
+  return PersistentOrigins;
+}
+
 namespace {
+
 /// Represents the dataflow lattice for loan propagation.
 ///
 /// This lattice tracks which loans each origin may hold at a given program
@@ -20,21 +70,35 @@ namespace {
 /// not expressions, because expressions are not visible across blocks.
 struct Lattice {
   /// The map from an origin to the set of loans it contains.
-  OriginLoanMap Origins = OriginLoanMap(nullptr);
+  OriginLoanMap PersistentOrigins = OriginLoanMap(nullptr);
+  OriginLoanMap BlockLocalOrigins = OriginLoanMap(nullptr);
 
-  explicit Lattice(const OriginLoanMap &S) : Origins(S) {}
+  explicit Lattice(const OriginLoanMap &Persistent,
+                   const OriginLoanMap &BlockLocal)
+      : PersistentOrigins(Persistent), BlockLocalOrigins(BlockLocal) {}
   Lattice() = default;
 
   bool operator==(const Lattice &Other) const {
-    return Origins == Other.Origins;
+    return PersistentOrigins == Other.PersistentOrigins &&
+           BlockLocalOrigins == Other.BlockLocalOrigins;
   }
   bool operator!=(const Lattice &Other) const { return !(*this == Other); }
 
   void dump(llvm::raw_ostream &OS) const {
     OS << "LoanPropagationLattice State:\n";
-    if (Origins.isEmpty())
+    OS << " Persistent Origins:\n";
+    if (PersistentOrigins.isEmpty())
       OS << "  <empty>\n";
-    for (const auto &Entry : Origins) {
+    for (const auto &Entry : PersistentOrigins) {
+      if (Entry.second.isEmpty())
+        OS << "  Origin " << Entry.first << " contains no loans\n";
+      for (const LoanID &LID : Entry.second)
+        OS << "  Origin " << Entry.first << " contains Loan " << LID << "\n";
+    }
+    OS << " Block-Local Origins:\n";
+    if (BlockLocalOrigins.isEmpty())
+      OS << "  <empty>\n";
+    for (const auto &Entry : BlockLocalOrigins) {
       if (Entry.second.isEmpty())
         OS << "  Origin " << Entry.first << " contains no loans\n";
       for (const LoanID &LID : Entry.second)
@@ -50,7 +114,8 @@ class AnalysisImpl
                OriginLoanMap::Factory &OriginLoanMapFactory,
                LoanSet::Factory &LoanSetFactory)
       : DataflowAnalysis(C, AC, F), OriginLoanMapFactory(OriginLoanMapFactory),
-        LoanSetFactory(LoanSetFactory) {}
+        LoanSetFactory(LoanSetFactory),
+        PersistentOrigins(computePersistentOrigins(F, C)) {}
 
   using Base::transfer;
 
@@ -59,10 +124,9 @@ class AnalysisImpl
   Lattice getInitialState() { return Lattice{}; }
 
   /// Merges two lattices by taking the union of loans for each origin.
-  // TODO(opt): Keep the state small by removing origins which become dead.
   Lattice join(Lattice A, Lattice B) {
     OriginLoanMap JoinedOrigins = utils::join(
-        A.Origins, B.Origins, OriginLoanMapFactory,
+        A.PersistentOrigins, B.PersistentOrigins, OriginLoanMapFactory,
         [&](const LoanSet *S1, const LoanSet *S2) {
           assert((S1 || S2) && "unexpectedly merging 2 empty sets");
           if (!S1)
@@ -74,16 +138,15 @@ class AnalysisImpl
         // Asymmetric join is a performance win. For origins present only on one
         // branch, the loan set can be carried over as-is.
         utils::JoinKind::Asymmetric);
-    return Lattice(JoinedOrigins);
+    return Lattice(JoinedOrigins, OriginLoanMapFactory.getEmptyMap());
   }
 
   /// A new loan is issued to the origin. Old loans are erased.
   Lattice transfer(Lattice In, const IssueFact &F) {
     OriginID OID = F.getOriginID();
     LoanID LID = F.getLoanID();
-    return Lattice(OriginLoanMapFactory.add(
-        In.Origins, OID,
-        LoanSetFactory.add(LoanSetFactory.getEmptySet(), LID)));
+    LoanSet NewLoans = LoanSetFactory.add(LoanSetFactory.getEmptySet(), LID);
+    return setLoans(In, OID, NewLoans);
   }
 
   /// A flow from source to destination. If `KillDest` is true, this replaces
@@ -98,7 +161,7 @@ class AnalysisImpl
     LoanSet SrcLoans = getLoans(In, SrcOID);
     LoanSet MergedLoans = utils::join(DestLoans, SrcLoans, LoanSetFactory);
 
-    return Lattice(OriginLoanMapFactory.add(In.Origins, DestOID, MergedLoans));
+    return setLoans(In, DestOID, MergedLoans);
   }
 
   LoanSet getLoans(OriginID OID, ProgramPoint P) const {
@@ -106,14 +169,30 @@ class AnalysisImpl
   }
 
 private:
+  bool isPersistent(OriginID OID) const {
+    return PersistentOrigins.contains(OID);
+  }
+
+  Lattice setLoans(Lattice L, OriginID OID, LoanSet Loans) {
+    if (isPersistent(OID)) {
+      return Lattice(OriginLoanMapFactory.add(L.PersistentOrigins, OID, Loans),
+                     L.BlockLocalOrigins);
+    }
+    return Lattice(L.PersistentOrigins,
+                   OriginLoanMapFactory.add(L.BlockLocalOrigins, OID, Loans));
+  }
+
   LoanSet getLoans(Lattice L, OriginID OID) const {
-    if (auto *Loans = L.Origins.lookup(OID))
+    const OriginLoanMap *Map =
+        isPersistent(OID) ? &L.PersistentOrigins : &L.BlockLocalOrigins;
+    if (auto *Loans = Map->lookup(OID))
       return *Loans;
     return LoanSetFactory.getEmptySet();
   }
 
   OriginLoanMap::Factory &OriginLoanMapFactory;
   LoanSet::Factory &LoanSetFactory;
+  llvm::DenseSet<OriginID> PersistentOrigins;
 };
 } // namespace
 
diff --git a/clang/unittests/Analysis/LifetimeSafetyTest.cpp b/clang/unittests/Analysis/LifetimeSafetyTest.cpp
index 0c051847f4d47..40205b9a8fd19 100644
--- a/clang/unittests/Analysis/LifetimeSafetyTest.cpp
+++ b/clang/unittests/Analysis/LifetimeSafetyTest.cpp
@@ -543,7 +543,6 @@ TEST_F(LifetimeAnalysisTest, PointersInACycle) {
   EXPECT_THAT(Origin("p1"), HasLoansTo({"v1", "v2", "v3"}, "after_loop"));
   EXPECT_THAT(Origin("p2"), HasLoansTo({"v1", "v2", "v3"}, "after_loop"));
   EXPECT_THAT(Origin("p3"), HasLoansTo({"v1", "v2", "v3"}, "after_loop"));
-  EXPECT_THAT(Origin("temp"), HasLoansTo({"v1", "v2", "v3"}, "after_loop"));
 }
 
 TEST_F(LifetimeAnalysisTest, PointersAndExpirationInACycle) {

@usx95 usx95 force-pushed the users/usx95/10-30-persistent-origin-optimisation branch from e18f21c to 8e7fde9 Compare October 30, 2025 23:40
@usx95 usx95 force-pushed the users/usx95/10-30-persistent-origin-optimisation branch from a0f216f to 3db9f2d Compare October 31, 2025 17:17
@usx95 usx95 requested a review from Xazax-hun October 31, 2025 17:20
usx95 added a commit to usx95/llvm-project that referenced this pull request Oct 31, 2025
Copy link
Collaborator

@Xazax-hun Xazax-hun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks!

@usx95 usx95 force-pushed the users/usx95/10-30-persistent-origin-optimisation branch from 3db9f2d to 33c0c70 Compare November 1, 2025 00:04
usx95 added a commit to usx95/llvm-project that referenced this pull request Nov 1, 2025
Copy link
Contributor

@mrcvtl mrcvtl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice! I left a comment while I was taking a look at the changes.

@usx95 usx95 force-pushed the users/usx95/10-30-persistent-origin-optimisation branch from 33c0c70 to 0bbc422 Compare November 4, 2025 15:53
@usx95 usx95 changed the title Optimize loan propagation by separating persistent and block-local origins [LifetimeSafety] Optimize loan propagation by separating persistent and block-local origins Nov 5, 2025
Copy link
Collaborator

@ymand ymand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asked about 2 possible changes, but fine going in as is. Thanks!

auto CheckOrigin = [&](OriginID OID) {
if (PersistentOrigins.test(OID.Value))
return;
auto &FirstSeenBlock = OriginToFirstSeenBlock[OID.Value];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could you instead just count the occurences of each origin and then, after visiting all blocks in C, any origin with count > 1 are persistent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. The origin flow facts would be of the form: $1 = $2, $2 = $3, ... and $2 is still a block-local origin.

/// Origins that appear in multiple blocks. Participates in join operations.
OriginLoanMap PersistentOrigins = OriginLoanMap(nullptr);
/// Origins confined to a single block. Discarded at block boundaries.
OriginLoanMap BlockLocalOrigins = OriginLoanMap(nullptr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered, instead of this eager tracking of persistant and local separately, just clearing all local originals from the single map before the join? Then, the logic/complexity is limited to that one site.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case this change is made let's redo the benchmarks. Not sure how efficient removing items is from our persistent maps.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is possible to do so. There are some benefits of doing so: we can delete more than just block-local origins, we can delete all origins which are dead (using the liveness analysis).

But I would prefer not to do "deletions" though as they are both expensive (logarithmic) + create a lot of holes in the buffer backing the trees and make it quite sparse (the number of deleted origins would be much higher than the persistent origins).
So I feel the current approach is both simple and efficient in time and memory layout.

Copy link
Contributor Author

usx95 commented Nov 7, 2025

Merge activity

  • Nov 7, 3:00 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Nov 7, 3:02 AM UTC: @usx95 merged this pull request with Graphite.

@usx95 usx95 force-pushed the users/usx95/10-30-persistent-origin-optimisation branch from 0bbc422 to 667242a Compare November 7, 2025 03:02
@usx95 usx95 merged commit 8fca65c into main Nov 7, 2025
5 of 9 checks passed
@usx95 usx95 deleted the users/usx95/10-30-persistent-origin-optimisation branch November 7, 2025 03:02
@github-project-automation github-project-automation bot moved this from In Progress to Done in Lifetime Safety in Clang Nov 7, 2025
usx95 added a commit that referenced this pull request Nov 7, 2025
Fixes test failure introduced by a typo in #165789
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-ubuntu-fast running on sie-linux-worker while building clang at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/39567

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/7/49' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-3884835-7-49.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=49 GTEST_SHARD_INDEX=7 /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:548: Failure
Value of: Origin("temp")
Expected: has loans to impl (LoanVars: { "v1", "v2", "v3" }, Annotation: "in_loop")
  Actual: 24-byte object <DA-78 01-81 58-5A 00-00 04-00 00-00 00-00 00-00 A0-D6 1C-9B 58-5A 00-00>, could not get a valid loan set at point 'in_loop'

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-aarch64-darwin running on doug-worker-4 while building clang at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/30485

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/7/49' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-78420-7-49.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=49 GTEST_SHARD_INDEX=7 /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:548: Failure
Value of: Origin("temp")
Expected: has loans to impl (LoanVars: { "v1", "v2", "v3" }, Annotation: "in_loop")
  Actual: 24-byte object <49-27 0B-0A 01-00 00-00 04-00 00-00 00-00 00-00 F0-BA 86-01 00-60 00-00>, could not get a valid loan set at point 'in_loop'

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder clang-m68k-linux-cross running on suse-gary-m68k-cross while building clang at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/18592

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/7/49' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-1251499-7-49.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=49 GTEST_SHARD_INDEX=7 /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:548: Failure
Value of: Origin("temp")
Expected: has loans to impl (LoanVars: { "v1", "v2", "v3" }, Annotation: "in_loop")
  Actual: 24-byte object <4C-2C 66-08 00-00 00-00 04-00 00-00 00-00 00-00 C0-8B B3-31 00-00 00-00>, could not get a valid loan set at point 'in_loop'

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder arc-builder running on arc-worker while building clang at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/24519

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/7/49' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/buildbot/worker/arc-folder/build/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-8896-7-49.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=49 GTEST_SHARD_INDEX=7 /buildbot/worker/arc-folder/build/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/buildbot/worker/arc-folder/build/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/buildbot/worker/arc-folder/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/buildbot/worker/arc-folder/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/buildbot/worker/arc-folder/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/buildbot/worker/arc-folder/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/buildbot/worker/arc-folder/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/buildbot/worker/arc-folder/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:548: Failure
Value of: Origin("temp")
Expected: has loans to impl (LoanVars: { "v1", "v2", "v3" }, Annotation: "in_loop")
  Actual: 24-byte object <8F-92 5C-08 00-00 00-00 04-00 00-00 00-00 00-00 00-9F 5C-0C 00-00 00-00>, could not get a valid loan set at point 'in_loop'

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-amdgpu-runtime-2 running on rocm-worker-hw-02 while building clang at step 7 "Add check check-clang".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/16861

Here is the relevant piece of the build log for the reference
Step 7 (Add check check-clang) failure: test (failure)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/10/194' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-2391768-10-194.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=194 GTEST_SHARD_INDEX=10 /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/unittests/Analysis/LifetimeSafetyTest.cpp:548: Failure
Value of: Origin("temp")
Expected: has loans to impl (LoanVars: { "v1", "v2", "v3" }, Annotation: "in_loop")
  Actual: 24-byte object <00-D8 05-18 AD-60 00-00 04-00 00-00 00-00 00-00 40-74 88-36 AD-60 00-00>, could not get a valid loan set at point 'in_loop'

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-quick running on linaro-clang-aarch64-quick while building clang at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/25139

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/11/388' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-4128075-11-388.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=388 GTEST_SHARD_INDEX=11 /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
../llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


../llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


../llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


../llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

../llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

../llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:548: Failure
Value of: Origin("temp")
Expected: has loans to impl (LoanVars: { "v1", "v2", "v3" }, Annotation: "in_loop")
  Actual: 24-byte object <CF-76 EB-AF 39-B6 00-00 04-00 00-00 00-00 00-00 D0-B9 2B-E2 39-B6 00-00>, could not get a valid loan set at point 'in_loop'

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-win running on sie-win-worker while building clang at step 4 "clean-build-dir".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/25977

Here is the relevant piece of the build log for the reference
Step 4 (clean-build-dir) failure: Delete failed. (failure)
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests.exe/9/49' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\unittests\.\AllClangUnitTests.exe-Clang-Unit-147120-9-49.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=49 GTEST_SHARD_INDEX=9 Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\unittests\.\AllClangUnitTests.exe
--

Script:
--
Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\unittests\.\AllClangUnitTests.exe --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\lib\Testing\TestAST.cpp(49): error: Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\lib\Testing\TestAST.cpp(49): error: Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\lib\Testing\TestAST.cpp(49): error: Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\unittests\Analysis\LifetimeSafetyTest.cpp(76): error: Failed
Annotation 'in_loop' not found.

Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\unittests\Analysis\LifetimeSafetyTest.cpp(76): error: Failed
Annotation 'in_loop' not found.

Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\unittests\Analysis\LifetimeSafetyTest.cpp(548): error: Value of: Origin("temp")
Expected: has loans to impl (LoanVars: { "v1", "v2", "v3" }, Annotation: "in_loop")
  Actual: 24-byte object <90-C8 F7-87 F7-7F 00-00 04-00 00-00 00-00 00-00 F0-3B C6-2C F1-01 00-00>, could not get a valid loan set at point 'in_loop'


Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\lib\Testing\TestAST.cpp:49
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-sles-build-only running on rocm-worker-hw-04-sles while building clang at step 6 "Add check check-clang".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/33678

Here is the relevant piece of the build log for the reference
Step 6 (Add check check-clang) failure: test (failure)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/7/49' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-1879674-7-49.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=49 GTEST_SHARD_INDEX=7 /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/unittests/Analysis/LifetimeSafetyTest.cpp:548: Failure
Value of: Origin("temp")
Expected: has loans to impl (LoanVars: { "v1", "v2", "v3" }, Annotation: "in_loop")
  Actual: 24-byte object <CD-CB 57-07 00-00 00-00 04-00 00-00 00-00 00-00 A0-61 DE-38 00-00 00-00>, could not get a valid loan set at point 'in_loop'

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder clang-armv8-quick running on linaro-clang-armv8-quick while building clang at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/23718

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/11/388' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-461704-11-388.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=388 GTEST_SHARD_INDEX=11 /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
../llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


../llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


../llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


../llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

../llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

../llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:548: Failure
Value of: Origin("temp")
Expected: has loans to impl (LoanVars: { "v1", "v2", "v3" }, Annotation: "in_loop")
  Actual: 12-byte object <72-80 32-0D 04-00 00-00 78-60 82-0F>, could not get a valid loan set at point 'in_loop'

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-gcc-ubuntu running on sie-linux-worker3 while building clang at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/27108

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/7/49' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-3173997-7-49.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=49 GTEST_SHARD_INDEX=7 /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Failed
Annotation 'in_loop' not found.

/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:548: Failure
Value of: Origin("temp")
Expected: has loans to impl (LoanVars: { "v1", "v2", "v3" }, Annotation: "in_loop")
  Actual: 24-byte object <EA-F9 2E-28 45-56 00-00 04-00 00-00 00-00 00-00 00-F9 FD-2E 45-56 00-00>, could not get a valid loan set at point 'in_loop'

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder fuchsia-x86_64-linux running on fuchsia-debian-64-us-central1-a-1 while building clang at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/27534

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/fuchsia-linux.py ...' (failure)
...
[865/1463] Running the Clang regression tests
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using clang: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin/clang
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find cir-opt in /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find clang-repl in /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin/wasm-ld
-- Testing: 23068 tests, 60 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: Clang-Unit :: ./AllClangUnitTests/10/97 (22744 of 23068)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/10/97' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-1660719-10-97.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=97 GTEST_SHARD_INDEX=10 /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Step 7 (check) failure: check (failure)
...
[865/1463] Running the Clang regression tests
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using clang: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin/clang
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find cir-opt in /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find clang-repl in /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/bin/wasm-ld
-- Testing: 23068 tests, 60 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: Clang-Unit :: ./AllClangUnitTests/10/97 (22744 of 23068)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/10/97' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-1660719-10-97.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=97 GTEST_SHARD_INDEX=10 /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-0eoh4ri2/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure

llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Nov 7, 2025
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-hwasan running on sanitizer-buildbot12 while building clang at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/19715

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 92239 tests, 72 workers --
Testing:  0.. 10.. 20
FAIL: Clang-Unit :: ./AllClangUnitTests/11/97 (22878 of 92239)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/11/97' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-3668136-11-97.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=97 GTEST_SHARD_INDEX=11 /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Step 11 (stage2/hwasan check) failure: stage2/hwasan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 92239 tests, 72 workers --
Testing:  0.. 10.. 20
FAIL: Clang-Unit :: ./AllClangUnitTests/11/97 (22878 of 92239)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/11/97' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-3668136-11-97.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=97 GTEST_SHARD_INDEX=11 /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Step 14 (stage3/hwasan check) failure: stage3/hwasan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 88780 tests, 72 workers --
Testing:  0.. 10.. 20
FAIL: Clang-Unit :: ./AllClangUnitTests/11/97 (22901 of 88780)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/11/97' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-1210002-11-97.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=97 GTEST_SHARD_INDEX=11 /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-ubsan running on sanitizer-buildbot9 while building clang at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/85/builds/15388

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 92240 tests, 72 workers --
Testing:  0.. 10.. 20
FAIL: Clang-Unit :: ./AllClangUnitTests/11/97 (22940 of 92240)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/11/97' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-2113160-11-97.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=97 GTEST_SHARD_INDEX=11 /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Step 11 (stage2/ubsan check) failure: stage2/ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 92240 tests, 72 workers --
Testing:  0.. 10.. 20
FAIL: Clang-Unit :: ./AllClangUnitTests/11/97 (22940 of 92240)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/11/97' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-2113160-11-97.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=97 GTEST_SHARD_INDEX=11 /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Step 14 (stage3/ubsan check) failure: stage3/ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 88780 tests, 72 workers --
Testing:  0.. 10.. 20
FAIL: Clang-Unit :: ./AllClangUnitTests/11/97 (22872 of 88780)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/11/97' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-3645917-11-97.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=97 GTEST_SHARD_INDEX=11 /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-bootstrap-msan running on sanitizer-buildbot6 while building clang at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/164/builds/15348

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 93591 tests, 64 workers --
Testing:  0.. 10.. 20
FAIL: Clang-Unit :: ./AllClangUnitTests/11/97 (23903 of 93591)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/11/97' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-644663-11-97.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=97 GTEST_SHARD_INDEX=11 /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Step 11 (stage2/msan check) failure: stage2/msan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 93591 tests, 64 workers --
Testing:  0.. 10.. 20
FAIL: Clang-Unit :: ./AllClangUnitTests/11/97 (23903 of 93591)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/11/97' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-644663-11-97.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=97 GTEST_SHARD_INDEX=11 /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Step 14 (stage3/msan check) failure: stage3/msan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 90198 tests, 64 workers --
Testing:  0.. 10.. 20.
FAIL: Clang-Unit :: ./AllClangUnitTests/11/97 (23907 of 90198)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/11/97' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-1497306-11-97.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=97 GTEST_SHARD_INDEX=11 /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder clang-riscv-rva20-2stage running on rise-clang-riscv-rva20-2stage while building clang at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/87/builds/4026

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/rise-riscv-build.sh --jobs=32' (failure)
...
PASS: Clangd Unit Tests :: ./ClangdTests/12/42 (24028 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/6/49 (24029 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/5/49 (24030 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/4/49 (24031 of 88818)
PASS: Clangd Unit Tests :: ./ClangdTests/11/42 (24032 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/39/49 (24033 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/38/49 (24034 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/42/49 (24035 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/47/49 (24036 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/41/49 (24037 of 88818)
FAIL: Clang-Unit :: ./AllClangUnitTests/7/49 (24038 of 88818)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/7/49' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/stage2/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-707-7-49.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=49 GTEST_SHARD_INDEX=7 /home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/stage2/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/stage2/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Step 11 (llvm-project check-all) failure: llvm-project check-all (failure)
...
PASS: Clangd Unit Tests :: ./ClangdTests/12/42 (24028 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/6/49 (24029 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/5/49 (24030 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/4/49 (24031 of 88818)
PASS: Clangd Unit Tests :: ./ClangdTests/11/42 (24032 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/39/49 (24033 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/38/49 (24034 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/42/49 (24035 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/47/49 (24036 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/41/49 (24037 of 88818)
FAIL: Clang-Unit :: ./AllClangUnitTests/7/49 (24038 of 88818)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/7/49' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/stage2/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-707-7-49.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=49 GTEST_SHARD_INDEX=7 /home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/stage2/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/stage2/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/buildbot-worker/bbroot/clang-riscv-rva20-2stage/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 7, 2025

LLVM Buildbot has detected a new failure on builder clang-riscv-rva23-evl-vec-2stage running on rise-clang-riscv-rva23-evl-vec-2stage while building clang at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/132/builds/3341

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/rise-riscv-build.sh --jobs=16' (failure)
...
PASS: Clangd :: infinite-instantiation.test (24025 of 88818)
PASS: Clangd Unit Tests :: ./ClangdTests/13/42 (24026 of 88818)
PASS: Clangd Unit Tests :: ./ClangdTests/14/42 (24027 of 88818)
PASS: Clangd Unit Tests :: ./ClangdTests/12/42 (24028 of 88818)
PASS: Clangd Unit Tests :: ./ClangdTests/11/42 (24029 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/6/49 (24030 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/4/49 (24031 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/5/49 (24032 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/39/49 (24033 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/38/49 (24034 of 88818)
FAIL: Clang-Unit :: ./AllClangUnitTests/7/49 (24035 of 88818)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/7/49' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/stage2/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-727-7-49.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=49 GTEST_SHARD_INDEX=7 /home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/stage2/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/stage2/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure
Step 11 (llvm-project check-all) failure: llvm-project check-all (failure)
...
PASS: Clangd :: infinite-instantiation.test (24025 of 88818)
PASS: Clangd Unit Tests :: ./ClangdTests/13/42 (24026 of 88818)
PASS: Clangd Unit Tests :: ./ClangdTests/14/42 (24027 of 88818)
PASS: Clangd Unit Tests :: ./ClangdTests/12/42 (24028 of 88818)
PASS: Clangd Unit Tests :: ./ClangdTests/11/42 (24029 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/6/49 (24030 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/4/49 (24031 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/5/49 (24032 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/39/49 (24033 of 88818)
PASS: Clang-Unit :: ./AllClangUnitTests/38/49 (24034 of 88818)
FAIL: Clang-Unit :: ./AllClangUnitTests/7/49 (24035 of 88818)
******************** TEST 'Clang-Unit :: ./AllClangUnitTests/7/49' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/stage2/tools/clang/unittests/./AllClangUnitTests-Clang-Unit-727-7-49.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=49 GTEST_SHARD_INDEX=7 /home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/stage2/tools/clang/unittests/./AllClangUnitTests
--

Script:
--
/home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/stage2/tools/clang/unittests/./AllClangUnitTests --gtest_filter=LifetimeAnalysisTest.PointersInACycle
--
/home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:20:19: error: unknown type name 'B'
   20 |         p3 = temp;B
      |                   ^


/home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected unqualified-id
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/llvm/clang/lib/Testing/TestAST.cpp:49: Failure
Failed
input.cc:21:9: error: expected ')'
   21 |         POINT(in_loop);
      |         ^
input.cc:2:32: note: expanded from macro 'POINT'
    2 |       #define POINT(name) void("__lifetime_test_point_" #name)
      |                                ^


/home/buildbot-worker/bbroot/clang-riscv-rva23-evl-vec-2stage/llvm/clang/unittests/Analysis/LifetimeSafetyTest.cpp:76: Failure

vinay-deshmukh pushed a commit to vinay-deshmukh/llvm-project that referenced this pull request Nov 8, 2025
…nd block-local origins (llvm#165789)

## Summary

Optimizes the lifetime analysis loan propagation by preventing block-local origins from participating in expensive join operations at block boundaries.

## Problem

The lifetime analysis currently performs join operations on all origins at every block boundary. However, many origins are block-local: they exist only to propagate loans between persistent origins across temporary declarations and expressions within a single block. Including them in joins is unnecessary and expensive.

## Solution

This PR classifies origins into two categories:

- **Persistent origins**: referenced in multiple basic blocks, must participate in joins
- **Block-local origins**: confined to a single block, can be discarded at block boundaries

### Implementation

1. **Pre-pass** (`computePersistentOrigins`): Analyzes all facts in the CFG to identify which origins appear in multiple blocks
2. **Split lattice**: Maintains two separate `OriginLoanMap`s:
    - `PersistentOrigins`: participates in join operations
    - `BlockLocalOrigins`: used during block execution, discarded at boundaries
3. **Optimized join**: Only merges persistent origins; block-local map is reset to empty

### Benefits

- Significantly reduces join complexity, especially in functions with many temporary locals
- Performance scales with the ratio of temporary to persistent origins
- Correctness preserved: block-local loan propagation still works within blocks

Fixes: llvm#165780

Fixes: llvm#164625. It brings down regression from **150% to 2%**.

---
vinay-deshmukh pushed a commit to vinay-deshmukh/llvm-project that referenced this pull request Nov 8, 2025
Fixes test failure introduced by a typo in llvm#165789
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:analysis clang:temporal-safety Issue/FR relating to the lifetime analysis in Clang (-Wdangling, -Wreturn-local-addr) clang Clang issues not falling into any other category slow-compile

Projects

Status: Done

7 participants