[PATCH] D119771: Insert MIRProfile into LLD
Roger Kim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 14 13:03:42 PST 2022
Roger created this revision.
Herald added subscribers: ormris, steven_wu, hiraditya.
Roger requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119771
Files:
llvm/lib/LTO/LTOBackend.cpp
Index: llvm/lib/LTO/LTOBackend.cpp
===================================================================
--- llvm/lib/LTO/LTOBackend.cpp
+++ llvm/lib/LTO/LTOBackend.cpp
@@ -46,6 +46,9 @@
#include "llvm/Transforms/Scalar/LoopPassManager.h"
#include "llvm/Transforms/Utils/FunctionImportUtils.h"
#include "llvm/Transforms/Utils/SplitModule.h"
+#ifdef __FACEBOOK__
+#include "pika/CodeGen/MIRProfileSummary.h"
+#endif // __FACEBOOK__
using namespace llvm;
using namespace lto;
@@ -528,6 +531,9 @@
std::unique_ptr<TargetMachine> TM = createTargetMachine(C, *TOrErr, *Mod);
+#ifdef __FACEBOOK__
+ MIRProfileSummary::parseProfile();
+#endif
if (!C.CodeGenOnly) {
if (!opt(C, TM.get(), 0, *Mod, /*IsThinLTO=*/false,
/*ExportSummary=*/&CombinedIndex, /*ImportSummary=*/nullptr,
@@ -541,6 +547,10 @@
splitCodeGen(C, TM.get(), AddStream, ParallelCodeGenParallelismLevel,
std::move(Mod), CombinedIndex);
}
+#ifdef __FACEBOOK__
+ std::vector<std::string> temp;
+ MIRProfileSummary::publishFinalOrderedSymbols(temp);
+#endif
return Error::success();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119771.408584.patch
Type: text/x-patch
Size: 1108 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220214/5fdf57c3/attachment.bin>
More information about the llvm-commits
mailing list