Skip to content

[ctxprof] Capture sampling info for context roots #131201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

mtrofin
Copy link
Member

@mtrofin mtrofin commented Mar 13, 2025

When we collect a contextual profile, we sample the threads entering its root and only collect on one at a time (see ContextRoot::Taken). If we want to compare profiles between contextual profiles, and/or flat profiles, we have a problem: we don't know how to compare the counter values relative to each other. To that end, we add ContextRoot::TotalEntries, which is incremented every time a root is entered and serves as multiplier for the counter values collected under that root.

We expose this in the profile and leave the normalization to the user of the profile, for a few reasons:

  • it's only needed if reasoning about all profiles in aggregate.
  • the goal, in compiler_rt, is to flush out the profile as quickly as possible, and performing multiplications adds an overhead that may not even be necessary if the consumer of the profile doesn't care about combining profiles
  • the information itself may be interesting as an indication of relative sampling of various contexts.

Copy link
Member Author

mtrofin commented Mar 13, 2025

@mtrofin mtrofin force-pushed the users/mtrofin/03-11-_ctxprof_capture_sampling_info_for_context_roots branch from f0d861c to 7aa7364 Compare March 13, 2025 21:43
@mtrofin mtrofin marked this pull request as ready for review March 13, 2025 21:44
@llvmbot llvmbot added compiler-rt PGO Profile Guided Optimizations LTO Link time optimization (regular/full LTO or ThinLTO) llvm:analysis Includes value tracking, cost tables and constant folding llvm:transforms labels Mar 13, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 13, 2025

@llvm/pr-subscribers-llvm-analysis
@llvm/pr-subscribers-llvm-transforms
@llvm/pr-subscribers-lto

@llvm/pr-subscribers-pgo

Author: Mircea Trofin (mtrofin)

Changes

When we collect a contextual profile, we sample the threads entering its root and only collect on one at a time (see ContextRoot::Taken). If we want to compare profiles between contextual profiles, and/or flat profiles, we have a problem: we don't know how to compare the counter values relative to each other. To that end, we add ContextRoot::TotalEntries, which is incremented every time a root is entered and serves as multiplier for the counter values collected under that root.

We expose this in the profile and leave the normalization to the user of the profile, for a few reasons:

  • it's only needed if reasoning about all profiles in aggregate.
  • the goal, in compiler_rt, is to flush out the profile as quickly as possible, and performing multiplications adds an overhead that may not even be necessary if the consumer of the profile doesn't care about combining profiles
  • the information itself may be interesting as an indication of relative sampling of various contexts.

Patch is 35.80 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/131201.diff

29 Files Affected:

  • (modified) compiler-rt/lib/ctx_profile/CtxInstrContextNode.h (+2-1)
  • (modified) compiler-rt/lib/ctx_profile/CtxInstrProfiling.cpp (+6-1)
  • (modified) compiler-rt/lib/ctx_profile/CtxInstrProfiling.h (+4)
  • (modified) compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp (+3-1)
  • (modified) compiler-rt/test/ctx_profile/TestCases/generate-context.cpp (+5-1)
  • (modified) llvm/include/llvm/ProfileData/CtxInstrContextNode.h (+2-1)
  • (modified) llvm/include/llvm/ProfileData/PGOCtxProfReader.h (+8-2)
  • (modified) llvm/include/llvm/ProfileData/PGOCtxProfWriter.h (+15-5)
  • (modified) llvm/lib/ProfileData/PGOCtxProfReader.cpp (+27-5)
  • (modified) llvm/lib/ProfileData/PGOCtxProfWriter.cpp (+46-14)
  • (modified) llvm/test/Analysis/CtxProfAnalysis/flatten-and-annotate.ll (+1)
  • (modified) llvm/test/Analysis/CtxProfAnalysis/flatten-check-path.ll (+3)
  • (modified) llvm/test/Analysis/CtxProfAnalysis/flatten-icp.ll (+1)
  • (modified) llvm/test/Analysis/CtxProfAnalysis/flatten-zero-path.ll (+1)
  • (modified) llvm/test/Analysis/CtxProfAnalysis/full-cycle.ll (+2)
  • (modified) llvm/test/Analysis/CtxProfAnalysis/handle-select.ll (+1)
  • (modified) llvm/test/Analysis/CtxProfAnalysis/inline.ll (+2)
  • (modified) llvm/test/Analysis/CtxProfAnalysis/load-unapplicable.ll (+3)
  • (modified) llvm/test/Analysis/CtxProfAnalysis/load.ll (+5)
  • (modified) llvm/test/ThinLTO/X86/ctxprof.ll (+2-2)
  • (modified) llvm/test/Transforms/EliminateAvailableExternally/transform-to-local.ll (+2-2)
  • (added) llvm/test/tools/llvm-ctxprof-util/Inputs/invalid-no-entrycount.yaml (+3)
  • (modified) llvm/test/tools/llvm-ctxprof-util/Inputs/valid-ctx-only.yaml (+2)
  • (modified) llvm/test/tools/llvm-ctxprof-util/Inputs/valid-flat-first.yaml (+2)
  • (modified) llvm/test/tools/llvm-ctxprof-util/Inputs/valid.yaml (+2)
  • (modified) llvm/test/tools/llvm-ctxprof-util/llvm-ctxprof-util-negative.test (+2)
  • (modified) llvm/test/tools/llvm-ctxprof-util/llvm-ctxprof-util.test (+7-5)
  • (modified) llvm/unittests/ProfileData/PGOCtxProfReaderWriterTest.cpp (+7-7)
  • (modified) llvm/unittests/Transforms/Utils/CallPromotionUtilsTest.cpp (+4)
