Skip to content

[NFC][Cloning] Replace DIFinder usage in CloneFunctionInto with a MetadataPredicate #129148

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

Conversation

artempyanykh
Copy link
Contributor

@artempyanykh artempyanykh commented Feb 27, 2025

Stacked PRs:


[NFC][Cloning] Replace DIFinder usage in CloneFunctionInto with a MetadataPredicate

Summary:
The new code should be functionally identical to the old one (but
faster). The reasoning is as follows.

In the old code when cloning within the module:

  1. DIFinder traverses and collects all debug info reachable from a
    function, its instructions, and its owning compile unit.
  2. Then "compile units, types, other subprograms, and lexical blocks of
    other subprograms" are saved in a set.
  3. Then when we MapMetadata, we traverse the function's debug info
    again and those nodes that are in the set from p.2 are identity
    mapped.

This looks equivalent to just doing step 3 with identity mapping based
on a predicate that says to identity map "compile units, types, other
subprograms, and lexical blocks of other subprograms" (same as in step
2). This is what the new code does.

Test Plan:
ninja check-all
There's a bunch of tests around cloning and all of them pass.

@llvmbot
Copy link
Member

llvmbot commented Feb 27, 2025

@llvm/pr-subscribers-debuginfo
@llvm/pr-subscribers-coroutines

@llvm/pr-subscribers-llvm-transforms

Author: Artem Pianykh (artempyanykh)

Changes

Stacked PRs:

  • #129154
  • #129153
  • #129152
  • #129151
  • #129150
  • #129149
  • ->#129148
  • #129147
  • #129146
  • #129145
  • #129144
  • #129143

[NFC][Cloning] Replace DIFinder usage in CloneFunctionInto with a MetadataPredicate

Summary:
The new code should be functionally identical to the old one (but
faster). The reasoning is as follows.

In the old code when cloning within the module:

  1. DIFinder traverses and collects all debug info reachable from a
    function, its instructions, and its owning compile unit.
  2. Then "compile units, types, other subprograms, and lexical blocks of
    other subprograms" are saved in a set.
  3. Then when we MapMetadata, we traverse the function's debug info
    again and those nodes that are in the set from p.2 are identity
    mapped.

This looks equivalent to just doing step 3 with identity mapping based
on a predicate that says to identity map "compile units, types, other
subprograms, and lexical blocks of other subprograms" (same as in step
2). This is what the new code does.

Test Plan:
ninja check-all
There's a bunch of tests around cloning and all of them pass.


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

1 Files Affected:

  • (modified) llvm/lib/Transforms/Utils/CloneFunction.cpp (+25-7)
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 8e2a02d49d35c..17c14c09082b0 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -50,6 +50,30 @@ void collectDebugInfoFromInstructions(const Function &F,
       DIFinder.processInstruction(*M, I);
   }
 }
+
+// Create a predicate that matches the metadata that should be identity mapped
+// during function cloning.
+MetadataPredicate createIdentityMDPredicate(const Function &F,
+                                            CloneFunctionChangeType Changes) {
+  if (Changes >= CloneFunctionChangeType::DifferentModule)
+    return [](const Metadata *MD) { return false; };
+
+  DISubprogram *SPClonedWithinModule = F.getSubprogram();
+  return [=](const Metadata *MD) {
+    // Avoid cloning types, compile units, and (other) subprograms.
+    if (isa<DICompileUnit>(MD) || isa<DIType>(MD))
+      return true;
+
+    if (auto *SP = dyn_cast<DISubprogram>(MD); SP)
+      return SP != SPClonedWithinModule;
+
+    // If a subprogram isn't going to be cloned skip its lexical blocks as well.
+    if (auto *LScope = dyn_cast<DILocalScope>(MD); LScope)
+      return LScope->getSubprogram() != SPClonedWithinModule;
+
+    return false;
+  };
+}
 } // namespace
 
 /// See comments in Cloning.h.
@@ -325,13 +349,7 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
     }
   }
 
-  DISubprogram *SPClonedWithinModule =
-      CollectDebugInfoForCloning(*OldFunc, Changes, DIFinder);
-
-  MetadataPredicate IdentityMD =
-      [MDSet =
-           FindDebugInfoToIdentityMap(Changes, DIFinder, SPClonedWithinModule)](
-          const Metadata *MD) { return MDSet.contains(MD); };
+  MetadataPredicate IdentityMD = createIdentityMDPredicate(*OldFunc, Changes);
 
   // Cloning is always a Module level operation, since Metadata needs to be
   // cloned.

jollaitbot pushed a commit to sailfishos-mirror/llvm-project that referenced this pull request Feb 28, 2025
…adataPredicate

Summary:
The new code should be functionally identical to the old one (but
faster). The reasoning is as follows.

In the old code when cloning within the module:
1. DIFinder traverses and collects *all* debug info reachable from a
   function, its instructions, and its owning compile unit.
2. Then "compile units, types, other subprograms, and lexical blocks of
   other subprograms" are saved in a set.
3. Then when we MapMetadata, we traverse the function's debug info
   _again_ and those nodes that are in the set from p.2 are identity
   mapped.

This looks equivalent to just doing step 3 with identity mapping based
on a predicate that says to identity map "compile units, types, other
subprograms, and lexical blocks of other subprograms" (same as in step
2). This is what the new code does.

Test Plan:
ninja check-all
There's a bunch of tests around cloning and all of them pass.

stack-info: PR: llvm/llvm-project#129148, branch: users/artempyanykh/fast-coro-upstream-part2-take2/6
if (isa<DICompileUnit>(MD) || isa<DIType>(MD))
return true;

if (auto *SP = dyn_cast<DISubprogram>(MD); SP)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: the ; SP is redundant here

Copy link
Contributor

Choose a reason for hiding this comment

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

same with ; LScope below

Copy link
Contributor

@felipepiovezan felipepiovezan left a comment

Choose a reason for hiding this comment

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

This is pretty neat!

@artempyanykh artempyanykh changed the base branch from users/artempyanykh/fast-coro-upstream-part2-take2/5 to main March 9, 2025 14:30
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/6 branch from 2773399 to a73e948 Compare March 9, 2025 14:30
@llvmbot llvmbot added the coroutines C++20 coroutines label Mar 9, 2025
@artempyanykh artempyanykh changed the base branch from main to users/artempyanykh/fast-coro-upstream-part2-take2/5 March 9, 2025 14:30
@artempyanykh artempyanykh changed the base branch from users/artempyanykh/fast-coro-upstream-part2-take2/5 to main March 9, 2025 14:32
@artempyanykh artempyanykh changed the base branch from main to users/artempyanykh/fast-coro-upstream-part2-take2/5 March 9, 2025 14:32
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/5 branch from b5f28bb to ca21a68 Compare March 9, 2025 15:49
artempyanykh added a commit that referenced this pull request Mar 9, 2025
…adataPredicate

Summary:
The new code should be functionally identical to the old one (but
faster). The reasoning is as follows.

In the old code when cloning within the module:
1. DIFinder traverses and collects *all* debug info reachable from a
   function, its instructions, and its owning compile unit.
2. Then "compile units, types, other subprograms, and lexical blocks of
   other subprograms" are saved in a set.
3. Then when we MapMetadata, we traverse the function's debug info
   _again_ and those nodes that are in the set from p.2 are identity
   mapped.

This looks equivalent to just doing step 3 with identity mapping based
on a predicate that says to identity map "compile units, types, other
subprograms, and lexical blocks of other subprograms" (same as in step
2). This is what the new code does.

Test Plan:
ninja check-all
There's a bunch of tests around cloning and all of them pass.

stack-info: PR: #129148, branch: users/artempyanykh/fast-coro-upstream-part2-take2/6
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/6 branch from a73e948 to 0f7fb67 Compare March 9, 2025 15:49
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/5 branch from ca21a68 to f847bc6 Compare March 9, 2025 17:49
artempyanykh added a commit that referenced this pull request Mar 9, 2025
…adataPredicate

Summary:
The new code should be functionally identical to the old one (but
faster). The reasoning is as follows.

In the old code when cloning within the module:
1. DIFinder traverses and collects *all* debug info reachable from a
   function, its instructions, and its owning compile unit.
2. Then "compile units, types, other subprograms, and lexical blocks of
   other subprograms" are saved in a set.
3. Then when we MapMetadata, we traverse the function's debug info
   _again_ and those nodes that are in the set from p.2 are identity
   mapped.

This looks equivalent to just doing step 3 with identity mapping based
on a predicate that says to identity map "compile units, types, other
subprograms, and lexical blocks of other subprograms" (same as in step
2). This is what the new code does.

Test Plan:
ninja check-all
There's a bunch of tests around cloning and all of them pass.

stack-info: PR: #129148, branch: users/artempyanykh/fast-coro-upstream-part2-take2/6
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/6 branch from 0f7fb67 to 66695d8 Compare March 9, 2025 17:49
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/5 branch from f847bc6 to 17728dd Compare March 9, 2025 18:35
artempyanykh added a commit that referenced this pull request Mar 9, 2025
…adataPredicate

Summary:
The new code should be functionally identical to the old one (but
faster). The reasoning is as follows.

In the old code when cloning within the module:
1. DIFinder traverses and collects *all* debug info reachable from a
   function, its instructions, and its owning compile unit.
2. Then "compile units, types, other subprograms, and lexical blocks of
   other subprograms" are saved in a set.
3. Then when we MapMetadata, we traverse the function's debug info
   _again_ and those nodes that are in the set from p.2 are identity
   mapped.

This looks equivalent to just doing step 3 with identity mapping based
on a predicate that says to identity map "compile units, types, other
subprograms, and lexical blocks of other subprograms" (same as in step
2). This is what the new code does.

Test Plan:
ninja check-all
There's a bunch of tests around cloning and all of them pass.

stack-info: PR: #129148, branch: users/artempyanykh/fast-coro-upstream-part2-take2/6
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/6 branch from 66695d8 to 7801cdf Compare March 9, 2025 18:36
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/5 branch from 17728dd to 34baefc Compare March 12, 2025 11:19
artempyanykh added a commit that referenced this pull request Mar 12, 2025
…adataPredicate

Summary:
The new code should be functionally identical to the old one (but
faster). The reasoning is as follows.

In the old code when cloning within the module:
1. DIFinder traverses and collects *all* debug info reachable from a
   function, its instructions, and its owning compile unit.
2. Then "compile units, types, other subprograms, and lexical blocks of
   other subprograms" are saved in a set.
3. Then when we MapMetadata, we traverse the function's debug info
   _again_ and those nodes that are in the set from p.2 are identity
   mapped.

This looks equivalent to just doing step 3 with identity mapping based
on a predicate that says to identity map "compile units, types, other
subprograms, and lexical blocks of other subprograms" (same as in step
2). This is what the new code does.

Test Plan:
ninja check-all
There's a bunch of tests around cloning and all of them pass.

stack-info: PR: #129148, branch: users/artempyanykh/fast-coro-upstream-part2-take2/6
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/6 branch from 7801cdf to df8853d Compare March 12, 2025 11:19
Base automatically changed from users/artempyanykh/fast-coro-upstream-part2-take2/5 to main March 12, 2025 23:33
artempyanykh added a commit that referenced this pull request Mar 12, 2025
…adataPredicate

Summary:
The new code should be functionally identical to the old one (but
faster). The reasoning is as follows.

In the old code when cloning within the module:
1. DIFinder traverses and collects *all* debug info reachable from a
   function, its instructions, and its owning compile unit.
2. Then "compile units, types, other subprograms, and lexical blocks of
   other subprograms" are saved in a set.
