LLVM 24.0.0git
DXILWriterPass.h
Go to the documentation of this file.
1//===-- DXILWriterPass.h - Bitcode writing pass --------------*- C++ -*-===//
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/// \file
9///
10/// This file provides a bitcode writing pass.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_BITCODE_DXILWriterPass_H
15#define LLVM_BITCODE_DXILWriterPass_H
16
17#include "DirectX.h"
19#include "llvm/IR/Analysis.h"
20#include "llvm/IR/PassManager.h"
22
23namespace llvm {
24class Module;
25class raw_ostream;
26
27/// Create and return a pass that writes the module to the specified
28/// ostream.
29class DXILWriterPass : public RequiredPassInfoMixin<DXILWriterPass> {
30 raw_ostream &OS;
31
32public:
33 explicit DXILWriterPass(raw_ostream &OS = dbgs()) : OS(OS) {}
35};
36
37ModulePass *createDXILWriterLegacyPass(raw_ostream &Str);
38
39/// Create and return a pass that writes the module to a global variable in the
40/// module for later emission in the MCStreamer.
41class DXILEmbedderPass : public RequiredPassInfoMixin<DXILEmbedderPass> {
42public:
44};
45
47
48namespace dxil {
50} // namespace dxil
51
52} // namespace llvm
53
54#endif
This header defines various interfaces for pass management in LLVM.
ModuleAnalysisManager MAM
Create and return a pass that writes the module to a global variable in the module for later emission...
PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM)
DXILWriterPass(raw_ostream &OS=dbgs())
PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM)
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
Definition Pass.h:253
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:68
A set of analyses that are preserved following a run of a transformation pass.
Definition Analysis.h:112
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
Pass manager infrastructure for declaring and invalidating analyses.
cl::opt< bool > SourceInDebugModule
This is an optimization pass for GlobalISel generic memory operations.
ModulePass * createDXILWriterLegacyPass(raw_ostream &Str)
ModulePass * createDXILEmbedderLegacyPass()
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Definition Debug.cpp:209
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
Definition MIRParser.h:39
A CRTP mix-in for passes that should not be skipped.