[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.

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, davi...@google.com 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

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 x...@google.com wrote: On Thu, Jul 21, 2011 at 11:09 AM,  davi...@google.com 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

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 Rong Xu
Please review the new patch attached to this email. thanks, -Rong On Thu, Jul 21, 2011 at 12:44 PM, Rong Xu x...@google.com 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

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 x...@google.com wrote: Please review the new patch attached to this email. thanks, -Rong On Thu, Jul 21, 2011 at 12:44 PM, Rong Xu x...@google.com wrote: wait a second. this still won't work if we disable the whole-program pass (like my