[PATCH] D94486: [LTO] Expose opt() in LTOBackend (NFC).
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 14 02:07:23 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4bb11b3eafbd: [LTO] Expose opt() in LTOBackend (NFC). (authored by fhahn).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94486/new/
https://reviews.llvm.org/D94486
Files:
llvm/include/llvm/LTO/LTOBackend.h
llvm/lib/LTO/LTOBackend.cpp
Index: llvm/lib/LTO/LTOBackend.cpp
===================================================================
--- llvm/lib/LTO/LTOBackend.cpp
+++ llvm/lib/LTO/LTOBackend.cpp
@@ -358,10 +358,10 @@
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
Index: llvm/include/llvm/LTO/LTOBackend.h
===================================================================
--- llvm/include/llvm/LTO/LTOBackend.h
+++ llvm/include/llvm/LTO/LTOBackend.h
@@ -33,6 +33,12 @@
namespace lto {
+/// Runs middle-end LTO optimizations on \p Mod.
+bool opt(const Config &Conf, TargetMachine *TM, unsigned Task, Module &Mod,
+ bool IsThinLTO, ModuleSummaryIndex *ExportSummary,
+ const ModuleSummaryIndex *ImportSummary,
+ const std::vector<uint8_t> &CmdArgs);
+
/// Runs a regular LTO backend. The regular LTO backend can also act as the
/// regular LTO phase of ThinLTO, which may need to access the combined index.
Error backend(const Config &C, AddStreamFn AddStream,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94486.316594.patch
Type: text/x-patch
Size: 1702 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210114/786ec09f/attachment-0001.bin>
More information about the llvm-commits
mailing list