[all-commits] [llvm/llvm-project] 91b77d: [IR] Don't use TrackingMDNodeRef for DebugLoc (#20...

Alexis Engelke via All-commits all-commits at lists.llvm.org
Mon Jun 1 01:06:10 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 91b77dc685cf628cbf925e43e25f2f86a912b38b
      https://github.com/llvm/llvm-project/commit/91b77dc685cf628cbf925e43e25f2f86a912b38b
  Author: Alexis Engelke <engelke at in.tum.de>
  Date:   2026-06-01 (Mon, 01 Jun 2026)

  Changed paths:
    M clang/lib/CodeGen/CGClass.cpp
    M clang/lib/CodeGen/CGDebugInfo.h
    M llvm/include/llvm/AsmParser/LLParser.h
    M llvm/include/llvm/CodeGen/MachineInstr.h
    M llvm/include/llvm/CodeGen/SelectionDAGNodes.h
    M llvm/include/llvm/IR/DebugLoc.h
    M llvm/include/llvm/IR/DebugProgramInstruction.h
    M llvm/include/llvm/IR/TrackingMDRef.h
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/CodeGen/MIRParser/MIParser.cpp
    M llvm/lib/CodeGen/MachineInstr.cpp
    M llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    M llvm/lib/IR/AutoUpgrade.cpp
    M llvm/lib/IR/Core.cpp
    M llvm/lib/IR/DebugInfo.cpp
    M llvm/lib/IR/DebugLoc.cpp
    M llvm/lib/IR/DebugProgramInstruction.cpp
    M llvm/lib/IR/Metadata.cpp
    A llvm/test/Assembler/dbg-declare-invalid-debug-loc.ll
    A llvm/test/Assembler/dbg.ll
    M llvm/test/CodeGen/X86/stack-protector-dbginfo.ll
    M llvm/test/DebugInfo/Generic/2009-10-16-Phi.ll
    M llvm/test/DebugInfo/Generic/location-verifier.ll
    M llvm/test/DebugInfo/MIR/X86/regcoalescer.mir
    M llvm/test/Transforms/MergeFunc/mergefunc-preserve-nonnull.ll
    M llvm/test/Verifier/RemoveDI/llvm.dbg.intrinsic-dbg-attachment.ll
    R llvm/test/Verifier/dbg-declare-invalid-debug-loc.ll
    M llvm/test/Verifier/dbg.ll
    M llvm/test/tools/llvm-reduce/remove-metadata.ll
    M llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
    M llvm/unittests/CodeGen/MachineInstrTest.cpp
    M llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
    M llvm/unittests/IR/InstructionsTest.cpp
    M llvm/unittests/SandboxIR/SandboxIRTest.cpp

  Log Message:
  -----------
  [IR] Don't use TrackingMDNodeRef for DebugLoc (#200649)

TrackingMDNodeRef is expensive and the tracking functionality is only
used when parsing textual LLVM IR. Therefore, store a plain DILocation
pointer in DebugLoc and update the debug locs explicitly when parsing
finishes.

Invalid debug metadata now fails directly at parsing and not (just)
later when verifying. A consequence is that old-style DILocations cannot
be parsed from textual IR anymore.

As related cleanup, remove the now-unused hasTrivialDestructor() on
TrackingMDRef.

While work on changing DILocation to no longer be metadata is on the
way, it is going to take a while to finish, we can get this immediate
performance and max-rss improvement earlier.



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