[PATCH] D115850: [LTO][codegen] Add TargetLibraryInfoWrapperPass initially
Freddy, Ye via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 15 22:48:54 PST 2021
FreddyYe created this revision.
Herald added subscribers: ormris, steven_wu, hiraditya, inglorion.
FreddyYe requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Many codegen pass require this pass with useful triple info.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D115850
Files:
llvm/lib/LTO/LTOBackend.cpp
Index: llvm/lib/LTO/LTOBackend.cpp
===================================================================
--- llvm/lib/LTO/LTOBackend.cpp
+++ llvm/lib/LTO/LTOBackend.cpp
@@ -413,6 +413,8 @@
report_fatal_error(std::move(Err));
std::unique_ptr<CachedFileStream> &Stream = *StreamOrErr;
legacy::PassManager CodeGenPasses;
+ TargetLibraryInfoImpl TLII(Triple(Mod.getTargetTriple()));
+ CodeGenPasses.add(new TargetLibraryInfoWrapperPass(TLII));
CodeGenPasses.add(
createImmutableModuleSummaryIndexWrapperPass(&CombinedIndex));
if (Conf.PreCodeGenPassesHook)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115850.394749.patch
Type: text/x-patch
Size: 577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211216/11af1109/attachment.bin>
More information about the llvm-commits
mailing list