[LLVMbugs] [Bug 5663] New: Lazy bitcode loading interacts badly with global opts
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Dec 1 16:37:35 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=5663
Summary: Lazy bitcode loading interacts badly with global opts
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Core LLVM classes
AssignedTo: unassignedbugs at nondot.org
ReportedBy: jyasskin at google.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=3904)
--> (http://llvm.org/bugs/attachment.cgi?id=3904)
C++ program demonstrating bad behavior
$ g++ `llvm-config --cxxflags --ldflags --libs` modprovider_crash.cpp -o
modprovider_crash -Wall -g
$ llvm-as modprovider_crash.ll
$ ./modprovider_crash modprovider_crash.bc
LLVM ERROR: Error reading bitcode file: Invalid LOAD record
$
At ToT, globaldce deletes functions with ghost linkage, which forgets the fact
that the BitcodeReader can materialize them from the backing file.
With the attached patch, we get the above problem instead, where globaldce
doesn't realize that @globl has a user hidden away in the bitcode file.
Globaldce then deletes @globl which causes ModuleProvider::materializeFunction
to fail.
deadargelim is likely to have a similar problem when it thinks it can eliminate
an argument to a function but can't update callers hidden in the bitcode.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list