[llvm] [DXIL] Consume Metadata Analysis information in passes (PR #108034)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 18 11:49:58 PDT 2024
================
@@ -7,26 +7,57 @@
//===----------------------------------------------------------------------===//
#include "DXILTranslateMetadata.h"
-#include "DXILMetadata.h"
#include "DXILResource.h"
#include "DXILResourceAnalysis.h"
#include "DXILShaderFlags.h"
#include "DirectX.h"
-#include "llvm/ADT/StringSet.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/DXILMetadataAnalysis.h"
#include "llvm/Analysis/DXILResource.h"
#include "llvm/IR/Constants.h"
+#include "llvm/IR/DiagnosticInfo.h"
+#include "llvm/IR/DiagnosticPrinter.h"
+#include "llvm/IR/Function.h"
+#include "llvm/IR/IRBuilder.h"
+#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/VersionTuple.h"
#include "llvm/TargetParser/Triple.h"
+#include <cstdint>
using namespace llvm;
using namespace llvm::dxil;
-static void emitResourceMetadata(Module &M, const DXILResourceMap &DRM,
- const dxil::Resources &MDResources) {
+/// A simple Wrapper DiagnosticInfo that generates Module-level diagnostic
+class DiagnosticInfoModuleFormat : public DiagnosticInfo {
----------------
bogner wrote:
This needs to be wrapped in an anonymous namespace to avoid leaking the name / risking name collisions. Also I don't really understand the name - what does the word format here mean?
https://github.com/llvm/llvm-project/pull/108034
More information about the llvm-commits
mailing list