[all-commits] [llvm/llvm-project] 4cf7f3: [Coro] Use DebugInfoCache to speed up cloning in C...
Artem Pianykh via All-commits
all-commits at lists.llvm.org
Fri Dec 6 04:45:34 PST 2024
Branch: refs/heads/users/artempyanykh/fast-coro-upstream/11
Home: https://github.com/llvm/llvm-project
Commit: 4cf7f3f62a96e99a7d9d5b4c32d4267da0ed44b4
https://github.com/llvm/llvm-project/commit/4cf7f3f62a96e99a7d9d5b4c32d4267da0ed44b4
Author: Artem Pianykh <arr at fb.com>
Date: 2024-09-15 (Sun, 15 Sep 2024)
Changed paths:
M llvm/include/llvm/Transforms/Coroutines/ABI.h
M llvm/lib/Analysis/CGSCCPassManager.cpp
M llvm/lib/Transforms/Coroutines/CoroSplit.cpp
M llvm/test/Other/new-pass-manager.ll
M llvm/test/Other/new-pm-defaults.ll
M llvm/test/Other/new-pm-lto-defaults.ll
M llvm/test/Other/new-pm-pgo-preinline.ll
M llvm/test/Other/new-pm-thinlto-postlink-defaults.ll
M llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
M llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
M llvm/test/Other/new-pm-thinlto-prelink-defaults.ll
M llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
M llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
M llvm/unittests/Analysis/CGSCCPassManagerTest.cpp
Log Message:
-----------
[Coro] Use DebugInfoCache to speed up cloning in CoroSplitPass
Summary:
We can use a DebugInfoFinder from DebugInfoCache which is already primed on a compile unit to speed
up collection of global debug info.
The pass could likely be another 2x+ faster if we avoid rebuilding the set of global debug
info. This needs further massaging of CloneFunction and ValueMapper, though, and can be done
incrementally on top of this.
Comparing performance of CoroSplitPass at various points in this stack, this is anecdata from a sample
cpp file compiled with full debug info:
| | Baseline | IdentityMD set | Prebuilt GlobalDI | Cached CU DIFinder (cur.) |
|-----------------+----------+----------------+-------------------+---------------------------|
| CoroSplitPass | 306ms | 221ms | 68ms | 17ms |
| CoroCloner | 101ms | 72ms | 0.5ms | 0.5ms |
| CollectGlobalDI | - | - | 63ms | 13ms |
|-----------------+----------+----------------+-------------------+---------------------------|
| Speed up | 1x | 1.4x | 4.5x | 18x |
Test Plan:
ninja check-llvm-unit
ninja check-llvm
Compiled a sample cpp file with time trace to get the avg. duration of the pass and inner scopes.
stack-info: PR: https://github.com/llvm/llvm-project/pull/118630, branch: users/artempyanykh/fast-coro-upstream/11
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list