From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21119 invoked by alias); 16 Jul 2002 18:51:36 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 21111 invoked from network); 16 Jul 2002 18:51:35 -0000 Received: from unknown (HELO laptop.moene.indiv.nluug.nl) (195.109.255.217) by sources.redhat.com with SMTP; 16 Jul 2002 18:51:35 -0000 Received: from local ([127.0.0.1] helo=moene.indiv.nluug.nl) by laptop.moene.indiv.nluug.nl with esmtp (Exim 3.12 #1 (Debian)) id 17UXPw-0005eF-00 for ; Tue, 16 Jul 2002 20:51:24 +0200 Message-ID: <3D346B28.47039CD9@moene.indiv.nluug.nl> Date: Tue, 16 Jul 2002 14:10:00 -0000 From: Toon Moene Organization: Moene Computational Physics, Maartensdijk, The Netherlands X-Accept-Language: en MIME-Version: 1.0 To: gcc@gcc.gnu.org Subject: Alias analysis - does base_alias_check still work ? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-07/txt/msg00700.txt.bz2 L.S., f/com.c contains the following note, preceding the definition of #define LANG_HOOKS_GET_ALIAS_SET hook_get_alias_set_0 /* We do not wish to use alias-set based aliasing at all. Used in the extreme (every object with its own set, with equivalences recorded) it might be helpful, but there are problems when it comes to inlining. We get on ok with flag_argument_noalias, and alias-set aliasing does currently limit how stack slots can be reused, which is a lose. */ I do not know if all the facts mentioned here still actually hold, but I do have strong doubts that base_alias_check in alias.c still does its duty. Consider the following Fortran source: SUBROUTINE SIMPLE(A, B) B = 3.0 A = 2.0 B = A*B END one would assume that alias analysis at least once should check that the assignment to A in line 3 doesn't change the value of B set in line 2, which, with flag_argument_noalias > 1 [arguments don't alias] in effect, would be the case. However, according to my experiments with setting breakpoints in base_alias_check, it never passes that point. Before I go on a wholesale check to see if base_alias_check *ever* returns anything else than `1` (x and y might alias), does someone have a good idea to narrow the search ? Thanks in advance, -- Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290 Saturnushof 14, 3738 XG Maartensdijk, The Netherlands Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)