Skip to content
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

[CGData] Refactor Global Merge Functions #115750

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

kyulee-com
Copy link
Contributor

@kyulee-com kyulee-com commented Nov 11, 2024

This is a follow-up PR to refactor the initial global merge function pass implemented in #112671.

It first collects stable functions relevant to the current module and iterates over those only, instead of iterating through all stable functions in the stable function map.

This is a patch for https://discourse.llvm.org/t/rfc-global-function-merging/82608.

Copy link
Contributor

@nocchijiang nocchijiang left a comment

Choose a reason for hiding this comment

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

This refactoring makes much more sense to me than the previous implementation.

// Parameter locations based on the unique hash sequences
// across the candidates.
// Collect stable functions related to the current module.
DenseMap<stable_hash, SmallVector<Function *>> HashToFuncs;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
DenseMap<stable_hash, SmallVector<Function *>> HashToFuncs;
DenseMap<stable_hash, SmallVector<std::pair<Function *, FunctionHashInfo>>> HashToFuncs;

To save the cost of FuncToFI. Or maybe we could put Function * in FunctionHashInfo?

}
// Iterate functions with the same hash.
for (auto &F : Funcs) {
auto &SFS = Maps.at(Hash);
Copy link
Contributor

Choose a reason for hiding this comment

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

Hopefully this will be hoisted out of the for loop by the compiler.

// Check if the function is compatible with any stable function
// in terms of the number of instructions and ignored operands.
assert(!SFS.empty());
auto &RFS = SFS[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

I seem to understand the potential size increase introduced by the refactoring: is it possible that stable function entries with the same hash could have different numbers of / incompatible operands? If that is the case, I believe we can assume that the probability of hash collisions should be very low, otherwise we might actually need to improve the hashing algorithm.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or maybe we can move the "lightweight" checks back into the nested loop below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the codegen data is not stale —meaning there has been no source change in the first or second pass— the size regression is less of a concern. My main worry was about the stability of optimization when the codegen data becomes outdated.

@kyulee-com kyulee-com marked this pull request as ready for review November 12, 2024 05:31
@kyulee-com kyulee-com force-pushed the users/kyulee-com/globmerge-refactor branch from e09f9c0 to b45eee4 Compare November 12, 2024 05:49
@nocchijiang
Copy link
Contributor

Hit an assertion in ignoreOp when testing the refactored code.

Assertion failed: (OpIdx < I->getNumOperands() && "Invalid operand index"), function ignoreOp, file GlobalMergeFunctions.cpp, line 129.
Stop reason: hit program assert
expr I->dump()
  %6 = tail call ptr @objc_retain(ptr %5), !dbg !576

p I->getNumOperands()

(unsigned int) 2
p OpIdx

(unsigned int) 4

@kyulee-com
Copy link
Contributor Author

Hit an assertion in ignoreOp when testing the refactored code.

Assertion failed: (OpIdx < I->getNumOperands() && "Invalid operand index"), function ignoreOp, file GlobalMergeFunctions.cpp, line 129.
Stop reason: hit program assert
expr I->dump()
  %6 = tail call ptr @objc_retain(ptr %5), !dbg !576

p I->getNumOperands()

(unsigned int) 2
p OpIdx

(unsigned int) 4

Thank you for testing and identifying this bug!
Since we also use this function to verify any function that matches a hash, it should not assert.

@ellishg
Copy link
Contributor

ellishg commented Nov 12, 2024

Hit an assertion in ignoreOp when testing the refactored code.

Assertion failed: (OpIdx < I->getNumOperands() && "Invalid operand index"), function ignoreOp, file GlobalMergeFunctions.cpp, line 129.
Stop reason: hit program assert
expr I->dump()
  %6 = tail call ptr @objc_retain(ptr %5), !dbg !576

p I->getNumOperands()

(unsigned int) 2
p OpIdx

(unsigned int) 4

Do we know why OpIdx is 4 here? This is confusing to me because it looks like there is only one argument, %5.

@kyulee-com
Copy link
Contributor Author

Do we know why OpIdx is 4 here? This is confusing to me because it looks like there is only one argument, %5.

The ignoreOp function was initially designed for use with llvm::StructuralHashWithDifferences, where it iterates over operands within the same instruction. In this context, OpIdx is always within the valid range for the specified instruction.
However, we now also utilize this function to determine if a particular operand can be ignored in certain instructions during this merge operation, as matched in the stable function summary— see hasValidSharedConst() for its use. So, there may be cases where an out-of-range index is passed from a different instruction context (although the entire function hash is matched). In this case, we should simply return false, as the target operand is not an interesting operand (that can be ignored/parameterized for merging).

@kyulee-com
Copy link
Contributor Author

@nocchijiang The new approach seems to be functioning well and is similar in size to the previous method.
I suspect that the no-LTO case might still encounter some slowdown, as each CU needs to read the entire CGData regardless. Currently, the CGData used for this merging process does not utilize names, which means we could potentially eliminate strings or make them optional. Alternatively, we could restructure the indexed CGData to allow for reading only the relevant hash entries on demand. I'd like to leave these options open for now, and if you can continue to improve it, that would be excellent.

@nocchijiang
Copy link
Contributor

I suspect that the no-LTO case might still encounter some slowdown, as each CU needs to read the entire CGData regardless.

I can confirm that the performance have been improved significantly from my testing on no-LTO projects that the slowdown is acceptable now. Before applying the PR it was about 50% slowdown, now it is ~5%.

Alternatively, we could restructure the indexed CGData to allow for reading only the relevant hash entries on demand.

Besides only consuming the matched stable entries like what this PR does, this is exactly what I planned to do to reduce the memory footprint of the deserialized CGData. I would like to discuss the detail in the RFC thread with you to make sure that we are on the same page before coding it.

@kyulee-com
Copy link
Contributor Author

I can confirm that the performance have been improved significantly from my testing on no-LTO projects that the slowdown is acceptable now. Before applying the PR it was about 50% slowdown, now it is ~5%.

That's great to hear!
Since these PRs appear to be functioning, is it okay to merge them for now while we continue to discuss further improvements? Or do you have more comments to be addressed?

Base automatically changed from users/kyulee-com/globmerge to main November 14, 2024 01:34
@kyulee-com kyulee-com force-pushed the users/kyulee-com/globmerge-refactor branch from 1d0a934 to 5edbc30 Compare November 14, 2024 01:38
@kyulee-com kyulee-com merged commit d3da788 into main Nov 14, 2024
8 checks passed
@kyulee-com kyulee-com deleted the users/kyulee-com/globmerge-refactor branch November 14, 2024 05:15
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 14, 2024

LLVM Buildbot has detected a new failure on builder lldb-x86_64-debian running on lldb-x86_64-debian while building llvm at step 4 "build".

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

Here is the relevant piece of the build log for the reference
Step 4 (build) failure: build (failure)
...
3.868 [66/37/35] Linking CXX executable bin/llvm-modextract
3.869 [66/36/36] Linking CXX executable bin/llvm-as
3.873 [66/35/37] Linking CXX executable bin/obj2yaml
3.873 [66/34/38] Linking CXX executable bin/llvm-readobj
3.885 [65/34/39] Generating ../../bin/llvm-readelf
3.887 [65/33/40] Linking CXX executable bin/llvm-link
3.893 [65/32/41] Linking CXX executable bin/llvm-pdbutil
3.895 [65/31/42] Linking CXX executable bin/verify-uselistorder
3.908 [65/30/43] Linking CXX executable bin/llvm-ifs
3.910 [65/29/44] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o 
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/worker/2.0.1/lldb-x86_64-debian/build/lib/CodeGen -I/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/lib/CodeGen -I/home/worker/2.0.1/lldb-x86_64-debian/build/include -I/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -c /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:450:34: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              assert(InstIndex < FI.IndexInstruction->size());
                                 ^
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:451:28: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              auto *Inst = FI.IndexInstruction->lookup(InstIndex);
                           ^
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
2 errors generated.
3.924 [65/28/45] Linking CXX executable bin/llvm-profdata
3.937 [65/27/46] Linking CXX executable bin/llvm-symbolizer
3.951 [65/26/47] Linking CXX executable bin/llvm-cov
3.991 [65/25/48] Linking CXX executable bin/llvm-xray
3.998 [65/24/49] Linking CXX executable bin/clang-format
4.085 [65/23/50] Linking CXX executable bin/clang-offload-bundler
4.207 [65/22/51] Linking CXX executable bin/llvm-ml
4.220 [65/21/52] Linking CXX executable bin/llvm-dwarfdump
4.232 [65/20/53] Linking CXX executable bin/llvm-rtdyld
4.242 [65/19/54] Linking CXX executable bin/llvm-mca
4.280 [65/18/55] Linking CXX executable bin/llvm-ar
4.305 [65/17/56] Linking CXX executable bin/llvm-nm
4.305 [65/16/57] Linking CXX executable bin/llvm-debuginfo-analyzer
4.310 [65/15/58] Linking CXX executable bin/llvm-mc
4.330 [65/14/59] Linking CXX executable bin/llvm-objdump
4.334 [65/13/60] Linking CXX executable bin/sancov
4.432 [65/12/61] Linking CXX executable bin/llvm-cfi-verify
4.506 [65/11/62] Linking CXX executable bin/llvm-profgen
4.778 [65/10/63] Linking CXX shared module lib/CheckerOptionHandlingAnalyzerPlugin.so
4.798 [65/9/64] Linking CXX executable bin/diagtool
4.799 [65/8/65] Linking CXX shared module lib/CheckerDependencyHandlingAnalyzerPlugin.so
4.867 [65/7/66] Linking CXX shared module lib/SampleAnalyzerPlugin.so
5.402 [65/6/67] Linking CXX executable bin/clang-diff
5.460 [65/5/68] Linking CXX executable bin/clang-installapi

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 14, 2024

LLVM Buildbot has detected a new failure on builder libc-x86_64-debian-dbg-runtimes-build running on libc-x86_64-debian while building llvm at step 4 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
@@@BUILD_STEP build libc@@@
Running: ninja libc
[1/38] Generating VCSRevision.h
[2/38] Generating VCSVersion.inc
[3/38] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Version.cpp.o
[4/38] Building CXX object tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[5/38] Linking CXX executable bin/llvm-config
[6/38] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/IRSymtab.cpp.o
[7/38] Linking CXX static library lib/libLLVMObject.a
[8/38] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o 
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/build/lib/CodeGen -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/lib/CodeGen -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/build/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g  -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:450:34: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              assert(InstIndex < FI.IndexInstruction->size());
                                 ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:451:28: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              auto *Inst = FI.IndexInstruction->lookup(InstIndex);
                           ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
2 errors generated.
[9/38] Linking CXX static library lib/libclangBasic.a
[10/38] Linking CXX executable bin/llvm-size
[11/38] Linking CXX executable bin/llvm-objcopy
[12/38] Linking CXX executable bin/llvm-readobj
[13/38] Linking CXX executable bin/sanstats
[14/38] Linking CXX executable bin/llvm-symbolizer
[15/38] Linking CXX executable bin/llvm-cov
[16/38] Linking CXX executable bin/llvm-xray
[17/38] Linking CXX executable bin/llvm-profdata
[18/38] Linking CXX executable bin/obj2yaml
[19/38] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
[20/38] Linking CXX executable bin/llvm-ar
[21/38] Linking CXX executable bin/sancov
[22/38] Linking CXX executable bin/llvm-nm
[23/38] Linking CXX executable bin/llvm-objdump
[24/38] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
ninja: build stopped: subcommand failed.
['ninja', 'libc'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/llvm-libc-buildbot/home/sivachandra/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 164, in step
    yield
  File "/home/llvm-libc-buildbot/home/sivachandra/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 121, in main
    run_command(['ninja', 'libc'])
Step 6 (build libc) failure: build libc (failure)
@@@BUILD_STEP build libc@@@
Running: ninja libc
[1/38] Generating VCSRevision.h
[2/38] Generating VCSVersion.inc
[3/38] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Version.cpp.o
[4/38] Building CXX object tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[5/38] Linking CXX executable bin/llvm-config
[6/38] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/IRSymtab.cpp.o
[7/38] Linking CXX static library lib/libLLVMObject.a
[8/38] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o 
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/build/lib/CodeGen -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/lib/CodeGen -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/build/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g  -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:450:34: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              assert(InstIndex < FI.IndexInstruction->size());
                                 ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:451:28: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              auto *Inst = FI.IndexInstruction->lookup(InstIndex);
                           ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
2 errors generated.
[9/38] Linking CXX static library lib/libclangBasic.a
[10/38] Linking CXX executable bin/llvm-size
[11/38] Linking CXX executable bin/llvm-objcopy
[12/38] Linking CXX executable bin/llvm-readobj
[13/38] Linking CXX executable bin/sanstats
[14/38] Linking CXX executable bin/llvm-symbolizer
[15/38] Linking CXX executable bin/llvm-cov
[16/38] Linking CXX executable bin/llvm-xray
[17/38] Linking CXX executable bin/llvm-profdata
[18/38] Linking CXX executable bin/obj2yaml
[19/38] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
[20/38] Linking CXX executable bin/llvm-ar
[21/38] Linking CXX executable bin/sancov
[22/38] Linking CXX executable bin/llvm-nm
[23/38] Linking CXX executable bin/llvm-objdump
[24/38] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
ninja: build stopped: subcommand failed.
['ninja', 'libc'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/llvm-libc-buildbot/home/sivachandra/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 164, in step
    yield
  File "/home/llvm-libc-buildbot/home/sivachandra/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 121, in main
    run_command(['ninja', 'libc'])
  File "/home/llvm-libc-buildbot/home/sivachandra/libc-x86_64-debian/libc-x86_64-debian-dbg-runtimes-build/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 179, in run_command

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 14, 2024

LLVM Buildbot has detected a new failure on builder clang-ve-ninja running on hpce-ve-main while building llvm at step 4 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/ve-linux.py ...' (failure)
...
[2918/4066] Linking CXX static library lib/libLLVMVEInfo.a
[2919/4066] Building CXX object tools/clang/lib/Analysis/plugins/SampleAnalyzer/CMakeFiles/SampleAnalyzerPlugin.dir/MainCallChecker.cpp.o
[2920/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/SanitizerArgs.cpp.o
[2921/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/AMDGPUOpenMP.cpp.o
[2922/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/AIX.cpp.o
[2923/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/BareMetal.cpp.o
[2924/4066] Building CXX object tools/llvm-profdata/CMakeFiles/llvm-profdata.dir/llvm-profdata.cpp.o
[2925/4066] Building CXX object tools/clang/lib/ARCMigrate/CMakeFiles/obj.clangARCMigrate.dir/TransUnbridgedCasts.cpp.o
[2926/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/AMDGPU.cpp.o
[2927/4066] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o 
/usr/bin/ccache  /home/buildbot/install/bin/clang++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/scratch/buildbot/bothome/clang-ve-ninja/build/build_llvm/lib/CodeGen -I/scratch/buildbot/bothome/clang-ve-ninja/llvm-project/llvm/lib/CodeGen -I/scratch/buildbot/bothome/clang-ve-ninja/build/build_llvm/include -I/scratch/buildbot/bothome/clang-ve-ninja/llvm-project/llvm/include -O2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O2 -g -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -c /scratch/buildbot/bothome/clang-ve-ninja/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
/scratch/buildbot/bothome/clang-ve-ninja/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:451:28: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              auto *Inst = FI.IndexInstruction->lookup(InstIndex);
                           ^
/scratch/buildbot/bothome/clang-ve-ninja/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
1 error generated.
[2928/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/CrossWindows.cpp.o
[2929/4066] Building CXX object tools/clang/tools/clang-import-test/CMakeFiles/clang-import-test.dir/clang-import-test.cpp.o
[2930/4066] Linking CXX static library lib/libLLVMFrontendHLSL.a
[2931/4066] Linking CXX static library lib/libLLVMCFGuard.a
[2932/4066] Linking CXX static library lib/libLLVMVEDisassembler.a
[2933/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/CSKYToolChain.cpp.o
[2934/4066] Linking CXX static library lib/libLLVMBitReader.a
[2935/4066] Linking CXX static library lib/libLLVMVEDesc.a
[2936/4066] Linking CXX static library lib/libLLVMAsmParser.a
[2937/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/DragonFly.cpp.o
[2938/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Cuda.cpp.o
[2939/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/CommonArgs.cpp.o
[2940/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/FreeBSD.cpp.o
[2941/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Flang.cpp.o
[2942/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/RISCVToolchain.cpp.o
[2943/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Fuchsia.cpp.o
[2944/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Haiku.cpp.o
[2945/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Hurd.cpp.o
[2946/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HIPAMD.cpp.o
[2947/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HIPSPV.cpp.o
[2948/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/MipsLinux.cpp.o
[2949/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Hexagon.cpp.o
[2950/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HLSL.cpp.o
[2951/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/MSVC.cpp.o
[2952/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/MSP430.cpp.o
[2953/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/OHOS.cpp.o
[2954/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Darwin.cpp.o
[2955/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/Driver.cpp.o
[2956/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Clang.cpp.o
[2957/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Gnu.cpp.o
Step 7 (build-llvm) failure: build-llvm (failure)
...
[2918/4066] Linking CXX static library lib/libLLVMVEInfo.a
[2919/4066] Building CXX object tools/clang/lib/Analysis/plugins/SampleAnalyzer/CMakeFiles/SampleAnalyzerPlugin.dir/MainCallChecker.cpp.o
[2920/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/SanitizerArgs.cpp.o
[2921/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/AMDGPUOpenMP.cpp.o
[2922/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/AIX.cpp.o
[2923/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/BareMetal.cpp.o
[2924/4066] Building CXX object tools/llvm-profdata/CMakeFiles/llvm-profdata.dir/llvm-profdata.cpp.o
[2925/4066] Building CXX object tools/clang/lib/ARCMigrate/CMakeFiles/obj.clangARCMigrate.dir/TransUnbridgedCasts.cpp.o
[2926/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/AMDGPU.cpp.o
[2927/4066] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o 
/usr/bin/ccache  /home/buildbot/install/bin/clang++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/scratch/buildbot/bothome/clang-ve-ninja/build/build_llvm/lib/CodeGen -I/scratch/buildbot/bothome/clang-ve-ninja/llvm-project/llvm/lib/CodeGen -I/scratch/buildbot/bothome/clang-ve-ninja/build/build_llvm/include -I/scratch/buildbot/bothome/clang-ve-ninja/llvm-project/llvm/include -O2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O2 -g -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -c /scratch/buildbot/bothome/clang-ve-ninja/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
/scratch/buildbot/bothome/clang-ve-ninja/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:451:28: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              auto *Inst = FI.IndexInstruction->lookup(InstIndex);
                           ^
/scratch/buildbot/bothome/clang-ve-ninja/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
1 error generated.
[2928/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/CrossWindows.cpp.o
[2929/4066] Building CXX object tools/clang/tools/clang-import-test/CMakeFiles/clang-import-test.dir/clang-import-test.cpp.o
[2930/4066] Linking CXX static library lib/libLLVMFrontendHLSL.a
[2931/4066] Linking CXX static library lib/libLLVMCFGuard.a
[2932/4066] Linking CXX static library lib/libLLVMVEDisassembler.a
[2933/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/CSKYToolChain.cpp.o
[2934/4066] Linking CXX static library lib/libLLVMBitReader.a
[2935/4066] Linking CXX static library lib/libLLVMVEDesc.a
[2936/4066] Linking CXX static library lib/libLLVMAsmParser.a
[2937/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/DragonFly.cpp.o
[2938/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Cuda.cpp.o
[2939/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/CommonArgs.cpp.o
[2940/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/FreeBSD.cpp.o
[2941/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Flang.cpp.o
[2942/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/RISCVToolchain.cpp.o
[2943/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Fuchsia.cpp.o
[2944/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Haiku.cpp.o
[2945/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Hurd.cpp.o
[2946/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HIPAMD.cpp.o
[2947/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HIPSPV.cpp.o
[2948/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/MipsLinux.cpp.o
[2949/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Hexagon.cpp.o
[2950/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HLSL.cpp.o
[2951/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/MSVC.cpp.o
[2952/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/MSP430.cpp.o
[2953/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/OHOS.cpp.o
[2954/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Darwin.cpp.o
[2955/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/Driver.cpp.o
[2956/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Clang.cpp.o
[2957/4066] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Gnu.cpp.o

kyulee-com added a commit that referenced this pull request Nov 14, 2024
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 14, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-expensive-checks-debian running on gribozavr4 while building llvm at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
9.259 [992/33/2976] Building AArch64GenSubtargetInfo.inc...
9.282 [992/32/2977] Building OCaml library llvm_irreader
9.287 [991/32/2978] Building OCaml library llvm_bitreader
9.330 [990/32/2979] Building OCaml documentation for llvm_irreader
9.338 [989/32/2980] Building OCaml documentation for llvm_bitreader
9.339 [988/32/2981] Running utility command for ocaml_llvm_irreader
9.347 [988/31/2982] Running utility command for ocaml_llvm_bitreader
9.390 [988/30/2983] Building OCaml stub object file debuginfo_ocaml.o
9.462 [987/30/2984] Building OCaml library llvm_debuginfo
9.489 [986/30/2985] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DEXPENSIVE_CHECKS -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/llvm-clang-x86_64-expensive-checks-debian/build/lib/CodeGen -I/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/lib/CodeGen -I/b/1/llvm-clang-x86_64-expensive-checks-debian/build/include -I/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/include -U_GLIBCXX_DEBUG -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -c /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:450:34: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              assert(InstIndex < FI.IndexInstruction->size());
                                 ^
/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:451:28: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              auto *Inst = FI.IndexInstruction->lookup(InstIndex);
                           ^
/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
2 errors generated.
9.563 [986/29/2986] Building X86GenDAGISel.inc...
9.617 [986/28/2987] Building OCaml documentation for llvm_debuginfo
10.115 [986/27/2988] Building X86GenSubtargetInfo.inc...
10.337 [986/26/2989] Building AArch64GenInstrInfo.inc...
11.970 [986/25/2990] Building X86GenInstrInfo.inc...
12.345 [986/24/2991] Building RISCVGenInstrInfo.inc...
12.724 [986/23/2992] Building AMDGPUGenCallingConv.inc...
13.367 [986/22/2993] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
13.609 [986/21/2994] Building AMDGPUGenPreLegalizeGICombiner.inc...
13.803 [986/20/2995] Building AMDGPUGenMCPseudoLowering.inc...
13.824 [986/19/2996] Building AMDGPUGenPostLegalizeGICombiner.inc...
14.195 [986/18/2997] Building AMDGPUGenSubtargetInfo.inc...
14.298 [986/17/2998] Building AMDGPUGenMCCodeEmitter.inc...
14.338 [986/16/2999] Building RISCVGenGlobalISel.inc...
14.687 [986/15/3000] Building AMDGPUGenRegBankGICombiner.inc...
14.701 [986/14/3001] Building AMDGPUGenDisassemblerTables.inc...
14.912 [986/13/3002] Building AMDGPUGenSearchableTables.inc...
16.287 [986/12/3003] Building RISCVGenDAGISel.inc...
19.811 [986/11/3004] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
20.663 [986/10/3005] Building RISCVGenSubtargetInfo.inc...
22.135 [986/9/3006] Building X86GenAsmMatcher.inc...
22.183 [986/8/3007] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
24.682 [986/7/3008] Building AMDGPUGenDAGISel.inc...
26.303 [986/6/3009] Building AMDGPUGenAsmWriter.inc...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 14, 2024

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

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
12.445 [3554/96/3393] Building CXX object lib/Target/VE/CMakeFiles/LLVMVECodeGen.dir/VVPISelLowering.cpp.o
12.446 [3553/96/3394] Building CXX object lib/Target/VE/AsmParser/CMakeFiles/LLVMVEAsmParser.dir/VEAsmParser.cpp.o
12.447 [3552/96/3395] Building CXX object lib/Target/VE/Disassembler/CMakeFiles/LLVMVEDisassembler.dir/VEDisassembler.cpp.o
12.447 [3551/96/3396] Building CXX object lib/Target/VE/TargetInfo/CMakeFiles/LLVMVEInfo.dir/VETargetInfo.cpp.o
12.448 [3550/96/3397] Building CXX object lib/Target/VE/MCTargetDesc/CMakeFiles/LLVMVEDesc.dir/VEAsmBackend.cpp.o
12.449 [3549/96/3398] Building CXX object lib/Target/VE/MCTargetDesc/CMakeFiles/LLVMVEDesc.dir/VEELFObjectWriter.cpp.o
12.449 [3548/96/3399] Building CXX object lib/Target/VE/MCTargetDesc/CMakeFiles/LLVMVEDesc.dir/VEInstPrinter.cpp.o
12.450 [3547/96/3400] Building CXX object lib/Target/VE/MCTargetDesc/CMakeFiles/LLVMVEDesc.dir/VEMCAsmInfo.cpp.o
12.451 [3546/96/3401] Building CXX object lib/Target/VE/MCTargetDesc/CMakeFiles/LLVMVEDesc.dir/VEMCExpr.cpp.o
12.452 [3545/96/3402] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_EXPORTS -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/llvm-x86_64-debian-dylib/build/lib/CodeGen -I/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/CodeGen -I/b/1/llvm-x86_64-debian-dylib/build/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -c /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:450:34: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              assert(InstIndex < FI.IndexInstruction->size());
                                 ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:451:28: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              auto *Inst = FI.IndexInstruction->lookup(InstIndex);
                           ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
2 errors generated.
12.453 [3545/95/3403] Building CXX object lib/Target/VE/MCTargetDesc/CMakeFiles/LLVMVEDesc.dir/VEMCCodeEmitter.cpp.o
12.453 [3545/94/3404] Building CXX object lib/Target/VE/MCTargetDesc/CMakeFiles/LLVMVEDesc.dir/VEMCTargetDesc.cpp.o
12.453 [3545/93/3405] Building CXX object lib/Target/VE/MCTargetDesc/CMakeFiles/LLVMVEDesc.dir/VETargetStreamer.cpp.o
12.454 [3545/92/3406] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyAddMissingPrototypes.cpp.o
12.454 [3545/91/3407] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyArgumentMove.cpp.o
12.455 [3545/90/3408] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyAsmPrinter.cpp.o
12.455 [3545/89/3409] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyCFGStackify.cpp.o
12.456 [3545/88/3410] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyCleanCodeAfterTrap.cpp.o
12.456 [3545/87/3411] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyCFGSort.cpp.o
12.457 [3545/86/3412] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyDebugFixup.cpp.o
12.457 [3545/85/3413] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyDebugValueManager.cpp.o
12.457 [3545/84/3414] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyLateEHPrepare.cpp.o
12.458 [3545/83/3415] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyExceptionInfo.cpp.o
12.458 [3545/82/3416] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyExplicitLocals.cpp.o
12.459 [3545/81/3417] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyFastISel.cpp.o
12.459 [3545/80/3418] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyFixBrTableDefaults.cpp.o
12.460 [3545/79/3419] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyFixIrreducibleControlFlow.cpp.o
12.460 [3545/78/3420] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyFixFunctionBitcasts.cpp.o
12.460 [3545/77/3421] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyFrameLowering.cpp.o
12.461 [3545/76/3422] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyISelDAGToDAG.cpp.o
12.461 [3545/75/3423] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyISelLowering.cpp.o
12.462 [3545/74/3424] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyInstrInfo.cpp.o
12.462 [3545/73/3425] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyLowerBrUnless.cpp.o
12.463 [3545/72/3426] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyLowerEmscriptenEHSjLj.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 14, 2024

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

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
  /// FIXME: Eventually we want to drop \param Target and deduce it from
                                               ^~~~~~
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:991:8: note: previous documentation
  /// \param Target The region where the object should be constructed. If NULL,
       ^     ~~~~~~
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:998:14: warning: parameter 'ElemRef.' not found in the function declaration [-Wdocumentation]
  /// \param ElemRef.
             ^~~~~~~~
11 warnings generated.
14.266 [1952/96/4001] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/clang-x86_64-debian-fast/llvm.obj/lib/CodeGen -I/b/1/clang-x86_64-debian-fast/llvm.src/llvm/lib/CodeGen -I/b/1/clang-x86_64-debian-fast/llvm.obj/include -I/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include -std=c++11 -Wdocumentation -Wno-documentation-deprecated-sync -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GlobalMergeFunctions.cpp.o -c /b/1/clang-x86_64-debian-fast/llvm.src/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:450:34: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              assert(InstIndex < FI.IndexInstruction->size());
                                 ^
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:451:28: error: reference to local binding 'FI' declared in enclosing function 'llvm::GlobalMergeFunc::merge'
              auto *Inst = FI.IndexInstruction->lookup(InstIndex);
                           ^
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/lib/CodeGen/GlobalMergeFunctions.cpp:440:20: note: 'FI' declared here
    for (auto &[F, FI] : Funcs) {
                   ^
2 errors generated.
14.267 [1952/95/4002] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/BlockInCriticalSectionChecker.cpp.o
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp:18:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h:18:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/StaticAnalyzer/Core/Checker.h:16:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Analysis/ProgramPoint.h:17:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Analysis/AnalysisDeclContext.h:22:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Analysis/CFG.h:17:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/Attr.h:18:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/Decl.h:17:
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/APValue.h:372:14: warning: parameter 'UninitArray' not found in the function declaration [-Wdocumentation]
  /// \param UninitArray Marker. Pass an empty UninitArray.
             ^~~~~~~~~~~
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/APValue.h:380:14: warning: parameter 'UninitStruct' not found in the function declaration [-Wdocumentation]
  /// \param UninitStruct Marker. Pass an empty UninitStruct.
             ^~~~~~~~~~~~
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp:18:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h:18:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/StaticAnalyzer/Core/Checker.h:16:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Analysis/ProgramPoint.h:17:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Analysis/AnalysisDeclContext.h:22:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Analysis/CFG.h:18:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/ExprCXX.h:21:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/DeclCXX.h:22:
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/Expr.h:5228:21: warning: '@endcode' command does not terminate a verbatim text block [-Wdocumentation]

kyulee-com added a commit to kyulee-com/llvm-project that referenced this pull request Nov 14, 2024
This is a follow-up PR to refactor the initial global merge function
pass implemented in llvm#112671.

It first collects stable functions relevant to the current module and
iterates over those only, instead of iterating through all stable
functions in the stable function map.

This is a patch for
https://discourse.llvm.org/t/rfc-global-function-merging/82608.
kyulee-com added a commit to kyulee-com/llvm-project that referenced this pull request Nov 14, 2024
This is a follow-up PR to refactor the initial global merge function
pass implemented in llvm#112671.

It first collects stable functions relevant to the current module and
iterates over those only, instead of iterating through all stable
functions in the stable function map.

This is a patch for
https://discourse.llvm.org/t/rfc-global-function-merging/82608.
kyulee-com added a commit that referenced this pull request Nov 14, 2024
This is a follow-up PR to refactor the initial global merge function
pass implemented in #112671.

It first collects stable functions relevant to the current module and
iterates over those only, instead of iterating through all stable
functions in the stable function map.

This is a patch for
https://discourse.llvm.org/t/rfc-global-function-merging/82608.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants