From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 648 invoked by alias); 27 Oct 2011 23:36:05 -0000 Received: (qmail 2965 invoked by uid 22791); 27 Oct 2011 23:33:50 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp25.services.sfr.fr (HELO smtp25.services.sfr.fr) (93.17.128.120) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Oct 2011 23:33:35 +0000 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2512.sfr.fr (SMTP Server) with ESMTP id 8E6277000054; Fri, 28 Oct 2011 01:33:34 +0200 (CEST) Received: from gimli.local (145.15.72.86.rev.sfr.net [86.72.15.145]) by msfrf2512.sfr.fr (SMTP Server) with ESMTP id 5482F7000040; Fri, 28 Oct 2011 01:33:34 +0200 (CEST) X-SFR-UUID: 20111027233334346.5482F7000040@msfrf2512.sfr.fr Content-Type: multipart/mixed; boundary="===============0600394643598849900==" MIME-Version: 1.0 From: Mikael Morin To: gfortran , GCC patches Message-ID: <20111027233334.18581.98661@gimli.local> In-Reply-To: <20111027233305.18581.72802@gimli.local> References: <20111027232818.18581.901@gimli.local> <20111027233305.18581.72802@gimli.local> Subject: [Patch, fortran] [61/66] inline sum and product: Prevent regressions: Disable frontend optimizations. Date: Fri, 28 Oct 2011 00:01:00 -0000 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg02584.txt.bz2 --===============0600394643598849900== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-length: 246 Not exactly a regression, but frontend optimizations can make things worse by forcing temporary generation. This disables common function elimination and binary operator optimization for inline intrinsics. I hope I didn't miss anything else. OK? --===============0600394643598849900== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr43829-61.CL" Content-length: 250 2011-10-19 Mikael Morin * frontend-passes.c (cfe_register_funcs): Return early in the case of an inline intrinsic function. (optimize_binop_array_assignment): Skip optimization in the case of an inline intrinsic function. --===============0600394643598849900== Content-Type: text/x-diff; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr43829-61.patch" Content-length: 1103 diff --git a/frontend-passes.c b/frontend-passes.c index 5b1a644..a19f22d 100644 --- a/frontend-passes.c +++ b/frontend-passes.c @@ -203,8 +203,8 @@ cfe_register_funcs (gfc_expr **e, int *walk_subtrees ATTRIBUTE_UNUSED, /* Conversions are handled on the fly by the middle end, transpose during trans-* stages and TRANSFER by the middle end. */ if ((*e)->value.function.isym->id == GFC_ISYM_CONVERSION - || (*e)->value.function.isym->id == GFC_ISYM_TRANSPOSE - || (*e)->value.function.isym->id == GFC_ISYM_TRANSFER) + || (*e)->value.function.isym->id == GFC_ISYM_TRANSFER + || gfc_inline_intrinsic_function_p (*e)) return 0; /* Don't create an array temporary for elemental functions, @@ -567,7 +567,8 @@ optimize_binop_array_assignment (gfc_code *c, gfc_expr **rhs, bool seen_op) && ! (e->value.function.isym && (e->value.function.isym->elemental || e->ts.type != c->expr1->ts.type - || e->ts.kind != c->expr1->ts.kind))) + || e->ts.kind != c->expr1->ts.kind)) + && ! gfc_inline_intrinsic_function_p (e)) { gfc_code *n; --===============0600394643598849900==--