Drop non-debug unknown metadata and UB-implying call attributes.
Declared in <llvm/IR/Instruction.h>
void
dropUBImplyingAttrsAndUnknownMetadata(ArrayRef<unsigned int> KnownIDs = {});
This 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.
| Name | Description |
|---|---|
| KnownIDs | Metadata kind IDs that should be retained. |