From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14535 invoked by alias); 23 Jun 2017 10:25:17 -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 14360 invoked by uid 89); 23 Jun 2017 10:25:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-ua0-f170.google.com Received: from mail-ua0-f170.google.com (HELO mail-ua0-f170.google.com) (209.85.217.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Jun 2017 10:25:11 +0000 Received: by mail-ua0-f170.google.com with SMTP id g40so34051910uaa.3 for ; Fri, 23 Jun 2017 03:25:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=OjnCnEnhbUfa1xQankWdfL+0ukGexYrcNqNqqE0TlE0=; b=RtPNH9u8NdUIqeq1oq0ltFj6LAaDMMQSFKWyh3RSIF/e3bzw85HYJ7DRy6+ZRZnK3C lJ8WfwLhe6BJE72OKQX7iVCBW0vvQ+mfqXuWFjrpv5/xJdLgsqGy/8b6A0rDrBx0/SGD jmok+pwqOR5nNILDEft8tZWS6itRCo8sbyuCrkn1qU9z0T1yFVucrvhk8o1Mu0Tpk2B4 nRoVnnUuwsEqaD+335w9NBZ9IcTND6+OcnhsRPs3rov/DKdzhcFaF6kKkrJ4Ui0etD+O VtoUp3ij0xbRwKOogOprlgCj/rIqzCuPE2HNUpEHsvBwhwuP4+xewCxOp1CYVt/PZK4z 71Jg== X-Gm-Message-State: AKS2vOw+ywOuA0u1IKVNHuOZRlaoqb3n+3BW/WQnSE8v+E+Clbfep68T CgO5znd1JRmPIMkSz8wHcdunql3l1Q== X-Received: by 10.159.37.145 with SMTP id 17mr5418200uaf.112.1498213509651; Fri, 23 Jun 2017 03:25:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.49.142 with HTTP; Fri, 23 Jun 2017 03:25:09 -0700 (PDT) In-Reply-To: References: From: "Bin.Cheng" Date: Fri, 23 Jun 2017 10:25:00 -0000 Message-ID: Subject: Re: [PATCH GCC][11/13]Annotate partition by its parallelism execution type To: Richard Biener Cc: "gcc-patches@gcc.gnu.org" Content-Type: multipart/mixed; boundary="001a113912160a743205529e0498" X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg01757.txt.bz2 --001a113912160a743205529e0498 Content-Type: text/plain; charset="UTF-8" Content-length: 3235 And the patch. On Fri, Jun 23, 2017 at 11:24 AM, Bin.Cheng wrote: > On Tue, Jun 20, 2017 at 12:34 PM, Richard Biener > wrote: >> On Tue, Jun 20, 2017 at 11:18 AM, Bin.Cheng wrote: >>> On Fri, Jun 16, 2017 at 11:10 AM, Richard Biener >>> wrote: >>>> On Mon, Jun 12, 2017 at 7:03 PM, Bin Cheng wrote: >>>>> Hi, >>>>> This patch checks and records if partition can be executed in parallel by >>>>> looking if there exists data dependence cycles. The information is needed >>>>> for distribution because the idea is to distribute parallel type partitions >>>>> away from sequential ones. I believe current distribution doesn't work >>>>> very well because it does blind distribution/fusion. >>>>> Bootstrap and test on x86_64 and AArch64. Is it OK? >>>> >>>> + /* In case of no data dependence. */ >>>> + if (DDR_ARE_DEPENDENT (ddr) == chrec_known) >>>> + return false; >>>> + /* Or the data dependence can be resolved by compilation time alias >>>> + check. */ >>>> + else if (!alias_sets_conflict_p (get_alias_set (DR_REF (dr1)), >>>> + get_alias_set (DR_REF (dr2)))) >>>> + return false; >>>> >>>> dependence analysis should use TBAA already, in which cases do you need this? >>>> It seems to fall foul of the easy mistake of not honoring GCCs memory model >>>> as well ... see dr_may_alias_p. >>> I see. Patch updated with this branch removed. >>> >>>> >>>> + /* Further check if any data dependence prevents us from executing the >>>> + partition parallelly. */ >>>> + EXECUTE_IF_SET_IN_BITMAP (partition->reads, 0, i, bi) >>>> + { >>>> + dr1 = (*datarefs_vec)[i]; >>>> + EXECUTE_IF_SET_IN_BITMAP (partition->writes, 0, j, bj) >>>> + { >>>> >>>> what about write-write dependences? >>>> >>>> + EXECUTE_IF_SET_IN_BITMAP (partition->reads, 0, i, bi) >>>> + { >>>> + dr1 = (*datarefs_vec)[i]; >>>> + EXECUTE_IF_SET_IN_BITMAP (partition->writes, i + 1, j, bj) >>>> + { >>>> + dr2 = (*datarefs_vec)[j]; >>>> + /* Partition can only be executed sequentially if there is any >>>> + data dependence cycle. */ >>>> >>>> exact copy of the loop nest follows?! Maybe you meant to iterate >>>> over writes in the first loop. >>> Yes, this is a copy-paste typo. Patch is also simplified because >>> read/write are recorded together now. Is it OK? >> >> Ok. > Sorry I have to update this patch because one of my mistake. I didn't > update partition type when fusing them. For some partition fusion, > the update is necessary otherwise we end up with inaccurate type and > inaccurate fusion later. Is it Ok? > > Thanks, > bin > 2017-06-20 Bin Cheng > > * tree-loop-distribution.c (enum partition_type): New. > (struct partition): New field type. > (partition_merge_into): Add parameter. Update partition type. > (data_dep_in_cycle_p, update_type_for_merge): New functions. > (build_rdg_partition_for_vertex): Compute partition type. > (rdg_build_partitions): Dump partition type. > (distribute_loop): Update calls to partition_merge_into. --001a113912160a743205529e0498 Content-Type: text/x-patch; charset="US-ASCII"; name="0010-partition-type-20170608.txt.patch" Content-Disposition: attachment; filename="0010-partition-type-20170608.txt.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j49pmvn10 Content-length: 11310 RnJvbSAzYTAwMzIzYjE3NzNlYWVhYjM2OGQyOWZkNTk5NWQwOWFmYzBjYjRl IE1vbiBTZXAgMTcgMDA6MDA6MDAg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