[PATCH] D133291: [Assignment Tracking][8/*] Add DIAssignID merging utilities

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 5 05:14:40 PDT 2022


Orlando created this revision.
Orlando added a project: debug-info.
Herald added a subscriber: hiraditya.
Herald added a project: All.
Orlando requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Add `Instruction::mergeDIAssignID(ArrayRef<const Instruction* > SourceInstructions)` which merges the `DIAssignID` metadata attachments on the `SourceInstructions` and `this` and replaces uses of the original IDs with the new shared one.

This is used when stores are merged, for example sinking stores out of a if-diamond CFG or vectorizing contiguous stores.


https://reviews.llvm.org/D133291

Files:
  llvm/include/llvm/IR/Instruction.h
  llvm/lib/IR/DebugInfo.cpp
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/unittests/IR/DebugInfoTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133291.457898.patch
Type: text/x-patch
Size: 9090 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220905/b8d48cdc/attachment.bin>


More information about the llvm-commits mailing list