X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FTransforms%2FIPO.h;h=0c374a070ce8390247b27bb94229e9a40f52c3e6;hb=053615be026c65a88de1eb79642f2521174cd502;hp=7f51c516b9b5070c5550af1aae3e09bd3e754224;hpb=7e667c56cf7e27ff521ceb86518beab32bfb630d;p=oota-llvm.git diff --git a/include/llvm/Transforms/IPO.h b/include/llvm/Transforms/IPO.h index 7f51c516b9b..0c374a070ce 100644 --- a/include/llvm/Transforms/IPO.h +++ b/include/llvm/Transforms/IPO.h @@ -16,9 +16,11 @@ #define LLVM_TRANSFORMS_IPO_H #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/StringRef.h" namespace llvm { +class FunctionInfoIndex; class ModulePass; class Pass; class Function; @@ -34,7 +36,7 @@ ModulePass *createStripSymbolsPass(bool OnlyDebugInfo = false); //===----------------------------------------------------------------------===// // -// These functions strips symbols from functions and modules. +// These functions strips symbols from functions and modules. // Only debugging information is not stripped. // ModulePass *createStripNonDebugSymbolsPass(); @@ -58,40 +60,51 @@ ModulePass *createStripDeadDebugInfoPass(); /// ModulePass *createConstantMergePass(); - //===----------------------------------------------------------------------===// /// createGlobalOptimizerPass - This function returns a new pass that optimizes /// non-address taken internal globals. /// ModulePass *createGlobalOptimizerPass(); - //===----------------------------------------------------------------------===// /// createGlobalDCEPass - This transform is designed to eliminate unreachable /// internal globals (functions or global variables) /// ModulePass *createGlobalDCEPass(); +//===----------------------------------------------------------------------===// +/// This transform is designed to eliminate available external globals +/// (functions or global variables) +/// +ModulePass *createEliminateAvailableExternallyPass(); //===----------------------------------------------------------------------===// /// createGVExtractionPass - If deleteFn is true, this pass deletes /// the specified global values. Otherwise, it deletes as much of the module as /// possible, except for the global values specified. /// -ModulePass *createGVExtractionPass(std::vector& GVs, bool +ModulePass *createGVExtractionPass(std::vector& GVs, bool deleteFn = false); +//===----------------------------------------------------------------------===// +/// This pass performs iterative function importing from other modules. +Pass *createFunctionImportPass(const FunctionInfoIndex *Index = nullptr); + //===----------------------------------------------------------------------===// /// createFunctionInliningPass - Return a new pass object that uses a heuristic /// to inline direct function calls to small functions. /// +/// The Threshold can be passed directly, or asked to be computed from the +/// given optimization and size optimization arguments. +/// /// The -inline-threshold command line option takes precedence over the /// threshold given here. Pass *createFunctionInliningPass(); Pass *createFunctionInliningPass(int Threshold); +Pass *createFunctionInliningPass(unsigned OptLevel, unsigned SizeOptLevel); //===----------------------------------------------------------------------===// -/// createAlwaysInlinerPass - Return a new pass object that inlines only +/// createAlwaysInlinerPass - Return a new pass object that inlines only /// functions that are marked as "always_inline". Pass *createAlwaysInlinerPass(); Pass *createAlwaysInlinerPass(bool InsertLifetime); @@ -187,7 +200,7 @@ ModulePass *createMergeFunctionsPass(); /// createPartialInliningPass - This pass inlines parts of functions. /// ModulePass *createPartialInliningPass(); - + //===----------------------------------------------------------------------===// // createMetaRenamerPass - Rename everything with metasyntatic names. // @@ -198,6 +211,19 @@ ModulePass *createMetaRenamerPass(); /// manager. ModulePass *createBarrierNoopPass(); +/// \brief This pass lowers bitset metadata and the llvm.bitset.test intrinsic +/// to bitsets. +ModulePass *createLowerBitSetsPass(); + +/// \brief This pass export CFI checks for use by external modules. +ModulePass *createCrossDSOCFIPass(); + +//===----------------------------------------------------------------------===// +// SampleProfilePass - Loads sample profile data from disk and generates +// IR metadata to reflect the profile. +ModulePass *createSampleProfileLoaderPass(); +ModulePass *createSampleProfileLoaderPass(StringRef Name); + } // End llvm namespace #endif