|
LLVM
4.0.0
|
#include "llvm/Transforms/IPO/FunctionImport.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/ADT/StringSet.h"#include "llvm/ADT/Triple.h"#include "llvm/IR/AutoUpgrade.h"#include "llvm/IR/DiagnosticPrinter.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/Module.h"#include "llvm/IR/Verifier.h"#include "llvm/IRReader/IRReader.h"#include "llvm/Linker/Linker.h"#include "llvm/Object/IRObjectFile.h"#include "llvm/Object/ModuleSummaryIndexObjectFile.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Debug.h"#include "llvm/Support/SourceMgr.h"#include "llvm/Transforms/IPO/Internalize.h"#include "llvm/Transforms/Utils/FunctionImportUtils.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "function-import" |
Functions | |
| STATISTIC (NumImportedFunctions,"Number of functions imported") | |
| STATISTIC (NumImportedModules,"Number of modules imported from") | |
| STATISTIC (NumDeadSymbols,"Number of dead stripped symbols in index") | |
| STATISTIC (NumLiveSymbols,"Number of live symbols in index") | |
| static std::unique_ptr< Module > | loadFile (const std::string &FileName, LLVMContext &Context) |
| static bool | doImportingForModule (Module &M) |
| INITIALIZE_PASS (FunctionImportLegacyPass,"function-import","Summary Based Function Import", false, false) namespace llvm | |
Variables | |
| static cl::opt< unsigned > | ImportInstrLimit ("import-instr-limit", cl::init(100), cl::Hidden, cl::value_desc("N"), cl::desc("Only import functions with less than N instructions")) |
| Limit on instruction count of imported functions. More... | |
| static cl::opt< float > | ImportInstrFactor ("import-instr-evolution-factor", cl::init(0.7), cl::Hidden, cl::value_desc("x"), cl::desc("As we import functions, multiply the ""`import-instr-limit` threshold by this factor ""before processing newly imported functions")) |
| static cl::opt< float > | ImportHotInstrFactor ("import-hot-evolution-factor", cl::init(1.0), cl::Hidden, cl::value_desc("x"), cl::desc("As we import functions called from hot callsite, multiply the ""`import-instr-limit` threshold by this factor ""before processing newly imported functions")) |
| static cl::opt< float > | ImportHotMultiplier ("import-hot-multiplier", cl::init(3.0), cl::Hidden, cl::value_desc("x"), cl::desc("Multiply the `import-instr-limit` threshold for hot callsites")) |
| static cl::opt< float > | ImportColdMultiplier ("import-cold-multiplier", cl::init(0), cl::Hidden, cl::value_desc("N"), cl::desc("Multiply the `import-instr-limit` threshold for cold callsites")) |
| static cl::opt< bool > | PrintImports ("print-imports", cl::init(false), cl::Hidden, cl::desc("Print imported functions")) |
| static cl::opt< bool > | ComputeDead ("compute-dead", cl::init(true), cl::Hidden, cl::desc("Compute dead symbols")) |
| static cl::opt< bool > | DontForceImportReferencedDiscardableSymbols ("disable-force-link-odr", cl::init(false), cl::Hidden) |
| static cl::opt< bool > | EnableImportMetadata ("enable-import-metadata", cl::init(true), cl::Hidden, cl::desc("Enable import metadata like 'thinlto_src_module'")) |
| static cl::opt< std::string > | SummaryFile ("summary-file", cl::desc("The summary file to use for function importing.")) |
| Summary file to use for function importing when using -function-import from the command line. More... | |
| #define DEBUG_TYPE "function-import" |
Definition at line 35 of file FunctionImport.cpp.
Definition at line 759 of file FunctionImport.cpp.
References llvm::ComputeCrossModuleImportForModule(), DontForceImportReferencedDiscardableSymbols, llvm::errs(), llvm::GlobalValue::ExternalLinkage, llvm::Module::getContext(), llvm::Module::getModuleIdentifier(), llvm::getModuleSummaryIndexForFile(), I, llvm::FunctionImporter::importFunctions(), llvm::GlobalValue::isLocalLinkage(), loadFile(), llvm::logAllUnhandledErrors(), llvm::renameModuleForThinLTO(), llvm::report_fatal_error(), and llvm::Expected< T >::takeError().
Referenced by llvm::FunctionImportPass::run().
| INITIALIZE_PASS | ( | FunctionImportLegacyPass | , |
| "function-import" | , | ||
| "Summary Based Function Import" | , | ||
| false | , | ||
| false | |||
| ) |
Definition at line 842 of file FunctionImport.cpp.
References llvm::createFunctionImportPass().
|
static |
Definition at line 95 of file FunctionImport.cpp.
References llvm::dbgs(), DEBUG, llvm::errs(), llvm::getLazyIRFileModule(), llvm::SMDiagnostic::print(), and llvm::report_fatal_error().
Referenced by doImportingForModule().
| STATISTIC | ( | NumImportedFunctions | , |
| "Number of functions imported" | |||
| ) |
| STATISTIC | ( | NumImportedModules | , |
| "Number of modules imported from" | |||
| ) |
| STATISTIC | ( | NumDeadSymbols | , |
| "Number of dead stripped symbols in index" | |||
| ) |
| STATISTIC | ( | NumLiveSymbols | , |
| "Number of live symbols in index" | |||
| ) |
|
static |
Referenced by llvm::computeDeadSymbols().
|
static |
Referenced by doImportingForModule().
|
static |
Referenced by llvm::FunctionImporter::importFunctions().
|
static |
|
static |
|
static |
|
static |
|
static |
Limit on instruction count of imported functions.
|
static |
Referenced by llvm::FunctionImporter::importFunctions().
1.8.6