[llvm] [NFC][DebugInfo] Make MDNodeKeyImpl<DILocation>::Column 16 bits (PR #143399)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 9 08:33:49 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-debuginfo
Author: Orlando Cazalet-Hyams (OCHyams)
<details>
<summary>Changes</summary>
Column is limited to 16 bits in several places in the compiler: https://github.com/llvm/llvm-project/blob/a3c7d461456f2da25c1d119b6686773f675e313e/llvm/lib/IR/DebugInfoMetadata.cpp#L87
https://github.com/llvm/llvm-project/blob/a3c7d461456f2da25c1d119b6686773f675e313e/llvm/lib/AsmParser/LLParser.cpp#L4706
Slight compile time improvement due to reducing `hash_combine` workload in `MDNodeKeyImpl<DILocation>::getHashValue()`.
https://llvm-compile-time-tracker.com/compare.php?from=2b7b0e178259a910355631d7d648c89052000872&to=89490929c34f45842df1588cf78d836f51c2c222&stat=instructions%3Au
(positively affects compile time regardless of whether Key Instructions is enabled)
---
Full diff: https://github.com/llvm/llvm-project/pull/143399.diff
1 Files Affected:
- (modified) llvm/lib/IR/LLVMContextImpl.h (+1-1)
``````````diff
diff --git a/llvm/lib/IR/LLVMContextImpl.h b/llvm/lib/IR/LLVMContextImpl.h
index 7b6083a7a3496..946dc3188aeb1 100644
--- a/llvm/lib/IR/LLVMContextImpl.h
+++ b/llvm/lib/IR/LLVMContextImpl.h
@@ -311,7 +311,7 @@ template <> struct MDNodeKeyImpl<MDTuple> : MDNodeOpsKey {
/// DenseMapInfo for DILocation.
template <> struct MDNodeKeyImpl<DILocation> {
unsigned Line;
- unsigned Column;
+ uint16_t Column;
Metadata *Scope;
Metadata *InlinedAt;
bool ImplicitCode;
``````````
</details>
https://github.com/llvm/llvm-project/pull/143399
More information about the llvm-commits
mailing list