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
17#include "llvm/Support/Compiler.h"
18
19namespace llvm {
20
21class ModulePass;
22class Pass;
23class raw_ostream;
24
25//===----------------------------------------------------------------------===//
26/// createDeadArgEliminationPass - This pass removes arguments from functions
27/// which are not used by the body of the function.
28///
29LLVM_ABI ModulePass *createDeadArgEliminationPass();
30
31/// DeadArgHacking pass - Same as DAE, but delete arguments of external
32/// functions as well. This is definitely not safe, and should only be used by
33/// bugpoint.
34LLVM_ABI ModulePass *createDeadArgHackingPass();
35
36//===----------------------------------------------------------------------===//
37//
38/// createLoopExtractorPass - This pass extracts all natural loops from the
39/// program into a function if it can.
40///
41LLVM_ABI Pass *createLoopExtractorPass();
42
43/// createSingleLoopExtractorPass - This pass extracts one natural loop from the
44/// program into a function if it can. This is used by bugpoint.
45///
46LLVM_ABI Pass *createSingleLoopExtractorPass();
47
48//===----------------------------------------------------------------------===//
49/// createBarrierNoopPass - This pass is purely a module pass barrier in a pass
50/// manager.
51LLVM_ABI ModulePass *createBarrierNoopPass();
52
53/// What to do with the summary when running passes that operate on it.
54enum class PassSummaryAction {
55 None, ///< Do nothing.
56 Import, ///< Import information from summary.
57 Export, ///< Export information to summary.
58};
59
60} // End llvm namespace
61
62#endif
63