llvm::adaptNoAliasScopes

Adapt an instruction's noalias metadata using a scope map.

Synopsis

Declared in <llvm/Transforms/Utils/Cloning.h>

void
adaptNoAliasScopes(
    llvm::Instruction* I,
    DenseMap<MDNode*, MDNode*> const& ClonedScopes,
    LLVMContext& Context);

Description

Adapt the metadata for the specified instruction according to the provided mapping. This is normally used after cloning an instruction, when some noalias scopes needed to be cloned.

Parameters

NameDescription
IInstruction whose noalias metadata should be rewritten.
ClonedScopesMapping from original noalias scopes to their clones.
ContextLLVM context used when rebuilding metadata.