This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: Fix PR tree-optimization/21407


On Tue, 2005-05-10 at 10:21 -0700, Dale Johannesen wrote:
> On May 10, 2005, at 10:08 AM, Daniel Berlin wrote:
> > The only opinion i personally hold is that it would be better for
> > optimizers if the code is illegal.  :)
> 
> And for most users.  One of ours did something like this:
> 
> struct foo { int a; int b; };
> 
> bar() {
>     struct foo f;
>     f.a= ...;
>     g(&f.b);
>     if (f.a) ....
> }
> 
> He wants f.a's value propagated across the call, and kept in a register.
> That would be cool, if it's valid.
> 

Yup, as of right now, the compiler should be assuming that that call
will *not* clobber f.a, at least the tree optimization level.





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]