Open Bug 1574534 Opened 6 years ago Updated 1 year ago

Investigate using context-sensitive PGO

Categories

(Firefox Build System :: Toolchains, task)

task

Tracking

(Not tracked)

People

(Reporter: away, Unassigned)

References

Details

Clang 9 has a new optimization called context-sensitive PGO. The feature's commit message has an explanation and example usage: https://llvm.org/r354930

Basically, the 3-phase "instrument, run, optimize" flow turns into a 5-phase "instrument, run, re-instrument, re-run, optimize".

Back in June I played around with it on Try but didn't see any improvements in perf benchmarks. At the time, our PGO builds were still single-task. If we want to give this another try, my patches would need to be substantially rewritten for our new multi-task PGO config. I'll describe what I did if someone wants to pick this up.

  • Prerequisite: Upgrade to clang 9 (bug 1573211)
  • Optional preparation: stop using the .i_o suffix for PGO objects, mainly just because I don't want to introduce another suffix for the new phase. 550972b5e409
  • Main patch: add the new re-instrument and re-run phases: 7341b45440ac
  • Fixup: at the time, I was using a trunk version of LLVM and needed to disable PGO on a few files that crashed clang. I don't know if these are still necessary: 1e04c964b998
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.