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/46763] gcc 4.5: missed optimization: copy global to local, prefetch


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matz at gcc dot gnu.org

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-15 11:32:49 UTC ---
store sinking now works and exposes an if-conversion possibility:

<bb 5>:
  g.1_6 = i_19 + 1;
  g = g.1_6;
  i_7 = bar (i_16);
  g = i_7;
  goto <bb 7>;

<bb 6>:
  g = i_16;

<bb 7>:
  # i_5 = PHI <i_7(5), i_16(6)>

the stores to g can be if-converted by re-using the existing PHI like so:

<bb 5>:
  g.1_6 = i_19 + 1;
  g = g.1_6;
  i_7 = bar (i_16);
  goto <bb 7>;

<bb 6>:
  ;

<bb 7>:
  # i_5 = PHI <i_7(5), i_16(6)>
  g = i_5;

that eventually fits into the cs_elim framework, but cs_elim runs
too early - Micha, do you remember why it runs where it runs?


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