[pkg-d-commits] [ldc] 73/74: Fix LTO for LLVM 5.0 (#2158)
Matthias Klumpp
mak at moszumanska.debian.org
Thu Jul 13 20:54:20 UTC 2017
This is an automated email from the git hooks/post-receive script.
mak pushed a commit to annotated tag v1.3.0-beta2
in repository ldc.
commit 40de53d0956cf7eb7d5b719884c78dc4f4b375f6
Author: Nicholas Wilson <thewilsonator at users.noreply.github.com>
Date: Tue Jun 6 14:34:35 2017 +0800
Fix LTO for LLVM 5.0 (#2158)
Remove micro-optimization that breaks LTO on LLVM 5.0.
---
driver/toobj.cpp | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/driver/toobj.cpp b/driver/toobj.cpp
index 8b96573..55b1bbc 100644
--- a/driver/toobj.cpp
+++ b/driver/toobj.cpp
@@ -498,15 +498,11 @@ void writeModule(llvm::Module *m, const char *filename) {
auto &moduleSummaryIndex = indexBuilder.getIndex();
#else
llvm::ProfileSummaryInfo PSI(*m);
- // Set PSIptr to nullptr when there is no PGO information available, such
- // that LLVM will not try to find PGO information for each function inside
- // `buildModuleSummaryIndex`. (micro-optimization)
- auto PSIptr = m->getProfileSummary() ? &PSI : nullptr;
// When the function freq info callback is set to nullptr, LLVM will
// calculate it automatically for us.
auto moduleSummaryIndex = buildModuleSummaryIndex(
- *m, /* function freq callback */ nullptr, PSIptr);
+ *m, /* function freq callback */ nullptr, &PSI);
#endif
llvm::WriteBitcodeToFile(m, bos, true, &moduleSummaryIndex,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git
More information about the pkg-d-commits
mailing list