Skip to content

Use global TimerGroups for both new pass manager and old pass manager timers #130375

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

Merged
merged 7 commits into from
Mar 13, 2025

Conversation

alanzhao1
Copy link
Contributor

Additionally, remove the behavior for both pass manager's timer manager classes (PassTimingInfo for the old pass manager and TimePassesHandler for the new pass manager) where these classes would print the values of their timers upon destruction.

Currently, each pass manager manages their own TimerGroups. This is problematic because of duplicate TimerGroups (both pass managers have a TimerGroup for pass times with identical names and descriptions). The result is that in Clang, -ftime-report has two "Pass execution timing report" sections (one for the new pass manager which manages optimization passes, and one for the old pass manager which manages the backend). The result of this change is that Clang's -ftime-report now prints both optimization and backend pass timing info in a unified "Pass execution timing report" section.

Moving the ownership of the TimerGroups to globals also makes it easier to implement JSON-formatted -ftime-report. This was not possible with the old structure because the two pass managers were created and destroyed in far parts of the codebase and outputting JSON requires the printing logic to be at the same place because of formatting.

Previous discourse discussion: https://discourse.llvm.org/t/difficulties-with-implementing-json-formatted-ftime-report/84353

… timers

Additionally, remove the behavior for both pass manager's timer manager
classes (`PassTimingInfo` for the old pass manager and
`TimePassesHandler` for the new pass manager) where these classes would
print the values of their timers upon destruction.

Currently, each pass manager manages their own `TimerGroup`s. This is
problematic because of duplicate `TimerGroup`s (both pass managers have
a `TimerGroup` for pass times with identical names and descriptions).
The result is that in Clang, `-ftime-report` has two "Pass execution
timing report" sections (one for the new pass manager which manages
optimization passes, and one for the old pass manager which manages the
backend). The result of this change is that Clang's `-ftime-report` now
prints both optimization and backend pass timing info in a unified "Pass
execution timing report" section.

Moving the ownership of the `TimerGroups` to globals also  makes it
easier to implement JSON-formatted `-ftime-report`. This was not
possible with the old structure because the two pass managers were
created and destroyed in far parts of the codebase and outputting JSON
requires the printing logic to be at the same place because of
formatting.

Previous discourse discussion: https://discourse.llvm.org/t/difficulties-with-implementing-json-formatted-ftime-report/84353
@alanzhao1 alanzhao1 requested review from rnk, MaskRay and aeubanks March 8, 2025 00:52
@llvmbot llvmbot added clang Clang issues not falling into any other category llvm:support llvm:ir labels Mar 8, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 8, 2025

@llvm/pr-subscribers-llvm-support
@llvm/pr-subscribers-llvm-ir

@llvm/pr-subscribers-clang

Author: Alan Zhao (alanzhao1)

Changes

Additionally, remove the behavior for both pass manager's timer manager classes (PassTimingInfo for the old pass manager and TimePassesHandler for the new pass manager) where these classes would print the values of their timers upon destruction.

Currently, each pass manager manages their own TimerGroups. This is problematic because of duplicate TimerGroups (both pass managers have a TimerGroup for pass times with identical names and descriptions). The result is that in Clang, -ftime-report has two "Pass execution timing report" sections (one for the new pass manager which manages optimization passes, and one for the old pass manager which manages the backend). The result of this change is that Clang's -ftime-report now prints both optimization and backend pass timing info in a unified "Pass execution timing report" section.

Moving the ownership of the TimerGroups to globals also makes it easier to implement JSON-formatted -ftime-report. This was not possible with the old structure because the two pass managers were created and destroyed in far parts of the codebase and outputting JSON requires the printing logic to be at the same place because of formatting.

Previous discourse discussion: https://discourse.llvm.org/t/difficulties-with-implementing-json-formatted-ftime-report/84353


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

6 Files Affected:

  • (modified) clang/test/Misc/time-passes.c (-1)
  • (modified) llvm/include/llvm/IR/PassTimingInfo.h (+3-9)
  • (modified) llvm/include/llvm/Support/Timer.h (+11)
  • (modified) llvm/lib/IR/PassTimingInfo.cpp (+30-30)
  • (modified) llvm/lib/Support/Timer.cpp (+33-9)
  • (modified) llvm/unittests/IR/TimePassesTest.cpp (+2-2)
diff --git a/clang/test/Misc/time-passes.c b/clang/test/Misc/time-passes.c
index 395da216aad42..c1669826b2268 100644
--- a/clang/test/Misc/time-passes.c
+++ b/clang/test/Misc/time-passes.c
@@ -19,6 +19,5 @@
 // NPM:       InstCombinePass{{$}}
 // NPM-NOT:   InstCombinePass #
 // TIME: Total{{$}}
-// NPM: Pass execution timing report
 
 int foo(int x, int y) { return x + y; }
