mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-17 08:36:52 +00:00
add a note
llvm-svn: 104404
This commit is contained in:
parent
d250f449cb
commit
d5c391bba6
@ -1833,6 +1833,21 @@ entry:
|
||||
We should use DSE + llvm.lifetime.end to delete dead vtable pointer updates.
|
||||
See GCC PR34949
|
||||
|
||||
Another interesting case is that something related could be used for variables
|
||||
that go const after their ctor has finished. In these cases, globalopt (which
|
||||
can statically run the constructor) could mark the global const (so it gets put
|
||||
in the readonly section). A testcase would be:
|
||||
|
||||
#include <complex>
|
||||
using namespace std;
|
||||
const complex<char> should_be_in_rodata (42,-42);
|
||||
complex<char> should_be_in_data (42,-42);
|
||||
complex<char> should_be_in_bss;
|
||||
|
||||
Where we currently evaluate the ctors but the globals don't become const because
|
||||
the optimizer doesn't know they "become const" after the ctor is done. See
|
||||
GCC PR4131 for more examples.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
In this code:
|
||||
|
Loading…
Reference in New Issue
Block a user