llvm::propagateMetadata

Propagate common metadata from VL onto instruction I.

Synopsis

Declared in <llvm/Analysis/VectorUtils.h>

Instruction*
propagateMetadata(
    Instruction* I,
    ArrayRef<Value*> VL);

Description

Specifically, let Kinds = [MD_tbaa, MD_alias_scope, MD_noalias, MD_fpmath,] MD_nontemporal, MD_access_group, MD_mmra]. For K in Kinds, we get the MDNode for K from each of the elements of VL, compute their "intersection" (i.e., the most generic metadata value that covers all of the individual values), and set I's metadata for M equal to the intersection value.

This function always sets a (possibly null) value for each K in Kinds.

Return Value

I after its preservable metadata has been updated.

Parameters

NameDescription
IInstruction that receives the intersected metadata.
VLValues whose metadata is intersected and propagated.