3. Then when we MapMetadata, we traverse the function's debug info
   _again_ and those nodes that are in the set from p.2 are identity
   mapped.

This looks equivalent to just doing step 3 with identity mapping based
on a predicate that says to identity map "compile units, types, other
subprograms, and lexical blocks of other subprograms" (same as in step
2). This is what the new code does.

Test Plan:
ninja check-all
There's a bunch of tests around cloning and all of them pass.

stack-info: PR: #129148, branch: users/artempyanykh/fast-coro-upstream-part2-take2/6
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/6 branch from df8853d to ce2bad5 Compare March 12, 2025 23:33
…adataPredicate

Summary:
The new code should be functionally identical to the old one (but
faster). The reasoning is as follows.

In the old code when cloning within the module:
1. DIFinder traverses and collects *all* debug info reachable from a
   function, its instructions, and its owning compile unit.
2. Then "compile units, types, other subprograms, and lexical blocks of
   other subprograms" are saved in a set.
3. Then when we MapMetadata, we traverse the function's debug info
   _again_ and those nodes that are in the set from p.2 are identity
   mapped.

This looks equivalent to just doing step 3 with identity mapping based
on a predicate that says to identity map "compile units, types, other
subprograms, and lexical blocks of other subprograms" (same as in step
2). This is what the new code does.

Test Plan:
ninja check-all
There's a bunch of tests around cloning and all of them pass.

stack-info: PR: #129148, branch: users/artempyanykh/fast-coro-upstream-part2-take2/6
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/6 branch from ce2bad5 to f235ccf Compare March 13, 2025 10:57
@artempyanykh artempyanykh merged commit aa612f3 into main Mar 13, 2025
9 of 11 checks passed
@artempyanykh artempyanykh deleted the users/artempyanykh/fast-coro-upstream-part2-take2/6 branch March 13, 2025 17:18
@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 13, 2025

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

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

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

Command Output (stderr):
--
RUN: at line 1: /b/ml-opt-devrel-x86-64-b1/build/bin/opt -module-summary /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/ThinLTO/X86/strong_non_prevailing.ll -o /b/ml-opt-devrel-x86-64-b1/build/test/ThinLTO/X86/Output/strong_non_prevailing.ll.tmp.bc
+ /b/ml-opt-devrel-x86-64-b1/build/bin/opt -module-summary /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/ThinLTO/X86/strong_non_prevailing.ll -o /b/ml-opt-devrel-x86-64-b1/build/test/ThinLTO/X86/Output/strong_non_prevailing.ll.tmp.bc
RUN: at line 2: /b/ml-opt-devrel-x86-64-b1/build/bin/opt -module-summary /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/ThinLTO/X86/Inputs/strong_non_prevailing.ll -o /b/ml-opt-devrel-x86-64-b1/build/test/ThinLTO/X86/Output/strong_non_prevailing.ll.tmp2.bc
+ /b/ml-opt-devrel-x86-64-b1/build/bin/opt -module-summary /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/ThinLTO/X86/Inputs/strong_non_prevailing.ll -o /b/ml-opt-devrel-x86-64-b1/build/test/ThinLTO/X86/Output/strong_non_prevailing.ll.tmp2.bc
RUN: at line 4: /b/ml-opt-devrel-x86-64-b1/build/bin/llvm-lto -thinlto-action=run /b/ml-opt-devrel-x86-64-b1/build/test/ThinLTO/X86/Output/strong_non_prevailing.ll.tmp.bc /b/ml-opt-devrel-x86-64-b1/build/test/ThinLTO/X86/Output/strong_non_prevailing.ll.tmp2.bc -exported-symbol=__llvm_profile_filename
+ /b/ml-opt-devrel-x86-64-b1/build/bin/llvm-lto -thinlto-action=run /b/ml-opt-devrel-x86-64-b1/build/test/ThinLTO/X86/Output/strong_non_prevailing.ll.tmp.bc /b/ml-opt-devrel-x86-64-b1/build/test/ThinLTO/X86/Output/strong_non_prevailing.ll.tmp2.bc -exported-symbol=__llvm_profile_filename
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
 #0 0x00005576b1fa1c78 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/b/ml-opt-devrel-x86-64-b1/build/bin/llvm-lto+0x350cc78)
 #1 0x00005576b1f9f505 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #2 0x00007fdfb8197140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x13140)
 #3 0x00005576b1f69db1 llvm::NamedRegionTimer::getNamedTimerGroup(llvm::StringRef, llvm::StringRef) (/b/ml-opt-devrel-x86-64-b1/build/bin/llvm-lto+0x34d4db1)
 #4 0x00005576b1b9c28d llvm::TimePassesHandler::TimePassesHandler() (/b/ml-opt-devrel-x86-64-b1/build/bin/llvm-lto+0x310728d)
 #5 0x00005576b264e6d1 llvm::StandardInstrumentations::StandardInstrumentations(llvm::LLVMContext&, bool, bool, llvm::PrintPassOptions) (/b/ml-opt-devrel-x86-64-b1/build/bin/llvm-lto+0x3bb96d1)
 #6 0x00005576b1d9edaf optimizeModule(llvm::Module&, llvm::TargetMachine&, unsigned int, bool, bool, llvm::ModuleSummaryIndex*) ThinLTOCodeGenerator.cpp:0:0
 #7 0x00005576b1da3c12 llvm::ThinLTOCodeGenerator::run()::'lambda1'(int)::operator()(int) const ThinLTOCodeGenerator.cpp:0:0
 #8 0x00005576b1d7676e 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&) crtstuff.c:0:0
 #9 0x00005576b1d76e3b 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*) crtstuff.c:0:0
