llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-directx

Author: Justin Bogner (bogner)

<details>
<summary>Changes</summary>

This is a bit of a hack, but these aren't actually used at the moment
and they'll cause naming conflicts with DXIL resource passes that I'm
adding to llvm/Analysis for replacing all of this with the target
extension type based solution. I'd rather leave the existing stuff in
place until we're ready to replace it completely, and this is the
simplest way to get away with that.


---
Full diff: https://github.com/llvm/llvm-project/pull/100698.diff


3 Files Affected:

- (modified) llvm/lib/Target/DirectX/DXILResourceAnalysis.cpp (-16) 
- (modified) llvm/lib/Target/DirectX/DXILResourceAnalysis.h (-20) 
- (modified) llvm/lib/Target/DirectX/DirectXPassRegistry.def (-2) 


``````````diff
diff --git a/llvm/lib/Target/DirectX/DXILResourceAnalysis.cpp 
b/llvm/lib/Target/DirectX/DXILResourceAnalysis.cpp
index 0b2f0d827ebbc..35d750311ffd4 100644
--- a/llvm/lib/Target/DirectX/DXILResourceAnalysis.cpp
+++ b/llvm/lib/Target/DirectX/DXILResourceAnalysis.cpp
@@ -18,22 +18,6 @@ using namespace llvm;
 
 #define DEBUG_TYPE "dxil-resource-analysis"
 
-dxil::Resources DXILResourceAnalysis::run(Module &M,
-                                          ModuleAnalysisManager &AM) {
-  dxil::Resources R;
-  R.collect(M);
-  return R;
-}
-
-AnalysisKey DXILResourceAnalysis::Key;
-
-PreservedAnalyses DXILResourcePrinterPass::run(Module &M,
-                                               ModuleAnalysisManager &AM) {
-  dxil::Resources Res = AM.getResult<DXILResourceAnalysis>(M);
-  Res.print(OS);
-  return PreservedAnalyses::all();
-}
-
 char DXILResourceWrapper::ID = 0;
 INITIALIZE_PASS_BEGIN(DXILResourceWrapper, DEBUG_TYPE,
                       "DXIL resource Information", true, true)
diff --git a/llvm/lib/Target/DirectX/DXILResourceAnalysis.h 
b/llvm/lib/Target/DirectX/DXILResourceAnalysis.h
index bce41160b95ec..aa66180b560be 100644
--- a/llvm/lib/Target/DirectX/DXILResourceAnalysis.h
+++ b/llvm/lib/Target/DirectX/DXILResourceAnalysis.h
@@ -19,26 +19,6 @@
 #include <memory>
 
 namespace llvm {
-/// Analysis pass that exposes the \c DXILResource for a module.
-class DXILResourceAnalysis : public AnalysisInfoMixin<DXILResourceAnalysis> {
-  friend AnalysisInfoMixin<DXILResourceAnalysis>;
-  static AnalysisKey Key;
-
-public:
-  typedef dxil::Resources Result;
-  dxil::Resources run(Module &M, ModuleAnalysisManager &AM);
-};
-
-/// Printer pass for the \c DXILResourceAnalysis results.
-class DXILResourcePrinterPass : public PassInfoMixin<DXILResourcePrinterPass> {
-  raw_ostream &OS;
-
-public:
-  explicit DXILResourcePrinterPass(raw_ostream &OS) : OS(OS) {}
-  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
-  static bool isRequired() { return true; }
-};
-
 /// The legacy pass manager's analysis pass to compute DXIL resource
 /// information.
 class DXILResourceWrapper : public ModulePass {
diff --git a/llvm/lib/Target/DirectX/DirectXPassRegistry.def 
b/llvm/lib/Target/DirectX/DirectXPassRegistry.def
index 1b326d020d511..754f174b96052 100644
--- a/llvm/lib/Target/DirectX/DirectXPassRegistry.def
+++ b/llvm/lib/Target/DirectX/DirectXPassRegistry.def
@@ -17,7 +17,6 @@
 #define MODULE_ANALYSIS(NAME, CREATE_PASS)
 #endif
 MODULE_ANALYSIS("dx-shader-flags", dxil::ShaderFlagsAnalysis())
-MODULE_ANALYSIS("dxil-resource", DXILResourceAnalysis())
 #undef MODULE_ANALYSIS
 
 #ifndef MODULE_PASS
@@ -25,5 +24,4 @@ MODULE_ANALYSIS("dxil-resource", DXILResourceAnalysis())
 #endif
 // TODO: rename to print<foo> after NPM switch
 MODULE_PASS("print-dx-shader-flags", dxil::ShaderFlagsAnalysisPrinter(dbgs()))
-MODULE_PASS("print-dxil-resource", DXILResourcePrinterPass(dbgs()))
 #undef MODULE_PASS

``````````

</details>


https://github.com/llvm/llvm-project/pull/100698
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to