[all-commits] [llvm/llvm-project] 5bbda3: [Coro] Prebuild a module-level debug info set and ...
Artem Pianykh via All-commits
all-commits at lists.llvm.org
Fri Jan 24 00:39:50 PST 2025
Branch: refs/heads/users/artempyanykh/fast-coro-upstream/9
Home: https://github.com/llvm/llvm-project
Commit: 5bbda3044e421f62fa49895a4d9d4e8154113ec5
https://github.com/llvm/llvm-project/commit/5bbda3044e421f62fa49895a4d9d4e8154113ec5
Author: Artem Pianykh <arr at fb.com>
Date: 2025-01-23 (Thu, 23 Jan 2025)
Changed paths:
M llvm/lib/Transforms/Coroutines/CoroCloner.h
M llvm/lib/Transforms/Coroutines/CoroSplit.cpp
Log Message:
-----------
[Coro] Prebuild a module-level debug info set and share it between all coroutine clones
Summary:
CoroCloner, by calling into CloneFunctionInto, does a lot of repeated
work priming DIFinder and building a list of common module-level debug
info metadata. For programs compiled with full debug info this can get
very expensive.
This diff builds the data once and shares it between all clones.
Anecdata for a sample cpp source file compiled with full debug info:
| | Baseline | IdentityMD set | Prebuilt CommonDI (cur.) |
|-----------------|----------|----------------|--------------------------|
| CoroSplitPass | 306ms | 221ms | 68ms |
| CoroCloner | 101ms | 72ms | 0.5ms |
| CollectGlobalDI | - | - | 63ms |
| Speed up | 1x | 1.4x | 4.5x |
Note that CollectCommonDebugInfo happens once *per coroutine* rather than per clone.
Test Plan:
ninja check-llvm-unit
ninja check-llvm
Compiled a sample internal source file, checked time trace output for scope timings.
stack-info: PR: https://github.com/llvm/llvm-project/pull/118628, branch: users/artempyanykh/fast-coro-upstream/9
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