#10 0x00007fdfb819434f __pthread_once_slow (/lib/x86_64-linux-gnu/libpthread.so.0+0x1034f)
#11 0x00005576b1d76dbe std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>::_M_complete_async() crtstuff.c:0:0
#12 0x00005576b1d77a7f std::_Function_handler<void (), std::shared_future<void> llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::'lambda'()>::_M_invoke(std::_Any_data const&) crtstuff.c:0:0
#13 0x00005576b1f630da llvm::StdThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/b/ml-opt-devrel-x86-64-b1/build/bin/llvm-lto+0x34ce0da)
#14 0x00005576b1f63e7a void* llvm::thread::ThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::'lambda'()>>(void*) ThreadPool.cpp:0:0
#15 0x00007fdfb818bea7 start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7ea7)
#16 0x00007fdfb7d5bacf __clone (/lib/x86_64-linux-gnu/libc.so.6+0xfbacf)
/b/ml-opt-devrel-x86-64-b1/build/test/ThinLTO/X86/Output/strong_non_prevailing.ll.script: line 5: 1893588 Segmentation fault      /b/ml-opt-devrel-x86-64-b1/build/bin/llvm-lto -thinlto-action=run /b/ml-opt-devrel-x86-64-b1/build/test/ThinLTO/X86/Output/strong_non_prevailing.ll.tmp.bc /b/ml-opt-devrel-x86-64-b1/build/test/ThinLTO/X86/Output/strong_non_prevailing.ll.tmp2.bc -exported-symbol=__llvm_profile_filename

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 13, 2025

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

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

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

Command Output (stderr):
--
RUN: at line 9: /b/ml-opt-dev-x86-64-b1/build/bin/opt -thinlto-bc -o /b/ml-opt-dev-x86-64-b1/build/test/ThinLTO/X86/Output/devirt_promote_legacy.ll.tmp3.o /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/ThinLTO/X86/devirt_promote_legacy.ll
+ /b/ml-opt-dev-x86-64-b1/build/bin/opt -thinlto-bc -o /b/ml-opt-dev-x86-64-b1/build/test/ThinLTO/X86/Output/devirt_promote_legacy.ll.tmp3.o /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/ThinLTO/X86/devirt_promote_legacy.ll
RUN: at line 10: /b/ml-opt-dev-x86-64-b1/build/bin/opt -thinlto-bc -o /b/ml-opt-dev-x86-64-b1/build/test/ThinLTO/X86/Output/devirt_promote_legacy.ll.tmp4.o /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/ThinLTO/X86/Inputs/devirt_promote.ll
+ /b/ml-opt-dev-x86-64-b1/build/bin/opt -thinlto-bc -o /b/ml-opt-dev-x86-64-b1/build/test/ThinLTO/X86/Output/devirt_promote_legacy.ll.tmp4.o /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/ThinLTO/X86/Inputs/devirt_promote.ll
RUN: at line 12: /b/ml-opt-dev-x86-64-b1/build/bin/llvm-lto -thinlto-action=run /b/ml-opt-dev-x86-64-b1/build/test/ThinLTO/X86/Output/devirt_promote_legacy.ll.tmp3.o /b/ml-opt-dev-x86-64-b1/build/test/ThinLTO/X86/Output/devirt_promote_legacy.ll.tmp4.o --thinlto-save-temps=/b/ml-opt-dev-x86-64-b1/build/test/ThinLTO/X86/Output/devirt_promote_legacy.ll.tmp5.    -whole-program-visibility    --pass-remarks=.    --exported-symbol=test    --exported-symbol=test2    --exported-symbol=_ZTV1B 2>&1 | /b/ml-opt-dev-x86-64-b1/build/bin/FileCheck /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/ThinLTO/X86/devirt_promote_legacy.ll --check-prefix=REMARK
+ /b/ml-opt-dev-x86-64-b1/build/bin/FileCheck /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/ThinLTO/X86/devirt_promote_legacy.ll --check-prefix=REMARK
+ /b/ml-opt-dev-x86-64-b1/build/bin/llvm-lto -thinlto-action=run /b/ml-opt-dev-x86-64-b1/build/test/ThinLTO/X86/Output/devirt_promote_legacy.ll.tmp3.o /b/ml-opt-dev-x86-64-b1/build/test/ThinLTO/X86/Output/devirt_promote_legacy.ll.tmp4.o --thinlto-save-temps=/b/ml-opt-dev-x86-64-b1/build/test/ThinLTO/X86/Output/devirt_promote_legacy.ll.tmp5. -whole-program-visibility --pass-remarks=. --exported-symbol=test --exported-symbol=test2 --exported-symbol=_ZTV1B
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/ThinLTO/X86/devirt_promote_legacy.ll:23: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>:2:76: note: scanning from here
remark: <unknown>:0:0: single-impl: devirtualized a call to _ZN1A1nEi.llvm.15532526383027258165
                                                                           ^
<stdin>:6:37: note: possible intended match here
 #3 0x00005650521faf81 llvm::NamedRegionTimer::getNamedTimerGroup(llvm::StringRef, llvm::StringRef) (/b/ml-opt-dev-x86-64-b1/build/bin/llvm-lto+0x34d2f81)
                                    ^

Input file: <stdin>
Check file: /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/ThinLTO/X86/devirt_promote_legacy.ll

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

Input was:
<<<<<<
            1: PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. 
            2: remark: <unknown>:0:0: single-impl: devirtualized a call to _ZN1A1nEi.llvm.15532526383027258165 
count:23'0                                                                                X~~~~~~~~~~~~~~~~~~~~ error: no match found
            3:  #0 0x0000565052232e48 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/b/ml-opt-dev-x86-64-b1/build/bin/llvm-lto+0x350ae48) 
count:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            4:  #1 0x00005650522306d5 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0 
count:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            5:  #2 0x00007fc563abb140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x13140) 
count:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            6:  #3 0x00005650521faf81 llvm::NamedRegionTimer::getNamedTimerGroup(llvm::StringRef, llvm::StringRef) (/b/ml-opt-dev-x86-64-b1/build/bin/llvm-lto+0x34d2f81) 
count:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
count:23'1                                         ?                                                                                                                       possible intended match
            7:  #4 0x0000565051e2d72d llvm::TimePassesHandler::TimePassesHandler() (/b/ml-opt-dev-x86-64-b1/build/bin/llvm-lto+0x310572d) 
count:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            8:  #5 0x00005650528df8a1 llvm::StandardInstrumentations::StandardInstrumentations(llvm::LLVMContext&, bool, bool, llvm::PrintPassOptions) (/b/ml-opt-dev-x86-64-b1/build/bin/llvm-lto+0x3bb78a1) 
count:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            9:  #6 0x000056505203024f optimizeModule(llvm::Module&, llvm::TargetMachine&, unsigned int, bool, bool, llvm::ModuleSummaryIndex*) ThinLTOCodeGenerator.cpp:0:0 
count:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           10:  #7 0x00005650520350b2 llvm::ThinLTOCodeGenerator::run()::'lambda1'(int)::operator()(int) const ThinLTOCodeGenerator.cpp:0:0 
count:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           11:  #8 0x0000565052007c0e 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&) crtstuff.c:0:0 
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 13, 2025

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

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

Here is the relevant piece of the build log for the reference
Step 8 (Add check check-llvm) failure: test (failure)
******************** TEST 'LLVM :: ThinLTO/X86/selective-save-temps.ll' FAILED ********************
Exit Code: 139

Command Output (stderr):
--
RUN: at line 5: rm -rf /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/test/ThinLTO/X86/Output/selective-save-temps.ll.tmp && mkdir /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/test/ThinLTO/X86/Output/selective-save-temps.ll.tmp && cd /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/test/ThinLTO/X86/Output/selective-save-temps.ll.tmp
+ rm -rf /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/test/ThinLTO/X86/Output/selective-save-temps.ll.tmp
+ mkdir /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/test/ThinLTO/X86/Output/selective-save-temps.ll.tmp
+ cd /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/test/ThinLTO/X86/Output/selective-save-temps.ll.tmp
RUN: at line 8: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -thinlto-bc /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/ThinLTO/X86/selective-save-temps.ll -o 1.bc
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -thinlto-bc /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/ThinLTO/X86/selective-save-temps.ll -o 1.bc
RUN: at line 9: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -thinlto-bc /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/ThinLTO/X86/Inputs/import-constant.ll -o 2.bc
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -thinlto-bc /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/ThinLTO/X86/Inputs/import-constant.ll -o 2.bc
RUN: at line 13: mkdir all all2 build subset subset2
+ mkdir all all2 build subset subset2
RUN: at line 14: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-lto2 run 1.bc 2.bc -o all/a.out     -import-constants-with-refs -r=1.bc,main,plx -r=1.bc,_Z6getObjv,l     -r=2.bc,_Z6getObjv,pl -r=2.bc,val,pl -r=2.bc,outer,pl     -save-temps
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-lto2 run 1.bc 2.bc -o all/a.out -import-constants-with-refs -r=1.bc,main,plx -r=1.bc,_Z6getObjv,l -r=2.bc,_Z6getObjv,pl -r=2.bc,val,pl -r=2.bc,outer,pl -save-temps
RUN: at line 30: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-lto2 run 1.bc 2.bc -o build/a.out     -import-constants-with-refs -r=1.bc,main,plx -r=1.bc,_Z6getObjv,l     -r=2.bc,_Z6getObjv,pl -r=2.bc,val,pl -r=2.bc,outer,pl     -select-save-temps=preopt
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-lto2 run 1.bc 2.bc -o build/a.out -import-constants-with-refs -r=1.bc,main,plx -r=1.bc,_Z6getObjv,l -r=2.bc,_Z6getObjv,pl -r=2.bc,val,pl -r=2.bc,outer,pl -select-save-temps=preopt
RUN: at line 34: cmp all/a.out.1 build/a.out.1 && rm -f build/a.out.1
+ cmp all/a.out.1 build/a.out.1
+ rm -f build/a.out.1
RUN: at line 35: cmp all/a.out.2 build/a.out.2 && rm -f build/a.out.2
+ cmp all/a.out.2 build/a.out.2
+ rm -f build/a.out.2
RUN: at line 36: cp build/*.0.preopt.* subset2
+ cp build/a.out.0.0.preopt.bc build/a.out.1.0.preopt.bc build/a.out.2.0.preopt.bc subset2
RUN: at line 37: mv build/*.0.preopt.* all2
+ mv build/a.out.0.0.preopt.bc build/a.out.1.0.preopt.bc build/a.out.2.0.preopt.bc all2
RUN: at line 38: ls build | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/count 0
+ ls build
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/count 0
RUN: at line 41: rm -f all2/*.1.promote*
+ rm -f 'all2/*.1.promote*'
RUN: at line 42: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-lto2 run 1.bc 2.bc -o build/a.out     -import-constants-with-refs -r=1.bc,main,plx -r=1.bc,_Z6getObjv,l     -r=2.bc,_Z6getObjv,pl -r=2.bc,val,pl -r=2.bc,outer,pl     -select-save-temps=promote
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-lto2 run 1.bc 2.bc -o build/a.out -import-constants-with-refs -r=1.bc,main,plx -r=1.bc,_Z6getObjv,l -r=2.bc,_Z6getObjv,pl -r=2.bc,val,pl -r=2.bc,outer,pl -select-save-temps=promote
RUN: at line 46: cmp all/a.out.1 build/a.out.1 && rm -f build/a.out.1
+ cmp all/a.out.1 build/a.out.1
+ rm -f build/a.out.1
RUN: at line 47: cmp all/a.out.2 build/a.out.2 && rm -f build/a.out.2
+ cmp all/a.out.2 build/a.out.2
+ rm -f build/a.out.2
RUN: at line 48: mv build/*.1.promote* all2
+ mv build/a.out.1.1.promote.bc build/a.out.2.1.promote.bc all2
RUN: at line 49: ls build | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/count 0
+ ls build
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/count 0
RUN: at line 52: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-lto2 run 1.bc 2.bc -o build/a.out     -import-constants-with-refs -r=1.bc,main,plx -r=1.bc,_Z6getObjv,l     -r=2.bc,_Z6getObjv,pl -r=2.bc,val,pl -r=2.bc,outer,pl     -select-save-temps=internalize
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-lto2 run 1.bc 2.bc -o build/a.out -import-constants-with-refs -r=1.bc,main,plx -r=1.bc,_Z6getObjv,l -r=2.bc,_Z6getObjv,pl -r=2.bc,val,pl -r=2.bc,outer,pl -select-save-temps=internalize
RUN: at line 56: cmp all/a.out.1 build/a.out.1 && rm -f build/a.out.1
...
Step 9 (Add check check-lld) failure: test (failure)
******************** TEST 'lld :: MachO/lto-symbol-resolution.ll' FAILED ********************
Exit Code: 139

Command Output (stderr):
--
RUN: at line 3: rm -rf /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp; split-file /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/lto-symbol-resolution.ll /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp
+ rm -rf /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp
+ split-file /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/lto-symbol-resolution.ll /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp
RUN: at line 5: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -module-summary /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.ll -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.o
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -module-summary /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.ll -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.o
RUN: at line 6: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -module-summary /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.ll -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.o
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -module-summary /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.ll -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.o
RUN: at line 7: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -module-summary /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/archive.ll -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/archive.o
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -module-summary /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/archive.ll -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/archive.o
RUN: at line 8: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -module-summary /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.ll -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.o
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -module-summary /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.ll -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.o
RUN: at line 9: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-mc -filetype=obj -triple=x86_64-apple-darwin /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.s -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined-asm.o
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-mc -filetype=obj -triple=x86_64-apple-darwin /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.s -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined-asm.o
RUN: at line 11: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem -dylib /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/libfoo.dylib
+ ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem -dylib /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/libfoo.dylib
RUN: at line 12: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem -dylib /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/libweakfoo.dylib
+ ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem -dylib /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/libweakfoo.dylib
RUN: at line 14: llvm-ar rcs /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/archive.a /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/archive.o
+ llvm-ar rcs /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/archive.a /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/archive.o
RUN: at line 17: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
+ ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
RUN: at line 18: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-objdump --syms /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/lto-symbol-resolution.ll --check-prefix=DEFINED
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-objdump --syms /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/lto-symbol-resolution.ll --check-prefix=DEFINED
RUN: at line 19: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
+ ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
RUN: at line 20: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-objdump --syms /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/lto-symbol-resolution.ll --check-prefix=DEFINED
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-objdump --syms /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/lto-symbol-resolution.ll --check-prefix=DEFINED
RUN: at line 23: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined-asm.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
+ ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined-asm.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
RUN: at line 24: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-objdump --syms /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/lto-symbol-resolution.ll --check-prefix=DEFINED
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/lto-symbol-resolution.ll --check-prefix=DEFINED
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-objdump --syms /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
RUN: at line 25: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined-asm.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
+ ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined-asm.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
RUN: at line 26: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-objdump --syms /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/lto-symbol-resolution.ll --check-prefix=DEFINED
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-objdump --syms /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/lto-symbol-resolution.ll --check-prefix=DEFINED
RUN: at line 31: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined-asm.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
+ ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined-asm.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
RUN: at line 32: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-objdump --syms /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/lto-symbol-resolution.ll --check-prefix=WEAK-DEFINED
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llvm-objdump --syms /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/lto-symbol-resolution.ll --check-prefix=WEAK-DEFINED
RUN: at line 34: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -lSystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined-asm.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/weak-defined.o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/calls-foo.o -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/lld/test/MachO/Output/lto-symbol-resolution.ll.tmp/test
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 13, 2025

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

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

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 :: ThinLTO/AArch64/cgdata-merge-two-rounds.ll' FAILED ********************
Exit Code: 139

Command Output (stderr):
--
RUN: at line 4: rm -rf /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp; split-file /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/ThinLTO/AArch64/cgdata-merge-two-rounds.ll /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp
+ rm -rf /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp
+ split-file /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/llvm/test/ThinLTO/AArch64/cgdata-merge-two-rounds.ll /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp
RUN: at line 6: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/opt -module-summary -module-hash /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp/foo.ll -o /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/opt -module-summary -module-hash /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp/foo.ll -o /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc
RUN: at line 7: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/opt -module-summary -module-hash /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp/goo.ll -o /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/opt -module-summary -module-hash /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp/goo.ll -o /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc
RUN: at line 9: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2 run -enable-global-merge-func=true -codegen-data-thinlto-two-rounds=true /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc -o /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmpout     -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc,_f1,px     -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc,_f2,px     -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc,_g,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc,_g1,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc,_g2,l     -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc,_g,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc,_g1,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc,_g2,l
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2 run -enable-global-merge-func=true -codegen-data-thinlto-two-rounds=true /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc -o /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmpout -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc,_f1,px -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc,_f2,px -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc,_g,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc,_g1,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc,_g2,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc,_g,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc,_g1,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc,_g2,l
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
 #0 0x00000001016a8184 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100ec4184)
 #1 0x00000001016a6208 llvm::sys::RunSignalHandlers() (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100ec2208)
 #2 0x00000001016a8840 SignalHandler(int, __siginfo*, void*) (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100ec4840)
 #3 0x0000000189db6584 (/usr/lib/system/libsystem_platform.dylib+0x18047a584)
 #4 0x0000000101658c0c llvm::NamedRegionTimer::getNamedTimerGroup(llvm::StringRef, llvm::StringRef) (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100e74c0c)
 #5 0x00000001012bc96c llvm::TimePassesHandler::TimePassesHandler() (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100ad896c)
 #6 0x00000001015a4dbc llvm::StandardInstrumentations::StandardInstrumentations(llvm::LLVMContext&, bool, bool, llvm::PrintPassOptions) (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100dc0dbc)
 #7 0x0000000101349334 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>> const&) (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100b65334)
 #8 0x000000010134c440 llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::FunctionImporter::ImportMapTy const&, llvm::DenseMap<unsigned long long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long long, void>, llvm::detail::DenseMapPair<unsigned long 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::__1::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>*, bool, std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>> const&)::$_3::operator()(llvm::Module&, llvm::TargetMachine*, std::__1::unique_ptr<llvm::ToolOutputFile, std::__1::default_delete<llvm::ToolOutputFile>>) const (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100b68440)
 #9 0x000000010134c2c8 llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::FunctionImporter::ImportMapTy const&, llvm::DenseMap<unsigned long long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long long, void>, llvm::detail::DenseMapPair<unsigned long 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::__1::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>*, bool, std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>> const&) (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100b682c8)
#10 0x0000000101346308 (anonymous namespace)::FirstRoundThinBackend::runThinLTOBackendThread(std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::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::__1::map<unsigned long long, llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long long>, std::__1::allocator<std::__1::pair<unsigned long long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::DenseMap<unsigned long long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long long, void>, llvm::detail::DenseMapPair<unsigned long 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::__1::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>&)::'lambda'(std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>)::operator()(std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) const (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100b62308)
#11 0x0000000101345bd4 (anonymous namespace)::FirstRoundThinBackend::runThinLTOBackendThread(std::__1::function<llvm::Expected<std::__1::unique_ptr<llvm::CachedFileStream, std::__1::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::__1::map<unsigned long long, llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long long>, std::__1::allocator<std::__1::pair<unsigned long long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::DenseMap<unsigned long long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long long, void>, llvm::detail::DenseMapPair<unsigned long 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::__1::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>&) (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100b61bd4)
#12 0x00000001013428a8 std::__1::__function::__func<std::__1::__bind<(anonymous namespace)::InProcessThinBackend::start(unsigned int, llvm::BitcodeModule, llvm::FunctionImporter::ImportMapTy const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const&, std::__1::map<unsigned long long, llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long long>, std::__1::allocator<std::__1::pair<unsigned long 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::__1::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::__1::map<unsigned long long, llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long long>, std::__1::allocator<std::__1::pair<unsigned long long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::DenseMap<unsigned long long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long long, void>, llvm::detail::DenseMapPair<unsigned long 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::__1::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>&), llvm::BitcodeModule&, std::__1::reference_wrapper<llvm::ModuleSummaryIndex>, std::__1::reference_wrapper<llvm::FunctionImporter::ImportMapTy const>, std::__1::reference_wrapper<llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const>, std::__1::reference_wrapper<std::__1::map<unsigned long long, llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long long>, std::__1::allocator<std::__1::pair<unsigned long long const, llvm::GlobalValue::LinkageTypes>>> const>, std::__1::reference_wrapper<llvm::DenseMap<unsigned long long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long long, void>, llvm::detail::DenseMapPair<unsigned long long, llvm::GlobalValueSummary*>> const>, std::__1::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::__1::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>>>, std::__1::allocator<std::__1::__bind<(anonymous namespace)::InProcessThinBackend::start(unsigned int, llvm::BitcodeModule, llvm::FunctionImporter::ImportMapTy const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const&, std::__1::map<unsigned long long, llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long long>, std::__1::allocator<std::__1::pair<unsigned long 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::__1::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::__1::map<unsigned long long, llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long long>, std::__1::allocator<std::__1::pair<unsigned long long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::DenseMap<unsigned long long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long long, void>, llvm::detail::DenseMapPair<unsigned long long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::Dense
apInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::__1::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>&), llvm::BitcodeModule&, std::__1::reference_wrapper<llvm::ModuleSummaryIndex>, std::__1::reference_wrapper<llvm::FunctionImporter::ImportMapTy const>, std::__1::reference_wrapper<llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const>, std::__1::reference_wrapper<std::__1::map<unsigned long long, llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long long>, std::__1::allocator<std::__1::pair<unsigned long long const, llvm::GlobalValue::LinkageTypes>>> const>, std::__1::reference_wrapper<llvm::DenseMap<unsigned long long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long long, void>, llvm::detail::DenseMapPair<unsigned long long, llvm::GlobalValueSummary*>> const>, std::__1::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::__1::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>>>>, void ()>::operator()() (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100b5e8a8)
#13 0x00000001013424c4 std::__1::__deferred_assoc_state<void, std::__1::__async_func<std::__1::function<void ()>>>::__execute() (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100b5e4c4)
#14 0x0000000189caf548 (/usr/lib/libc++.1.dylib+0x180373548)
#15 0x000000010164f520 llvm::StdThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100e6b520)
#16 0x0000000101650f70 void* llvm::thread::ThreadProxy<std::__1::tuple<llvm::StdThreadPool::grow(int)::$_0>>(void*) (/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2+0x100e6cf70)
#17 0x0000000189d85f94 (/usr/lib/system/libsystem_pthread.dylib+0x180449f94)
#18 0x0000000189d80d34 (/usr/lib/system/libsystem_pthread.dylib+0x180444d34)
/Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.script: line 8: 23115 Segmentation fault: 11  /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/llvm-lto2 run -enable-global-merge-func=true -codegen-data-thinlto-two-rounds=true /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc -o /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmpout -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc,_f1,px -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc,_f2,px -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc,_g,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc,_g1,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-foo.bc,_g2,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc,_g,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc,_g1,l -r /Users/buildbot/buildbot-root/aarch64-darwin/build/test/ThinLTO/AArch64/Output/cgdata-merge-two-rounds.ll.tmp-goo.bc,_g2,l

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 13, 2025

LLVM Buildbot has detected a new failure on builder llvm-x86_64-debian-dylib running on gribozavr4 while building llvm at step 8 "test-build-unified-tree-check-lld".

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

Here is the relevant piece of the build log for the reference
Step 8 (test-build-unified-tree-check-lld) failure: test (failure)
******************** TEST 'lld :: MachO/lto-linkonce.ll' FAILED ********************
Exit Code: 139

Command Output (stderr):
--
RUN: at line 2: rm -rf /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp; split-file /b/1/llvm-x86_64-debian-dylib/llvm-project/lld/test/MachO/lto-linkonce.ll /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp
+ rm -rf /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp
+ split-file /b/1/llvm-x86_64-debian-dylib/llvm-project/lld/test/MachO/lto-linkonce.ll /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp
RUN: at line 3: /b/1/llvm-x86_64-debian-dylib/build/bin/opt -module-summary /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/first.ll -o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/first.o
+ /b/1/llvm-x86_64-debian-dylib/build/bin/opt -module-summary /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/first.ll -o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/first.o
RUN: at line 4: /b/1/llvm-x86_64-debian-dylib/build/bin/opt -module-summary /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/second.ll -o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/second.o
+ /b/1/llvm-x86_64-debian-dylib/build/bin/opt -module-summary /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/second.ll -o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/second.o
RUN: at line 5: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /b/1/llvm-x86_64-debian-dylib/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib -lSystem /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/first.o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/second.o -o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/12
+ ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /b/1/llvm-x86_64-debian-dylib/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib -lSystem /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/first.o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/second.o -o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/12
RUN: at line 6: /b/1/llvm-x86_64-debian-dylib/build/bin/llvm-objdump --syms /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/12 | /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck /b/1/llvm-x86_64-debian-dylib/llvm-project/lld/test/MachO/lto-linkonce.ll --check-prefix=FIRST
+ /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck /b/1/llvm-x86_64-debian-dylib/llvm-project/lld/test/MachO/lto-linkonce.ll --check-prefix=FIRST
+ /b/1/llvm-x86_64-debian-dylib/build/bin/llvm-objdump --syms /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/12
RUN: at line 7: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /b/1/llvm-x86_64-debian-dylib/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib -lSystem /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/second.o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/first.o -o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/21
+ ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /b/1/llvm-x86_64-debian-dylib/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib -lSystem /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/second.o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/first.o -o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/21
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
 #0 0x00007f04c1d5d247 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.21.0git+0xf93247)
 #1 0x00007f04c1d5acfe llvm::sys::RunSignalHandlers() (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.21.0git+0xf90cfe)
 #2 0x00007f04c1d5d91a SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x00007f04cb4d0140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x13140)
 #4 0x00007f04c1d0391d llvm::NamedRegionTimer::getNamedTimerGroup(llvm::StringRef, llvm::StringRef) (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.21.0git+0xf3991d)
 #5 0x00007f04c1f872a8 llvm::TimePassesHandler::TimePassesHandler() (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.21.0git+0x11bd2a8)
 #6 0x00007f04c660f0d7 llvm::StandardInstrumentations::StandardInstrumentations(llvm::LLVMContext&, bool, bool, llvm::PrintPassOptions) (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.21.0git+0x58450d7)
 #7 0x00007f04c3d57ef9 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&) (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.21.0git+0x2f8def9)
 #8 0x00007f04c3d5ba22 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&)::$_3::operator()(llvm::Module&, llvm::TargetMachine*, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>) const LTOBackend.cpp:0:0
 #9 0x00007f04c3d5b87b 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&) (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.21.0git+0x2f9187b)
#10 0x00007f04c3d5142c (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
#11 0x00007f04c3d509b7 (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
#12 0x00007f04c3d50f84 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
#13 0x00007f04c1c5d968 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&) crtstuff.c:0:0
#14 0x00007f04c1c5d8c7 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*) crtstuff.c:0:0
#15 0x00007f04cb4cd34f __pthread_once_slow (/lib/x86_64-linux-gnu/libpthread.so.0+0x1034f)
#16 0x00007f04c1c5dc7b std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>::_M_complete_async() crtstuff.c:0:0
#17 0x00007f04c1c5dd29 void std::__invoke_impl<void, std::shared_future<void> llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::'lambda'()&>(std::__invoke_other, std::shared_future<void> llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::'lambda'()&) crtstuff.c:0:0
#18 0x00007f04c1cfa90b llvm::StdThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.21.0git+0xf3090b)
#19 0x00007f04c1cfc0c7 void* llvm::thread::ThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::$_0>>(void*) ThreadPool.cpp:0:0
#20 0x00007f04cb4c4ea7 start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7ea7)
#21 0x00007f04c09c6acf __clone (/lib/x86_64-linux-gnu/libc.so.6+0xfbacf)
/b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.script: line 7: 2592412 Segmentation fault      ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /b/1/llvm-x86_64-debian-dylib/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib -lSystem /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/second.o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/first.o -o /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/MachO/Output/lto-linkonce.ll.tmp/21

--

********************


frederik-h pushed a commit to frederik-h/llvm-project that referenced this pull request Mar 18, 2025
…adataPredicate (llvm#129148)

Summary:
The new code should be functionally identical to the old one (but
faster). The reasoning is as follows.

In the old code when cloning within the module:
1. DIFinder traverses and collects *all* debug info reachable from a
   function, its instructions, and its owning compile unit.
2. Then "compile units, types, other subprograms, and lexical blocks of
   other subprograms" are saved in a set.
3. Then when we MapMetadata, we traverse the function's debug info
   _again_ and those nodes that are in the set from p.2 are identity
   mapped.

This looks equivalent to just doing step 3 with identity mapping based
on a predicate that says to identity map "compile units, types, other
subprograms, and lexical blocks of other subprograms" (same as in step
2). This is what the new code does.

Test Plan:
ninja check-all
There's a bunch of tests around cloning and all of them pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants