LLVM  7.0.0svn
Namespaces | Macros | Functions
ThinLTOCodeGenerator.cpp File Reference
#include "llvm/LTO/legacy/ThinLTOCodeGenerator.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Analysis/ModuleSummaryAnalysis.h"
#include "llvm/Analysis/ProfileSummaryInfo.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/Bitcode/BitcodeWriterPass.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Verifier.h"
#include "llvm/IRReader/IRReader.h"
#include "llvm/LTO/LTO.h"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Object/IRObjectFile.h"
#include "llvm/Support/CachePruning.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SHA1.h"
#include "llvm/Support/SmallVectorMemoryBuffer.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/ThreadPool.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/ToolOutputFile.h"
#include "llvm/Support/VCSRevision.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/IPO/FunctionImport.h"
#include "llvm/Transforms/IPO/Internalize.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#include "llvm/Transforms/ObjCARC.h"
#include "llvm/Transforms/Utils/FunctionImportUtils.h"
#include <numeric>
#include <unistd.h>
Include dependency graph for ThinLTOCodeGenerator.cpp:

Go to the source code of this file.

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Macros

#define DEBUG_TYPE   "thinlto"
 

Functions

static void internalizeAndPromoteInIndex (const StringMap< FunctionImporter::ExportSetTy > &ExportLists, const DenseSet< GlobalValue::GUID > &GUIDPreservedSymbols, ModuleSummaryIndex &Index)
 
static void computeDeadSymbolsInIndex (ModuleSummaryIndex &Index, const DenseSet< GlobalValue::GUID > &GUIDPreservedSymbols)
 
static std::string writeGeneratedObject (int count, StringRef CacheEntryPath, StringRef SavedObjectsDirectoryPath, const MemoryBuffer &OutputBuffer)
 Write out the generated object file, either from CacheEntryPath or from OutputBuffer, preferring hard-link when possible. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "thinlto"

Definition at line 66 of file ThinLTOCodeGenerator.cpp.

Function Documentation

◆ computeDeadSymbolsInIndex()

static void computeDeadSymbolsInIndex ( ModuleSummaryIndex Index,
const DenseSet< GlobalValue::GUID > &  GUIDPreservedSymbols 
)
static

◆ internalizeAndPromoteInIndex()

static void internalizeAndPromoteInIndex ( const StringMap< FunctionImporter::ExportSetTy > &  ExportLists,
const DenseSet< GlobalValue::GUID > &  GUIDPreservedSymbols,
ModuleSummaryIndex Index 
)
static

◆ writeGeneratedObject()

static std::string writeGeneratedObject ( int  count,
StringRef  CacheEntryPath,
StringRef  SavedObjectsDirectoryPath,
const MemoryBuffer OutputBuffer 
)
static

Write out the generated object file, either from CacheEntryPath or from OutputBuffer, preferring hard-link when possible.

Returns the path to the generated file in SavedObjectsDirectoryPath.

Definition at line 832 of file ThinLTOCodeGenerator.cpp.

References llvm::sys::path::append(), llvm::SmallString< InternalLen >::c_str(), llvm::StringRef::empty(), llvm::sys::fs::exists(), and llvm::sys::fs::remove().

Referenced by llvm::ThinLTOCodeGenerator::run().