llvm::Instruction::dropUBImplyingAttrsAndUnknownMetadata

This function drops non-debug unknown metadata (through dropUnknownNonDebugMetadata). For calls, it also drops parameter and return attributes that can cause undefined behaviour. Both of these should be done by passes which move instructions in IR.

Synopsis

Declared in <llvm/IR/Instruction.h>

void
dropUBImplyingAttrsAndUnknownMetadata(ArrayRef<unsigned int> KnownIDs = {});

Parameters

NameDescription
KnownIDsRepresent a constant reference to an array (0 or more elements consecutively in memory), i.e. a start pointer and a length. It allows various APIs to take consecutive elements easily and conveniently.