LLVM 17.0.0git
IPO.h
Go to the documentation of this file.
1//===- llvm/Transforms/IPO.h - Interprocedural Transformations --*- 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//
9// This header file defines prototypes for accessor functions that expose passes
10// in the IPO transformations library.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_TRANSFORMS_IPO_H
15#define LLVM_TRANSFORMS_IPO_H
16
18#include <functional>
19#include <vector>
20
21namespace llvm {
22
23struct InlineParams;
24class ModulePass;
25class Pass;
26class BasicBlock;
27class GlobalValue;
28class raw_ostream;
29
30//===----------------------------------------------------------------------===//
31/// createGVExtractionPass - If deleteFn is true, this pass deletes
32/// the specified global values. Otherwise, it deletes as much of the module as
33/// possible, except for the global values specified. If keepConstInit is true,
34/// the initializers of global constants are not deleted even if they are
35/// unused.
36///
37ModulePass *createGVExtractionPass(std::vector<GlobalValue*>& GVs, bool
38 deleteFn = false, bool keepConstInit = false);
39
40//===----------------------------------------------------------------------===//
41/// createDeadArgEliminationPass - This pass removes arguments from functions
42/// which are not used by the body of the function.
43///
45
46/// DeadArgHacking pass - Same as DAE, but delete arguments of external
47/// functions as well. This is definitely not safe, and should only be used by
48/// bugpoint.
50
51//===----------------------------------------------------------------------===//
52//
53/// createLoopExtractorPass - This pass extracts all natural loops from the
54/// program into a function if it can.
55///
57
58/// createSingleLoopExtractorPass - This pass extracts one natural loop from the
59/// program into a function if it can. This is used by bugpoint.
60///
62
63//===----------------------------------------------------------------------===//
64/// createBarrierNoopPass - This pass is purely a module pass barrier in a pass
65/// manager.
67
68/// What to do with the summary when running passes that operate on it.
70 None, ///< Do nothing.
71 Import, ///< Import information from summary.
72 Export, ///< Export information to summary.
73};
74
75} // End llvm namespace
76
77#endif
print lazy value Lazy Value Info Printer Pass
This file defines the SmallVector class.
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
@ BasicBlock
Various leaf nodes.
Definition: ISDOpcodes.h:71
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
ModulePass * createDeadArgEliminationPass()
createDeadArgEliminationPass - This pass removes arguments from functions which are not used by the b...
ModulePass * createGVExtractionPass(std::vector< GlobalValue * > &GVs, bool deleteFn=false, bool keepConstInit=false)
createGVExtractionPass - If deleteFn is true, this pass deletes the specified global values.
PassSummaryAction
What to do with the summary when running passes that operate on it.
Definition: IPO.h:69
@ Export
Export information to summary.
@ Import
Import information from summary.
Pass * createLoopExtractorPass()
createLoopExtractorPass - This pass extracts all natural loops from the program into a function if it...
Pass * createSingleLoopExtractorPass()
createSingleLoopExtractorPass - This pass extracts one natural loop from the program into a function ...
ModulePass * createBarrierNoopPass()
createBarrierNoopPass - This pass is purely a module pass barrier in a pass manager.
ModulePass * createDeadArgHackingPass()
DeadArgHacking pass - Same as DAE, but delete arguments of external functions as well.
constexpr std::nullopt_t None
Definition: None.h:28