Re: Q: C++ FE emitting assignments to global read-only symbols?

2005-04-10 Thread Paul Schlie
Giovanni Bajo writes: Dale Johannesen [EMAIL PROTECTED] wrote: I do think the C++ FE needs fixing before Diego's change gets merged, though. I can make the change, but not instantly. If someone files a PR, and assigns to me, I'll get to it at some not-too-distant point. It would be good

Re: Q: C++ FE emitting assignments to global read-only symbols?

2005-04-09 Thread Paul Schlie
Richard Kenner wrote: It would be good to have a way to mark things as write once, then readonly IMO. It's very common, and you can do some of the same optimizations on such things that you can do on true Readonly objects. We used to do this in RTL and it caused all sorts of

Re: Q: C++ FE emitting assignments to global read-only symbols?

2005-04-08 Thread Daniel Berlin
On Fri, 2005-04-08 at 12:45 -0400, Diego Novillo wrote: One of the micro-optimizations I am about to merge from TCB involves disregarding V_MAY_DEF/V_MUST_DEF operands for read-only globals. So, if a symbol is marked read-only and the operand scanner requests a V_MAY_DEF or V_MUST_DEF

Re: Q: C++ FE emitting assignments to global read-only symbols?

2005-04-08 Thread Giovanni Bajo
Dale Johannesen [EMAIL PROTECTED] wrote: I do think the C++ FE needs fixing before Diego's change gets merged, though. I can make the change, but not instantly. If someone files a PR, and assigns to me, I'll get to it at some not-too-distant point. It would be good to have a way to mark

Re: Q: C++ FE emitting assignments to global read-only symbols?

2005-04-08 Thread Diego Novillo
On Fri, Apr 08, 2005 at 04:40:01PM -0700, Mark Mitchell wrote: I do think the C++ FE needs fixing before Diego's change gets merged, though. I can make the change, but not instantly. If someone files a PR, and assigns to me, I'll get to it at some not-too-distant point. PR c++/20912. I

Re: Q: C++ FE emitting assignments to global read-only symbols?

2005-04-08 Thread Paul Schlie
On Fri, 2005-04-08 at 16:51 -0700, Dale Johannesen wrote: On Apr 8, 2005, at 4:40 PM, Mark Mitchell wrote: Daniel Berlin wrote: Your transform is correct. The FE is not. The variable is not read only. It is write once, then read-only. Diego, your analysis is exactly correct about what is

Re: Q: C++ FE emitting assignments to global read-only symbols?

2005-04-08 Thread Richard Henderson
On Fri, Apr 08, 2005 at 07:57:31PM -0400, Daniel Berlin wrote: Some of these global properties probably belong in cgraph_var node's instead of shoving them into the tree structure. I tend to agree. This would allow us to do things like find out that the variable is read-write while compiling