diff --git a/compiler-rt/lib/ctx_profile/CtxInstrContextNode.h b/compiler-rt/lib/ctx_profile/CtxInstrContextNode.h
index 0fc4883305145..55962df57fb58 100644
--- a/compiler-rt/lib/ctx_profile/CtxInstrContextNode.h
+++ b/compiler-rt/lib/ctx_profile/CtxInstrContextNode.h
@@ -120,7 +120,8 @@ class ContextNode final {
 class ProfileWriter {
 public:
   virtual void startContextSection() = 0;
-  virtual void writeContextual(const ctx_profile::ContextNode &RootNode) = 0;
+  virtual void writeContextual(const ctx_profile::ContextNode &RootNode,
+                               uint64_t TotalRootEntryCount) = 0;
   virtual void endContextSection() = 0;
 
   virtual void startFlatSection() = 0;
diff --git a/compiler-rt/lib/ctx_profile/CtxInstrProfiling.cpp b/compiler-rt/lib/ctx_profile/CtxInstrProfiling.cpp
index d7ec8fde4ec7d..1c2cad1ca506e 100644
--- a/compiler-rt/lib/ctx_profile/CtxInstrProfiling.cpp
+++ b/compiler-rt/lib/ctx_profile/CtxInstrProfiling.cpp
@@ -340,6 +340,9 @@ ContextNode *__llvm_ctx_profile_start_context(
     ContextRoot *Root, GUID Guid, uint32_t Counters,
     uint32_t Callsites) SANITIZER_NO_THREAD_SAFETY_ANALYSIS {
   IsUnderContext = true;
+  __sanitizer::atomic_fetch_add(&Root->TotalEntries, 1,
+                                __sanitizer::memory_order_relaxed);
+
   if (!Root->FirstMemBlock) {
     setupContext(Root, Guid, Counters, Callsites);
   }
@@ -374,6 +377,7 @@ void __llvm_ctx_profile_start_collection() {
       ++NumMemUnits;
 
     resetContextNode(*Root->FirstNode);
+    __sanitizer::atomic_store_relaxed(&Root->TotalEntries, 0);
   }
   __sanitizer::atomic_store_relaxed(&ProfilingStarted, true);
   __sanitizer::Printf("[ctxprof] Initial NumMemUnits: %zu \n", NumMemUnits);
@@ -393,7 +397,8 @@ bool __llvm_ctx_profile_fetch(ProfileWriter &Writer) {
       __sanitizer::Printf("[ctxprof] Contextual Profile is %s\n", "invalid");
       return false;
     }
-    Writer.writeContextual(*Root->FirstNode);
+    Writer.writeContextual(*Root->FirstNode, __sanitizer::atomic_load_relaxed(
+                                                 &Root->TotalEntries));
   }
   Writer.endContextSection();
   Writer.startFlatSection();
diff --git a/compiler-rt/lib/ctx_profile/CtxInstrProfiling.h b/compiler-rt/lib/ctx_profile/CtxInstrProfiling.h
index ab6df6d15e704..72cc60bf523e1 100644
--- a/compiler-rt/lib/ctx_profile/CtxInstrProfiling.h
+++ b/compiler-rt/lib/ctx_profile/CtxInstrProfiling.h
@@ -80,6 +80,10 @@ struct ContextRoot {
   ContextNode *FirstNode = nullptr;
   Arena *FirstMemBlock = nullptr;
   Arena *CurrentMem = nullptr;
+
+  // Count the number of entries - regardless if we could take the `Taken` mutex
+  ::__sanitizer::atomic_uint64_t TotalEntries = {};
+
   // This is init-ed by the static zero initializer in LLVM.
   // Taken is used to ensure only one thread traverses the contextual graph -
   // either to read it or to write it. On server side, the same entrypoint will
diff --git a/compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp b/compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp
index f837424ccca52..62c7f53acec5f 100644
--- a/compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp
+++ b/compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp
@@ -238,7 +238,9 @@ TEST_F(ContextTest, Dump) {
     TestProfileWriter(ContextRoot *Root, size_t Entries)
         : Root(Root), Entries(Entries) {}
 
-    void writeContextual(const ContextNode &Node) override {
+    void writeContextual(const ContextNode &Node,
+                         uint64_t TotalRootEntryCount) override {
+      EXPECT_EQ(TotalRootEntryCount, Entries);
       EXPECT_EQ(EnteredSectionCount, 1);
       EXPECT_EQ(ExitedSectionCount, 0);
       EXPECT_FALSE(Root->Taken.TryLock());
diff --git a/compiler-rt/test/ctx_profile/TestCases/generate-context.cpp b/compiler-rt/test/ctx_profile/TestCases/generate-context.cpp
index bf33b4423fd1f..319f17debe48f 100644
--- a/compiler-rt/test/ctx_profile/TestCases/generate-context.cpp
+++ b/compiler-rt/test/ctx_profile/TestCases/generate-context.cpp
@@ -84,7 +84,10 @@ class TestProfileWriter : public ProfileWriter {
     std::cout << "Exited Context Section" << std::endl;
   }
 
-  void writeContextual(const ContextNode &RootNode) override {
+  void writeContextual(const ContextNode &RootNode,
+                       uint64_t EntryCount) override {
+    std::cout << "Entering Root " << RootNode.guid()
+              << " with total entry count " << EntryCount << std::endl;
     printProfile(RootNode, "", "");
   }
 
@@ -115,6 +118,7 @@ class TestProfileWriter : public ProfileWriter {
 // The second context is in the loop. We expect 2 entries and each of the
 // branches would be taken once, so the second counter is 1.
 // CHECK-NEXT: Entered Context Section
+// CHECK-NEXT: Entering Root 8657661246551306189 with total entry count 1
 // CHECK-NEXT: Guid: 8657661246551306189
 // CHECK-NEXT: Entries: 1
 // CHECK-NEXT: 2 counters and 3 callsites
diff --git a/llvm/include/llvm/ProfileData/CtxInstrContextNode.h b/llvm/include/llvm/ProfileData/CtxInstrContextNode.h
index 0fc4883305145..55962df57fb58 100644
--- a/llvm/include/llvm/ProfileData/CtxInstrContextNode.h
+++ b/llvm/include/llvm/ProfileData/CtxInstrContextNode.h
@@ -120,7 +120,8 @@ class ContextNode final {
 class ProfileWriter {
 public:
   virtual void startContextSection() = 0;
-  virtual void writeContextual(const ctx_profile::ContextNode &RootNode) = 0;
+  virtual void writeContextual(const ctx_profile::ContextNode &RootNode,
+                               uint64_t TotalRootEntryCount) = 0;
   virtual void endContextSection() = 0;
 
   virtual void startFlatSection() = 0;
diff --git a/llvm/include/llvm/ProfileData/PGOCtxProfReader.h b/llvm/include/llvm/ProfileData/PGOCtxProfReader.h
index 4b0c944a5258c..48f2c4efd020d 100644
--- a/llvm/include/llvm/ProfileData/PGOCtxProfReader.h
+++ b/llvm/include/llvm/ProfileData/PGOCtxProfReader.h
@@ -92,10 +92,13 @@ class PGOCtxProfContext final : public internal::IndexNode {
 
   GlobalValue::GUID GUID = 0;
   SmallVector<uint64_t, 16> Counters;
+  const std::optional<uint64_t> RootEntryCount;
   CallsiteMapTy Callsites;
 
-  PGOCtxProfContext(GlobalValue::GUID G, SmallVectorImpl<uint64_t> &&Counters)
-      : GUID(G), Counters(std::move(Counters)) {}
+  PGOCtxProfContext(GlobalValue::GUID G, SmallVectorImpl<uint64_t> &&Counters,
+                    std::optional<uint64_t> RootEntryCount = std::nullopt)
+      : GUID(G), Counters(std::move(Counters)), RootEntryCount(RootEntryCount) {
+  }
 
   Expected<PGOCtxProfContext &>
   getOrEmplace(uint32_t Index, GlobalValue::GUID G,
@@ -115,6 +118,9 @@ class PGOCtxProfContext final : public internal::IndexNode {
   const SmallVectorImpl<uint64_t> &counters() const { return Counters; }
   SmallVectorImpl<uint64_t> &counters() { return Counters; }
 
+  bool isRoot() const { return RootEntryCount.has_value(); }
+  uint64_t getTotalRootEntryCount() const { return *RootEntryCount; }
+
   uint64_t getEntrycount() const {
     assert(!Counters.empty() &&
            "Functions are expected to have at their entry BB instrumented, so "
diff --git a/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h b/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h
index c5a724d9a2142..b2bb8fea10cfe 100644
--- a/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h
+++ b/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h
@@ -19,7 +19,14 @@
 #include "llvm/ProfileData/CtxInstrContextNode.h"
 
 namespace llvm {
-enum PGOCtxProfileRecords { Invalid = 0, Version, Guid, CalleeIndex, Counters };
+enum PGOCtxProfileRecords {
+  Invalid = 0,
+  Version,
+  Guid,
+  CallsiteIndex,
+  Counters,
+  TotalRootEntryCount
+};
 
 enum PGOCtxProfileBlockIDs {
   FIRST_VALID = bitc::FIRST_APPLICATION_BLOCKID,
@@ -73,9 +80,11 @@ class PGOCtxProfileWriter final : public ctx_profile::ProfileWriter {
   const bool IncludeEmpty;
 
   void writeGuid(ctx_profile::GUID Guid);
+  void writeCallsiteIndex(uint32_t Index);
+  void writeRootEntryCount(uint64_t EntryCount);
   void writeCounters(ArrayRef<uint64_t> Counters);
-  void writeImpl(std::optional<uint32_t> CallerIndex,
-                 const ctx_profile::ContextNode &Node);
+  void writeNode(uint32_t CallerIndex, const ctx_profile::ContextNode &Node);
+  void writeSubcontexts(const ctx_profile::ContextNode &Node);
 
 public:
   PGOCtxProfileWriter(raw_ostream &Out,
@@ -84,7 +93,8 @@ class PGOCtxProfileWriter final : public ctx_profile::ProfileWriter {
   ~PGOCtxProfileWriter() { Writer.ExitBlock(); }
 
   void startContextSection() override;
-  void writeContextual(const ctx_profile::ContextNode &RootNode) override;
+  void writeContextual(const ctx_profile::ContextNode &RootNode,
+                       uint64_t TotalRootEntryCount) override;
   void endContextSection() override;
 
   void startFlatSection() override;
@@ -94,7 +104,7 @@ class PGOCtxProfileWriter final : public ctx_profile::ProfileWriter {
 
   // constants used in writing which a reader may find useful.
   static constexpr unsigned CodeLen = 2;
-  static constexpr uint32_t CurrentVersion = 2;
+  static constexpr uint32_t CurrentVersion = 3;
   static constexpr unsigned VBREncodingBits = 6;
   static constexpr StringRef ContainerMagic = "CTXP";
 };
diff --git a/llvm/lib/ProfileData/PGOCtxProfReader.cpp b/llvm/lib/ProfileData/PGOCtxProfReader.cpp
index 5cc4c94c74b76..f53f2956a7b7e 100644
--- a/llvm/lib/ProfileData/PGOCtxProfReader.cpp
+++ b/llvm/lib/ProfileData/PGOCtxProfReader.cpp
@@ -96,16 +96,19 @@ PGOCtxProfileReader::readProfile(PGOCtxProfileBlockIDs Kind) {
   std::optional<ctx_profile::GUID> Guid;
   std::optional<SmallVector<uint64_t, 16>> Counters;
   std::optional<uint32_t> CallsiteIndex;
+  std::optional<uint64_t> TotalEntryCount;
 
   SmallVector<uint64_t, 1> RecordValues;
 
   const bool ExpectIndex = Kind == PGOCtxProfileBlockIDs::ContextNodeBlockID;
+  const bool IsRoot = Kind == PGOCtxProfileBlockIDs::ContextRootBlockID;
   // We don't prescribe the order in which the records come in, and we are ok
   // if other unsupported records appear. We seek in the current subblock until
   // we get all we know.
   auto GotAllWeNeed = [&]() {
     return Guid.has_value() && Counters.has_value() &&
-           (!ExpectIndex || CallsiteIndex.has_value());
+           (!ExpectIndex || CallsiteIndex.has_value()) &&
+           (!IsRoot || TotalEntryCount.has_value());
   };
   while (!GotAllWeNeed()) {
     RecordValues.clear();
@@ -127,13 +130,21 @@ PGOCtxProfileReader::readProfile(PGOCtxProfileBlockIDs Kind) {
         return wrongValue("Empty counters. At least the entry counter (one "
                           "value) was expected");
       break;
-    case PGOCtxProfileRecords::CalleeIndex:
+    case PGOCtxProfileRecords::CallsiteIndex:
       if (!ExpectIndex)
         return wrongValue("The root context should not have a callee index");
       if (RecordValues.size() != 1)
         return wrongValue("The callee index should have exactly one value");
       CallsiteIndex = RecordValues[0];
       break;
+    case PGOCtxProfileRecords::TotalRootEntryCount:
+      if (!IsRoot)
+        return wrongValue("Non-root has a total entry count record");
+      if (RecordValues.size() != 1)
+        return wrongValue(
+            "The root total entry count record should have exactly one value");
+      TotalEntryCount = RecordValues[0];
+      break;
     default:
       // OK if we see records we do not understand, like records (profile
       // components) introduced later.
@@ -141,7 +152,7 @@ PGOCtxProfileReader::readProfile(PGOCtxProfileBlockIDs Kind) {
     }
   }
 
-  PGOCtxProfContext Ret(*Guid, std::move(*Counters));
+  PGOCtxProfContext Ret(*Guid, std::move(*Counters), TotalEntryCount);
 
   while (canEnterBlockWithID(PGOCtxProfileBlockIDs::ContextNodeBlockID)) {
     EXPECT_OR_RET(SC, readProfile(PGOCtxProfileBlockIDs::ContextNodeBlockID));
@@ -278,7 +289,8 @@ void toYaml(yaml::Output &Out,
 
 void toYaml(yaml::Output &Out, GlobalValue::GUID Guid,
             const SmallVectorImpl<uint64_t> &Counters,
-            const PGOCtxProfContext::CallsiteMapTy &Callsites) {
+            const PGOCtxProfContext::CallsiteMapTy &Callsites,
+            std::optional<uint64_t> TotalRootEntryCount = std::nullopt) {
   yaml::EmptyContext Empty;
   Out.beginMapping();
   void *SaveInfo = nullptr;
@@ -289,6 +301,11 @@ void toYaml(yaml::Output &Out, GlobalValue::GUID Guid,
     yaml::yamlize(Out, Guid, true, Empty);
     Out.postflightKey(nullptr);
   }
+  if (TotalRootEntryCount) {
+    Out.preflightKey("TotalRootEntryCount", true, false, UseDefault, SaveInfo);
+    yaml::yamlize(Out, *TotalRootEntryCount, true, Empty);
+    Out.postflightKey(nullptr);
+  }
   {
     Out.preflightKey("Counters", true, false, UseDefault, SaveInfo);
     Out.beginFlowSequence();
@@ -308,8 +325,13 @@ void toYaml(yaml::Output &Out, GlobalValue::GUID Guid,
   }
   Out.endMapping();
 }
+
 void toYaml(yaml::Output &Out, const PGOCtxProfContext &Ctx) {
-  toYaml(Out, Ctx.guid(), Ctx.counters(), Ctx.callsites());
+  if (Ctx.isRoot())
+    toYaml(Out, Ctx.guid(), Ctx.counters(), Ctx.callsites(),
+           Ctx.getTotalRootEntryCount());
+  else
+    toYaml(Out, Ctx.guid(), Ctx.counters(), Ctx.callsites());
 }
 
 } // namespace
diff --git a/llvm/lib/ProfileData/PGOCtxProfWriter.cpp b/llvm/lib/ProfileData/PGOCtxProfWriter.cpp
index e906836b16b2b..95981d231cd6c 100644
--- a/llvm/lib/ProfileData/PGOCtxProfWriter.cpp
+++ b/llvm/lib/ProfileData/PGOCtxProfWriter.cpp
@@ -55,10 +55,12 @@ PGOCtxProfileWriter::PGOCtxProfileWriter(
     DescribeBlock(PGOCtxProfileBlockIDs::ContextsSectionBlockID, "Contexts");
     DescribeBlock(PGOCtxProfileBlockIDs::ContextRootBlockID, "Root");
     DescribeRecord(PGOCtxProfileRecords::Guid, "GUID");
+    DescribeRecord(PGOCtxProfileRecords::TotalRootEntryCount,
+                   "TotalRootEntryCount");
     DescribeRecord(PGOCtxProfileRecords::Counters, "Counters");
     DescribeBlock(PGOCtxProfileBlockIDs::ContextNodeBlockID, "Context");
     DescribeRecord(PGOCtxProfileRecords::Guid, "GUID");
-    DescribeRecord(PGOCtxProfileRecords::CalleeIndex, "CalleeIndex");
+    DescribeRecord(PGOCtxProfileRecords::CallsiteIndex, "CalleeIndex");
     DescribeRecord(PGOCtxProfileRecords::Counters, "Counters");
     DescribeBlock(PGOCtxProfileBlockIDs::FlatProfilesSectionBlockID,
                   "FlatProfiles");
@@ -85,29 +87,39 @@ void PGOCtxProfileWriter::writeGuid(ctx_profile::GUID Guid) {
   Writer.EmitRecord(PGOCtxProfileRecords::Guid, SmallVector<uint64_t, 1>{Guid});
 }
 
+void PGOCtxProfileWriter::writeCallsiteIndex(uint32_t CallsiteIndex) {
+  Writer.EmitRecord(PGOCtxProfileRecords::CallsiteIndex,
+                    SmallVector<uint64_t, 1>{CallsiteIndex});
+}
+
+void PGOCtxProfileWriter::writeRootEntryCount(uint64_t TotalRootEntryCount) {
+  Writer.EmitRecord(PGOCtxProfileRecords::TotalRootEntryCount,
+                    SmallVector<uint64_t, 1>{TotalRootEntryCount});
+}
+
 // recursively write all the subcontexts. We do need to traverse depth first to
 // model the context->subcontext implicitly, and since this captures call
 // stacks, we don't really need to be worried about stack overflow and we can
 // keep the implementation simple.
-void PGOCtxProfileWriter::writeImpl(std::optional<uint32_t> CallerIndex,
+void PGOCtxProfileWriter::writeNode(uint32_t CallsiteIndex,
                                     const ContextNode &Node) {
   // A node with no counters is an error. We don't expect this to happen from
   // the runtime, rather, this is interesting for testing the reader.
   if (!IncludeEmpty && (Node.counters_size() > 0 && Node.entrycount() == 0))
     return;
-  Writer.EnterSubblock(CallerIndex ? PGOCtxProfileBlockIDs::ContextNodeBlockID
-                                   : PGOCtxProfileBlockIDs::ContextRootBlockID,
-                       CodeLen);
+  Writer.EnterSubblock(PGOCtxProfileBlockIDs::ContextNodeBlockID, CodeLen);
   writeGuid(Node.guid());
-  if (CallerIndex)
-    Writer.EmitRecord(PGOCtxProfileRecords::CalleeIndex,
-                      SmallVector<uint64_t, 1>{*CallerIndex});
+  writeCallsiteIndex(CallsiteIndex);
   writeCounters({Node.counters(), Node.counters_size()});
+  writeSubcontexts(Node);
+  Writer.ExitBlock();
+}
+
+void PGOCtxProfileWriter::writeSubcontexts(const ContextNode &Node) {
   for (uint32_t I = 0U; I < Node.callsites_size(); ++I)
     for (const auto *Subcontext = Node.subContexts()[I]; Subcontext;
          Subcontext = Subcontext->next())
-      writeImpl(I, *Subcontext);
-  Writer.ExitBlock();
+      writeNode(I, *Subcontext);
 }
 
 void PGOCtxProfileWriter::startContextSection() {
@@ -122,8 +134,16 @@ void PGOCtxProfileWriter::startFlatSection() {
 void PGOCtxProfileWriter::endContextSection() { Writer.ExitBlock(); }
 void PGOCtxProfileWriter::endFlatSection() { Writer.ExitBlock(); }
 
-void PGOCtxProfileWriter::writeContextual(const ContextNode &RootNode) {
-  writeImpl(std::nullopt, RootNode);
+void PGOCtxProfileWriter::writeContextual(const ContextNode &RootNode,
+                                          uint64_t TotalRootEntryCount) {
+  if (!IncludeEmpty && !TotalRootEntryCount)
+    return;
+  Writer.EnterSubblock(PGOCtxProfileBlockIDs::ContextRootBlockID, CodeLen);
+  writeGuid(RootNode.guid());
+  writeRootEntryCount(TotalRootEntryCount);
+  writeCounters({RootNode.counters(), RootNode.counters_size()});
+  writeSubcontexts(RootNode);
+  Writer.ExitBlock();
 }
 
 void PGOCtxProfileWriter::writeFlat(ctx_profile::GUID Guid,
@@ -144,11 +164,15 @@ struct SerializableCtxRepresentation {
   std::vector<std::vector<SerializableCtxRepresentation>> Callsites;
 };
 
+struct SerializableRootRepresentation : public SerializableCtxRepresentation {
+  uint64_t TotalRootEntryCount = 0;
+};
+
 using SerializableFlatProfileRepresentation =
     std::pair<ctx_profile::GUID, std::vector<uint64_t>>;
 
 struct SerializableProfileRepresentation {
-  std::vector<SerializableCtxRepresentation> Contexts;
+  std::vector<SerializableRootRepresentation> Contexts;
   std::vector<SerializableFlatProfileRepresentation> FlatProfiles;
 };
 
@@ -189,6 +213,7 @@ createNode(std::vector<std::unique_ptr<char[]>> &Nodes,
 
 LLVM_YAML_IS_SEQUENCE_VECTOR(SerializableCtxRepresentation)
 LLVM_YAML_IS_SEQUENCE_VECTOR(std::vector<SerializableCtxRepresentation>)
+LLVM_YAML_IS_SEQUENCE_VECTOR(SerializableRootRepresentation)
 LLVM_YAML_IS_SEQUENCE_VECTOR(SerializableFlatProfileRepresentation)
 template <> struct yaml::MappingTraits<SerializableCtxRepresentation> {
   static void mapping(yaml::IO &IO, SerializableCtxRepresentation &SCR) {
@@ -198,6 +223,13 @@ template <> struct yaml::MappingTraits<SerializableCtxRepresentation> {
   }
 };
 
+template <> struct yaml::MappingTraits<SerializableRootRepresentation> {
+  static void mapping(yaml::IO &IO, SerializableRootRepresentation &R) {
+    yaml::MappingTraits<SerializableCtxRepresentation>::mapping(IO, R);
+    IO.mapRequired("TotalRootEntryCount", R.TotalRootEntryCount);
+  }
+};
+
 template <> struct yaml::MappingTraits<SerializableProfileRepresentation> {
   static void mapping(yaml::IO &IO, SerializableProfileRepresentation &SPR) {
     IO.mapOptional("Contexts", SPR.Contexts);
@@ -232,7 +264,7 @@ Error llvm::createCtxProfFromYAML(StringRef Profile, raw_ostream &Out) {
       if (!TopList)
         return createStringError(
             "Unexpected error converting internal structure to ctx profile");
-      Writer.writeContextual(*TopList);
+      Writer.writeContextual(*TopList, DC.TotalRootEntryCount);
     }
     Writer.endContextSection();
   }
diff --git a/llvm/test/Analysis/CtxProfAnalysis/flatten-and-annotate.ll b/llvm/test/Analysis/CtxProfAnalysis/flatten-and-annotate.ll
index 20eaf59576855..c7b325bdbfff9 100644
--- a/llvm/test/Analysis/CtxProfAnalysis/flatten-and-annotate.ll
+++ b/llvm/test/Analysis/CtxProfAnalysis/flatten-and-annotate.ll
@@ -61,6 +61,7 @@
 ;--- profile.yaml
 Contexts:
   - Guid: 4909520559318251808
+    TotalRootEntryCount: 100
     Counters: [100, 40]
     Callsites: -
                 - Guid: 11872291593386833696
diff --git a/llvm/test/Analysis/CtxProfAnalysis/flatten-check-path.ll b/llvm/test/Analysis/CtxProfAnalysis/flatten-check-path.ll
index eb697b69e2c02..b10eb6a6ec1b1 100644
--- a/llvm/test/Analysis/CtxProfAnalysis/flatten-check-path.ll
+++ b/llvm/test/Analysis/CtxProfAnalysis/flatten-check-path.ll
@@ -41,6 +41,7 @@ exit:
 ;--- profile_ok.yaml...
[truncated]

@mtrofin mtrofin force-pushed the users/mtrofin/03-11-_ctxprof_capture_sampling_info_for_context_roots branch from 7aa7364 to 8824c32 Compare March 14, 2025 16:52
Copy link
Contributor

@snehasish snehasish left a comment

Choose a reason for hiding this comment

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

lgtm

@mtrofin mtrofin force-pushed the users/mtrofin/03-11-_ctxprof_capture_sampling_info_for_context_roots branch 2 times, most recently from 7078432 to 760bc2b Compare March 14, 2025 21:59
@mtrofin mtrofin force-pushed the users/mtrofin/03-11-_ctxprof_capture_sampling_info_for_context_roots branch from 760bc2b to c4b136b Compare March 15, 2025 03:28
@mtrofin mtrofin force-pushed the users/mtrofin/03-11-_ctxprof_capture_sampling_info_for_context_roots branch from c4b136b to 891e3b9 Compare March 15, 2025 04:04
Copy link
Member Author

mtrofin commented Mar 15, 2025

Merge activity

  • Mar 15, 12:08 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Mar 15, 12:10 AM EDT: A user merged this pull request with Graphite.

@mtrofin mtrofin merged commit b034905 into main Mar 15, 2025
6 of 10 checks passed
@mtrofin mtrofin deleted the users/mtrofin/03-11-_ctxprof_capture_sampling_info_for_context_roots branch March 15, 2025 04:10
@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder llvm-nvptx64-nvidia-ubuntu running on as-builder-7 while building compiler-rt,llvm at step 6 "test-build-unified-tree-check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-llvm) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/FileCheck --check-prefix=INSTRUMENT /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/FileCheck --check-prefix=INSTRUMENT /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/FileCheck --check-prefix=LOWERING /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/FileCheck --check-prefix=LOWERING /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder openmp-gcc-x86_64-linux-debian running on gribozavr4 while building compiler-rt,llvm at step 5 "compile-openmp".

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

Here is the relevant piece of the build log for the reference
Step 5 (compile-openmp) failure: build (failure)
...
20.231 [1770/96/3614] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaPPC.cpp.o
20.262 [1769/96/3615] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaStmtAttr.cpp.o
20.272 [1768/96/3616] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaSPIRV.cpp.o
20.286 [1767/96/3617] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaSwift.cpp.o
20.298 [1766/96/3618] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaSystemZ.cpp.o
20.307 [1765/96/3619] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTemplateVariadic.cpp.o
20.318 [1764/96/3620] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaWasm.cpp.o
20.334 [1763/96/3621] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaX86.cpp.o
20.346 [1762/96/3622] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/TypeLocBuilder.cpp.o
20.354 [1761/96/3623] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o
FAILED: lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/openmp-gcc-x86_64-linux-debian/llvm.build/lib/Transforms/IPO -I/b/1/openmp-gcc-x86_64-linux-debian/llvm.src/llvm/lib/Transforms/IPO -I/b/1/openmp-gcc-x86_64-linux-debian/llvm.build/include -I/b/1/openmp-gcc-x86_64-linux-debian/llvm.src/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o -MF lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o.d -o lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o -c /b/1/openmp-gcc-x86_64-linux-debian/llvm.src/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp
In file included from /b/1/openmp-gcc-x86_64-linux-debian/llvm.src/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp:17:
In file included from /b/1/openmp-gcc-x86_64-linux-debian/llvm.src/llvm/include/llvm/Analysis/CtxProfAnalysis.h:17:
/b/1/openmp-gcc-x86_64-linux-debian/llvm.src/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:109:3: warning: explicitly defaulted default constructor is implicitly deleted [-Wdefaulted-function-deleted]
  PGOCtxProfContext() = default;
  ^
/b/1/openmp-gcc-x86_64-linux-debian/llvm.src/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:95:33: note: default constructor of 'PGOCtxProfContext' is implicitly deleted because field 'RootEntryCount' of const-qualified type 'const std::optional<uint64_t>' (aka 'const optional<unsigned long>') would not be initialized
  const std::optional<uint64_t> RootEntryCount;
                                ^
In file included from /b/1/openmp-gcc-x86_64-linux-debian/llvm.src/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp:17:
/b/1/openmp-gcc-x86_64-linux-debian/llvm.src/llvm/include/llvm/Analysis/CtxProfAnalysis.h:33:5: error: call to implicitly-deleted default constructor of 'llvm::PGOCtxProfContext'
    FunctionInfo(StringRef Name) : Name(Name) {}
    ^
/b/1/openmp-gcc-x86_64-linux-debian/llvm.src/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:109:3: note: explicitly defaulted function was implicitly deleted here
  PGOCtxProfContext() = default;
  ^
/b/1/openmp-gcc-x86_64-linux-debian/llvm.src/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:95:33: note: default constructor of 'PGOCtxProfContext' is implicitly deleted because field 'RootEntryCount' of const-qualified type 'const std::optional<uint64_t>' (aka 'const optional<unsigned long>') would not be initialized
  const std::optional<uint64_t> RootEntryCount;
                                ^
1 warning and 1 error generated.
20.354 [1761/95/3624] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/AnalysisBasedWarnings.cpp.o
20.355 [1761/94/3625] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/Sema.cpp.o
20.356 [1761/93/3626] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaCast.cpp.o
20.356 [1761/92/3627] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaConcept.cpp.o
20.357 [1761/91/3628] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaCUDA.cpp.o
20.357 [1761/90/3629] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaDecl.cpp.o
20.358 [1761/89/3630] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaDeclAttr.cpp.o
20.359 [1761/88/3631] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGDebugInfo.cpp.o
20.359 [1761/87/3632] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGDecl.cpp.o
20.360 [1761/86/3633] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGDeclCXX.cpp.o
20.361 [1761/85/3634] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGException.cpp.o
20.362 [1761/84/3635] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExpr.cpp.o
20.362 [1761/83/3636] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprAgg.cpp.o
20.363 [1761/82/3637] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprCXX.cpp.o
20.364 [1761/81/3638] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprComplex.cpp.o
20.364 [1761/80/3639] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprConstant.cpp.o
20.365 [1761/79/3640] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprScalar.cpp.o
20.366 [1761/78/3641] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGGPUBuiltin.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck --check-prefix=INSTRUMENT /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck --check-prefix=INSTRUMENT /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
RUN: at line 4: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck --check-prefix=LOWERING /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck --check-prefix=LOWERING /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: �[0m�[0;1;31merror: �[0m�[1mLOWERING: expected string not found in input
�[0m; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
�[0;1;32m            ^
�[0m�[1m<stdin>:1:1: �[0m�[0;1;30mnote: �[0m�[1mscanning from here
�[0m; ModuleID = '<stdin>'
�[0;1;32m^
�[0m�[1m<stdin>:4:1: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
�[0;1;32m^
�[0m�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB0
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:17:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
�[0;1;32m ^
�[0m�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB1
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:103:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
�[0;1;32m ^
�[0m�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB2
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:111:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
�[0;1;32m ^
�[0m�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB3
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:130:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
�[0;1;32m ^
�[0m�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB4
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:147:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
�[0;1;32m ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder llvm-nvptx-nvidia-ubuntu running on as-builder-7 while building compiler-rt,llvm at step 6 "test-build-unified-tree-check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-llvm) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/FileCheck --check-prefix=INSTRUMENT /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/FileCheck --check-prefix=INSTRUMENT /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/FileCheck --check-prefix=LOWERING /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/FileCheck --check-prefix=LOWERING /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder openmp-clang-x86_64-linux-debian running on gribozavr4 while building compiler-rt,llvm at step 5 "compile-openmp".

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

Here is the relevant piece of the build log for the reference
Step 5 (compile-openmp) failure: build (failure)
...
10.141 [1140/96/4244] Building CXX object tools/llvm-debuginfod/CMakeFiles/llvm-debuginfod.dir/llvm-debuginfod.cpp.o
10.142 [1139/96/4245] Building CXX object tools/llvm-debuginfod/CMakeFiles/llvm-debuginfod.dir/llvm-debuginfod-driver.cpp.o
10.143 [1138/96/4246] Building CXX object tools/llvm-diff/CMakeFiles/llvm-diff.dir/llvm-diff.cpp.o
10.146 [1137/96/4247] Building CXX object tools/llvm-dlang-demangle-fuzzer/CMakeFiles/llvm-dlang-demangle-fuzzer.dir/DummyDemanglerFuzzer.cpp.o
10.147 [1136/96/4248] Building CXX object tools/llvm-diff/lib/CMakeFiles/LLVMDiff.dir/DiffConsumer.cpp.o
10.150 [1135/96/4249] Building CXX object tools/llvm-dlang-demangle-fuzzer/CMakeFiles/llvm-dlang-demangle-fuzzer.dir/llvm-dlang-demangle-fuzzer.cpp.o
10.151 [1134/96/4250] Building CXX object tools/llvm-diff/lib/CMakeFiles/LLVMDiff.dir/DiffLog.cpp.o
10.155 [1133/96/4251] Building CXX object tools/llvm-diff/lib/CMakeFiles/LLVMDiff.dir/DifferenceEngine.cpp.o
10.160 [1132/96/4252] Building CXX object tools/llvm-dis/CMakeFiles/llvm-dis.dir/llvm-dis.cpp.o
10.162 [1131/96/4253] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o
FAILED: lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/openmp-clang-x86_64-linux-debian/llvm.build/lib/Transforms/IPO -I/b/1/openmp-clang-x86_64-linux-debian/llvm.src/llvm/lib/Transforms/IPO -I/b/1/openmp-clang-x86_64-linux-debian/llvm.build/include -I/b/1/openmp-clang-x86_64-linux-debian/llvm.src/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o -MF lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o.d -o lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o -c /b/1/openmp-clang-x86_64-linux-debian/llvm.src/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp
In file included from /b/1/openmp-clang-x86_64-linux-debian/llvm.src/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp:17:
In file included from /b/1/openmp-clang-x86_64-linux-debian/llvm.src/llvm/include/llvm/Analysis/CtxProfAnalysis.h:17:
/b/1/openmp-clang-x86_64-linux-debian/llvm.src/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:109:3: warning: explicitly defaulted default constructor is implicitly deleted [-Wdefaulted-function-deleted]
  PGOCtxProfContext() = default;
  ^
/b/1/openmp-clang-x86_64-linux-debian/llvm.src/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:95:33: note: default constructor of 'PGOCtxProfContext' is implicitly deleted because field 'RootEntryCount' of const-qualified type 'const std::optional<uint64_t>' (aka 'const optional<unsigned long>') would not be initialized
  const std::optional<uint64_t> RootEntryCount;
                                ^
In file included from /b/1/openmp-clang-x86_64-linux-debian/llvm.src/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp:17:
/b/1/openmp-clang-x86_64-linux-debian/llvm.src/llvm/include/llvm/Analysis/CtxProfAnalysis.h:33:5: error: call to implicitly-deleted default constructor of 'llvm::PGOCtxProfContext'
    FunctionInfo(StringRef Name) : Name(Name) {}
    ^
/b/1/openmp-clang-x86_64-linux-debian/llvm.src/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:109:3: note: explicitly defaulted function was implicitly deleted here
  PGOCtxProfContext() = default;
  ^
/b/1/openmp-clang-x86_64-linux-debian/llvm.src/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:95:33: note: default constructor of 'PGOCtxProfContext' is implicitly deleted because field 'RootEntryCount' of const-qualified type 'const std::optional<uint64_t>' (aka 'const optional<unsigned long>') would not be initialized
  const std::optional<uint64_t> RootEntryCount;
                                ^
1 warning and 1 error generated.
10.163 [1131/95/4254] Building CXX object tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/BenchmarkResult.cpp.o
10.167 [1131/94/4255] Building CXX object tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/BenchmarkRunner.cpp.o
10.171 [1131/93/4256] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UndefCapturedBlockVarChecker.cpp.o
10.172 [1131/92/4257] Building CXX object tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/Analysis.cpp.o
10.172 [1131/91/4258] Linking CXX static library lib/libLLVMDiff.a
10.175 [1131/90/4259] Building CXX object tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/Assembler.cpp.o
10.195 [1131/89/4260] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UninitializedObject/UninitializedPointee.cpp.o
10.201 [1131/88/4261] Linking CXX executable bin/llvm-bcanalyzer
10.224 [1131/87/4262] Building CXX object tools/clang/tools/diagtool/CMakeFiles/diagtool.dir/ListWarnings.cpp.o
10.227 [1131/86/4263] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/VforkChecker.cpp.o
10.230 [1131/85/4264] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UndefinedNewArraySizeChecker.cpp.o
10.239 [1131/84/4265] Linking CXX executable bin/llvm-cxxfilt
10.241 [1131/83/4266] Building CXX object tools/clang/tools/diagtool/CMakeFiles/diagtool.dir/FindDiagnosticID.cpp.o
10.243 [1131/82/4267] Linking CXX executable bin/llvm-dlang-demangle-fuzzer
10.246 [1131/81/4268] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UnreachableCodeChecker.cpp.o
10.256 [1131/80/4269] Building CXX object tools/clang/lib/Format/CMakeFiles/obj.clangFormat.dir/MacroExpander.cpp.o
10.258 [1131/79/4270] Building CXX object tools/clang/tools/diagtool/CMakeFiles/diagtool.dir/TreeView.cpp.o
10.283 [1131/78/4271] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UnixAPIChecker.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 8 (Add check check-llvm) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck --check-prefix=INSTRUMENT /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck --check-prefix=INSTRUMENT /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck --check-prefix=LOWERING /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck --check-prefix=LOWERING /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder llvm-x86_64-debian-dylib running on gribozavr4 while building compiler-rt,llvm at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
15.381 [2894/86/4233] Building CXX object tools/obj2yaml/CMakeFiles/obj2yaml.dir/minidump2yaml.cpp.o
15.381 [2894/85/4234] Building WindresOpts.inc...
15.382 [2894/84/4235] Building CXX object tools/obj2yaml/CMakeFiles/obj2yaml.dir/offload2yaml.cpp.o
15.383 [2894/83/4236] Building CXX object tools/obj2yaml/CMakeFiles/obj2yaml.dir/xcoff2yaml.cpp.o
15.383 [2894/82/4237] Building Opts.inc...
15.385 [2894/81/4238] Building StripOpts.inc...
15.389 [2894/80/4239] Building CXX object tools/yaml2obj/CMakeFiles/yaml2obj.dir/yaml2obj.cpp.o
15.391 [2894/79/4240] Building CXX object tools/obj2yaml/CMakeFiles/obj2yaml.dir/wasm2yaml.cpp.o
15.395 [2894/78/4241] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/VLASizeChecker.cpp.o
15.407 [2894/77/4242] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o
FAILED: lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_EXPORTS -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/llvm-x86_64-debian-dylib/build/lib/Transforms/IPO -I/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Transforms/IPO -I/b/1/llvm-x86_64-debian-dylib/build/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o -MF lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o.d -o lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ElimAvailExtern.cpp.o -c /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp:17:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/Analysis/CtxProfAnalysis.h:17:
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:109:3: warning: explicitly defaulted default constructor is implicitly deleted [-Wdefaulted-function-deleted]
  PGOCtxProfContext() = default;
  ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:95:33: note: default constructor of 'PGOCtxProfContext' is implicitly deleted because field 'RootEntryCount' of const-qualified type 'const std::optional<uint64_t>' (aka 'const optional<unsigned long>') would not be initialized
  const std::optional<uint64_t> RootEntryCount;
                                ^
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp:17:
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/Analysis/CtxProfAnalysis.h:33:5: error: call to implicitly-deleted default constructor of 'llvm::PGOCtxProfContext'
    FunctionInfo(StringRef Name) : Name(Name) {}
    ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:109:3: note: explicitly defaulted function was implicitly deleted here
  PGOCtxProfContext() = default;
  ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:95:33: note: default constructor of 'PGOCtxProfContext' is implicitly deleted because field 'RootEntryCount' of const-qualified type 'const std::optional<uint64_t>' (aka 'const optional<unsigned long>') would not be initialized
  const std::optional<uint64_t> RootEntryCount;
                                ^
1 warning and 1 error generated.
15.413 [2894/76/4243] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/WebKit/ForwardDeclChecker.cpp.o
15.414 [2894/75/4244] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/WebKit/RawPtrRefLocalVarsChecker.cpp.o
15.425 [2894/74/4245] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/WebKit/RetainPtrCtorAdoptChecker.cpp.o
15.433 [2894/73/4246] Building CXX object tools/clang/lib/StaticAnalyzer/Frontend/CMakeFiles/obj.clangStaticAnalyzerFrontend.dir/AnalyzerHelpFlags.cpp.o
15.466 [2894/72/4247] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/WebKit/RawPtrRefMemberChecker.cpp.o
15.475 [2894/71/4248] Building CXX object tools/clang/lib/StaticAnalyzer/Frontend/CMakeFiles/obj.clangStaticAnalyzerFrontend.dir/AnalysisConsumer.cpp.o
15.479 [2894/70/4249] Linking CXX executable bin/llvm-jitlink-executor
15.511 [2894/69/4250] Building CXX object tools/clang/lib/StaticAnalyzer/Frontend/CMakeFiles/obj.clangStaticAnalyzerFrontend.dir/ModelInjector.cpp.o
15.518 [2894/68/4251] Building CXX object tools/clang/tools/extra/clang-include-fixer/plugin/CMakeFiles/obj.clangIncludeFixerPlugin.dir/IncludeFixerPlugin.cpp.o
15.581 [2894/67/4252] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/ObjCMemberwiseInitializer.cpp.o
15.585 [2894/66/4253] Building CXX object tools/clang/tools/clang-fuzzer/handle-cxx/CMakeFiles/obj.clangHandleCXX.dir/handle_cxx.cpp.o
15.618 [2894/65/4254] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/DefineOutline.cpp.o
15.618 [2894/64/4255] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/RawStringLiteral.cpp.o
15.623 [2894/63/4256] Building CXX object tools/clang/lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/CodeCompletion.cpp.o
15.632 [2894/62/4257] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/DumpAST.cpp.o
15.633 [2894/61/4258] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/SwapIfBranches.cpp.o
15.636 [2894/60/4259] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/AnnotateHighlightings.cpp.o
15.641 [2894/59/4260] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/SpecialMembers.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 8 (Add check check-llvm) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck --check-prefix=INSTRUMENT /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck --check-prefix=INSTRUMENT /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck --check-prefix=LOWERING /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck --check-prefix=LOWERING /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /buildbot/worker/arc-folder/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /buildbot/worker/arc-folder/build/bin/FileCheck --check-prefix=INSTRUMENT /buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /buildbot/worker/arc-folder/build/bin/FileCheck --check-prefix=INSTRUMENT /buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /buildbot/worker/arc-folder/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
RUN: at line 4: /buildbot/worker/arc-folder/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /buildbot/worker/arc-folder/build/bin/FileCheck --check-prefix=LOWERING /buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /buildbot/worker/arc-folder/build/bin/FileCheck --check-prefix=LOWERING /buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /buildbot/worker/arc-folder/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
/buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder ml-opt-dev-x86-64 running on ml-opt-dev-x86-64-b1 while building compiler-rt,llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /b/ml-opt-dev-x86-64-b1/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /b/ml-opt-dev-x86-64-b1/build/bin/FileCheck --check-prefix=INSTRUMENT /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /b/ml-opt-dev-x86-64-b1/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /b/ml-opt-dev-x86-64-b1/build/bin/FileCheck --check-prefix=INSTRUMENT /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /b/ml-opt-dev-x86-64-b1/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /b/ml-opt-dev-x86-64-b1/build/bin/FileCheck --check-prefix=LOWERING /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /b/ml-opt-dev-x86-64-b1/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /b/ml-opt-dev-x86-64-b1/build/bin/FileCheck --check-prefix=LOWERING /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder premerge-monolithic-linux running on premerge-linux-1 while building compiler-rt,llvm at step 7 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /build/buildbot/premerge-monolithic-linux/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck --check-prefix=INSTRUMENT /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /build/buildbot/premerge-monolithic-linux/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck --check-prefix=INSTRUMENT /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /build/buildbot/premerge-monolithic-linux/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck --check-prefix=LOWERING /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /build/buildbot/premerge-monolithic-linux/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck --check-prefix=LOWERING /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/FileCheck --check-prefix=INSTRUMENT /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/FileCheck --check-prefix=INSTRUMENT /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/FileCheck --check-prefix=LOWERING /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/FileCheck --check-prefix=LOWERING /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/FileCheck --check-prefix=INSTRUMENT /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/FileCheck --check-prefix=INSTRUMENT /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/FileCheck --check-prefix=LOWERING /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/FileCheck --check-prefix=LOWERING /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder ml-opt-rel-x86-64 running on ml-opt-rel-x86-64-b2 while building compiler-rt,llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /b/ml-opt-rel-x86-64-b1/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck --check-prefix=INSTRUMENT /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /b/ml-opt-rel-x86-64-b1/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck --check-prefix=INSTRUMENT /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /b/ml-opt-rel-x86-64-b1/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck --check-prefix=LOWERING /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /b/ml-opt-rel-x86-64-b1/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck --check-prefix=LOWERING /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck --check-prefix=INSTRUMENT /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck --check-prefix=INSTRUMENT /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck --check-prefix=LOWERING /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck --check-prefix=LOWERING /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: �[0m�[0;1;31merror: �[0m�[1mLOWERING: expected string not found in input
�[0m; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
�[0;1;32m            ^
�[0m�[1m<stdin>:1:1: �[0m�[0;1;30mnote: �[0m�[1mscanning from here
�[0m; ModuleID = '<stdin>'
�[0;1;32m^
�[0m�[1m<stdin>:4:1: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
�[0;1;32m^
�[0m�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB0
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:17:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
�[0;1;32m ^
�[0m�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB1
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:103:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
�[0;1;32m ^
�[0m�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB2
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:111:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
�[0;1;32m ^
�[0m�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB3
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:130:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
�[0;1;32m ^
�[0m�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB4
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:147:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
�[0;1;32m ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder clang-cmake-x86_64-avx512-linux running on avx512-intel64 while building compiler-rt,llvm at step 7 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/FileCheck --check-prefix=INSTRUMENT /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/FileCheck --check-prefix=INSTRUMENT /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/FileCheck --check-prefix=LOWERING /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/FileCheck --check-prefix=LOWERING /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/FileCheck --check-prefix=INSTRUMENT /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/FileCheck --check-prefix=INSTRUMENT /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/FileCheck --check-prefix=LOWERING /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/FileCheck --check-prefix=LOWERING /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-win running on sie-win-worker while building compiler-rt,llvm at step 7 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
z:\b\llvm-clang-x86_64-sie-win\build\bin\opt.exe -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll | z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe --check-prefix=INSTRUMENT Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\opt.exe' -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' --check-prefix=INSTRUMENT 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll'
# RUN: at line 4
z:\b\llvm-clang-x86_64-sie-win\build\bin\opt.exe -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll | z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe --check-prefix=LOWERING Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\opt.exe' -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' --check-prefix=LOWERING 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll'
# .---command stderr------------
# | �[1mZ:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll:12:13: �[0m�[0;1;31merror: �[0m�[1mLOWERING: expected string not found in input
�[0m# | �[1m�[0m; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
# | �[0;1;32m            ^
�[0m# | �[0;1;32m�[0m�[1m<stdin>:1:1: �[0m�[0;1;30mnote: �[0m�[1mscanning from here
�[0m# | �[1m�[0m; ModuleID = '<stdin>'
# | �[0;1;32m^
�[0m# | �[0;1;32m�[0m�[1m<stdin>:4:1: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m# | �[1m�[0m@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
# | �[0;1;32m^
�[0m# | �[0;1;32m�[0m�[1mZ:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll:42:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB0
�[0m# | �[1m�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
# | �[0;1;32m                                                                                ^
�[0m# | �[0;1;32m�[0m�[1m<stdin>:17:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m# | �[1m�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
# | �[0;1;32m ^
�[0m# | �[0;1;32m�[0m�[1mZ:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll:184:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB1
�[0m# | �[1m�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
# | �[0;1;32m                                                                                ^
�[0m# | �[0;1;32m�[0m�[1m<stdin>:103:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m# | �[1m�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
# | �[0;1;32m ^
�[0m# | �[0;1;32m�[0m�[1mZ:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll:208:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB2
�[0m# | �[1m�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
# | �[0;1;32m                                                                                ^
�[0m# | �[0;1;32m�[0m�[1m<stdin>:111:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m# | �[1m�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
# | �[0;1;32m ^
�[0m# | �[0;1;32m�[0m�[1mZ:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll:240:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB3
�[0m# | �[1m�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
# | �[0;1;32m                                                                                ^
�[0m# | �[0;1;32m�[0m�[1m<stdin>:130:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m# | �[1m�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
# | �[0;1;32m ^
�[0m# | �[0;1;32m�[0m�[1mZ:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll:268:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB4
�[0m# | �[1m�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
# | �[0;1;32m                                                                                ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck --check-prefix=INSTRUMENT /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck --check-prefix=INSTRUMENT /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck --check-prefix=LOWERING /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck --check-prefix=LOWERING /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
�[1m/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: �[0m�[0;1;31merror: �[0m�[1mLOWERING: expected string not found in input
�[0m; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
�[0;1;32m            ^
�[0m�[1m<stdin>:1:1: �[0m�[0;1;30mnote: �[0m�[1mscanning from here
�[0m; ModuleID = '<stdin>'
�[0;1;32m^
�[0m�[1m<stdin>:4:1: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
�[0;1;32m^
�[0m�[1m/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB0
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:17:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
�[0;1;32m ^
�[0m�[1m/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB1
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:103:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
�[0;1;32m ^
�[0m�[1m/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB2
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:111:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
�[0;1;32m ^
�[0m�[1m/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB3
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:130:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
�[0;1;32m ^
�[0m�[1m/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: �[0m�[0;1;31merror: �[0m�[1mundefined variable: GLOB4
�[0m; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
�[0;1;32m                                                                                ^
�[0m�[1m<stdin>:147:2: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
�[0;1;32m ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder llvm-nvptx64-nvidia-win running on as-builder-8 while building compiler-rt,llvm at step 7 "test-build-unified-tree-check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-llvm) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\build\bin\opt.exe -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < C:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll | c:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\build\bin\filecheck.exe --check-prefix=INSTRUMENT C:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll
# executed command: 'c:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\build\bin\opt.exe' -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
# executed command: 'c:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\build\bin\filecheck.exe' --check-prefix=INSTRUMENT 'C:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll'
# RUN: at line 4
c:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\build\bin\opt.exe -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < C:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll | c:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\build\bin\filecheck.exe --check-prefix=LOWERING C:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll
# executed command: 'c:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\build\bin\opt.exe' -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
# executed command: 'c:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\build\bin\filecheck.exe' --check-prefix=LOWERING 'C:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll'
# .---command stderr------------
# | C:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
# | ; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
# |             ^
# | <stdin>:1:1: note: scanning from here
# | ; ModuleID = '<stdin>'
# | ^
# | <stdin>:4:1: note: possible intended match here
# | @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
# | ^
# | C:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
# | ; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
# |                                                                                 ^
# | <stdin>:17:2: note: possible intended match here
# |  %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
# |  ^
# | C:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
# | ; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
# |                                                                                 ^
# | <stdin>:103:2: note: possible intended match here
# |  %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
# |  ^
# | C:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
# | ; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
# |                                                                                 ^
# | <stdin>:111:2: note: possible intended match here
# |  %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
# |  ^
# | C:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
# | ; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
# |                                                                                 ^
# | <stdin>:130:2: note: possible intended match here
# |  %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
# |  ^
# | C:\buildbot\as-builder-8\llvm-nvptx64-nvidia-win\llvm-project\llvm\test\Transforms\PGOProfile\ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
# | ; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
# |                                                                                 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder ml-opt-devrel-x86-64 running on ml-opt-devrel-x86-64-b2 while building compiler-rt,llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /b/ml-opt-devrel-x86-64-b1/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /b/ml-opt-devrel-x86-64-b1/build/bin/FileCheck --check-prefix=INSTRUMENT /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /b/ml-opt-devrel-x86-64-b1/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /b/ml-opt-devrel-x86-64-b1/build/bin/FileCheck --check-prefix=INSTRUMENT /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /b/ml-opt-devrel-x86-64-b1/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /b/ml-opt-devrel-x86-64-b1/build/bin/FileCheck --check-prefix=LOWERING /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /b/ml-opt-devrel-x86-64-b1/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /b/ml-opt-devrel-x86-64-b1/build/bin/FileCheck --check-prefix=LOWERING /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder clang-debian-cpp20 running on clang-debian-cpp20 while building compiler-rt,llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/FileCheck --check-prefix=INSTRUMENT /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/FileCheck --check-prefix=INSTRUMENT /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/FileCheck --check-prefix=LOWERING /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/FileCheck --check-prefix=LOWERING /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

mtrofin added a commit that referenced this pull request Mar 15, 2025
@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-test-suite running on ppc64le-clang-test-suite while building compiler-rt,llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/FileCheck --check-prefix=INSTRUMENT /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/FileCheck --check-prefix=INSTRUMENT /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/FileCheck --check-prefix=LOWERING /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/FileCheck --check-prefix=LOWERING /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

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

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

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:512: 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:512: 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:512: 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:512: 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:512: 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:512: 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:512: 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:72: 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: 87092 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 
FAIL: LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll (70564 of 87092)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck --check-prefix=INSTRUMENT /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck --check-prefix=INSTRUMENT /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck --check-prefix=LOWERING /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck --check-prefix=LOWERING /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
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:512: 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:512: 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:512: 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:512: 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:512: 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:512: 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:512: 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:72: 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: 87092 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 
FAIL: LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll (70564 of 87092)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck --check-prefix=INSTRUMENT /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck --check-prefix=INSTRUMENT /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck --check-prefix=LOWERING /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck --check-prefix=LOWERING /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
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:512: 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:512: 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:512: 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:512: 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:512: 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:512: 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:512: 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:72: 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: 84139 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80
FAIL: LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll (70582 of 84139)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/FileCheck --check-prefix=INSTRUMENT /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/FileCheck --check-prefix=INSTRUMENT /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
RUN: at line 4: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/FileCheck --check-prefix=LOWERING /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/FileCheck --check-prefix=LOWERING /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 15, 2025

LLVM Buildbot has detected a new failure on builder lld-x86_64-ubuntu-fast running on as-builder-4 while building compiler-rt,llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/PGOProfile/ctx-instrumentation.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint    -S < /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck --check-prefix=INSTRUMENT /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck --check-prefix=INSTRUMENT /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/opt -passes=ctx-instr-gen -profile-context-root=an_entrypoint -S
RUN: at line 4: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint    -profile-context-root=another_entrypoint_no_callees    -S < /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll | /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck --check-prefix=LOWERING /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/opt -passes=ctx-instr-gen,assign-guid,ctx-instr-lower -profile-context-root=an_entrypoint -profile-context-root=another_entrypoint_no_callees -S
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck --check-prefix=LOWERING /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:12:13: error: LOWERING: expected string not found in input
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
            ^
<stdin>:1:1: note: scanning from here
; ModuleID = '<stdin>'
^
<stdin>:4:1: note: possible intended match here
@an_entrypoint_ctx_root = global { ptr, ptr, ptr, i64, i8 } zeroinitializer
^
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:42:81: error: undefined variable: GLOB0
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB0]], ptr @foo, i64 6699318081062747564, i32 2, i32 2)
                                                                                ^
<stdin>:17:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @0, ptr @foo, i64 6699318081062747564, i32 2, i32 2)
 ^
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:184:81: error: undefined variable: GLOB1
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB1]], ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
                                                                                ^
<stdin>:103:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @1, ptr @simple, i64 -3006003237940970099, i32 1, i32 0)
 ^
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:208:81: error: undefined variable: GLOB2
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB2]], ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
                                                                                ^
<stdin>:111:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @2, ptr @no_callsites, i64 5679753335911435902, i32 2, i32 0)
 ^
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:240:81: error: undefined variable: GLOB3
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB3]], ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
                                                                                ^
<stdin>:130:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @3, ptr @no_counters, i64 5458232184388660970, i32 1, i32 1)
 ^
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll:268:81: error: undefined variable: GLOB4
; LOWERING-NEXT: [[TMP1:%.*]] = call ptr @__llvm_ctx_profile_get_context(ptr @[[GLOB4]], ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
                                                                                ^
<stdin>:147:2: note: possible intended match here
 %1 = call ptr @__llvm_ctx_profile_get_context(ptr @4, ptr @inlineasm, i64 -3771893999295659109, i32 1, i32 0)
 ^
...

@erichkeane
Copy link
Collaborator

erichkeane commented Mar 17, 2025

Using clang-10 as a host compiler (and GCC/stdlibc++ 9.4, both are part of our support matrix: https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library), I'm getting the following error that I think is from this patch (at least based on the warning):

In file included from /local/home/ekeane/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp:26:
In file included from /local/home/ekeane/llvm-project/llvm/include/llvm/Analysis/CtxProfAnalysis.h:17:
/local/home/ekeane/llvm-project/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:109:3: warning: explicitly defaulted default constructor is implicitly deleted [-Wdefaulted-function-deleted]
  PGOCtxProfContext() = default;
  ^
/local/home/ekeane/llvm-project/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:95:33: note: default constructor of 'PGOCtxProfContext' is implicitly deleted because field 'RootEntryCount' of const-qualified type 'const std::optional<uint64_t>' (aka 'const optional<unsigned long>') would not be initialized
  const std::optional<uint64_t> RootEntryCount;
                                ^
In file included from /local/home/ekeane/llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp:26:
/local/home/ekeane/llvm-project/llvm/include/llvm/Analysis/CtxProfAnalysis.h:33:5: error: call to implicitly-deleted default constructor of 'llvm::PGOCtxProfContext'
    FunctionInfo(StringRef Name) : Name(Name) {}
    ^
/local/home/ekeane/llvm-project/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:109:3: note: explicitly defaulted function was implicitly deleted here
  PGOCtxProfContext() = default;
  ^
/local/home/ekeane/llvm-project/llvm/include/llvm/ProfileData/PGOCtxProfReader.h:95:33: note: default constructor of 'PGOCtxProfContext' is implicitly deleted because field 'RootEntryCount' of const-qualified type 'const std::optional<uint64_t>' (aka 'const optional<unsigned long>') would not be initialized
  const std::optional<uint64_t> RootEntryCount;

Min-repro on godbolt is here: https://godbolt.org/z/65TdreMaa

Looks like this repros up until Clang 11.

I found I can fix this by just doing an explicit default init with curleys on the type. I've done a RAC patch here: <2e6402ca2c6c33ccf41d74383a8e3afb82489410>

Feel free to correct this in a different way if this doesn't suffice for you.

Copy link
Member Author

mtrofin commented Mar 17, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler-rt llvm:analysis Includes value tracking, cost tables and constant folding llvm:transforms LTO Link time optimization (regular/full LTO or ThinLTO) PGO Profile Guided Optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants