Skip to content

Commit f0d05b9

Browse files
authored
[NFC][DebugInfo] Make MDNodeKeyImpl<DILocation>::Column 16 bits (#143399)
Column is limited to 16 bits in several places in the compiler: DebugInfoMetadata.cpp#L87, LLParser.cpp#L4706, and more Slight compile time improvement due to reducing `hash_combine` workload in `MDNodeKeyImpl<DILocation>::getHashValue()`. Positively affects compile time regardless of whether Key Instructions is enabled. See PR for numbers.
1 parent 6a8464b commit f0d05b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/IR/LLVMContextImpl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ template <> struct MDNodeKeyImpl<MDTuple> : MDNodeOpsKey {
311311
/// DenseMapInfo for DILocation.
312312
template <> struct MDNodeKeyImpl<DILocation> {
313313
unsigned Line;
314-
unsigned Column;
314+
uint16_t Column;
315315
Metadata *Scope;
316316
Metadata *InlinedAt;
317317
bool ImplicitCode;
@@ -320,7 +320,7 @@ template <> struct MDNodeKeyImpl<DILocation> {
320320
uint64_t AtomRank : 3;
321321
#endif
322322

323-
MDNodeKeyImpl(unsigned Line, unsigned Column, Metadata *Scope,
323+
MDNodeKeyImpl(unsigned Line, uint16_t Column, Metadata *Scope,
324324
Metadata *InlinedAt, bool ImplicitCode, uint64_t AtomGroup,
325325
uint8_t AtomRank)
326326
: Line(Line), Column(Column), Scope(Scope), InlinedAt(InlinedAt),

0 commit comments

Comments
 (0)