From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80799 invoked by alias); 2 May 2017 14:09: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 80790 invoked by uid 89); 2 May 2017 14:09:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 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=meat, staring, lim, Hx-languages-length:1714 X-HELO: mail-yw0-f182.google.com Received: from mail-yw0-f182.google.com (HELO mail-yw0-f182.google.com) (209.85.161.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 May 2017 14:09:07 +0000 Received: by mail-yw0-f182.google.com with SMTP id u70so69548072ywe.2 for ; Tue, 02 May 2017 07:09:09 -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=KBTVE0Is7BiPSyyf2Y/Vf2EOiUT5PQN3lv3Y3h/2Lx8=; b=U/2cD05pSdKbXY5Z5Poqf/AxHK0U36f/He9gTnWZznEDZKOhyatacPT8enuZsLZ7B8 sBuAuazs+0JO+P+7mw+GGWvAXcp1Zc+yGpCSRsHUjfxG+33WM+xb2q2CK7LLaaGYYYvt cNkG41EoaY5/KE3JaxUvF2Ik76FI12TA00wz94p+G1Z8VHOmbcU9w3bbnA7zXXWsXcvU 5A54jpW4+KzffhTb8L7CSwonkbxhiN+rlCHtzHoy/b/+Ad+xYE0Wdr2D0xyMPtTNSOtd 2NZ75cOQGB9AaI+zn7ZIOBUJ3GwHz6okhYR2DEQ6h030JcHIQUunr7YP1liPFWp9CKCQ GSBg== X-Gm-Message-State: AN3rC/7CacQe0MbCjBypd6bYhQNSuflXfEPq/ij0CrNjsHSEcQFMwwOd 5x6x/8mSJMlN3Ix1nqcz12JjevLuEg== X-Received: by 10.157.46.234 with SMTP id w97mr11194272ota.78.1493734148335; Tue, 02 May 2017 07:09:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.51.83 with HTTP; Tue, 2 May 2017 07:09:07 -0700 (PDT) In-Reply-To: References: From: Richard Biener Date: Tue, 02 May 2017 14:16:00 -0000 Message-ID: Subject: Re: [PATCH GCC8][22/33]Generate TMR in new reassociation order To: "Bin.Cheng" Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00101.txt.bz2 On Wed, Apr 26, 2017 at 12:20 PM, Bin.Cheng wrote: > This is another one where context diff might help. No code change > from previous version. This isn't a context diff. Anyways, changes like using 'tmp' really interfere with creating a useful diff so it's hard to review no-op changes from the real meat. I spot re-ordering and doing parts.offset in a different way first. I wonder if we can do better by first re-factoring fields of mem_address to how TARGET_MEM_REF is laid out now -- merge symbol and base and introduce index2 so that create_mem_ref_raw becomes a 1:1 mapping. Anyway, the patch looks fine (after much staring) but it could really need some more commenting on what we try to do in what order and why. Thanks, Richard. > Thanks, > bin > > On Tue, Apr 18, 2017 at 11:49 AM, Bin Cheng wrote: >> Hi, >> This patch generates TMR for ivopts in new re-association order. General idea is, >> by querying target's addressing mode, we put as much address computation as possible >> in memory reference. For computation that has to be done outside of memory reference, >> we re-associate the address expression in new order so that loop invariant expression >> is kept and exposed for later lim pass. >> Is it OK? >> >> Thanks, >> bin >> 2017-04-11 Bin Cheng >> >> * tree-ssa-address.c: Include header file. >> (move_hint_to_base): Return TRUE if BASE_HINT is moved to memory >> address. >> (add_to_parts): Refactor. >> (addr_to_parts): New parameter. Update use of move_hint_to_base. >> (create_mem_ref): Update use of addr_to_parts. Re-associate addr >> in new order.