[all-commits] [llvm/llvm-project] 7b7509: [BOLT][NFC] Speedup YAML profile processing
Amir Ayupov via All-commits
all-commits at lists.llvm.org
Mon Sep 11 16:08:11 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7b750943d722a23cdd4088b144af1691f1955ac9
https://github.com/llvm/llvm-project/commit/7b750943d722a23cdd4088b144af1691f1955ac9
Author: Amir Ayupov <aaupov at meta.com>
Date: 2023-09-11 (Mon, 11 Sep 2023)
Changed paths:
M bolt/include/bolt/Profile/YAMLProfileReader.h
M bolt/lib/Profile/YAMLProfileReader.cpp
Log Message:
-----------
[BOLT][NFC] Speedup YAML profile processing
Reduce YAML profile processing times:
- preprocessProfile: speed up buildNameMaps by replacing ProfileNameToProfile
mapping with ProfileFunctionNames set and ProfileBFs vector.
Pre-look up YamlBF->BF correspondence, memoize in ProfileBFs.
- readProfile: replace iteration over all functions in the binary by iteration
over profile functions (strict match and LTO name match).
On a large binary (1.9M functions) and large YAML profile (121MB, 30k functions)
reduces profile steps runtime:
pre-process profile data: 12.4953s -> 10.7123s
process profile data: 9.8195s -> 5.6639s
Compared to fdata profile reading:
pre-process profile data: 8.0268s
process profile data: 1.0265s
process profile data pre-CFG: 0.1644s
Reviewed By: #bolt, maksfb
Differential Revision: https://reviews.llvm.org/D159460
More information about the All-commits
mailing list