[LLVMbugs] [Bug 11063] New: Inliner incorrectly removes non-dead code w/ lazy bitcode
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Oct 4 18:40:51 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=11063
Summary: Inliner incorrectly removes non-dead code w/ lazy
bitcode
Product: new-bugs
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: boulos at cs.stanford.edu
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=7402)
--> (http://llvm.org/bugs/attachment.cgi?id=7402)
bitcode loading app
This is a simpler test case from the one I posted in July
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-July/041187.html).
The setup is that I've got some simple bitcode with a template in it, which
causes a function to be marked linkonce_odr. If I load the bitcode via
getLazyBitcodeModule() though and then optimize the module with the Inliner, it
incorrectly treats the templated code as dead because it sees no callsites (and
it's linkonce_odr).
The original input (bitcode_input.cc) was:
template<typename T>
class SomeContainer {
public:
T* getPtr() { return data; }
T* data;
};
extern "C"
float* RunStuff(void) {
SomeContainer<float> emptyContainer;
return emptyContainer.getPtr();
}
To reproduce:
clang++ -emit-llvm -c bitcode_input.cc -o test.bc
clang++ `llvm-config --cxxflags --ldflags --libs` load_bitcode.cc
./a.out
--
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