[all-commits] [llvm/llvm-project] 1256ef: [BOLT] Fine-tuning hash computation for stale matc...

spupyrev via All-commits all-commits at lists.llvm.org
Thu Aug 31 07:29:22 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1256ef274c629ea1f86608a816f33a824679a75d
  Author: spupyrev <spupyrev at fb.com>
  Date:   2023-08-31 (Thu, 31 Aug 2023)

  Changed paths:
    M bolt/include/bolt/Core/HashUtilities.h
    M bolt/lib/Core/HashUtilities.cpp
    M bolt/lib/Profile/StaleProfileMatching.cpp
    M bolt/test/X86/Inputs/blarge_profile_stale.yaml
    M bolt/test/X86/reader-stale-yaml.test

  Log Message:
  [BOLT] Fine-tuning hash computation for stale matching

Fine-tuning hash computation for stale matching:
- introducing a new "loose" basic block hash that allows to match many more blocks than before;
- tweaking params of the inference algorithm that find (slightly) better solutions;
- added more meaningful tests for stale matching.

Tested the changes on several open-source benchmarks (clang, rocksdb, chrome)
and one prod workload using different compiler modes (LTO/PGO etc). There is
always an improvement in the quality of inferred profiles.
(The current implementation is still not optimal but the diff is a step forward;
I am open to further suggestions)

Reviewed By: Amir

Differential Revision: https://reviews.llvm.org/D156278

More information about the All-commits mailing list