public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: dewar@gnat.com (Robert Dewar)
Cc: rth@redhat.com, toon@moene.indiv.nluug.nl, gcc@gcc.gnu.org
Subject: Re: possible gcse failure: not able to eliminate redundant loads
Date: Sat, 21 Dec 2002 19:49:00 -0000	[thread overview]
Message-ID: <orsmwrnpvk.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: <20021219012754.5F8D8F28D5@nile.gnat.com>

On Dec 18, 2002, dewar@gnat.com (Robert Dewar) wrote:

> it is interesting to note that the IBM compiler group decided that
> ensuring that null could be safetly dereferenced, and hence such
> references can be hoisted etc, was a major win in C code efficiency.

At the expense of getting nice crashes at points where NULL is
dereferenced, which often makes it easy to find bugs?  Oh, and there's
also the issue that pointers with static storage, without an explicit
initializer, are supposed to be zero-initialized, which, I suppose,
means they get a NULL value.  If NULL is a bit pattern that differs
from all zeros, you become unable to place such symbols in sbss or,
worse, you need dynamic initialization in case the address of the NULL
object can only be known at run time (e.g. shared libraries).

Ideally, we'd be able to mark would-trap dereferences hoisted out of
their protecting conditions, and only actually trap should the
condition hold.  IA64 does that, but other platforms would require
supporting code in the kernel or in signal handlers, whose overhead
would probably defeat the performance win of being able to hoist the
dereferences in the first place.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

  parent reply	other threads:[~2002-12-21 19:17 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-18 18:39 Robert Dewar
2002-12-19  3:02 ` Richard Henderson
2002-12-21 19:49 ` Alexandre Oliva [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-21 20:36 Robert Dewar
2002-12-19  7:08 Richard Kenner
2002-12-13  0:39 Sanjiv Kumar Gupta, Noida
2002-12-13  2:42 ` Richard Henderson
2002-12-13 13:10   ` Toon Moene
2002-12-16 10:15     ` Richard Henderson
2002-12-16 11:32       ` Andrew Haley
2002-12-16 13:13       ` Toon Moene
2002-12-16 13:32         ` Richard Henderson
2002-12-16 14:44           ` Toon Moene
2002-12-16 14:48             ` Toon Moene
2002-12-16 15:29               ` Richard Henderson
2002-12-17 15:20                 ` Toon Moene
2002-12-16 15:38               ` Jan Hubicka
2002-12-16 16:40           ` Alex Rosenberg
2002-12-12 23:42 Sanjiv Kumar Gupta, Noida
2002-12-12 21:35 Sanjiv Kumar Gupta, Noida
2002-12-12 21:44 ` Dan Nicolaescu
2002-12-11 22:00 Sanjiv Kumar Gupta, Noida
2002-12-11 22:18 ` Daniel Berlin
2002-12-11 20:32 Sanjiv Kumar Gupta, Noida
2002-12-11  3:30 Sanjiv Kumar Gupta, Noida
2002-12-11 14:53 ` Dale Johannesen
2002-12-11 20:02   ` Daniel Berlin
2002-12-11 20:03     ` Daniel Berlin
2002-12-12 12:25     ` Richard Henderson
2002-12-12 12:28       ` Daniel Berlin
2002-12-12 13:03         ` Richard Henderson
2002-12-12 13:04           ` David Edelsohn
2002-12-12 14:32             ` Richard Henderson
2002-12-12 14:42               ` David Edelsohn
2002-12-12 14:58                 ` Richard Henderson
2002-12-12 15:28                   ` Daniel Berlin
2002-12-13  3:41                     ` Richard Henderson
2002-12-12 20:30                   ` David Edelsohn
2002-12-12 15:29               ` Geoff Keating
2002-12-11  3:27 Sanjiv Kumar Gupta, Noida

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=orsmwrnpvk.fsf@free.redhat.lsd.ic.unicamp.br \
    --to=aoliva@redhat.com \
    --cc=dewar@gnat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=rth@redhat.com \
    --cc=toon@moene.indiv.nluug.nl \
    /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).