diff options
author | OCHyams <orlando.hyams@sony.com> | 2022-11-09 10:41:28 +0000 |
---|---|---|
committer | OCHyams <orlando.hyams@sony.com> | 2022-11-09 10:46:04 +0000 |
commit | a9025f57bac1121a2aa5ac05f48f611cd2b3a64f (patch) | |
tree | 28aa97d38885d7278b6b3a4724f576a77cefa64f /llvm/lib/Transforms/Utils/Local.cpp | |
parent | a621e799168ff6e57c27a49e6badd40b16bc44a8 (diff) | |
download | llvm-a9025f57bac1121a2aa5ac05f48f611cd2b3a64f.zip llvm-a9025f57bac1121a2aa5ac05f48f611cd2b3a64f.tar.gz llvm-a9025f57bac1121a2aa5ac05f48f611cd2b3a64f.tar.bz2 |
[Assignment Tracking][8/*] Add DIAssignID merging utilities
The Assignment Tracking debug-info feature is outlined in this RFC:
https://discourse.llvm.org/t/
rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir
Add method:
Instruction::mergeDIAssignID(
ArrayRef<const Instruction* > SourceInstructions)
which merges the DIAssignID metadata attachments on `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.
Reviewed By: jmorse
Differential Revision: https://reviews.llvm.org/D133291
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index e31e691..f3c2371 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -2583,6 +2583,9 @@ void llvm::combineMetadata(Instruction *K, const Instruction *J, break; case LLVMContext::MD_dbg: llvm_unreachable("getAllMetadataOtherThanDebugLoc returned a MD_dbg"); + case LLVMContext::MD_DIAssignID: + K->mergeDIAssignID(J); + break; case LLVMContext::MD_tbaa: K->setMetadata(Kind, MDNode::getMostGenericTBAA(JMD, KMD)); break; |