LLVM  17.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 
20 namespace llvm {
21 class raw_ostream;
22 class StringRef;
23 class FunctionPass;
24 class ModulePass;
25 class Pass;
26 
27 /// Create and return a pass that writes the module to the specified
28 /// \c raw_ostream.
29 ModulePass *createPrintModulePass(raw_ostream &OS,
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.
35 FunctionPass *createPrintFunctionPass(raw_ostream &OS,
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.
42 void printLLVMNameWithoutPrefix(raw_ostream &OS, StringRef Name);
43 
44 /// Return true if a pass is for IR printing.
45 bool isIRPrintingPass(Pass *P);
46 
47 } // namespace llvm
48 
49 #endif
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Pass
print lazy value Lazy Value Info Printer Pass
Definition: LazyValueInfo.cpp:2066
P
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Definition: README-SSE.txt:411
llvm::printLLVMNameWithoutPrefix
void printLLVMNameWithoutPrefix(raw_ostream &OS, StringRef Name)
Print out a name of an LLVM value without any prefixes.
Definition: AsmWriter.cpp:354
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:50
llvm::isIRPrintingPass
bool isIRPrintingPass(Pass *P)
Return true if a pass is for IR printing.
Definition: IRPrintingPasses.cpp:117
llvm::createPrintFunctionPass
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.
Definition: IRPrintingPasses.cpp:112
llvm::createPrintModulePass
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.