public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: Alexandre Oliva <aoliva@redhat.com>
Cc: Richard Guenther <richard.guenther@gmail.com>,
		gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org
Subject: Re: Designs for better debug info in GCC (was: Re: [vta] don't let  debug insns get in the way of simple vect reduction)
Date: Wed, 07 Nov 2007 17:25:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0711071815540.23011@wotan.suse.de> (raw)
In-Reply-To: <or7ikuv6ex.fsf_-_@oliva.athome.lsd.ic.unicamp.br>

Hi,

On Wed, 7 Nov 2007, Alexandre Oliva wrote:

> > With the different approach I and Matz started (and to which we didn't 
> > yet spend enough time to get debug information actually output - but I 
> > hope we'll get there soon), on the tree level the extra information is 
> > stored in a bitmap per SSA_NAME (where necessary).
> 
> This will fail on a very fundamental level.  Consider code such as:
> 
> f(int x, int y) {
>   int c;
>   /* other vars */
> 
>   c = x;
>   do_something_with(c, ...); // doesn't touch x or y
> 
>   c = y;
>   do_something_else_with(c, ...); // doesn't touch x or y
> }
> 
> where do_something_*with are actually complex computations, be that
> explicit code, be it macros or inlined functions.
> 
> This can (and should) be trivially optimized to:
> 
> f(int x, int y) {
>   /* other vars */
> 
>   do_something_with(x, ...); // doesn't touch x or y
> 
>   do_something_else_with(y, ...); // doesn't touch x or y
> }
> 
> But now, if I 'print c' in a debugger in the middle of one of the
> do_something_*with expansions, what do I get?
> 
> With the approach I'm implementing, you should get x and y at the
> appropriate points, even though variable c doesn't really exist any
> more.
> 
> With your approach, what will you get?

x and y at the appropriate part.  Whatever holds 'x' at a point (SSA name, 
pseudo or mem) will also mention that it holds 'c'.  At a later point 
whichever holds 'y' will also mention in holds 'c' .

> There isn't any assignment to x or y you could hook your notes to.

But there are _places_ for x and y.  Those places can and are also 
associated with c.

> Even if you were to set up side representations to model the additional 
> variables that end up mapped to the incoming arguments, you'd have 'c' 
> in both, and at the entry point.  How would you tell?

I don't understand the question.


Ciao,
Michael.

  parent reply	other threads:[~2007-11-07 17:20 UTC|newest]

Thread overview: 163+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <or4pg114h5.fsf@oliva.athome.lsd.ic.unicamp.br>
     [not found] ` <84fc9c000711050327x74845c78ya18a3329fcf9e4d2@mail.gmail.com>
2007-11-07  8:03   ` Alexandre Oliva
2007-11-07 16:37     ` Ian Lance Taylor
2007-11-07 21:43       ` Designs for better debug info in GCC Alexandre Oliva
2007-11-07 23:05         ` Ian Lance Taylor
2007-11-07 23:28           ` Daniel Jacobowitz
2007-11-08  0:01           ` Mark Mitchell
2007-11-08  0:28             ` David Edelsohn
2007-11-08  5:01               ` Mark Mitchell
2007-11-08  5:15                 ` Alexandre Oliva
2007-11-08 18:44                   ` Alexandre Oliva
2007-11-23  2:20                 ` Frank Ch. Eigler
2007-11-23  2:30                   ` Richard Guenther
2007-11-23 23:40                     ` Frank Ch. Eigler
2007-11-23 23:56                       ` Alexandre Oliva
2007-11-24 13:52                     ` Robert Dewar
2007-11-08  5:44               ` Alexandre Oliva
2007-11-08 18:37                 ` Alexandre Oliva
2007-11-08 20:51                 ` Andrew Pinski
2007-11-09  1:11                   ` Alexandre Oliva
2007-11-09 11:28                   ` Robert Dewar
2007-11-08  6:39             ` Alexandre Oliva
2007-11-08 19:13               ` Alexandre Oliva
2007-11-08 20:07               ` Mark Mitchell
2007-11-08 20:14                 ` David Daney
2007-11-08 20:41                   ` Mark Mitchell
2007-11-09  9:10                 ` Alexandre Oliva
2007-11-12 10:55                   ` Mark Mitchell
2007-11-12 18:22                     ` Alexandre Oliva
2007-11-12 20:08                       ` Joe Buck
2007-11-24 22:12                         ` Alexandre Oliva
2007-11-24 22:42                           ` Richard Kenner
2007-11-12 22:43                       ` Ian Lance Taylor
2007-11-24  1:44                         ` Alexandre Oliva
2007-11-13 10:50                       ` Mark Mitchell
2007-11-24  4:05                         ` Alexandre Oliva
2007-11-13 15:46                       ` Michael Matz
2007-11-23 23:56                         ` Alexandre Oliva
2007-11-26 18:19                           ` Michael Matz
2007-11-27  7:31                             ` Alexandre Oliva
2007-11-27 18:33                               ` Michael Matz
2007-11-27 20:37                                 ` Alexandre Oliva
2007-11-08 10:11             ` Richard Guenther
2007-11-08  5:14           ` Alexandre Oliva
2007-11-08 18:28             ` Alexandre Oliva
2007-11-08 19:23             ` Ian Lance Taylor
2007-11-09  0:08               ` Alexandre Oliva
2007-11-09  1:26                 ` Ian Lance Taylor
2007-11-09 12:22                   ` Robert Dewar
2007-11-12 12:59                     ` Mark Mitchell
2007-11-12 18:05                       ` Alexandre Oliva
2007-11-12 18:09                         ` Mark Mitchell
2007-11-24  4:31                           ` Alexandre Oliva
2007-11-26  6:10                             ` Mark Mitchell
2007-12-05 14:21                               ` Diego Novillo
2007-12-05 22:10                                 ` Joe Buck
2007-12-15 22:51                                 ` Alexandre Oliva
2007-12-16  6:27                                   ` Daniel Berlin
2007-12-16 12:47                                     ` Alexandre Oliva
2007-12-17  1:27                                       ` Daniel Berlin
2007-12-17  5:38                                         ` Joe Buck
2007-12-17  8:20                                           ` Geert Bosch
2007-12-18  1:24                                             ` Alexandre Oliva
2007-12-18  2:02                                               ` Joe Buck
2007-12-18  4:40                                                 ` Alexandre Oliva
2007-12-18  7:45                                                   ` Robert Dewar
2007-12-18  7:56                                                     ` Alexandre Oliva
2007-12-18 13:29                                                       ` Robert Dewar
2007-12-18 22:15                                                         ` Alexandre Oliva
2007-12-18  6:16                                               ` Robert Dewar
2007-12-18  8:09                                                 ` Alexandre Oliva
2007-12-17 18:33                                           ` Alexandre Oliva
2007-12-17 17:59                                         ` Alexandre Oliva
2007-12-17 18:02                                           ` Diego Novillo
2007-12-17 20:43                                             ` Alexandre Oliva
2007-12-17 21:20                                               ` Diego Novillo
2007-12-18  1:01                                                 ` Alexandre Oliva
2007-12-18  1:14                                                   ` Diego Novillo
2007-12-18  5:17                                                     ` Alexandre Oliva
2007-12-18  8:06                                                       ` Kai Henningsen
2007-12-18  8:39                                                       ` Alexandre Oliva
2007-12-18 13:15                                                         ` Diego Novillo
2007-12-18 15:06                                                           ` Alexandre Oliva
2007-12-18 16:22                                                         ` Ian Lance Taylor
2007-12-18 16:28                                                           ` Robert Dewar
2007-12-18 16:31                                                             ` Andrew Haley
2007-12-18 16:42                                                               ` Robert Dewar
2007-12-18 17:04                                                                 ` Andrew Haley
2007-12-18 17:12                                                               ` Richard Kenner
2007-12-18 16:32                                                             ` Daniel Jacobowitz
2007-12-18 16:44                                                               ` Robert Dewar
2007-12-19  4:30                                                           ` Alexandre Oliva
2007-12-19 18:41                                                             ` Ian Lance Taylor
2007-12-19 19:00                                                               ` Daniel Jacobowitz
2007-12-19 19:53                                                               ` Janis Johnson
2007-12-19 21:17                                                                 ` Ian Lance Taylor
2007-12-20  6:10                                                                   ` Alexandre Oliva
2007-12-20 16:52                                                                     ` Ian Lance Taylor
2007-12-20 21:38                                                                       ` Alexandre Oliva
2007-12-21  1:54                                                                         ` Ian Lance Taylor
     [not found]                                                                           ` <orprx0izhp.fsf@oliva.atho! me.lsd.ic.unicamp.br>
2007-12-21  2:11                                                                           ` Alexandre Oliva
2007-12-21  3:16                                                                             ` Robert Dewar
2007-12-21  5:10                                                                             ` Ian Lance Taylor
2007-12-21 18:12                                                                               ` Alexandre Oliva
2007-12-21 19:32                                                                                 ` Ian Lance Taylor
2007-12-21 22:46                                                                                   ` Alexandre Oliva
2007-12-22  0:07                                                                                     ` Ian Lance Taylor
2007-12-22  0:09                                                                                       ` Andrew Pinski
2007-12-22  3:16                                                                                         ` Andrew Pinski
2007-12-22 11:44                                                                                           ` Chris Lattner
2007-12-22 21:27                                                                                             ` Ian Lance Taylor
2007-12-23 17:40                                                                                       ` Frank Ch. Eigler
2007-12-22  7:38                                                                                     ` Robert Dewar
2007-12-22 13:33                                                                                     ` Andrew Haley
2007-12-22 17:11                                                                                       ` Robert Dewar
2007-12-31 19:39                                                                           ` Alexandre Oliva
2007-12-20  8:00                                                               ` Alexandre Oliva
2007-12-20  8:01                                                                 ` Alexandre Oliva
2007-12-20 17:02                                                                 ` Ian Lance Taylor
2007-12-31 16:55                                                           ` Richard Guenther
     [not found]                                                             ` <y0my7baigdf.fsf@ton.toronto.redhat.com>
2008-01-01 17:31                                                               ` Richard Guenther
2007-12-18 23:19                                                         ` Daniel Berlin
2007-12-19  6:07                                                           ` Alexandre Oliva
2007-12-19  6:18                                                             ` Daniel Berlin
2007-12-19 16:01                                                               ` Daniel Berlin
2007-12-19 16:29                                                                 ` Andrew MacLeod
2007-12-19 19:25                                                                   ` Daniel Berlin
2007-12-19 20:00                                                                 ` Andrew MacLeod
2007-12-19 20:40                                                                   ` Daniel Berlin
2007-12-19 20:00                                                                 ` Alexandre Oliva
2007-12-19 21:11                                                                   ` Daniel Berlin
2007-12-20  5:16                                                                     ` Alexandre Oliva
2007-12-20 16:44                                                                       ` Ian Lance Taylor
2007-12-20 20:42                                                                         ` Alexandre Oliva
2007-12-19 20:03                                                               ` Alexandre Oliva
2007-12-18 23:31                                                         ` Daniel Berlin
2007-12-19  4:35                                                           ` Alexandre Oliva
2007-12-19 16:12                                                             ` Daniel Berlin
2007-12-19 19:13                                                               ` Alexandre Oliva
2007-12-19 20:11                                                                 ` Daniel Jacobowitz
2007-12-31 14:45                                               ` Richard Guenther
2007-12-16 22:20                                   ` Mark Mitchell
2007-11-09 12:31                   ` Seongbae Park (박성배, 朴成培)
2007-11-09 12:42                     ` Robert Dewar
2007-11-07 17:25     ` Michael Matz [this message]
2007-11-07 19:03       ` Alexandre Oliva
2007-11-08 11:22         ` Michael Matz
2007-11-08 15:13           ` Robert Dewar
2007-11-08 16:11             ` H.J. Lu
2007-11-08 16:32             ` Michael Matz
2007-11-08 18:18               ` Alexandre Oliva
2007-11-09 14:23                 ` Michael Matz
2007-11-12 18:17                   ` Alexandre Oliva
2007-11-13 14:22                     ` Michael Matz
2007-11-24  4:58                       ` Alexandre Oliva
2007-11-26 18:10                         ` Michael Matz
2007-11-27  3:48                           ` Alexandre Oliva
2007-11-08 17:48             ` Alexandre Oliva
2007-11-09  2:09               ` Robert Dewar
2007-11-12 17:52                 ` Alexandre Oliva
2007-11-09  2:13               ` Joe Buck
2007-11-09 18:40                 ` Daniel Jacobowitz
2007-11-09 19:02                   ` Robert Dewar
2007-11-08 16:37           ` Alexandre Oliva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0711071815540.23011@wotan.suse.de \
    --to=matz@suse.de \
    --cc=aoliva@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).