From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94587 invoked by alias); 18 Nov 2019 20:06:52 -0000 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 Received: (qmail 94579 invoked by uid 89); 18 Nov 2019 20:06:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.8 required=5.0 tests=AWL,BAYES_50,SPF_PASS autolearn=ham version=3.3.1 spammy=UD:tree-loop-distribution.c, sk:treelo, sk:tree-lo, UD:cfgloop.h X-HELO: mail-qv1-f65.google.com Received: from mail-qv1-f65.google.com (HELO mail-qv1-f65.google.com) (209.85.219.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Nov 2019 20:06:49 +0000 Received: by mail-qv1-f65.google.com with SMTP id v16so7107882qvq.6 for ; Mon, 18 Nov 2019 12:06:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=usp-br.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RFW63nT4/2v4F1nJ7rXUu7tK0sChWnU+MyUVKVgdkkM=; b=VwLmaPiTtXRZgfzcggsAzGiZjglLi0E3cC1RAdhzDepgU4C5SaiWe1jJGfVef3g5+m BtEC1KdESxEapsm1rrCnITYFhTr13ziR+4Yvd7Fvs8TjJ6T178T9d9xzw2IZGs38AFAu Fp1iw69M7FE+Q+rBhToiLIxwRbikX3Vg+xZy0MMDwsrN5XV3c6GPUUAtq/feCO3sIzyN iHZbd5m62FzezmPXnT1fBduRxfnie6d1Kij8ZClq6wHcc/bSOcTcSk7plozaurSg8LBt o0ORS6cqbUWQ+3XJLuYW+RLd++65j3K7EejOjvkwggUTNhRAB1HkHJcunRaTmbcmT3Jc v/Ug== Return-Path: Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id m13sm9007692qka.109.2019.11.18.12.06.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:06:47 -0800 (PST) Date: Mon, 18 Nov 2019 20:35:00 -0000 From: Giuliano Belinassi To: Richard Biener Cc: GCC Patches Subject: Re: [PATCH V2] Refactor tree-loop-distribution for thread safety Message-ID: <20191118200644.lxbg6gjjq72o2h2v@smtp.gmail.com> References: <20191109142556.gtcby5qjth5vxuts@smtp.gmail.com> <20191114213526.dewlw23y4tpceb4s@smtp.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg01750.txt.bz2 Hi, On 11/15, Richard Biener wrote: > On Thu, Nov 14, 2019 at 10:35 PM Giuliano Belinassi > wrote: > > > > Previously, the suggested patch removed all tree-loop-distributions.c global > > variables moving them into a struct and passing it aroung across the functions. > > This patch address this problem by using C++ classes instead, avoiding passing > > the struct as argument since it will be accessible from this pointer. > > This patch is OK if it passes bootstrap and regtest. Took me while to check if it did not trigger any fail. Anyway, I just commited it to trunk. > > Thanks, > Richard. > > > gcc/ChangeLog > > 2019-11-14 Giuliano Belinassi > > > > * cfgloop.c (get_loop_body_in_custom_order): New. > > * cfgloop.h (get_loop_body_in_custom_order): New prototype. > > * tree-loop-distribution.c (class loop_distribution): New. > > (bb_top_order_cmp): Remove. > > (bb_top_order_cmp_r): New. > > (create_rdg_vertices): Move into class loop_distribution. > > (stmts_from_loop): Same as above. > > (update_for_merge): Same as above. > > (partition_merge_into): Same as above. > > (get_data_dependence): Same as above. > > (data_dep_in_cycle_p): Same as above. > > (update_type_for_merge): Same as above. > > (build_rdg_partition_for-vertex): Same as above. > > (classify_builtin_ldst): Same as above. > > (classify_partition): Same as above. > > (share_memory_accesses): Same as above. > > (rdg_build_partitions): Same as above. > > (pg_add_dependence_edges): Same as above. > > (build_partition_graph): Same as above. > > (merge_dep_scc_partitions): Same as above. > > (break_alias_scc_partitions): Same as above. > > (finalize_partitions): Same as above. > > (distribute_loop): Same as above. > > (bb_top_order_init): New method > > (bb_top_order_destroy): New method. > > (get_bb_top_order_index_size): New method. > > (get_bb_top_order_index_index): New method. > > (get_bb_top_order_index_index): New method. > > (loop_distribution::execute): New method. > > (pass_loop_distribution::execute): Instantiate loop_distribution. Thank you, Giuliano.