[llvm] [CodeGen] Use optimized domtree for MachineFunction (PR #102107)

Zequan Wu via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 16:03:21 PDT 2024


ZequanWu wrote:

This causes clang to lld to crash:
```
[113/114] LINK ./flatc
FAILED: flatc
"python3" "../../build/toolchain/gcc_link_wrapper.py" --output="./flatc" -- /usr/local/google/home/zequanwu/workspace/llvm-project/build/cmake/bin/clang++ -Werror -fuse-ld=lld -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--icf=all -Wl,--color-diagnostics -Wl,-mllvm,-instcombine-lower-dbg-declare=0 -Wl,-mllvm,-split-threshold-for-reg-with-hint=0 -Wl,--thinlto-cache-dir=thinlto-cache -Wl,--thinlto-cache-policy=cache_size=10\%:cache_size_bytes=40g:cache_size_files=100000 -flto=thin -Wl,--thinlto-jobs=all -Wl,-mllvm,-import-instr-limit=30 -Wl,-mllvm,-disable-auto-upgrade-debug-info -Wl,-mllvm,-inlinehint-threshold=360 -fwhole-program-vtables -Wl,--undefined-version -m64 -no-canonical-prefixes -Wl,-O2 -Wl,--gc-sections -gsplit-dwarf -Wl,--gdb-index -Wl,-z,defs -Wl,--as-needed -nostdlib++ --sysroot=../../build/linux/debian_bullseye_amd64-sysroot -Wl,--lto-O0 -Wl,-mllvm,-enable-ext-tsp-block-placement=1 -fsanitize=cfi-vcall -fsanitize=cfi-icall -rdynamic -pie -Wl,--disable-new-dtags -o "./flatc" -Wl,--start-group @"./flatc.rsp" -Wl,--end-group   /usr/local/google/home/zequanwu/workspace/llvm-project/build/cmake/lib/clang/20/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a -ldl -lpthread -lrt -Wl,--start-group  -Wl,--end-group
ld.lld: /usr/local/google/home/zequanwu/workspace/llvm-project/llvm/include/llvm/CodeGen/MachineBasicBlock.h:1316: static unsigned int llvm::GraphTraits<const llvm::MachineBasicBlock *>::getNumber(const MachineBasicBlock *): Assertion `BB->getNumber() >= 0 && "negative block number"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Running pass 'Function Pass Manager' on module 'obj/third_party/flatbuffers/compiler_files/bfbs_gen_lua.o'.
1.      Running pass 'Branch Probability Basic Block Placement' on function '@_ZNK10reflection4Type6VerifyERN11flatbuffers16VerifierTemplateILb0EEE'
LLVM ERROR: Failed to rename temporary file thinlto-cache/Thin-7b716a.tmp.o to thinlto-cache/llvmcache-8BAFD4F3FEF83E7DA969778920EB65E546F23CCE: No such file or directory

clang++: error: unable to execute command: Aborted
clang++: error: linker command failed due to signal (use -v to see invocation)
ninja: build stopped: subcommand failed.
```

Can you take a look? If it takes a while to fix, we should revert this.

https://github.com/llvm/llvm-project/pull/102107


More information about the llvm-commits mailing list