Joe McDonnell created IMPALA-12731:
--------------------------------------
Summary: Investigate profile guided optimization of LLVM library
Key: IMPALA-12731
URL: https://issues.apache.org/jira/browse/IMPALA-12731
Project: IMPALA
Issue Type: Improvement
Components: Infrastructure
Affects Versions: Impala 4.4.0
Reporter: Joe McDonnell
LLVM compilation can be a performance critical path for query execution.
Various benchmarks have confirmed that profile guided optimization can speed up
various LLVM binaries including Clang.
[https://llvm.org/docs/HowToBuildWithPGO.html] has this sentence:
{noformat}
PGO (Profile-Guided Optimization) allows your compiler to better optimize code
for how it actually runs. Users report that applying this to Clang and LLVM can
decrease overall compile time by 20%.{noformat}
[https://github.com/llvm/llvm-project/issues/63486] gives some results from
applying this to other LLVM binaries such as clangd, lldb, clang-tidy, etc.
It sounds like this could speed up Impala's LLVM compilation. We could try this
by building LLVM with profiling enabled, linking it into Impala, running small
scale queries that do codegen (TPC-H, TPC-DS) to produce profiling data, then
rebuilding LLVM with that profiling data.
This links are referring to compilation using Clang, but we usually use GCC to
build LLVM. GCC has profile guided optimization that should be able to achieve
similar results, or we can try building the toolchain with Clang.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]