From patchwork Tue Oct 6 16:37:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 526824 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 913BB140D57 for ; Wed, 7 Oct 2015 03:37:30 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=VZtuAnGJ; 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; q=dns; s= default; b=kP6AB2FSBS8/PyIHhn+nNeoKKExmqaQv8KLjfhvTHMosQQsZn7611 I6aQIn7CcgHbgx0e473KeA1oOBDeGi2jR924D8oezUGeD6ljOM/QS4v/UIVlUyxw dOKBjgtno1VnR32gckEfXvELHlg+uXVpmtUiSKFIR3kuaPflVxdW34= 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; s=default; bh=Y/tAaK/Mr+NH1TDFT6onRXkRssU=; b=VZtuAnGJ0eXZ2Td7I5j4tSXIG2rF RC3BxtKWJJifDPhZyM5s6e7cAIyp/JKO7+1bbGOTP6tqOMy40wH3vUZ4WxNfIZjg Soqrxaep1f3xJxcxNyOVDqV0XuYNUr0uoFuCz0qAQi/P32Br3yUNQB4Os1M2l5cS 2FSy6nj23YPIyeY= Received: (qmail 88332 invoked by alias); 6 Oct 2015 16:37:24 -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 88311 invoked by uid 89); 6 Oct 2015 16:37:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f178.google.com Received: from mail-ob0-f178.google.com (HELO mail-ob0-f178.google.com) (209.85.214.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 06 Oct 2015 16:37:21 +0000 Received: by obbbh8 with SMTP id bh8so158523785obb.0 for ; Tue, 06 Oct 2015 09:37:20 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.142.40 with SMTP id rt8mr22280490obb.12.1444149439879; Tue, 06 Oct 2015 09:37:19 -0700 (PDT) Received: by 10.76.175.132 with HTTP; Tue, 6 Oct 2015 09:37:19 -0700 (PDT) In-Reply-To: References: <1444100014-25026-1-git-send-email-hiraditya@msn.com> Date: Tue, 6 Oct 2015 09:37:19 -0700 Message-ID: Subject: Re: [PATCH 1/2] [Refactoring graphite] Move declarations, assign types, renaming. From: "H.J. Lu" To: Aditya Kumar Cc: GCC Patches , Tobias Grosser , Richard Biener , aditya.k7@samsung.com, Sebastian Pop , Sebastian Pop X-IsSubscribed: yes On Tue, Oct 6, 2015 at 9:34 AM, H.J. Lu wrote: > On Mon, Oct 5, 2015 at 7:53 PM, Aditya Kumar wrote: >> 1. Move declarations near the assignment/usage. >> 2. Assign type to members which were void*. >> 3. Rename scop->context to scop::param_context, and scop::ctx to >> scop::isl_context >> >> No functional changes intended. Passes regtest and bootstrap. >> >> gcc/ChangeLog: >> >> 2015-10-05 Aditya Kumar >> >> * graphite-dependences.c (scop_get_reads): Renamed scop->context to scop->param_context. >> (scop_get_must_writes): Same. >> (scop_get_may_writes): Same. >> (scop_get_original_schedule): Same. >> (scop_get_transformed_schedule): Same. >> (subtract_commutative_associative_deps): Same. >> * graphite-isl-ast-to-gimple.c (add_parameters_to_ivs_params): Same. >> (generate_isl_context): Same. >> (generate_isl_schedule): Same. >> (scop_to_isl_ast): Same. >> (graphite_regenerate_ast_isl): Same. >> * graphite-optimize-isl.c (scop_get_domains): Same. >> (optimize_isl): Renamed scop->context to scop->param_context. >> * graphite-poly.c (new_poly_bb): Change the type of argument to gimple_poly_bb_p. >> (new_scop): Renamed scop->context to scop->param_context. >> (free_scop): Same. >> (print_scop_context): Same. >> * graphite-poly.h (new_poly_dr): Change the type of argument from void* to data_reference_p. >> (struct poly_bb): Change the type of black_box to gimple_poly_bb_p. >> (new_poly_bb): Change the type of argument from void* to gimple_poly_bb_p. >> (pbb_set_black_box): Same. >> (struct scop): Rename context to param_context, ctx to isl_context. >> * graphite-scop-detection.c (scop_detection::build_scop_bbs_1): Move declarations closer to assignment. >> (find_params_in_bb): Same. >> (find_scop_parameters): Same. >> * graphite-sese-to-poly.c (unsigned ssa_name_version_typesize): Global to be used for statement IDs. >> (isl_id_for_pbb): Use ssa_name_version_typesize. >> (simple_copy_phi_p): Move declarations closer to assignment. >> (build_pbb_scattering_polyhedrons): Same. >> (build_scop_scattering): Same. >> (isl_id_for_ssa_name): Same. >> (extract_affine_name): Same. >> (extract_affine_int): Same. >> (extract_affine): Same. >> (set_scop_parameter_dim): Use renamed member. >> (build_loop_iteration_domains): Same. >> (add_param_constraints): Same. >> (build_scop_iteration_domain): Same. >> (pdr_add_data_dimensions): Same. >> (build_poly_dr): Same. >> (build_scop_drs): Move declarations closer to assignment. >> (analyze_drs_in_stmts): Same. >> (insert_out_of_ssa_copy): Same. >> (insert_out_of_ssa_copy_on_edge): Same. >> (propagate_expr_outside_region): Same. >> (rewrite_phi_out_of_ssa): Same. >> (rewrite_degenerate_phi): Same. >> (rewrite_reductions_out_of_ssa): Same. >> (rewrite_cross_bb_scalar_dependence): Same. >> (handle_scalar_deps_crossing_scop_limits): Same. >> (rewrite_cross_bb_scalar_deps): Same. >> * graphite.c (graphite_transform_loops): Use renamed member. >> >> > > It breaks bootstrap with isl-0.14: > > /export/gnu/import/git/sources/gcc/gcc/graphite-optimize-isl.c: In > function ‘bool optimize_isl(scop_p)’: > /export/gnu/import/git/sources/gcc/gcc/graphite-optimize-isl.c:333:40: > error: ‘struct scop’ has no member named ‘ctx’ > isl_options_set_schedule_fuse (scop->ctx, ISL_SCHEDULE_FUSE_MIN); > ^ > Makefile:1077: recipe for target 'graphite-optimize-isl.o' failed > make[3]: *** [graphite-optimize-isl.o] Error 1 > make[3]: *** Waiting for unfinished jobs.... > > I am testing this patch. --- a/gcc/graphite-optimize-isl.c +++ b/gcc/graphite-optimize-isl.c @@ -330,7 +330,7 @@ optimize_isl (scop_p scop) /* ISL-0.15 or later. */ isl_options_set_schedule_serialize_sccs (scop->isl_context, 1); #else - isl_options_set_schedule_fuse (scop->ctx, ISL_SCHEDULE_FUSE_MIN); + isl_options_set_schedule_fuse (scop->isl_context, ISL_SCHEDULE_FUSE_MIN); #endif #ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE