diff options
author | Valery Pykhtin <valery.pykhtin@gmail.com> | 2025-03-11 07:19:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-11 07:19:53 +0100 |
commit | bb2e85f12f6a17afdb36b2ffd2dcd17bbc4dd866 (patch) | |
tree | 245422ebc2f4cb506e14f55f386a87da38a91070 /clang/lib/CodeGen/ModuleBuilder.cpp | |
parent | 1e83d975d72037567afd9d3b22bb063b442ec045 (diff) | |
download | llvm-bb2e85f12f6a17afdb36b2ffd2dcd17bbc4dd866.zip llvm-bb2e85f12f6a17afdb36b2ffd2dcd17bbc4dd866.tar.gz llvm-bb2e85f12f6a17afdb36b2ffd2dcd17bbc4dd866.tar.bz2 |
[AMDGPU] Improve StructurizeCFG pass performance: avoid redundant DebugLoc map initialization. NFC. (#130568)
Previously, the TermDL (BB terminator → DebugLoc) map was initialized at
the start of processing each function's region, creating entries for the
entire function. This could be inefficient for large functions.
This patch improves performance by creating map entries only when
needed—when a terminator is being killed or when a flow block is
created. Additionally, entries are removed immediately after use,
preventing unnecessary map growth and ensuring DebugLocs are not
"retracked."
A mapless variant was also explored, but due to limited familiarity with
the structurizer, it was not pursued further.
In my cases, this change improves performance by 2-3×.
Diffstat (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp')
0 files changed, 0 insertions, 0 deletions