Re: [google] fix global vars incorrectly marked as read-only in LIPO mode (issue4798045)

2011-07-21 Thread Xinliang David Li
Ok. David On Thu, Jul 21, 2011 at 1:45 PM, Rong Xu wrote: > Please review the new patch attached to this email. > > thanks, > > -Rong > > On Thu, Jul 21, 2011 at 12:44 PM, Rong Xu wrote: >> wait a second. this still won't work if we disable the whole-program >> pass (like my original change, th

Re: [google] fix global vars incorrectly marked as read-only in LIPO mode (issue4798045)

2011-07-21 Thread Rong Xu
Please review the new patch attached to this email. thanks, -Rong On Thu, Jul 21, 2011 at 12:44 PM, Rong Xu wrote: > wait a second. this still won't work if we disable the whole-program > pass (like my original change, the visibility analysis change won't > kick in). we also need to change varp

Re: [google] fix global vars incorrectly marked as read-only in LIPO mode (issue4798045)

2011-07-21 Thread Rong Xu
wait a second. this still won't work if we disable the whole-program pass (like my original change, the visibility analysis change won't kick in). we also need to change varpool_node_link() to merge the local attribute. -Rong On Thu, Jul 21, 2011 at 12:35 PM, Xinliang David Li wrote: > On Thu, J

Re: [google] fix global vars incorrectly marked as read-only in LIPO mode (issue4798045)

2011-07-21 Thread Xinliang David Li
On Thu, Jul 21, 2011 at 12:27 PM, Rong Xu wrote: > this is a good point. ipa_discover_readonly_nonaddressable_vars() is > called in two passes. whole-program (whole program visibility > analysis) and static-var. The one in whole-program is ok here as it is >  bundled together with the analysis. th

Re: [google] fix global vars incorrectly marked as read-only in LIPO mode (issue4798045)

2011-07-21 Thread Rong Xu
this is a good point. ipa_discover_readonly_nonaddressable_vars() is called in two passes. whole-program (whole program visibility analysis) and static-var. The one in whole-program is ok here as it is bundled together with the analysis. the invocation in static-var can go wrong. should we add a

Re: [google] fix global vars incorrectly marked as read-only in LIPO mode (issue4798045)

2011-07-21 Thread Xinliang David Li
On Thu, Jul 21, 2011 at 11:32 AM, Rong Xu wrote: > On Thu, Jul 21, 2011 at 11:09 AM,   wrote: >> >> http://codereview.appspot.com/4798045/diff/1/ipa.c >> File ipa.c (right): >> >> http://codereview.appspot.com/4798045/diff/1/ipa.c#newcode1034 >> ipa.c:1034: { >> Has varpool node linking happened a

Re: [google] fix global vars incorrectly marked as read-only in LIPO mode (issue4798045)

2011-07-21 Thread Rong Xu
On Thu, Jul 21, 2011 at 11:09 AM, wrote: > > http://codereview.appspot.com/4798045/diff/1/ipa.c > File ipa.c (right): > > http://codereview.appspot.com/4798045/diff/1/ipa.c#newcode1034 > ipa.c:1034: { > Has varpool node linking happened at this point? If not, the new code > here is not excersised

[google] fix global vars incorrectly marked as read-only in LIPO mode (issue4798045)

2011-07-21 Thread davidxl
http://codereview.appspot.com/4798045/diff/1/ipa.c File ipa.c (right): http://codereview.appspot.com/4798045/diff/1/ipa.c#newcode1034 ipa.c:1034: { Has varpool node linking happened at this point? If not, the new code here is not excersised. http://codereview.appspot.com/4798045/diff/1/ipa.c#ne