Go to the documentation of this file.
14 #ifndef LLVM_TRANSFORMS_UTILS_FUNCTIONIMPORTUTILS_H
15 #define LLVM_TRANSFORMS_UTILS_FUNCTIONIMPORTUTILS_H
40 bool HasExportedFunctions =
false;
53 bool ClearDSOLocalOnDeclarations;
71 bool isNonRenamableLocal(
const GlobalValue &GV)
const;
76 bool isPerformingImport()
const {
return GlobalsToImport !=
nullptr; }
77 bool isModuleExporting()
const {
return HasExportedFunctions; }
85 std::string getPromotedName(
const GlobalValue *SGV);
91 void processGlobalsForThinLTO();
103 bool ClearDSOLocalOnDeclarations)
104 :
M(
M), ImportIndex(
Index), GlobalsToImport(GlobalsToImport),
105 ClearDSOLocalOnDeclarations(ClearDSOLocalOnDeclarations) {
110 if (!GlobalsToImport)
119 Used = {Vec.begin(), Vec.end()};
129 Module &M,
const ModuleSummaryIndex &Index,
130 bool ClearDSOLocalOnDeclarations,
131 SetVector<GlobalValue *> *GlobalsToImport =
nullptr);
This is an optimization pass for GlobalISel generic memory operations.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
bool renameModuleForThinLTO(Module &M, const ModuleSummaryIndex &Index, bool ClearDSOLocalOnDeclarations, SetVector< GlobalValue * > *GlobalsToImport=nullptr)
Perform in-place global value handling on the given Module for exported local functions renamed and p...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
LinkageTypes
An enumeration for the kinds of linkage for global values.
GlobalVariable * collectUsedGlobalVariables(const Module &M, SmallVectorImpl< GlobalValue * > &Vec, bool CompilerUsed)
Given "llvm.used" or "llvm.compiler.used" as a global name, collect the initializer elements of that ...
FunctionImportGlobalProcessing(Module &M, const ModuleSummaryIndex &Index, SetVector< GlobalValue * > *GlobalsToImport, bool ClearDSOLocalOnDeclarations)
bool hasExportedFunctions(const Module &M) const
Check if the given Module has any functions available for exporting in the index.
Struct that holds a reference to a particular GUID in a global value summary.
A Module instance is used to store all the information related to an LLVM module.
Machine Check Debug Module
Class to handle necessary GlobalValue changes required by ThinLTO function importing,...
Class to hold module path string table and global value map, and encapsulate methods for operating on...
A vector that has set insertion semantics.