This PR introduces a Metadata Node Kind allowlist. The purpose is to prevent newer Metadata Node Kinds to be used and inserted into the outputted DXIL module. Only the metadata kinds that are accepted in the DXIL Validator are on the allowlist. The Github DXC validator doesn't support these newer Metadata Node Kinds, so we need to filter them out. We introduce this restrictive allowlist into LLVM and strip all metadata that isn't found in the list. The accompanying test would add the `llvm.loop.mustprogress` metadata node kind, but thanks to the allowlist, filters it out, and so the whitelist is proven to work. The test also has two separate metadata kinds that are on the allowlist, and remain after the DXIL Prepare pass.
10 KiB
10 KiB