[llvm-bugs] [Bug 37899] New: AssemblyWriter::printModuleSummaryIndex(): Assertion `ModPath.second.first < moduleVec.size()' failed.
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 21 14:59:36 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37899
Bug ID: 37899
Summary: AssemblyWriter::printModuleSummaryIndex(): Assertion
`ModPath.second.first < moduleVec.size()' failed.
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Core LLVM classes
Assignee: unassignedbugs at nondot.org
Reporter: vlad at tsyrklevich.net
CC: llvm-bugs at lists.llvm.org, tejohnson at google.com
If you make the following change to always dump ImportSummary in the backends:
$ git diff -U1
diff --git a/lib/Transforms/IPO/PassManagerBuilder.cpp
b/lib/Transforms/IPO/PassManagerBuilder.cpp
index a2559bc70b..91eb46ed3e 100644
--- a/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ b/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -886,4 +886,6 @@ void PassManagerBuilder::addLateLTOOptimizationPasses(
+#include "llvm/IR/ModuleSummaryIndex.h"
void PassManagerBuilder::populateThinLTOPassManager(
legacy::PassManagerBase &PM) {
+ if (ImportSummary) ImportSummary->dump();
PerformThinLTO = true;
You will hit the titled exception with test/LTO/Resolution/X86/mod-asm-used.ll
>From a brief look it looks like mod-asm-used.ll only has some inline assembly
and doesn't generate a summary, when the printModuleSummaryIndex() is reached
it has the following summary:
^0 = module: (path: "", hash: (0, 0, 0, 0, 0))
^1 = module: (path: "/test/LTO/Resolution/X86/Output/mod-asm-used.ll.tmp2.bc",
hash: (0, 0, 0, 0, 0))
^1 = gv: (name: "foo", summaries: (variable: (module: ^1, flags: (linkage:
external, notEligibleToImport: 0, live: 1, dsoLocal: 1)))) ; guid =
6699318081062747564
TheIndex->modulePaths().size() returns 1 but the ModPath.second.first value in
the loop is 1 not 0. Not familiar with how aggregation of summaries is
performed; however, note that ^1 occurs twice above, that seems like it might
also have to do with this bug?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180621/78187cd1/attachment.html>
More information about the llvm-bugs
mailing list