From: Tobias Burnus <burnus@net-b.de>
To: Thomas Koenig <tkoenig@netcologne.de>
Cc: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [patch, fortran] PR 40628, front-end optimization pass
Date: Sun, 25 Jul 2010 15:52:00 -0000 [thread overview]
Message-ID: <4C4C5DA0.9040708@net-b.de> (raw)
In-Reply-To: <1279663274.29693.4.camel@linux-fd1f.site>
Thomas Koenig wrote:
> Well, here is an updated version of the patch.
>
> I have also changed the place where the gfc_run_passes is called to
> resolve.c, as pault had suggested on IRC.
>
> Regression-tested, only allocate_with_typespec.f90 failed (which I also
> saw on gcc-testresults).
> OK?
>
OK. Thanks for the patch - and sorry for the late review.
Nits:
Index: gfortran.h
+/* passes.c */
+
+void gfc_run_passes (gfc_namespace *);
Update the filename in the comment.
! { dg-final { scan-tree-dump-times "memmove" 2 "original" } }
Can you add:
! { dg-final { scan-tree-dump-times "string_trim" 0 "original" } }
/* Check for direct comparison between identical variables.
TODO: Handle cases with identical refs. */
if (op1->expr_type == EXPR_VARIABLE
&& op2->expr_type == EXPR_VARIABLE
&& op1->symtree == op2->symtree
&& op1->ref == NULL && op2->ref == NULL
&& op1->ts.type != BT_REAL && op2->ts.type != BT_REAL
&& op1->ts.type != BT_COMPLEX && op2->ts.type !=BT_COMPLEX)
Is there a reason that you do not include REAL and COMPLEX variables,
but everything else? (characters, derived types, polymorphic types
(class), integer, Hollerith, ...). Especially, as derived types can also
contains real/complex variables ;-)
It seems to be save to do this comparison also for REAL and COMPLEX.
Tobias
> 2010-07-20 Thomas Koenig <tkoenig@gcc.gnu.org>
>
> * Make-lang.in: Add fortran/frontend-passes.o.
> * gfortran.h: Add prototype for gfc_run_passes.
> * resolve.c (gfc_resolve): Call gfc_run_passes.
> * frontend-passes.c: New file.
>
> 2010-0717 Thomas Koenig <tkoenig@gcc.gnu.org>
>
> * trim_optimize_1.f90: New test.
> * character_comparision_1.f90: New test.
>
next prev parent reply other threads:[~2010-07-25 15:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-17 18:38 Thomas Koenig
2010-07-18 8:41 ` Daniel Kraft
2010-07-18 10:18 ` Thomas Koenig
2010-07-19 18:59 ` Toon Moene
2010-07-19 19:11 ` Thomas Koenig
2010-07-19 4:12 ` Jerry DeLisle
2010-07-19 18:21 ` Richard Henderson
2010-07-19 19:06 ` Jakub Jelinek
2010-07-19 22:31 ` Thomas Koenig
2010-07-20 1:19 ` Jerry DeLisle
2010-07-20 2:08 ` Steve Kargl
2010-07-20 2:39 ` Diego Novillo
2010-07-20 2:54 ` Jerry DeLisle
2010-07-20 8:05 ` Tobias Burnus
2010-07-20 8:21 ` Daniel Kraft
2010-07-20 9:44 ` Toon Moene
2010-07-20 9:58 ` Richard Guenther
2010-07-20 22:01 ` Thomas Koenig
2010-07-25 15:52 ` Tobias Burnus [this message]
2010-07-25 19:35 ` Thomas Koenig
2010-07-25 21:15 ` Paolo Bonzini
2010-07-26 19:24 ` Thomas Koenig
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=4C4C5DA0.9040708@net-b.de \
--to=burnus@net-b.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=tkoenig@netcologne.de \
/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).