Shuxin Yang
2e1890e18b
Revert r193251 : Use address-taken to disambiguate global variable and indirect memops.
...
llvm-svn: 193489
2013-10-27 03:08:44 +00:00
Shuxin Yang
e4fb375995
Use address-taken to disambiguate global variable and indirect memops.
...
Major steps include:
1). introduces a not-addr-taken bit-field in GlobalVariable
2). GlobalOpt pass sets "not-address-taken" if it proves a global varirable
dosen't have its address taken.
3). AA use this info for disambiguation.
llvm-svn: 193251
2013-10-23 17:28:19 +00:00
Dmitri Gribenko
d7beca87f5
Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID
...
This is done to avoid odd test failures, like the one fixed in r171243.
My previous regex was not good enough to find these.
llvm-svn: 171343
2013-01-01 13:57:25 +00:00
Duncan Sands
e8ce94fcd7
GlobalOpt forgot to handle bitcast when analyzing globals. Found by inspection.
...
llvm-svn: 159546
2012-07-02 18:55:39 +00:00
Rafael Espindola
1821c6c3b0
Some optimizations done by globalopt are safe only for internal linkage, not
...
linkonce linkage. For example, it is not valid to add unnamed_addr.
This also fixes a crash in g++.dg/opt/static5.C.
llvm-svn: 158528
2012-06-15 18:00:24 +00:00
Rafael Espindola
fc355bc070
Add unnamed_addr when we can show that address of a global is not used.
...
llvm-svn: 123834
2011-01-19 16:32:21 +00:00