[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 25 13:19:30 PDT 2025


================
@@ -161,6 +161,15 @@ class DXILPrepareModule : public ModulePass {
                          Builder.getPtrTy(PtrTy->getAddressSpace())));
   }
 
+  static llvm::SmallVector<unsigned> getCompatibleInstructionMDs(Module &M) {
+    llvm::SmallVector<unsigned, 16> ret = {
----------------
bogner wrote:

Better to return a `std::array` - the size is a compile time constant, so SmallVector is a bit inefficient here.

https://github.com/llvm/llvm-project/pull/136386


More information about the cfe-commits mailing list