Skip to content

[DirectX] Remove new-pm versions of DXILResource passes. NFC #100698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions llvm/lib/Target/DirectX/DXILResourceAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
20 changes: 0 additions & 20 deletions llvm/lib/Target/DirectX/DXILResourceAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions llvm/lib/Target/DirectX/DirectXPassRegistry.def
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@
#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
#define MODULE_PASS(NAME, CREATE_PASS)
#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
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.