From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108658 invoked by alias); 12 Oct 2017 13:32:09 -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 108649 invoked by uid 89); 12 Oct 2017 13:32:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=distributing, Hx-spam-relays-external:74.125.82.68, H*RU:74.125.82.68, validity X-HELO: mail-wm0-f68.google.com Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Oct 2017 13:32:06 +0000 Received: by mail-wm0-f68.google.com with SMTP id q132so13407621wmd.2 for ; Thu, 12 Oct 2017 06:32:05 -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=nzckgheAyEcGo/YL+SrRGXzaAQ1sfSKCDvmcUz1Q5lw=; b=qwsIARx0uw1cAGtyfDRPuXD9o3EdIdIlk81RA1vBrJI1J1UaHei97INfSMnaCKEpsN f04mKtpYqV2V1nP1slA8ExANoip2+dxNmGUX15joLVg6tBo0rxWeZEtnn2tXKBHqDYEO jdHzb7k1SfNmFAspTACt/yaxY/l9bA8vXg47Y+zBxd9/eWGBk/rItWcA0MVMIa9sY+qH H5EyWrtzDXZL0QGtaJFOsnLhwxTQPta0PmKlTY7JbLzRdQIBrQHsfrpeoePWI+VfB5hn sQOLNm1ZK7vDmNSUTGemEf9vTe6Cvip/thiaGnpq69HibmC34kkjlYBKUg/Uag/1Ngmy v46w== X-Gm-Message-State: AMCzsaU7OcCfdKOV2fWMHuG6FD2ZTeV8z04epJUdb6YJUBBzW84cQYM5 9WfQhm1iKv+heN7q2yycEV6K7IXohOffnjyqp0U= X-Google-Smtp-Source: AOwi7QBATkUEbOQKOTE1pTtJpYVatrN/txSRYL56QPj2mqzR5Tzfq3/4ynSVe84I6NkGsMYwUl9sHm+7IyS8aQ84IVk= X-Received: by 10.80.217.15 with SMTP id t15mr2953486edj.217.1507815123624; Thu, 12 Oct 2017 06:32:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.143.34 with HTTP; Thu, 12 Oct 2017 06:32:03 -0700 (PDT) In-Reply-To: References: From: Richard Biener Date: Thu, 12 Oct 2017 13:43:00 -0000 Message-ID: Subject: Re: [PATCH GCC][6/7]Support loop nest distribution for builtin partition To: Bin Cheng Cc: "gcc-patches@gcc.gnu.org" , nd Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00753.txt.bz2 On Thu, Oct 5, 2017 at 3:17 PM, Bin Cheng wrote: > Hi, > This patch rewrites classification part of builtin partition so that nested > builtin partitions are supported. With this extension, below loop nest: > void > foo (void) > { > for (unsigned i = 0; i < M; ++i) > for (unsigned j = 0; j < N; ++j) > arr[i][j] = 0; > > will be distributed into a single memset, rather than a loop of memset. > Bootstrap and test in patch set on x86_64 and AArch64, is it OK? + tree access_size = fold_convert (sizetype, TYPE_SIZE_UNIT (TREE_TYPE (ref))); + TYPE_SIZE_UNIT should be always sizetype. + /* Classify the builtin kind. */ + if (single_ld == NULL) + classify_builtin_1 (loop, partition, single_st); + else + classify_builtin_2 (loop, rdg, partition, single_st, single_ld); maybe name those helpers classify_builtin_st and classify_builtin_ldst? Ok with those changes. Thanks, Richard. > Thanks, > bin > 2017-10-04 Bin Cheng > > * tree-loop-distribution.c (struct builtin_info): New struct. > (struct partition): Refactor fields into struct builtin_info. > (partition_free): Free struct builtin_info. > (build_size_arg_loc, build_addr_arg_loc): Delete. > (generate_memset_builtin, generate_memcpy_builtin): Get memory range > information from struct builtin_info. > (find_single_drs): New function refactored from classify_partition. > Also moved builtin validity checks to this function. > (compute_access_range, alloc_builtin): New functions. > (classify_builtin_1, classify_builtin_2): New functions. > (classify_partition): Refactor code into functions find_single_drs, > classify_builtin_1 and classify_builtin_2. > (distribute_loop): Don't do runtime alias check when distributing > loop nest. > (find_seed_stmts_for_distribution): New function. > (pass_loop_distribution::execute): Refactor code finding seed > stmts into above function. Support distribution for the innermost > two-level loop nest. Adjust dump information. > > gcc/testsuite/ChangeLog > 2017-10-04 Bin Cheng > > * gcc.dg/tree-ssa/ldist-28.c: New test. > * gcc.dg/tree-ssa/ldist-29.c: New test. > * gcc.dg/tree-ssa/ldist-30.c: New test. > * gcc.dg/tree-ssa/ldist-31.c: New test.