public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/63169] New: ivopts rewrite_uses pessimizes debug info
@ 2014-09-04 14:28 amodra at gmail dot com
  2014-09-04 14:31 ` [Bug tree-optimization/63169] " rguenth at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: amodra at gmail dot com @ 2014-09-04 14:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63169

            Bug ID: 63169
           Summary: ivopts rewrite_uses pessimizes debug info
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amodra at gmail dot com

Extract from 122t.ivopts for gcc.c-torture/compile/pr60655-2.c on powerpc,
showing loop in mp_compare.  The thing to note is the good expression for #
DEBUG r1, a simple dependency on one iv, but the bad choice for # DEBUG r2
(which triggers pr60655 on powerpc).
# DEBUG r2 => (sizetype) (ivtmp.19_20 + 4294967295) is correct also and leads
to much simpler debug info.

  <bb 3>:
  # ivtmp.17_24 = PHI <ivtmp.17_22(2), ivtmp.17_23(6)>
  # ivtmp.19_20 = PHI <ivtmp.19_26(2), ivtmp.19_25(6)>
  # DEBUG precision => (short int) (((unsigned short) precision_6 - (unsigned
short) (unsigned int) (r1_10 + 1)) + (unsigned short) ivtmp.17_24)
  # DEBUG r2 => r2_12 + (((sizetype) ivtmp.17_24 - (sizetype) r1_10) +
4294967295)
  # DEBUG r1 => (const unit *) (ivtmp.17_24 + 4294967295)
  ivtmp.17_23 = ivtmp.17_24 - 1;
  _28 = (void *) ivtmp.17_23;
  _13 = MEM[base: _28, offset: 0B];
  ivtmp.19_25 = ivtmp.19_20 - 1;
  _29 = (void *) ivtmp.19_25;
  _14 = MEM[base: _29, offset: 0B];
  if (_13 < _14)
    goto <bb 7>;
  else
    goto <bb 4>;

  <bb 4>:
  # DEBUG r1 => (const unit *) (ivtmp.17_23 + 4294967295)
  # DEBUG r2 => r2_12 + (((sizetype) ivtmp.17_23 - (sizetype) r1_10) +
4294967295)
  if (_13 > _14)
    goto <bb 7>;
  else
    goto <bb 5>;

  <bb 5>:
  # DEBUG precision => (short int) (((unsigned short) precision_6 - (unsigned
short) (unsigned int) (r1_10 + 1)) + (unsigned short) ivtmp.17_23)
  if (ivtmp.17_23 != _35)
    goto <bb 6>;
  else
    goto <bb 7>;

  <bb 6>:
  goto <bb 3>;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug tree-optimization/63169] ivopts rewrite_uses pessimizes debug info
  2014-09-04 14:28 [Bug tree-optimization/63169] New: ivopts rewrite_uses pessimizes debug info amodra at gmail dot com
@ 2014-09-04 14:31 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-09-04 14:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63169

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
IVOPTs depends on CSE to remove the effect of building its (sometimes gigantic)
GENERIC expressions figuring out IVs and inserting them multiple times.

Not sure if we even try to optimize the IV chosen to replace debuginfo uses.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-04 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-04 14:28 [Bug tree-optimization/63169] New: ivopts rewrite_uses pessimizes debug info amodra at gmail dot com
2014-09-04 14:31 ` [Bug tree-optimization/63169] " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).