[all-commits] [llvm/llvm-project] c4346f: Ignore `!guid` metadata when merging globals or co...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Fri May 29 08:51:00 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c4346f2a09aa809ddd5b3607f6efe8de254890b7
      https://github.com/llvm/llvm-project/commit/c4346f2a09aa809ddd5b3607f6efe8de254890b7
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2026-05-29 (Fri, 29 May 2026)

  Changed paths:
    M llvm/include/llvm/IR/GlobalObject.h
    M llvm/include/llvm/Transforms/Utils/AssignGUID.h
    M llvm/lib/CodeGen/GlobalMerge.cpp
    M llvm/lib/IR/Globals.cpp
    M llvm/lib/Transforms/IPO/ConstantMerge.cpp
    M llvm/lib/Transforms/Utils/AssignGUID.cpp
    M llvm/test/Transforms/ConstantMerge/merge-dbg.ll
    A llvm/test/Transforms/GlobalMerge/guid.ll

  Log Message:
  -----------
  Ignore `!guid` metadata when merging globals or constants (#200323)

Follow up from PR #184065. Since globals or constants would now have
their GUID pre-calculated and affixed with metadata, we need to tolerate
its presence when merging. To that effect, we rename (and change
accordingly) `GlobalObject::hasMetadataOtherThanDebugLoc` to
`...AndGuid`.

In the case of Constants, they are merged into one of them, which then
keeps its guid, while the rest are erased. In the case of
GlobalVariables, a new one is created, and we will give it its own guid.



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