aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTOBackend.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2021-01-14 09:53:41 +0000
committerFlorian Hahn <flo@fhahn.com>2021-01-14 09:53:41 +0000
commit4bb11b3eafbde75ab026ec180cae62799ba0fb3c (patch)
treec593a69ee7f01535623dc156932b1990419652a0 /llvm/lib/LTO/LTOBackend.cpp
parent2b1e25befefc20f012aa49011f46e11e8530ee21 (diff)
downloadllvm-4bb11b3eafbde75ab026ec180cae62799ba0fb3c.zip
llvm-4bb11b3eafbde75ab026ec180cae62799ba0fb3c.tar.gz
llvm-4bb11b3eafbde75ab026ec180cae62799ba0fb3c.tar.bz2
[LTO] Expose opt() in LTOBackend (NFC).
Exposing opt() which runs middle-end LTO optimzation allows re-using it in LTOCodeGenerator. Reviewed By: steven_wu Differential Revision: https://reviews.llvm.org/D94486
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 112a0c0..effbdf6 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -358,10 +358,10 @@ static void runOldPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM,
passes.run(Mod);
}
-static bool opt(const Config &Conf, TargetMachine *TM, unsigned Task,
- Module &Mod, bool IsThinLTO, ModuleSummaryIndex *ExportSummary,
- const ModuleSummaryIndex *ImportSummary,
- const std::vector<uint8_t> &CmdArgs) {
+bool lto::opt(const Config &Conf, TargetMachine *TM, unsigned Task, Module &Mod,
+ bool IsThinLTO, ModuleSummaryIndex *ExportSummary,
+ const ModuleSummaryIndex *ImportSummary,
+ const std::vector<uint8_t> &CmdArgs) {
if (EmbedBitcode == LTOBitcodeEmbedding::EmbedPostMergePreOptimized) {
// FIXME: the motivation for capturing post-merge bitcode and command line
// is replicating the compilation environment from bitcode, without needing