LLVM 19.0.0git
IRPrintingPasses.h
Go to the documentation of this file.
1//===- IRPrintingPasses.h - Passes to print out IR constructs ---*- 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 contains an interface for creating legacy passes to print out IR
11/// in various granularities.
12///
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_IR_IRPRINTINGPASSES_H
16#define LLVM_IR_IRPRINTINGPASSES_H
17
18#include <string>
19
20namespace llvm {
21class raw_ostream;
22class StringRef;
23class FunctionPass;
24class ModulePass;
25class Pass;
26
27/// Create and return a pass that writes the module to the specified
28/// \c raw_ostream.
30 const std::string &Banner = "",
31 bool ShouldPreserveUseListOrder = false);
32
33/// Create and return a pass that prints functions to the specified
34/// \c raw_ostream as they are processed.
36 const std::string &Banner = "");
37
38/// Print out a name of an LLVM value without any prefixes.
39///
40/// The name is surrounded with ""'s and escaped if it has any special or
41/// non-printable characters in it.
43
44/// Return true if a pass is for IR printing.
46
47} // namespace llvm
48
49#endif
aarch64 AArch64 CCMP Pass
std::string Name
#define P(N)
raw_pwrite_stream & OS
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:311
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
Definition: Pass.h:251
Pass interface - Implemented by all 'passes'.
Definition: Pass.h:94
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
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
bool isIRPrintingPass(Pass *P)
Return true if a pass is for IR printing.
ModulePass * createPrintModulePass(raw_ostream &OS, const std::string &Banner="", bool ShouldPreserveUseListOrder=false)
Create and return a pass that writes the module to the specified raw_ostream.
FunctionPass * createPrintFunctionPass(raw_ostream &OS, const std::string &Banner="")
Create and return a pass that prints functions to the specified raw_ostream as they are processed.
void printLLVMNameWithoutPrefix(raw_ostream &OS, StringRef Name)
Print out a name of an LLVM value without any prefixes.
Definition: AsmWriter.cpp:377