If this is a faster backend for LLVM, does it potentially obviate the niche Cranelift is optimizing for?
Build instructions
In the llvm/llvm-project repository
git switch origin/release/19.x
cmake -GNinja -S. -B/tmp/out/custom -DLLVM_TARGETS_TO_BUILD='X86;AArch64' -DLLVM_ENABLE_PROJECTS=clang -DLLVM_ENABLE_PLUGINS=off -DCMAKE_BUILD_TYPE=Release -DLLVM_LINK_LLVM_DYLIB=on
# consider -DCLANG_ENABLE_OBJC_REWRITER=off -DCLANG_ENABLE_STATIC_ANALYZER=off -DCLANG_ENABLE_ARCMT=off -DCLANG_PLUGIN_SUPPORT=off
ninja -C /tmp/out/custom clang LLVM FileCheck # build clang and libLLVM.so and test utilities
In the tpde repository git submodule update --init
cmake -GNinja -S. -Bout/debug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DCMAKE_PREFIX_PATH=/tmp/out/custom -DCMAKE_CXX_COMPILER=$HOME/Stable/bin/clang++ -DCMAKE_C_COMPILER=$HOME/Stable/bin/clang
/Stable/bin/clangThere are some failures:
``` % /tmp/out/custom/bin/llvm-lit out/debug/tpde/test/filetest ... Failed Tests (5): TPDE FileTests :: codegen/eh-frame-arm64.tir TPDE FileTests :: codegen/eh-frame-x64.tir TPDE FileTests :: codegen/simple_ret.tir TPDE FileTests :: codegen/tbz.tir TPDE FileTests :: tir/duplicate_funcs.tir ```
It's great start, but what would be cooler if they really went through the boring part, which is putting it into LLVM as the new default -O0 compiler.
Edit: LLM to LLVM
What makes this 'adaptable' and what makes this a 'framework'?
Seems like a pretty neat fast compiler backend for LLVM. Why the extra buzzwords?
> Performance results on SPECint 2017 show that we can compile LLVM-IR 8--24x faster than LLVM -O0 while being on-par in terms of run-time performance
Wait - it’s 8-24x faster than O0 while producing code on par with O3???
Source code for the framework
https://github.com/tpde2/tpde