Open Bug 1789087 Opened 3 years ago Updated 3 months ago

Consider using BOLT on our builds

Categories

(Firefox Build System :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: emilio, Unassigned)

References

(Blocks 1 open bug)

Details

May give us relatively easy performance wins?

https://github.com/llvm/llvm-project/tree/main/bolt

BOLT is linux only. It might be interesting to make clang itself faster on CI (although I've read varying reports of what kind of improvements it brings to the table compared to PGO+LTO, some of which make it sound like it wouldn't do much), but I'm not convinced it's worth the effort for Firefox itself until other platforms are supported.

Severity: -- → S3
Priority: -- → P3

Also, bolt is amd64 & arm64 only ( https://github.com/llvm/llvm-project/tree/main/bolt/lib/Target )

Mike also told me that it might be interesting for clang itself

See Also: → 1509314

Regarding using LLVM BOLT for Clang - Clang already supports building with BOLT: https://github.com/llvm/llvm-project/blob/main/clang/cmake/caches/BOLT-PGO.cmake

Also, you could be interested in the discussion of applying BOLT to Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1163978 .

Below I collected some BOLT performance benchmarks:

Even if BOLT works only on Linux, it still could be worth applying BOLT even only for one platform.

Some users referenced this bug in Comments section in relation to a PGO+BOLT article that appeared on Phoronix: https://www.phoronix.com/news/Fedora-Idea-More-PGO-LLVM-BOLT

So dumb question: Could we ducktape a prototype together for Android?

  1. BOLT is linux only, -but- Android is (mostly) linux
  2. BOLT can use perf, but it is possible to build real perf for linux, or you can use BOLT instrumentation.

I guess thinking this through the most awkard thing for bolt is that everything we care about is in libxul, which AIUI is dynamically linked in.

Blocks: 1947559
You need to log in before you can comment on or make changes to this bug.