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