mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-07 15:52:21 +00:00
[ThinLTO] FunctionImport pass can take a const index pointer (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255140 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1e3aaa8bef
commit
fbc5640b6b
@ -88,7 +88,7 @@ ModulePass *createGVExtractionPass(std::vector<GlobalValue*>& GVs, bool
|
|||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
/// This pass performs iterative function importing from other modules.
|
/// This pass performs iterative function importing from other modules.
|
||||||
Pass *createFunctionImportPass(FunctionInfoIndex *Index = nullptr);
|
Pass *createFunctionImportPass(const FunctionInfoIndex *Index = nullptr);
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
/// createFunctionInliningPass - Return a new pass object that uses a heuristic
|
/// createFunctionInliningPass - Return a new pass object that uses a heuristic
|
||||||
|
@ -117,7 +117,7 @@ public:
|
|||||||
Pass *Inliner;
|
Pass *Inliner;
|
||||||
|
|
||||||
/// The function summary index to use for function importing.
|
/// The function summary index to use for function importing.
|
||||||
FunctionInfoIndex *FunctionIndex;
|
const FunctionInfoIndex *FunctionIndex;
|
||||||
|
|
||||||
bool DisableTailCalls;
|
bool DisableTailCalls;
|
||||||
bool DisableUnitAtATime;
|
bool DisableUnitAtATime;
|
||||||
|
@ -344,7 +344,7 @@ getFunctionIndexForFile(StringRef Path, std::string &Error,
|
|||||||
class FunctionImportPass : public ModulePass {
|
class FunctionImportPass : public ModulePass {
|
||||||
/// Optional function summary index to use for importing, otherwise
|
/// Optional function summary index to use for importing, otherwise
|
||||||
/// the summary-file option must be specified.
|
/// the summary-file option must be specified.
|
||||||
FunctionInfoIndex *Index;
|
const FunctionInfoIndex *Index;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// Pass identification, replacement for typeid
|
/// Pass identification, replacement for typeid
|
||||||
@ -355,7 +355,7 @@ public:
|
|||||||
return "Function Importing";
|
return "Function Importing";
|
||||||
}
|
}
|
||||||
|
|
||||||
explicit FunctionImportPass(FunctionInfoIndex *Index = nullptr)
|
explicit FunctionImportPass(const FunctionInfoIndex *Index = nullptr)
|
||||||
: ModulePass(ID), Index(Index) {}
|
: ModulePass(ID), Index(Index) {}
|
||||||
|
|
||||||
bool runOnModule(Module &M) override {
|
bool runOnModule(Module &M) override {
|
||||||
@ -394,7 +394,7 @@ INITIALIZE_PASS_END(FunctionImportPass, "function-import",
|
|||||||
"Summary Based Function Import", false, false)
|
"Summary Based Function Import", false, false)
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
Pass *createFunctionImportPass(FunctionInfoIndex *Index = nullptr) {
|
Pass *createFunctionImportPass(const FunctionInfoIndex *Index = nullptr) {
|
||||||
return new FunctionImportPass(Index);
|
return new FunctionImportPass(Index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user