[all-commits] [llvm/llvm-project] 957dc4: [IR] Lazily initialize the class to pass name mapp...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Mon Jun 24 00:40:30 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 957dc4366dd2ce9d5d2991c3ad76bbf438e9954e
https://github.com/llvm/llvm-project/commit/957dc4366dd2ce9d5d2991c3ad76bbf438e9954e
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-06-24 (Mon, 24 Jun 2024)
Changed paths:
M llvm/include/llvm/IR/PassInstrumentation.h
M llvm/include/llvm/Passes/TargetPassRegistry.inc
M llvm/include/llvm/Target/TargetMachine.h
M llvm/lib/IR/PassInstrumentation.cpp
M llvm/lib/Passes/PassBuilder.cpp
M llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
M llvm/lib/Target/AArch64/AArch64TargetMachine.h
M llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
M llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h
M llvm/lib/Target/BPF/BPFTargetMachine.cpp
M llvm/lib/Target/BPF/BPFTargetMachine.h
M llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
M llvm/lib/Target/Hexagon/HexagonTargetMachine.h
M llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
M llvm/lib/Target/NVPTX/NVPTXTargetMachine.h
M llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
M llvm/lib/Target/X86/X86TargetMachine.h
Log Message:
-----------
[IR] Lazily initialize the class to pass name mapping (NFC) (#96321)
Initializing this map is somewhat expensive (especially for O0), so we
currently only do it if certain flags are used. I would like to make use
of it for crash dumps (#96078), where we don't know in advance whether
it will be needed or not.
This patch changes the initialization to a lazy approach, where a
callback is registered that does the actual initialization. The
callbacks will be run the first time the pass name is requested.
This way there is no compile-time impact if the mapping is not used.
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