mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[ThinLTO] FunctionImport pass can take a const index pointer (NFC)
llvm-svn: 255140
This commit is contained in:
parent
de6f59d487
commit
83a7df21b2
@ -88,7 +88,7 @@ ModulePass *createGVExtractionPass(std::vector<GlobalValue*>& GVs, bool
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
/// 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
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
Pass *Inliner;
|
||||
|
||||
/// The function summary index to use for function importing.
|
||||
FunctionInfoIndex *FunctionIndex;
|
||||
const FunctionInfoIndex *FunctionIndex;
|
||||
|
||||
bool DisableTailCalls;
|
||||
bool DisableUnitAtATime;
|
||||
|
@ -344,7 +344,7 @@ getFunctionIndexForFile(StringRef Path, std::string &Error,
|
||||
class FunctionImportPass : public ModulePass {
|
||||
/// Optional function summary index to use for importing, otherwise
|
||||
/// the summary-file option must be specified.
|
||||
FunctionInfoIndex *Index;
|
||||
const FunctionInfoIndex *Index;
|
||||
|
||||
public:
|
||||
/// Pass identification, replacement for typeid
|
||||
@ -355,7 +355,7 @@ public:
|
||||
return "Function Importing";
|
||||
}
|
||||
|
||||
explicit FunctionImportPass(FunctionInfoIndex *Index = nullptr)
|
||||
explicit FunctionImportPass(const FunctionInfoIndex *Index = nullptr)
|
||||
: ModulePass(ID), Index(Index) {}
|
||||
|
||||
bool runOnModule(Module &M) override {
|
||||
@ -394,7 +394,7 @@ INITIALIZE_PASS_END(FunctionImportPass, "function-import",
|
||||
"Summary Based Function Import", false, false)
|
||||
|
||||
namespace llvm {
|
||||
Pass *createFunctionImportPass(FunctionInfoIndex *Index = nullptr) {
|
||||
Pass *createFunctionImportPass(const FunctionInfoIndex *Index = nullptr) {
|
||||
return new FunctionImportPass(Index);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user