[IR] Return AAMDNodes from Instruction::getMetadata() (NFC)
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 15 Sep 2021 21:01:01 +0000 (23:01 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 16 Sep 2021 19:06:57 +0000 (21:06 +0200)
commit0fc624f029f568e91caf74d90abc5d8d971151c2
treeb5df3a596e39e04fbb61b3003e08676f4269176d
parenta2fd05ada9030eab2258fff25e77a05adccae128
[IR] Return AAMDNodes from Instruction::getMetadata() (NFC)

getMetadata() currently uses a weird API where it populates a
structure passed to it, and optionally merges into it. Instead,
we can return the AAMDNodes and provide a separate merge() API.
This makes usages more compact.

Differential Revision: https://reviews.llvm.org/D109852
17 files changed:
llvm/include/llvm/IR/Instruction.h
llvm/include/llvm/IR/Metadata.h
llvm/lib/Analysis/MemoryLocation.cpp
llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/lib/Transforms/IPO/FunctionAttrs.cpp
llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/lib/Transforms/Scalar/GVN.cpp
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
polly/lib/Analysis/ScopDetection.cpp