SYSTEM Cited by 2 sources
Clang¶
Clang is the LLVM-project C / C++ / Objective-C compiler frontend. Canonical project documentation at clang.llvm.org.
This wiki page is a stub covering clang's relevance to FDO tooling. For the LLVM post-link optimiser, see systems/llvm-bolt; for general C++ build-system patterns, see concepts/monorepo and the various code-analysis systems (systems/include-what-you-use, etc.).
PGO flags¶
Clang implements profile-guided optimization via a two-phase build:
-fprofile-generate[=<dir>]— phase 1. Instruments the binary. Profile data written on program exit.-fprofile-use=<path>/-fprofile-instr-use=<path>— phase 2. Consumes the profile for code-layout, inlining, and branch-hint decisions.-fprofile-sample-use=<path>— AutoFDO / CSSPGO variant. Consumes a sampling profile (from Linuxperfor Strobelight) instead of the instrumented.profdata.
See concepts/instrumented-vs-sampling-profile for the trade-off.
Role on this wiki¶
- The compile-time FDO implementer — PGO / CSSPGO / AutoFDO all live behind clang flags.
- Pairs with systems/llvm-bolt as compile-time + post-link siblings in the FDO family.
- Redpanda's 26.1 PGO rollout uses clang (Source: sources/2026-04-02-redpanda-supercharging-streaming-with-profile-guided-optimization) — the Tier-3 canonical wiki example of clang PGO delivering ~15% CPU reduction + 47% p999 latency reduction on a streaming-broker binary.
Seen in¶
- sources/2026-04-02-redpanda-supercharging-streaming-with-profile-guided-optimization — Redpanda Streaming 26.1 PGO rollout; clang is the canonical build-time FDO implementer named in the post.
- sources/2025-03-07-meta-strobelight-a-profiling-service-built-on-open-source-technology — Meta's fleet-scale CSSPGO deployment through clang.
Related¶
- systems/llvm-bolt — the post-link sibling.
- systems/meta-bolt-binary-optimizer — Meta's BOLT perspective.
- systems/linux-perf — the sampling-profile source.
- systems/redpanda — Tier-3 adopter.
- concepts/profile-guided-optimization — the optimisation clang's PGO flags implement.
- concepts/feedback-directed-optimization — the umbrella.
- concepts/instrumented-vs-sampling-profile — the two profile-collection shapes clang supports.
- concepts/hot-cold-code-splitting / concepts/instruction-cache-locality — the transformations clang PGO applies.
- patterns/pgo-for-frontend-bound-application — the canonical apply pattern.