LLVM  6.0.0svn
Classes | Macros | Typedefs | Functions
LTO.cpp File Reference
#include "llvm/LTO/LTO.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/CodeGen/Analysis.h"
#include "llvm/IR/AutoUpgrade.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Metadata.h"
#include "llvm/LTO/LTOBackend.h"
#include "llvm/Linker/IRMover.h"
#include "llvm/Object/IRObjectFile.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SHA1.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/ThreadPool.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/VCSRevision.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#include "llvm/Transforms/Utils/SplitModule.h"
#include <set>
Include dependency graph for LTO.cpp:

Go to the source code of this file.

Classes

class  llvm::lto::ThinBackendProc
 This class defines the interface to the ThinLTO backend. More...
 

Macros

#define DEBUG_TYPE   "lto"
 

Typedefs

typedef DenseMap< GlobalValue::GUID, TinyPtrVector< const std::pair< const std::string, TypeIdSummary > * > > TypeIdSummariesByGuidTy
 

Functions

static void computeCacheKey (SmallString< 40 > &Key, const Config &Conf, const ModuleSummaryIndex &Index, StringRef ModuleID, const FunctionImporter::ImportMapTy &ImportList, const FunctionImporter::ExportSetTy &ExportList, const std::map< GlobalValue::GUID, GlobalValue::LinkageTypes > &ResolvedODR, const GVSummaryMapTy &DefinedGlobals, const TypeIdSummariesByGuidTy &TypeIdSummariesByGuid, const std::set< GlobalValue::GUID > &CfiFunctionDefs, const std::set< GlobalValue::GUID > &CfiFunctionDecls)
 
static void thinLTOResolveWeakForLinkerGUID (GlobalValueSummaryList &GVSummaryList, GlobalValue::GUID GUID, DenseSet< GlobalValueSummary *> &GlobalInvolvedWithAlias, function_ref< bool(GlobalValue::GUID, const GlobalValueSummary *)> isPrevailing, function_ref< void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)> recordNewLinkage)
 
static void thinLTOInternalizeAndPromoteGUID (GlobalValueSummaryList &GVSummaryList, GlobalValue::GUID GUID, function_ref< bool(StringRef, GlobalValue::GUID)> isExported)
 
static void writeToResolutionFile (raw_ostream &OS, InputFile *Input, ArrayRef< SymbolResolution > Res)
 
static void handleNonPrevailingComdat (GlobalValue &GV, std::set< const Comdat *> &NonPrevailingComdats)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "lto"

Definition at line 51 of file LTO.cpp.

Typedef Documentation

◆ TypeIdSummariesByGuidTy

Definition at line 57 of file LTO.cpp.

Function Documentation

◆ computeCacheKey()

static void computeCacheKey ( SmallString< 40 > &  Key,
const Config Conf,
const ModuleSummaryIndex Index,
StringRef  ModuleID,
const FunctionImporter::ImportMapTy ImportList,
const FunctionImporter::ExportSetTy ExportList,
const std::map< GlobalValue::GUID, GlobalValue::LinkageTypes > &  ResolvedODR,
const GVSummaryMapTy DefinedGlobals,
const TypeIdSummariesByGuidTy TypeIdSummariesByGuid,
const std::set< GlobalValue::GUID > &  CfiFunctionDefs,
const std::set< GlobalValue::GUID > &  CfiFunctionDecls 
)
static

◆ handleNonPrevailingComdat()

static void handleNonPrevailingComdat ( GlobalValue GV,
std::set< const Comdat *> &  NonPrevailingComdats 
)
static

Definition at line 524 of file LTO.cpp.

References llvm::ModuleSymbolTable::addModule(), llvm::Module::aliases(), assert(), llvm::GlobalValue::AvailableExternallyLinkage, C, llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::count(), llvm::PointerUnion< PT1, PT2 >::dyn_cast(), llvm::StringMapImpl::empty(), llvm::GlobalValue::ExternalLinkage, llvm::lto::SymbolResolution::FinalDefinitionInLinkageUnit, llvm::GlobalValue::getBaseObject(), llvm::GlobalValue::getComdat(), llvm::Module::getComdatSymbolTable(), llvm::GlobalValue::getGlobalIdentifier(), llvm::GlobalValue::getGUID(), llvm::BitcodeModule::getLazyModule(), llvm::BitcodeModule::getModuleIdentifier(), llvm::Value::getName(), llvm::ModuleSymbolTable::getSymbolFlags(), llvm::GlobalValue::getWeakLinkage(), llvm::Module::global_values(), llvm::Module::globals(), llvm::GlobalValue::hasAvailableExternallyLinkage(), llvm::GlobalValue::hasLocalLinkage(), llvm::inconvertibleErrorCode(), llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::insert(), llvm::GlobalValue::isDeclaration(), llvm::GlobalValue::isLinkOnceLinkage(), llvm::GlobalValue::isLinkOnceODRLinkage(), llvm::lto::SymbolResolution::LinkerRedefined, llvm::Module::materializeMetadata(), llvm::max(), llvm::Mod, llvm::lto::SymbolResolution::Prevailing, llvm::BitcodeModule::readSummary(), llvm::GlobalValue::setLinkage(), llvm::object::BasicSymbolRef::SF_FormatSpecific, llvm::object::BasicSymbolRef::SF_Global, llvm::Error::success(), llvm::ModuleSymbolTable::symbols(), llvm::Expected< T >::takeError(), llvm::UpgradeDebugInfo(), and llvm::GlobalValue::WeakAnyLinkage.

◆ thinLTOInternalizeAndPromoteGUID()

static void thinLTOInternalizeAndPromoteGUID ( GlobalValueSummaryList GVSummaryList,
GlobalValue::GUID  GUID,
function_ref< bool(StringRef, GlobalValue::GUID)>  isExported 
)
static

◆ thinLTOResolveWeakForLinkerGUID()

static void thinLTOResolveWeakForLinkerGUID ( GlobalValueSummaryList GVSummaryList,
GlobalValue::GUID  GUID,
DenseSet< GlobalValueSummary *> &  GlobalInvolvedWithAlias,
function_ref< bool(GlobalValue::GUID, const GlobalValueSummary *)>  isPrevailing,
function_ref< void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)>  recordNewLinkage 
)
static

◆ writeToResolutionFile()

static void writeToResolutionFile ( raw_ostream OS,
InputFile Input,
ArrayRef< SymbolResolution Res 
)
static