git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255140
91177308-0d34-0410-b5e6-
96231b3b80d8
//===----------------------------------------------------------------------===//
/// 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
Pass *Inliner;
/// The function summary index to use for function importing.
Pass *Inliner;
/// The function summary index to use for function importing.
- FunctionInfoIndex *FunctionIndex;
+ const FunctionInfoIndex *FunctionIndex;
bool DisableTailCalls;
bool DisableUnitAtATime;
bool DisableTailCalls;
bool DisableUnitAtATime;
class FunctionImportPass : public ModulePass {
/// Optional function summary index to use for importing, otherwise
/// the summary-file option must be specified.
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
public:
/// Pass identification, replacement for typeid
return "Function Importing";
}
return "Function Importing";
}
- explicit FunctionImportPass(FunctionInfoIndex *Index = nullptr)
+ explicit FunctionImportPass(const FunctionInfoIndex *Index = nullptr)
: ModulePass(ID), Index(Index) {}
bool runOnModule(Module &M) override {
: ModulePass(ID), Index(Index) {}
bool runOnModule(Module &M) override {
"Summary Based Function Import", false, false)
namespace llvm {
"Summary Based Function Import", false, false)
namespace llvm {
-Pass *createFunctionImportPass(FunctionInfoIndex *Index = nullptr) {
+Pass *createFunctionImportPass(const FunctionInfoIndex *Index = nullptr) {
return new FunctionImportPass(Index);
}
}
return new FunctionImportPass(Index);
}
}