llvm::Instruction::dropUBImplyingAttrsAndMetadata

Drop attributes or metadata that can cause immediate undefined behavior.

Synopsis

Declared in <llvm/IR/Instruction.h>

void
dropUBImplyingAttrsAndMetadata(ArrayRef<unsigned int> Keep = {});

Description

Retain other attributes/metadata on a best-effort basis, as well as those passed in Keep. This should be used when speculating instructions.

Parameters

NameDescription
KeepMetadata kind IDs that should be retained.