From patchwork Fri Jul 10 20:47:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew MacLeod X-Patchwork-Id: 493876 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1C8E014029D for ; Sat, 11 Jul 2015 06:47:52 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=cb0Kng2E; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=BzZZv7LlDPWW950xEyydmr1qgIFaj1HWPNzJxLqRkR+YO9 U/puHOsPDHWLR7jxbUz2OYCUfrYWys3hh44OX3l+vwGhiqdfSEDb2zmP2jAEozYT FxsUw1TCXmtAJXq9x0Wcm9RKAMAQLqg0t1UN2RN5wCq5Ni/jkPstBfsPxRmHw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=m9smbddnGWK5+fGmFwoN2dK3Yn4=; b=cb0Kng2E4NwiAH1fv4D+ mS9xlXb/gxyrfhWvEXVOU6suty+sDI13K1WcarudI90y4LkHHr/78lLcSEixckJo thuRY1xok7ngHbc/gBp6Z2wGJXANc7WN8XDjd89dBgrXltnI+fEKuT6k2IzdX5Kd PRGsQicqYW1iE2Bl+hhtVQ4= Received: (qmail 74994 invoked by alias); 10 Jul 2015 20:47:44 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 74981 invoked by uid 89); 10 Jul 2015 20:47:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL, BAYES_50, KAM_ASCII_DIVIDERS, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 10 Jul 2015 20:47:41 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 1474333E7FF for ; Fri, 10 Jul 2015 20:47:39 +0000 (UTC) Received: from [10.10.57.58] (vpn-57-58.rdu2.redhat.com [10.10.57.58]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6AKlcoU019240 for ; Fri, 10 Jul 2015 16:47:39 -0400 Message-ID: <55A02F6A.1030602@redhat.com> Date: Fri, 10 Jul 2015 16:47:38 -0400 From: Andrew MacLeod User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: gcc-patches Subject: [patch] bit of cleanup to graphite files X-IsSubscribed: yes I noticed a few annoying bits around the graphite files that I decided to cleanup. - omega.h shouldn't include "config.h". including params.h is fine since it is needed, but it should be within the #ifndef GCC_OMEGA_H guard. - sese.h is required for compilation of graphite-poly.h, and basically isn't used anywhere else (except sese.c) , so simply include it in graphite-poly.h. - I adjusted the rest of the graphite files . All but graphite.c guard the enter contents of the file with HAVE_isl, but they all include a ton of GCC includes outside the guard. I moved them inside the guard and ran include reduction on them all to remove the unneeded headers. - graphite.c was similar, except it has a small hunk of code which is compiled when HAVE_isl is false. I manually adjusted those includes to be minimal, and ran include reduction on the rest. I bootstrapped with HAVE_isl defined and also with it not defined on x86_64-unknown-linux-gnu. I ran it with no regressions with HAVE_isl defined. OK for trunk? Andrew * omega.h: Don't include config.h, don't include params.h again if omega.h has already been included. * graphite-poly.h: Include sese.h. * graphite.c: Don't include sese.h, remove needless includes and minimize includes outside #ifdef HAVE_isl block. * graphite-blocking.c: Don't include sese.h, remove needless includes, and wrap entire file in #ifdef HAVE_isl * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. Index: omega.h =================================================================== *** omega.h (revision 225674) --- omega.h (working copy) *************** You should have received a copy of the G *** 24,35 **** along with GCC; see the file COPYING3. If not see . */ - #include "config.h" - #include "params.h" #ifndef GCC_OMEGA_H #define GCC_OMEGA_H #define OMEGA_MAX_VARS PARAM_VALUE (PARAM_OMEGA_MAX_VARS) #define OMEGA_MAX_GEQS PARAM_VALUE (PARAM_OMEGA_MAX_GEQS) #define OMEGA_MAX_EQS PARAM_VALUE (PARAM_OMEGA_MAX_EQS) --- 24,35 ---- along with GCC; see the file COPYING3. If not see . */ #ifndef GCC_OMEGA_H #define GCC_OMEGA_H + #include "params.h" + #define OMEGA_MAX_VARS PARAM_VALUE (PARAM_OMEGA_MAX_VARS) #define OMEGA_MAX_GEQS PARAM_VALUE (PARAM_OMEGA_MAX_GEQS) #define OMEGA_MAX_EQS PARAM_VALUE (PARAM_OMEGA_MAX_EQS) Index: graphite-poly.h =================================================================== *** graphite-poly.h (revision 225674) --- graphite-poly.h (working copy) *************** along with GCC; see the file COPYING3. *** 22,27 **** --- 22,29 ---- #ifndef GCC_GRAPHITE_POLY_H #define GCC_GRAPHITE_POLY_H + #include "sese.h" + typedef struct poly_dr *poly_dr_p; typedef struct poly_bb *poly_bb_p; Index: graphite.c =================================================================== *** graphite.c (revision 225674) --- graphite.c (working copy) *************** along with GCC; see the file COPYING3. *** 46,78 **** #include "system.h" #include "coretypes.h" - #include "diagnostic-core.h" - #include "alias.h" #include "backend.h" #include "cfghooks.h" #include "tree.h" #include "gimple.h" - #include "hard-reg-set.h" - #include "options.h" #include "fold-const.h" - #include "internal-fn.h" #include "gimple-iterator.h" #include "tree-cfg.h" #include "tree-ssa-loop.h" - #include "tree-dump.h" - #include "cfgloop.h" - #include "tree-chrec.h" #include "tree-data-ref.h" #include "tree-scalar-evolution.h" ! #include "sese.h" #include "dbgcnt.h" #include "tree-parloops.h" - #include "tree-pass.h" #include "tree-cfgcleanup.h" - - #ifdef HAVE_isl - - #include "graphite-poly.h" #include "graphite-scop-detection.h" #include "graphite-isl-ast-to-gimple.h" #include "graphite-sese-to-poly.h" --- 46,70 ---- #include "system.h" #include "coretypes.h" #include "backend.h" + #include "diagnostic-core.h" + #include "cfgloop.h" + #include "tree-pass.h" + + #ifdef HAVE_isl #include "cfghooks.h" #include "tree.h" #include "gimple.h" #include "fold-const.h" #include "gimple-iterator.h" #include "tree-cfg.h" #include "tree-ssa-loop.h" #include "tree-data-ref.h" #include "tree-scalar-evolution.h" ! #include "graphite-poly.h" #include "dbgcnt.h" #include "tree-parloops.h" #include "tree-cfgcleanup.h" #include "graphite-scop-detection.h" #include "graphite-isl-ast-to-gimple.h" #include "graphite-sese-to-poly.h" Index: graphite-blocking.c =================================================================== *** graphite-blocking.c (revision 225674) --- graphite-blocking.c (working copy) *************** along with GCC; see the file COPYING3. *** 31,62 **** #include #include #include - #endif #include "system.h" #include "coretypes.h" - #include "alias.h" #include "backend.h" #include "cfghooks.h" #include "tree.h" #include "gimple.h" - #include "hard-reg-set.h" - #include "options.h" #include "fold-const.h" - #include "dominance.h" - #include "internal-fn.h" #include "gimple-iterator.h" #include "tree-ssa-loop.h" #include "dumpfile.h" #include "cfgloop.h" - #include "tree-chrec.h" #include "tree-data-ref.h" - #include "sese.h" - - #ifdef HAVE_isl #include "graphite-poly.h" - /* Strip mines with a factor STRIDE the scattering (time) dimension around PBB at depth TIME_DEPTH. --- 31,51 ---- Index: graphite-dependences.c =================================================================== *** graphite-dependences.c (revision 225674) --- graphite-dependences.c (working copy) *************** along with GCC; see the file COPYING3. *** 30,60 **** #include #include #include - #endif #include "system.h" #include "coretypes.h" - #include "alias.h" #include "backend.h" #include "cfghooks.h" #include "tree.h" #include "gimple.h" - #include "hard-reg-set.h" - #include "options.h" #include "fold-const.h" - #include "internal-fn.h" #include "gimple-iterator.h" #include "tree-ssa-loop.h" #include "tree-pass.h" #include "cfgloop.h" - #include "tree-chrec.h" #include "tree-data-ref.h" - #include "tree-scalar-evolution.h" - #include "sese.h" - - #ifdef HAVE_isl #include "graphite-poly.h" isl_union_map * scop_get_dependences (scop_p scop) { --- 30,51 ---- #include #include #include #include "system.h" #include "coretypes.h" #include "backend.h" #include "cfghooks.h" #include "tree.h" #include "gimple.h" #include "fold-const.h" #include "gimple-iterator.h" #include "tree-ssa-loop.h" #include "tree-pass.h" #include "cfgloop.h" #include "tree-data-ref.h" #include "graphite-poly.h" + isl_union_map * scop_get_dependences (scop_p scop) { *************** graphite_legal_transform (scop_p scop) *** 632,635 **** return res; } ! #endif --- 623,626 ---- return res; } ! #endif /* HAVE_isl */ Index: graphite-interchange.c =================================================================== *** graphite-interchange.c (revision 225674) --- graphite-interchange.c (working copy) *************** extern "C" { *** 42,72 **** #if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) } #endif - #endif #include "system.h" #include "coretypes.h" - #include "alias.h" #include "backend.h" #include "cfghooks.h" #include "tree.h" #include "gimple.h" - #include "hard-reg-set.h" - #include "options.h" #include "fold-const.h" - #include "internal-fn.h" #include "gimple-iterator.h" #include "tree-ssa-loop.h" #include "dumpfile.h" #include "cfgloop.h" - #include "tree-chrec.h" #include "tree-data-ref.h" - #include "tree-scalar-evolution.h" - #include "sese.h" - - #ifdef HAVE_isl #include "graphite-poly.h" /* XXX isl rewrite following comment */ /* Builds a linear expression, of dimension DIM, representing PDR's memory access: --- 42,63 ---- #if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) } #endif #include "system.h" #include "coretypes.h" #include "backend.h" #include "cfghooks.h" #include "tree.h" #include "gimple.h" #include "fold-const.h" #include "gimple-iterator.h" #include "tree-ssa-loop.h" #include "dumpfile.h" #include "cfgloop.h" #include "tree-data-ref.h" #include "graphite-poly.h" + /* XXX isl rewrite following comment */ /* Builds a linear expression, of dimension DIM, representing PDR's memory access: *************** scop_do_interchange (scop_p scop) *** 657,661 **** } ! #endif --- 648,652 ---- } ! #endif /* HAVE_isl */ Index: graphite-isl-ast-to-gimple.c =================================================================== *** graphite-isl-ast-to-gimple.c (revision 225674) --- graphite-isl-ast-to-gimple.c (working copy) *************** extern "C" { *** 37,69 **** #if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) } #endif - #endif #include "system.h" #include "coretypes.h" - #include "alias.h" #include "backend.h" #include "cfghooks.h" #include "tree.h" #include "gimple.h" - #include "hard-reg-set.h" - #include "options.h" #include "fold-const.h" - #include "internal-fn.h" #include "gimple-iterator.h" #include "tree-ssa-loop.h" #include "tree-pass.h" #include "cfgloop.h" #include "tree-data-ref.h" ! #include "sese.h" #include "tree-ssa-loop-manip.h" #include "tree-scalar-evolution.h" #include "gimple-ssa.h" #include "tree-into-ssa.h" #include - - #ifdef HAVE_isl - #include "graphite-poly.h" #include "graphite-isl-ast-to-gimple.h" /* This flag is set when an error occurred during the translation of --- 37,61 ---- #if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) } #endif #include "system.h" #include "coretypes.h" #include "backend.h" #include "cfghooks.h" #include "tree.h" #include "gimple.h" #include "fold-const.h" #include "gimple-iterator.h" #include "tree-ssa-loop.h" #include "tree-pass.h" #include "cfgloop.h" #include "tree-data-ref.h" ! #include "graphite-poly.h" #include "tree-ssa-loop-manip.h" #include "tree-scalar-evolution.h" #include "gimple-ssa.h" #include "tree-into-ssa.h" #include #include "graphite-isl-ast-to-gimple.h" /* This flag is set when an error occurred during the translation of *************** graphite_regenerate_ast_isl (scop_p scop *** 1094,1097 **** return !graphite_regenerate_error; } ! #endif --- 1086,1089 ---- return !graphite_regenerate_error; } ! #endif /* HAVE_isl */ Index: graphite-optimize-isl.c =================================================================== *** graphite-optimize-isl.c (revision 225674) --- graphite-optimize-isl.c (working copy) *************** along with GCC; see the file COPYING3. *** 31,59 **** #include #include #include - #endif #include "system.h" #include "coretypes.h" - #include "alias.h" #include "backend.h" #include "cfghooks.h" #include "tree.h" #include "gimple.h" - #include "hard-reg-set.h" - #include "options.h" #include "fold-const.h" - #include "internal-fn.h" #include "gimple-iterator.h" #include "tree-ssa-loop.h" - #include "dumpfile.h" #include "cfgloop.h" - #include "tree-chrec.h" #include "tree-data-ref.h" - #include "tree-scalar-evolution.h" - #include "sese.h" - - #ifdef HAVE_isl #include "graphite-poly.h" static isl_union_set * --- 31,48 ---- *************** optimize_isl (scop_p scop) *** 623,626 **** return true; } ! #endif --- 612,615 ---- return true; } ! #endif /* HAVE_isl */ Index: graphite-poly.c =================================================================== *** graphite-poly.c (revision 225674) --- graphite-poly.c (working copy) *************** extern "C" { *** 41,71 **** #if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) } #endif - #endif #include "system.h" #include "coretypes.h" - #include "diagnostic-core.h" - #include "alias.h" #include "backend.h" #include "cfghooks.h" #include "tree.h" #include "gimple.h" - #include "hard-reg-set.h" - #include "options.h" #include "fold-const.h" - #include "internal-fn.h" #include "gimple-iterator.h" #include "tree-ssa-loop.h" - #include "dumpfile.h" #include "gimple-pretty-print.h" #include "cfgloop.h" - #include "tree-chrec.h" #include "tree-data-ref.h" - #include "tree-scalar-evolution.h" - #include "sese.h" - - #ifdef HAVE_isl #include "graphite-poly.h" #define OPENSCOP_MAX_STRING 256 --- 41,60 ---- #if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) } #endif #include "system.h" #include "coretypes.h" #include "backend.h" + #include "diagnostic-core.h" #include "cfghooks.h" #include "tree.h" #include "gimple.h" #include "fold-const.h" #include "gimple-iterator.h" #include "tree-ssa-loop.h" #include "gimple-pretty-print.h" #include "cfgloop.h" #include "tree-data-ref.h" #include "graphite-poly.h" #define OPENSCOP_MAX_STRING 256 *************** reverse_loop_for_pbbs (scop_p scop, vec< *** 1206,1210 **** } ! #endif --- 1195,1199 ---- } ! #endif /* HAVE_isl */ Index: graphite-scop-detection.c =================================================================== *** graphite-scop-detection.c (revision 225674) --- graphite-scop-detection.c (working copy) *************** along with GCC; see the file COPYING3. *** 28,47 **** #include #include #include - #endif #include "system.h" #include "coretypes.h" - #include "alias.h" #include "backend.h" #include "cfghooks.h" #include "tree.h" #include "gimple.h" - #include "hard-reg-set.h" #include "ssa.h" - #include "options.h" #include "fold-const.h" - #include "internal-fn.h" #include "gimple-iterator.h" #include "tree-ssa-loop-manip.h" #include "tree-ssa-loop-niter.h" --- 28,42 ---- *************** along with GCC; see the file COPYING3. *** 49,63 **** #include "tree-into-ssa.h" #include "tree-ssa.h" #include "cfgloop.h" - #include "tree-chrec.h" #include "tree-data-ref.h" #include "tree-scalar-evolution.h" #include "tree-pass.h" - #include "sese.h" - #include "tree-ssa-propagate.h" - - #ifdef HAVE_isl #include "graphite-poly.h" #include "graphite-scop-detection.h" /* Forward declarations. */ --- 44,54 ---- #include "tree-into-ssa.h" #include "tree-ssa.h" #include "cfgloop.h" #include "tree-data-ref.h" #include "tree-scalar-evolution.h" #include "tree-pass.h" #include "graphite-poly.h" + #include "tree-ssa-propagate.h" #include "graphite-scop-detection.h" /* Forward declarations. */ *************** dot_scop (scop_p scop) *** 1637,1640 **** #endif } ! #endif --- 1628,1631 ---- #endif } ! #endif /* HAVE_isl */ Index: graphite-sese-to-poly.c =================================================================== *** graphite-sese-to-poly.c (revision 225674) --- graphite-sese-to-poly.c (working copy) *************** extern "C" { *** 39,58 **** #if !defined(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE) && defined(__cplusplus) } #endif - #endif #include "system.h" #include "coretypes.h" - #include "alias.h" #include "backend.h" #include "cfghooks.h" #include "tree.h" #include "gimple.h" - #include "rtl.h" #include "ssa.h" - #include "options.h" #include "fold-const.h" - #include "internal-fn.h" #include "gimple-iterator.h" #include "gimplify.h" #include "gimplify-me.h" --- 39,53 ---- *************** extern "C" { *** 63,87 **** #include "tree-into-ssa.h" #include "tree-pass.h" #include "cfgloop.h" - #include "tree-chrec.h" #include "tree-data-ref.h" #include "tree-scalar-evolution.h" #include "domwalk.h" - #include "sese.h" - #include "tree-ssa-propagate.h" - - #ifdef HAVE_isl - #include "flags.h" - #include "insn-config.h" - #include "expmed.h" - #include "dojump.h" - #include "explow.h" - #include "calls.h" - #include "emit-rtl.h" - #include "varasm.h" - #include "stmt.h" - #include "expr.h" #include "graphite-poly.h" #include "graphite-sese-to-poly.h" --- 58,68 ---- #include "tree-into-ssa.h" #include "tree-pass.h" #include "cfgloop.h" #include "tree-data-ref.h" #include "tree-scalar-evolution.h" #include "domwalk.h" #include "graphite-poly.h" + #include "tree-ssa-propagate.h" #include "graphite-sese-to-poly.h" *************** build_poly_scop (scop_p scop) *** 3187,3190 **** representation. */ POLY_SCOP_P (scop) = true; } ! #endif --- 3168,3171 ---- representation. */ POLY_SCOP_P (scop) = true; } ! #endif /* HAVE_isl */