diff --git a/llvm/include/llvm/IR/PassTimingInfo.h b/llvm/include/llvm/IR/PassTimingInfo.h
index 1148399943186..13947f7405245 100644
--- a/llvm/include/llvm/IR/PassTimingInfo.h
+++ b/llvm/include/llvm/IR/PassTimingInfo.h
@@ -39,19 +39,14 @@ Timer *getPassTimer(Pass *);
 /// This class implements -time-passes functionality for new pass manager.
 /// It provides the pass-instrumentation callbacks that measure the pass
 /// execution time. They collect timing info into individual timers as
-/// passes are being run. At the end of its life-time it prints the resulting
-/// timing report.
+/// passes are being run.
 class TimePassesHandler {
   /// Value of this type is capable of uniquely identifying pass invocations.
   /// It is a pair of string Pass-Identifier (which for now is common
   /// to all the instance of a given pass) + sequential invocation counter.
   using PassInvocationID = std::pair<StringRef, unsigned>;
 
-  /// Groups of timers for passes and analyses.
-  TimerGroup PassTG;
-  TimerGroup AnalysisTG;
-
-  using TimerVector = llvm::SmallVector<std::unique_ptr<Timer>, 4>;
+  using TimerVector = llvm::SmallVector<Timer *, 4>;
   /// Map of timers for pass invocations
   StringMap<TimerVector> TimingData;
 
@@ -74,8 +69,7 @@ class TimePassesHandler {
   TimePassesHandler();
   TimePassesHandler(bool Enabled, bool PerRun = false);
 
-  /// Destructor handles the print action if it has not been handled before.
-  ~TimePassesHandler() { print(); }
+  ~TimePassesHandler() = default;
 
   /// Prints out timing information and then resets the timers.
   void print();
diff --git a/llvm/include/llvm/Support/Timer.h b/llvm/include/llvm/Support/Timer.h
index abe30451dd2f2..3e115df1500fe 100644
--- a/llvm/include/llvm/Support/Timer.h
+++ b/llvm/include/llvm/Support/Timer.h
@@ -169,6 +169,17 @@ struct NamedRegionTimer : public TimeRegion {
   explicit NamedRegionTimer(StringRef Name, StringRef Description,
                             StringRef GroupName,
                             StringRef GroupDescription, bool Enabled = true);
+
+  // Create or get a timer stored in the same global map as other timers owned
+  // by NamedRegionTimer.
+  static Timer &getNamedGroupTimer(StringRef Name, StringRef Description,
+                                   StringRef GroupName,
+                                   StringRef GroupDescription);
+
+  // Create or get a TimerGroup stored in the same global map owned by
+  // NamedRegionTimer.
+  static TimerGroup &getNamedGroupTimerGroup(StringRef GroupName,
+                                             StringRef GroupDescription);
 };
 
 /// The TimerGroup class is used to group together related timers into a single
diff --git a/llvm/lib/IR/PassTimingInfo.cpp b/llvm/lib/IR/PassTimingInfo.cpp
index 46db2c74a5c76..0d133be890ce2 100644
--- a/llvm/lib/IR/PassTimingInfo.cpp
+++ b/llvm/lib/IR/PassTimingInfo.cpp
@@ -37,6 +37,12 @@ namespace llvm {
 bool TimePassesIsEnabled = false;
 bool TimePassesPerRun = false;
 
+static constexpr StringRef PassGroupName = "pass";
+static constexpr StringRef AnalysisGroupName = "analysis";
+static constexpr StringRef PassGroupDesc = "Pass execution timing report";
+static constexpr StringRef AnalysisGroupDesc =
+    "Analysis execution timing report";
+
 static cl::opt<bool, true> EnableTiming(
     "time-passes", cl::location(TimePassesIsEnabled), cl::Hidden,
     cl::desc("Time each pass, printing elapsed time for each on exit"));
@@ -62,16 +68,12 @@ class PassTimingInfo {
 
 private:
   StringMap<unsigned> PassIDCountMap; ///< Map that counts instances of passes
-  DenseMap<PassInstanceID, std::unique_ptr<Timer>> TimingData; ///< timers for pass instances
-  TimerGroup TG;
+  DenseMap<PassInstanceID, Timer *> TimingData; ///< timers for pass instances
 
 public:
-  /// Default constructor for yet-inactive timeinfo.
-  /// Use \p init() to activate it.
-  PassTimingInfo();
+  PassTimingInfo() = default;
 
-  /// Print out timing information and release timers.
-  ~PassTimingInfo();
+  ~PassTimingInfo() = default;
 
   /// Initializes the static \p TheTimeInfo member to a non-null value when
   /// -time-passes is enabled. Leaves it null otherwise.
@@ -94,14 +96,6 @@ class PassTimingInfo {
 
 static ManagedStatic<sys::SmartMutex<true>> TimingInfoMutex;
 
-PassTimingInfo::PassTimingInfo() : TG("pass", "Pass execution timing report") {}
-
-PassTimingInfo::~PassTimingInfo() {
-  // Deleting the timers accumulates their info into the TG member.
-  // Then TG member is (implicitly) deleted, actually printing the report.
-  TimingData.clear();
-}
-
 void PassTimingInfo::init() {
   if (TheTimeInfo || !TimePassesIsEnabled)
     return;
@@ -115,7 +109,8 @@ void PassTimingInfo::init() {
 
 /// Prints out timing information and then resets the timers.
 void PassTimingInfo::print(raw_ostream *OutStream) {
-  TG.print(OutStream ? *OutStream : *CreateInfoOutputFile(), true);
+  NamedRegionTimer::getNamedGroupTimerGroup(PassGroupName, PassGroupDesc)
+      .print(OutStream ? *OutStream : *CreateInfoOutputFile(), true);
 }
 
 Timer *PassTimingInfo::newPassTimer(StringRef PassID, StringRef PassDesc) {
@@ -124,7 +119,8 @@ Timer *PassTimingInfo::newPassTimer(StringRef PassID, StringRef PassDesc) {
   // Appending description with a pass-instance number for all but the first one
   std::string PassDescNumbered =
       num <= 1 ? PassDesc.str() : formatv("{0} #{1}", PassDesc, num).str();
-  return new Timer(PassID, PassDescNumbered, TG);
+  return &NamedRegionTimer::getNamedGroupTimer(PassID, PassDescNumbered,
+                                               PassGroupName, PassGroupDesc);
 }
 
 Timer *PassTimingInfo::getPassTimer(Pass *P, PassInstanceID Pass) {
@@ -133,16 +129,16 @@ Timer *PassTimingInfo::getPassTimer(Pass *P, PassInstanceID Pass) {
 
   init();
   sys::SmartScopedLock<true> Lock(*TimingInfoMutex);
-  std::unique_ptr<Timer> &T = TimingData[Pass];
+  Timer *&T = TimingData[Pass];
 
   if (!T) {
     StringRef PassName = P->getPassName();
     StringRef PassArgument;
     if (const PassInfo *PI = Pass::lookupPassInfo(P->getPassID()))
       PassArgument = PI->getPassArgument();
-    T.reset(newPassTimer(PassArgument.empty() ? PassName : PassArgument, PassName));
+    T = newPassTimer(PassArgument.empty() ? PassName : PassArgument, PassName);
   }
-  return T.get();
+  return T;
 }
 
 PassTimingInfo *PassTimingInfo::TheTimeInfo;
@@ -170,11 +166,13 @@ void reportAndResetTimings(raw_ostream *OutStream) {
 /// Returns the timer for the specified pass invocation of \p PassID.
 /// Each time it creates a new timer.
 Timer &TimePassesHandler::getPassTimer(StringRef PassID, bool IsPass) {
-  TimerGroup &TG = IsPass ? PassTG : AnalysisTG;
+  StringRef TGName = IsPass ? PassGroupName : PassGroupDesc;
+  StringRef TGDesc = IsPass ? PassGroupDesc : AnalysisGroupDesc;
+  TimerGroup &TG = NamedRegionTimer::getNamedGroupTimerGroup(TGName, TGDesc);
   if (!PerRun) {
     TimerVector &Timers = TimingData[PassID];
     if (Timers.size() == 0)
-      Timers.emplace_back(new Timer(PassID, PassID, TG));
+      Timers.push_back(new Timer(PassID, PassID, TG));
     return *Timers.front();
   }
 
@@ -186,16 +184,14 @@ Timer &TimePassesHandler::getPassTimer(StringRef PassID, bool IsPass) {
   std::string FullDesc = formatv("{0} #{1}", PassID, Count).str();
 
   Timer *T = new Timer(PassID, FullDesc, TG);
-  Timers.emplace_back(T);
+  Timers.push_back(T);
   assert(Count == Timers.size() && "Timers vector not adjusted correctly.");
 
   return *T;
 }
 
 TimePassesHandler::TimePassesHandler(bool Enabled, bool PerRun)
-    : PassTG("pass", "Pass execution timing report"),
-      AnalysisTG("analysis", "Analysis execution timing report"),
-      Enabled(Enabled), PerRun(PerRun) {}
+    : Enabled(Enabled), PerRun(PerRun) {}
 
 TimePassesHandler::TimePassesHandler()
     : TimePassesHandler(TimePassesIsEnabled, TimePassesPerRun) {}
@@ -215,8 +211,12 @@ void TimePassesHandler::print() {
     MaybeCreated = CreateInfoOutputFile();
     OS = &*MaybeCreated;
   }
-  PassTG.print(*OS, true);
-  AnalysisTG.print(*OS, true);
+
+  NamedRegionTimer::getNamedGroupTimerGroup(PassGroupName, PassGroupDesc)
+      .print(*OS, true);
+  NamedRegionTimer::getNamedGroupTimerGroup(AnalysisGroupName,
+                                            AnalysisGroupDesc)
+      .print(*OS, true);
 }
 
 LLVM_DUMP_METHOD void TimePassesHandler::dump() const {
@@ -226,7 +226,7 @@ LLVM_DUMP_METHOD void TimePassesHandler::dump() const {
     StringRef PassID = I.getKey();
     const TimerVector& MyTimers = I.getValue();
     for (unsigned idx = 0; idx < MyTimers.size(); idx++) {
-      const Timer* MyTimer = MyTimers[idx].get();
+      const Timer *MyTimer = MyTimers[idx];
       if (MyTimer && MyTimer->isRunning())
         dbgs() << "\tTimer " << MyTimer << " for pass " << PassID << "(" << idx << ")\n";
     }
@@ -236,7 +236,7 @@ LLVM_DUMP_METHOD void TimePassesHandler::dump() const {
     StringRef PassID = I.getKey();
     const TimerVector& MyTimers = I.getValue();
     for (unsigned idx = 0; idx < MyTimers.size(); idx++) {
-      const Timer* MyTimer = MyTimers[idx].get();
+      const Timer *MyTimer = MyTimers[idx];
       if (MyTimer && MyTimer->hasTriggered() && !MyTimer->isRunning())
         dbgs() << "\tTimer " << MyTimer << " for pass " << PassID << "(" << idx << ")\n";
     }
diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp
index 089dae2886f22..0be1e5b47bee8 100644
--- a/llvm/lib/Support/Timer.cpp
+++ b/llvm/lib/Support/Timer.cpp
@@ -222,16 +222,27 @@ class Name2PairMap {
              StringRef GroupDescription) {
     sys::SmartScopedLock<true> L(timerLock());
 
-    std::pair<TimerGroup*, Name2TimerMap> &GroupEntry = Map[GroupName];
-
-    if (!GroupEntry.first)
-      GroupEntry.first = new TimerGroup(GroupName, GroupDescription);
-
+    std::pair<TimerGroup *, Name2TimerMap> &GroupEntry =
+        getGroupEntry(GroupName, GroupDescription);
     Timer &T = GroupEntry.second[Name];
     if (!T.isInitialized())
       T.init(Name, Description, *GroupEntry.first);
     return T;
   }
+
+  TimerGroup &getTimerGroup(StringRef GroupName, StringRef GroupDescription) {
+    return *getGroupEntry(GroupName, GroupDescription).first;
+  }
+
+private:
+  std::pair<TimerGroup *, Name2TimerMap> &
+  getGroupEntry(StringRef GroupName, StringRef GroupDescription) {
+    std::pair<TimerGroup *, Name2TimerMap> &GroupEntry = Map[GroupName];
+    if (!GroupEntry.first)
+      GroupEntry.first = new TimerGroup(GroupName, GroupDescription);
+
+    return GroupEntry;
+  }
 };
 
 }
@@ -239,10 +250,23 @@ class Name2PairMap {
 NamedRegionTimer::NamedRegionTimer(StringRef Name, StringRef Description,
                                    StringRef GroupName,
                                    StringRef GroupDescription, bool Enabled)
-    : TimeRegion(!Enabled
-                     ? nullptr
-                     : &namedGroupedTimers().get(Name, Description, GroupName,
-                                                 GroupDescription)) {}
+    : TimeRegion(!Enabled ? nullptr
+                          : &getNamedGroupTimer(Name, Description, GroupName,
+                                                GroupDescription)) {}
+
+Timer &NamedRegionTimer::getNamedGroupTimer(StringRef Name,
+                                            StringRef Description,
+                                            StringRef GroupName,
+                                            StringRef GroupDescription) {
+  return namedGroupedTimers().get(Name, Description, GroupName,
+                                  GroupDescription);
+}
+
+TimerGroup &
+NamedRegionTimer::getNamedGroupTimerGroup(StringRef GroupName,
+                                          StringRef GroupDescription) {
+  return namedGroupedTimers().getTimerGroup(GroupName, GroupDescription);
+}
 
 //===----------------------------------------------------------------------===//
 //   TimerGroup Implementation
diff --git a/llvm/unittests/IR/TimePassesTest.cpp b/llvm/unittests/IR/TimePassesTest.cpp
index 33f8e00b377d5..85986132103ca 100644
--- a/llvm/unittests/IR/TimePassesTest.cpp
+++ b/llvm/unittests/IR/TimePassesTest.cpp
@@ -161,8 +161,8 @@ TEST(TimePassesTest, CustomOut) {
   PI.runBeforePass(Pass2, M);
   PI.runAfterPass(Pass2, M, PreservedAnalyses::all());
 
-  // Generate report by deleting the handler.
-  TimePasses.reset();
+  // Clear and generate report again.
+  TimePasses->print();
 
   // There should be Pass2 in this report and no Pass1.
   EXPECT_FALSE(TimePassesStr.str().empty());

Copy link
Contributor

@aeubanks aeubanks left a comment

Choose a reason for hiding this comment

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

I think exposing NamedRegionTimer::getNamedGroupTimerGroup() is fine. the alternative is to provide a NamedRegionTimerGroup where we can add our own timers to in StandardInstrumentations.

Copy link
Contributor

@aeubanks aeubanks left a comment

Choose a reason for hiding this comment

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

lgtm

@alanzhao1 alanzhao1 merged commit 09d8e44 into llvm:main Mar 13, 2025
8 of 11 checks passed
@alanzhao1 alanzhao1 deleted the feature/global-timers branch March 13, 2025 17:13
@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 13, 2025

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

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

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 :: ThinLTO/X86/devirt_promote.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 9: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/opt -thinlto-bc -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp3.o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/devirt_promote.ll
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/opt -thinlto-bc -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp3.o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/devirt_promote.ll
RUN: at line 10: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/opt -thinlto-bc -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp4.o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/Inputs/devirt_promote.ll
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/opt -thinlto-bc -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp4.o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/Inputs/devirt_promote.ll
RUN: at line 12: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/llvm-lto2 run /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp3.o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp4.o -save-temps -pass-remarks=.    -whole-program-visibility    -wholeprogramdevirt-print-index-based    -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp5    -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp3.o,test,px    -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp4.o,_ZN1B1fEi,p    -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp4.o,test2,px    -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp4.o,_ZTV1B,px    2>&1 | /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/FileCheck /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/devirt_promote.ll --check-prefix=REMARK --check-prefix=PRINT
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/FileCheck /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/devirt_promote.ll --check-prefix=REMARK --check-prefix=PRINT
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/llvm-lto2 run /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp3.o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp4.o -save-temps -pass-remarks=. -whole-program-visibility -wholeprogramdevirt-print-index-based -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp5 -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp3.o,test,px -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp4.o,_ZN1B1fEi,p -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp4.o,test2,px -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/test/ThinLTO/X86/Output/devirt_promote.ll.tmp4.o,_ZTV1B,px
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/devirt_promote.ll:41:19: error: REMARK-COUNT: expected string not found in input (2 out of 2)
; REMARK-COUNT-2: single-impl: devirtualized a call to _ZN1A1nEi.llvm.
                  ^
<stdin>:3:68: note: scanning from here
<unknown>:0:0: single-impl: devirtualized a call to _ZN1A1nEi.llvm.8211438729707041488
                                                                   ^
<stdin>:13:529: note: possible intended match here
 #9 0x0000777c0df9828e llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::FunctionImporter::ImportMapTy const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>*, bool, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::vector<unsigned char, std::allocator<unsigned char>> const&)::'lambda'(llvm::Module&, llvm::TargetMachine*, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>)::operator()(llvm::Module&, llvm::TargetMachine*, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>) const LTOBackend.cpp:0:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ^

Input file: <stdin>
Check file: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/devirt_promote.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: Devirtualized call to 769020779879025209 (_ZN1A1nEi) 
            2: PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. 
            3: <unknown>:0:0: single-impl: devirtualized a call to _ZN1A1nEi.llvm.8211438729707041488 
count:41'0                                                                        X~~~~~~~~~~~~~~~~~~~ error: no match found
            4:  #0 0x0000777c0c8e88a0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/../lib/libLLVMSupport.so.21.0git+0x1f18a0) 
count:41'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            5:  #1 0x0000777c0c8e5c9f llvm::sys::RunSignalHandlers() (/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/../lib/libLLVMSupport.so.21.0git+0x1eec9f) 
count:41'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            6:  #2 0x0000777c0c8e5dea SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0 
count:41'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            7:  #3 0x0000777c0c042520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) 
count:41'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            8:  #4 0x0000777c0c87955b llvm::NamedRegionTimer::getNamedTimerGroup(llvm::StringRef, llvm::StringRef) (/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/../lib/libLLVMSupport.so.21.0git+0x18255b) 
count:41'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            9:  #5 0x0000777c0cd32497 llvm::TimePassesHandler::TimePassesHandler() (/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/../lib/libLLVMCore.so.21.0git+0x2fe497) 
count:41'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           10:  #6 0x0000777c0de8cfc5 llvm::StandardInstrumentations::StandardInstrumentations(llvm::LLVMContext&, bool, bool, llvm::PrintPassOptions) (/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/../lib/libLLVMPasses.so.21.0git+0x167fc5) 
count:41'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           11:  #7 0x0000777c0df944e3 runNewPMPasses(llvm::lto::Config const&, llvm::Module&, llvm::TargetMachine*, unsigned int, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*) LTOBackend.cpp:0:0 
count:41'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           12:  #8 0x0000777c0df96c12 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/bin/../lib/libLLVMLTO.so.21.0git+0x4ac12) 
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 13, 2025

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

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

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 :: ThinLTO/X86/cache.ll' FAILED ********************
Exit Code: 139

Command Output (stdout):
--
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex/llvmcache.timestamp
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex/llvmcache.timestamp
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex/foo

--
Command Output (stderr):
--
RUN: at line 8: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/opt -module-summary /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/cache.ll -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.bc
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/opt -module-summary /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/cache.ll -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.bc
RUN: at line 9: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/opt -module-summary /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/Inputs/cache.ll -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/opt -module-summary /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/Inputs/cache.ll -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc
RUN: at line 12: rm -Rf /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex && mkdir /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
+ rm -Rf /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
+ mkdir /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
RUN: at line 13: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/llvm-lto -thinlto-action=run -exported-symbol=globalfunc /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.bc -thinlto-cache-dir /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/llvm-lto -thinlto-action=run -exported-symbol=globalfunc /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.bc -thinlto-cache-dir /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
RUN: at line 14: ls /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex/llvmcache.timestamp
+ ls /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex/llvmcache.timestamp
RUN: at line 15: ls /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex | /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/count 1
+ ls /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/count 1
RUN: at line 18: rm -Rf /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
+ rm -Rf /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
RUN: at line 19: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/llvm-lto2 run -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc  /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.bc -cache-dir /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex   -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc,_main,plx   -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc,_globalfunc,lx   -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.bc,_globalfunc,plx
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/llvm-lto2 run -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.bc -cache-dir /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc,_main,plx -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc,_globalfunc,lx -r=/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.bc,_globalfunc,plx
RUN: at line 23: not ls /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
+ not ls /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
ls: cannot access '/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex': No such file or directory
RUN: at line 28: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/opt -module-hash -module-summary /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/cache.ll -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.bc
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/opt -module-hash -module-summary /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/cache.ll -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.bc
RUN: at line 29: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/opt -module-hash -module-summary /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/Inputs/cache.ll -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/opt -module-hash -module-summary /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/test/ThinLTO/X86/Inputs/cache.ll -o /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc
RUN: at line 33: rm -Rf /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex && mkdir /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
+ rm -Rf /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
+ mkdir /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
RUN: at line 34: touch -t 197001011200 /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex/llvmcache-foo /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex/foo
+ touch -t 197001011200 /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex/llvmcache-foo /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex/foo
RUN: at line 35: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/llvm-lto -thinlto-action=run -exported-symbol=globalfunc /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.bc -thinlto-cache-dir /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/llvm-lto -thinlto-action=run -exported-symbol=globalfunc /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp2.bc /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.bc -thinlto-cache-dir /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
RUN: at line 36: ls /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex | /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/count 4
+ ls /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex
+ /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/bin/count 4
RUN: at line 37: ls /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex/llvmcache.timestamp
+ ls /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex/llvmcache.timestamp
RUN: at line 38: ls /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/test/ThinLTO/X86/Output/cache.ll.tmp.cache.noindex/foo
...

@aeubanks
Copy link
Contributor

Reverted due to bot breakages. Also the precommit CI was already showing failures that are presumably related to this.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 13, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[28/223] Building CXX object tools/clang/tools/extra/unittests/clang-tidy/CMakeFiles/ClangTidyTests.dir/AddConstTest.cpp.o
[29/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/MapLatticeTest.cpp.o
[30/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/CachedConstAccessorsLatticeTest.cpp.o
[31/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/DebugSupportTest.cpp.o
[32/223] Building CXX object tools/clang/unittests/Analysis/CMakeFiles/ClangAnalysisTests.dir/ExprMutationAnalyzerTest.cpp.o
[33/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/ChromiumCheckModelTest.cpp.o
[34/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/ASTOpsTest.cpp.o
[35/223] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ReplayPeambleTests.cpp.o
[36/223] Building CXX object tools/clang/tools/extra/unittests/clang-tidy/CMakeFiles/ClangTidyTests.dir/OverlappingReplacementsTest.cpp.o
[37/223] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ParsedASTTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ParsedASTTests.cpp.o 
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/clangd/unittests -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/../include-cleaner/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/clangd/../clang-tidy -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/clangd -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ParsedASTTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ParsedASTTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ParsedASTTests.cpp.o -c /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
[38/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/TransferTest.cpp.o
FAILED: tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/TransferTest.cpp.o 
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/unittests/Analysis/FlowSensitive -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Analysis/FlowSensitive -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googletest/include -I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/TransferTest.cpp.o -MF tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/TransferTest.cpp.o.d -o tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/TransferTest.cpp.o -c /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
[39/223] Building CXX object tools/clang/unittests/StaticAnalyzer/CMakeFiles/StaticAnalysisTests.dir/SymbolReaperTest.cpp.o
[40/223] Building CXX object tools/clang/unittests/StaticAnalyzer/CMakeFiles/StaticAnalysisTests.dir/IsCLibraryFunctionTest.cpp.o
[41/223] Building CXX object tools/clang/unittests/ASTMatchers/CMakeFiles/ASTMatchersTests.dir/GtestMatchersTest.cpp.o
[42/223] Building CXX object tools/clang/unittests/ASTMatchers/CMakeFiles/ASTMatchersTests.dir/ASTMatchersInternalTest.cpp.o
[43/223] Building CXX object tools/clang/unittests/ASTMatchers/Dynamic/CMakeFiles/DynamicASTMatchersTests.dir/VariantValueTest.cpp.o
[44/223] Building CXX object tools/clang/unittests/ASTMatchers/Dynamic/CMakeFiles/DynamicASTMatchersTests.dir/RegistryTest.cpp.o
[45/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/SmartPointerAccessorCachingTest.cpp.o
[46/223] Building CXX object tools/clang/unittests/StaticAnalyzer/CMakeFiles/StaticAnalysisTests.dir/BugReportInterestingnessTest.cpp.o
[47/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/WatchedLiteralsSolverTest.cpp.o
[48/223] Building CXX object tools/clang/unittests/StaticAnalyzer/CMakeFiles/StaticAnalysisTests.dir/ParamRegionTest.cpp.o
[49/223] Building CXX object tools/clang/unittests/StaticAnalyzer/CMakeFiles/StaticAnalysisTests.dir/FalsePositiveRefutationBRVisitorTest.cpp.o
[50/223] Building CXX object tools/clang/unittests/StaticAnalyzer/CMakeFiles/StaticAnalysisTests.dir/StoreTest.cpp.o
[51/223] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/ASTContextParentMapTest.cpp.o
[52/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/RecordOpsTest.cpp.o
[53/223] Building CXX object tools/clang/unittests/ASTMatchers/Dynamic/CMakeFiles/DynamicASTMatchersTests.dir/ParserTest.cpp.o
[54/223] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/ASTExprTest.cpp.o
[55/223] Building CXX object tools/clang/unittests/StaticAnalyzer/CMakeFiles/StaticAnalysisTests.dir/CallDescriptionTest.cpp.o
[56/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/TestingSupport.cpp.o
[57/223] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/ASTDumperTest.cpp.o
[58/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/TransferBranchTest.cpp.o
[59/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/SimplifyConstraintsTest.cpp.o
[60/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/UncheckedOptionalAccessModelTest.cpp.o
[61/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/TestingSupportTest.cpp.o
[62/223] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/ASTImporterFixtures.cpp.o
[63/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/SingleVarConstantPropagationTest.cpp.o
[64/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/MultiVarConstantPropagationTest.cpp.o
[65/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/SignAnalysisTest.cpp.o
[66/223] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/TypeErasedDataflowAnalysisTest.cpp.o
[67/223] Building CXX object tools/clang/unittests/ASTMatchers/CMakeFiles/ASTMatchersTests.dir/ASTMatchersNodeTest.cpp.o
[68/223] Building CXX object tools/clang/unittests/ASTMatchers/CMakeFiles/ASTMatchersTests.dir/ASTMatchersNarrowingTest.cpp.o

llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Mar 13, 2025
@alanzhao1
Copy link
Contributor Author

Hmm...the bot breakages look like LLD test failures. Will investigate further.

@alanzhao1
Copy link
Contributor Author

Hmm...the bot breakages look like LLD test failures. Will investigate further.

Note to self: add cross-project-tests to LLVM_ENABLE_PROJECTSto repro; I had no idea that existed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 13, 2025

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

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

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 :: LTO/Resolution/X86/unified-lto-check.ll' FAILED ********************
Exit Code: 139

Command Output (stderr):
--
RUN: at line 7: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/opt -thinlto-bc -thinlto-split-lto-unit -o /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp1 /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/LTO/Resolution/X86/unified-lto-check.ll
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/opt -thinlto-bc -thinlto-split-lto-unit -o /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp1 /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/LTO/Resolution/X86/unified-lto-check.ll
RUN: at line 8: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-bcanalyzer -dump /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp1 | /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/LTO/Resolution/X86/unified-lto-check.ll --check-prefix=NOUNIFIEDLTO
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-bcanalyzer -dump /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp1
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/LTO/Resolution/X86/unified-lto-check.ll --check-prefix=NOUNIFIEDLTO
RUN: at line 9: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-dis -o - /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp1 | /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/LTO/Resolution/X86/unified-lto-check.ll --check-prefix=NOUNIFIEDLTOFLAG
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-dis -o - /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp1
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/LTO/Resolution/X86/unified-lto-check.ll --check-prefix=NOUNIFIEDLTOFLAG
RUN: at line 10: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/opt -thinlto-bc -thinlto-split-lto-unit -o /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp2 /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/LTO/Resolution/X86/unified-lto-check.ll
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/opt -thinlto-bc -thinlto-split-lto-unit -o /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp2 /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/LTO/Resolution/X86/unified-lto-check.ll
RUN: at line 11: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-bcanalyzer -dump /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp2 | /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/LTO/Resolution/X86/unified-lto-check.ll --check-prefix=NOUNIFIEDLTO
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-bcanalyzer -dump /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp2
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/LTO/Resolution/X86/unified-lto-check.ll --check-prefix=NOUNIFIEDLTO
RUN: at line 12: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-dis -o - /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp2 | /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/LTO/Resolution/X86/unified-lto-check.ll --check-prefix=NOUNIFIEDLTOFLAG
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-dis -o - /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp2
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/LTO/Resolution/X86/unified-lto-check.ll --check-prefix=NOUNIFIEDLTOFLAG
RUN: at line 13: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2 run -o /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp3 /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp1 /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp2
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2 run -o /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp3 /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp1 /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp2
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
 #0 0x000055ef93c555e0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2+0x39835e0)
 #1 0x000055ef93c529df llvm::sys::RunSignalHandlers() (/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2+0x39809df)
 #2 0x000055ef93c52b2a SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x00007f156f36a520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x000055ef93befd0b llvm::NamedRegionTimer::getNamedTimerGroup(llvm::StringRef, llvm::StringRef) (/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2+0x391dd0b)
 #5 0x000055ef937a7e77 llvm::TimePassesHandler::TimePassesHandler() (/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2+0x34d5e77)
 #6 0x000055ef93b13045 llvm::StandardInstrumentations::StandardInstrumentations(llvm::LLVMContext&, bool, bool, llvm::PrintPassOptions) (/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2+0x3841045)
 #7 0x000055ef938495a3 runNewPMPasses(llvm::lto::Config const&, llvm::Module&, llvm::TargetMachine*, unsigned int, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*) LTOBackend.cpp:0:0
 #8 0x000055ef9384bcd2 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2+0x3579cd2)
 #9 0x000055ef9384d34e llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::FunctionImporter::ImportMapTy const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>*, bool, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::vector<unsigned char, std::allocator<unsigned char>> const&)::'lambda'(llvm::Module&, llvm::TargetMachine*, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>)::operator()(llvm::Module&, llvm::TargetMachine*, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>) const LTOBackend.cpp:0:0
#10 0x000055ef9384e1d0 llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::FunctionImporter::ImportMapTy const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>*, bool, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2+0x357c1d0)
#11 0x000055ef9382d7d1 (anonymous namespace)::InProcessThinBackend::runThinLTOBackendThread(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::FileCache, unsigned int, llvm::BitcodeModule, llvm::ModuleSummaryIndex&, llvm::FunctionImporter::ImportMapTy const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const&, std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>&)::'lambda'(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>)::operator()(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) const LTO.cpp:0:0
#12 0x000055ef9383c38e (anonymous namespace)::InProcessThinBackend::runThinLTOBackendThread(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::FileCache, unsigned int, llvm::BitcodeModule, llvm::ModuleSummaryIndex&, llvm::FunctionImporter::ImportMapTy const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const&, std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>&) LTO.cpp:0:0
#13 0x000055ef9382b5c8 std::_Function_handler<void (), std::_Bind<(anonymous namespace)::InProcessThinBackend::start(unsigned int, llvm::BitcodeModule, llvm::FunctionImporter::ImportMapTy const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const&, std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>&)::'lambda'(llvm::BitcodeModule, llvm::ModuleSummaryIndex&, llvm::FunctionImporter::ImportMapTy const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const&, std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>&) (llvm::BitcodeModule, std::reference_wrapper<llvm::ModuleSummaryIndex>, std::reference_wrapper<llvm::FunctionImporter::ImportMapTy const>, std::reference_wrapper<llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const>, std::reference_wrapper<std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes>>> const>, std::reference_wrapper<llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const>, std::reference_wrapper<llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>>)>>::_M_invoke(std::_Any_data const&) LTO.cpp:0:0
#14 0x000055ef9381e2c2 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>>::_M_invoke(std::_Any_data const&) (/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2+0x354c2c2)
#15 0x000055ef9381f36d std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) (/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2+0x354d36d)
#16 0x00007f156f3c1ee8 (/lib/x86_64-linux-gnu/libc.so.6+0x99ee8)
#17 0x000055ef9381f2b7 std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>::_M_complete_async() (/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2+0x354d2b7)
#18 0x000055ef93823ba7 std::_Function_handler<void (), std::shared_future<void> llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::'lambda'()>::_M_invoke(std::_Any_data const&) (/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2+0x3551ba7)
#19 0x000055ef93be4c27 llvm::StdThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2+0x3912c27)
#20 0x000055ef93be59ee void* llvm::thread::ThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::'lambda'()>>(void*) ThreadPool.cpp:0:0
#21 0x00007f156f3bcac3 (/lib/x86_64-linux-gnu/libc.so.6+0x94ac3)
#22 0x00007f156f44e850 (/lib/x86_64-linux-gnu/libc.so.6+0x126850)
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.script: line 24: 1970866 Segmentation fault      (core dumped) /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-lto2 run -o /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp3 /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp1 /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/test/LTO/Resolution/X86/Output/unified-lto-check.ll.tmp2

--
...

frederik-h pushed a commit to frederik-h/llvm-project that referenced this pull request Mar 18, 2025
…d pass manager timers (llvm#130375)

Additionally, remove the behavior for both pass manager's timer manager
classes (`PassTimingInfo` for the old pass manager and
`TimePassesHandler` for the new pass manager) where these classes would
print the values of their timers upon destruction.

Currently, each pass manager manages their own `TimerGroup`s. This is
problematic because of duplicate `TimerGroup`s (both pass managers have
a `TimerGroup` for pass times with identical names and descriptions).
The result is that in Clang, `-ftime-report` has two "Pass execution
timing report" sections (one for the new pass manager which manages
optimization passes, and one for the old pass manager which manages the
backend). The result of this change is that Clang's `-ftime-report` now
prints both optimization and backend pass timing info in a unified "Pass
execution timing report" section.

Moving the ownership of the `TimerGroups` to globals also makes it
easier to implement JSON-formatted `-ftime-report`. This was not
possible with the old structure because the two pass managers were
created and destroyed in far parts of the codebase and outputting JSON
requires the printing logic to be at the same place because of
formatting.

Previous discourse discussion:
https://discourse.llvm.org/t/difficulties-with-implementing-json-formatted-ftime-report/84353
frederik-h pushed a commit to frederik-h/llvm-project that referenced this pull request Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category llvm:ir llvm:support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants