This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/32183] [4.3 Regression] reassoc2 can more extra calculations into a loop



------- Comment #25 from rakdver at gcc dot gnu dot org  2007-06-04 23:34 -------
> > Reassoc should be fixed, we should not consider workarounds like this.
> 
> Either fix or remove reassoc2 works for me :)

One possible fix is attached; it prevents us from reassociating across loop
boundaries.  This might be too conservative, though, preventing us from
optimizing e.g. 

x = ...
y = ...

while(...)
  {
    a = ...
    b = a + x;
    while (...)
      c = b + y;
  }

So probably this restriction should be applied only in reassoc2 (or reassoc2
should be removed, if Daniel believes it is not useful).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32183


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