Open Quuxplusone opened 5 years ago
Bugzilla Link | PR43048 |
Status | NEW |
Importance | P normal |
Reported by | Karthikeyan Manivannan (karthikeyan.m@gmail.com) |
Reported on | 2019-08-19 11:13:49 -0700 |
Last modified on | 2019-08-19 15:27:28 -0700 |
Version | trunk |
Hardware | Macintosh MacOS X |
CC | llvm-bugs@lists.llvm.org |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
This might be the problem:
llvm-as, via llvm::parseAssemblyWithIndex, builds a ModuleSummaryIndex with HaveGVs always set to true.
The input .ll file I was trying to run 'llvm-as -d' on, has no IR. GlobalValueSummaryInfo.U.GV seem to be set only when GVs in the IR are parsed.
In the absence of IR, and having HaveGVs always set to true, we end up in a situation where a null GlobalValueSummaryInfo.U.GV gets dereferenced.
For this test case, HaveGVs should have been false.
Should there be a way for llvm-as to be able to construct a ModuleSummaryIndex where HaveGVs is set conditionally via an option?