[all-commits] [llvm/llvm-project] 83cfc8: [Coro] Use DebugInfoCache to speed up cloning in C...
Artem Pianykh via All-commits
all-commits at lists.llvm.org
Thu Jan 23 13:16:43 PST 2025
Branch: refs/heads/users/artempyanykh/fast-coro-upstream/11
Home: https://github.com/llvm/llvm-project
Commit: 83cfc8da62eaf7241f54f83f7ad641453acd6d0f
https://github.com/llvm/llvm-project/commit/83cfc8da62eaf7241f54f83f7ad641453acd6d0f
Author: Artem Pianykh <arr at fb.com>
Date: 2025-01-23 (Thu, 23 Jan 2025)
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 module-level 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 CommonDI | 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