[llvm] TableGen: Allow defining sets of runtime libraries (PR #144978)
Mikael Holmén via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 8 01:20:38 PDT 2025
mikaelholmen wrote:
Hi @arsenm
I see the following when I build opt with EXPENSIVE_CHECKS with this patch:
```
[286/2984] Building RuntimeLibcalls.inc...
FAILED: include/llvm/IR/RuntimeLibcalls.inc /repo/llvm/build-all-expensive/include/llvm/IR/RuntimeLibcalls.inc
cd /repo/llvm/build-all-expensive/include/llvm/IR && /repo/llvm/build-all-expensive/bin/llvm-min-tblgen -gen-runtime-libcalls -I/repo/llvm/include/llvm/IR -I/repo/llvm/build-all-expensive/include -I/repo/llvm/include /repo/llvm/include/llvm/IR/RuntimeLibcalls.td --write-if-changed -o RuntimeLibcalls.inc -d RuntimeLibcalls.inc.d && /afs/sero.gic.ericsson.se/app/vbuild/RHEL8-x86_64/cmake/3.27.2/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /repo/llvm /repo/llvm/include/llvm/IR /repo/llvm/build-all-expensive /repo/llvm/build-all-expensive/include/llvm/IR /repo/llvm/build-all-expensive/include/llvm/IR/RuntimeLibcalls.inc.d /repo/llvm/build-all-expensive/CMakeFiles/d/d57c3848066209cf93d709536d81207635c4152e2e83b5b2e7dc5d61b977a39f.d
/compiler/include/c++/13.3.0/bits/stl_algo.h:4892:
In function:
void std::sort(_RandomAccessIterator, _RandomAccessIterator, _Compare)
[_RandomAccessIterator = const llvm::Record **, _Compare = (lambda at
../utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp:356:28)]
Error: comparison doesn't meet irreflexive requirements, assert(!(a < a)).
Objects involved in the operation:
instance "functor" @ 0x7ffdfae1c150 {
}
iterator::value_type "ordered type" {
}
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /repo/llvm/build-all-expensive/bin/llvm-min-tblgen -gen-runtime-libcalls -I/repo/llvm/include/llvm/IR -I/repo/llvm/build-all-expensive/include -I/repo/llvm/include /repo/llvm/include/llvm/IR/RuntimeLibcalls.td --write-if-changed -o RuntimeLibcalls.inc -d RuntimeLibcalls.inc.d
#0 0x0000555a7fef46d6 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/repo/llvm/build-all-expensive/bin/llvm-min-tblgen+0x1656d6)
#1 0x0000555a7fef1e95 llvm::sys::RunSignalHandlers() (/repo/llvm/build-all-expensive/bin/llvm-min-tblgen+0x162e95)
#2 0x0000555a7fef5529 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007f1da2eaad10 __restore_rt (/lib64/libpthread.so.0+0x12d10)
#4 0x00007f1da084a52f raise (/lib64/libc.so.6+0x4e52f)
#5 0x00007f1da081de65 abort (/lib64/libc.so.6+0x21e65)
#6 0x0000555a7ff7b703 (/repo/llvm/build-all-expensive/bin/llvm-min-tblgen+0x1ec703)
#7 0x0000555a7fe8ccb5 (anonymous namespace)::RuntimeLibcallEmitter::emitSystemRuntimeLibrarySetCalls(llvm::raw_ostream&) const RuntimeLibcallsEmitter.cpp:0:0
#8 0x0000555a7fe86d14 llvm::TableGen::Emitter::OptClass<(anonymous namespace)::RuntimeLibcallEmitter>::run(llvm::RecordKeeper const&, llvm::raw_ostream&) RuntimeLibcallsEmitter.cpp:0:0
#9 0x0000555a7ff3d354 llvm::TableGen::Emitter::ApplyCallback(llvm::RecordKeeper const&, llvm::raw_ostream&) (/repo/llvm/build-all-expensive/bin/llvm-min-tblgen+0x1ae354)
#10 0x0000555a7ff05dd3 llvm::TableGenMain(char const*, std::function<bool (llvm::raw_ostream&, llvm::RecordKeeper const&)>) (/repo/llvm/build-all-expensive/bin/llvm-min-tblgen+0x176dd3)
#11 0x0000555a7fe946fe tblgen_main(int, char**) (/repo/llvm/build-all-expensive/bin/llvm-min-tblgen+0x1056fe)
#12 0x00007f1da08367e5 __libc_start_main (/lib64/libc.so.6+0x3a7e5)
#13 0x0000555a7fe2814e _start (/repo/llvm/build-all-expensive/bin/llvm-min-tblgen+0x9914e)
/bin/sh: line 1: 2905861 Aborted (core dumped) /repo/llvm/build-all-expensive/bin/llvm-min-tblgen -gen-runtime-libcalls -I/repo/llvm/include/llvm/IR -I/repo/llvm/build-all-expensive/include -I/repo/llvm/include /repo/llvm/include/llvm/IR/RuntimeLibcalls.td --write-if-changed -o RuntimeLibcalls.inc -d RuntimeLibcalls.inc.d
[288/2984] Building RISCVTargetParserDef.inc...
ninja: build stopped: subcommand failed.
system(/app/vbuild/RHEL8-x86_64/ninja/1.10.2/bin/ninja -j96 -C llvm/build-all-expensive opt) failed: child exited with value 1
```
I can't say I know anything about this but I guess the
```
if (!A)
return true;
```
in the comparison that breaks the
```
!(a < a)
```
requirement for nullptr?
https://github.com/llvm/llvm-project/pull/144978
More information about the llvm-commits
mailing list