LLVM 20.0.0git
DXILResourceAnalysis.cpp
Go to the documentation of this file.
1//===- DXILResourceAnalysis.cpp - DXIL Resource analysis-------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8///
9/// \file This file contains Analysis for information about DXIL resources.
10///
11//===----------------------------------------------------------------------===//
12
14#include "DirectX.h"
15#include "llvm/IR/PassManager.h"
16
17using namespace llvm;
18
19#define DEBUG_TYPE "dxil-resource-analysis"
20
24 R.collect(M);
25 return R;
26}
27
28AnalysisKey DXILResourceMDAnalysis::Key;
29
33 Res.print(OS);
35}
36
39 "DXIL resource Information", true, true)
41 "DXIL resource Information", true, true)
42
43bool DXILResourceMDWrapper::runOnModule(Module &M) {
44 Resources.collect(M);
45 return false;
46}
47
49
51 Resources.print(OS);
52}
basic Basic Alias true
#define DEBUG_TYPE
Natural Loop Information
Definition: LoopInfo.cpp:1209
This header defines various interfaces for pass management in LLVM.
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
Definition: PassSupport.h:57
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
Definition: PassSupport.h:52
raw_pwrite_stream & OS
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:253
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Definition: PassManager.h:405
Analysis pass that exposes the DXILResource for a module.
dxil::Resources run(Module &M, ModuleAnalysisManager &AM)
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
The legacy pass manager's analysis pass to compute DXIL resource information.
void print(raw_ostream &O, const Module *M=nullptr) const override
print - Print out the internal state of the pass.
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
Definition: Pass.h:251
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:111
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
Definition: Analysis.h:117
void print(raw_ostream &O) const
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
A special type used by analysis passes to provide an address that identifies that particular analysis...
Definition: Analysis.h:28