From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57674 invoked by alias); 16 Sep 2019 13:31:18 -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 57401 invoked by uid 89); 16 Sep 2019 13:31:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*i:sk:VI1PR08, H*RU:209.85.167.68, HX-Spam-Relays-External:209.85.167.68, HX-Received:ac2 X-HELO: mail-lf1-f68.google.com Received: from mail-lf1-f68.google.com (HELO mail-lf1-f68.google.com) (209.85.167.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Sep 2019 13:31:16 +0000 Received: by mail-lf1-f68.google.com with SMTP id q11so12541516lfc.11 for ; Mon, 16 Sep 2019 06:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aQGVmiikJq8mag4+wdpxilNt/7FiXwoyQsZLBLOJfKs=; b=DlaSM00/ZJe10keP/H+8MM1FRiSbSrf4zorxO7B0VcFn4nQ4kYhHudJivm3ga1xyGm Q0yMjUZljpUR6W5kwx4/j6SXLgu3TU7Qt4j+sqKpsbtPY5SFYZXD1Cx7CQZD4Gc5O5OR euq14tOPdHx8+Rx1I/Mtswzob2bCq9yPEMe9M67uifdw7Ozj9Bke7vMBlp1xSEPYCl5g 0SblPCHYFuSF96NgMx3mBnzpplq9L5uaPAdwqv6LhJeXdf8HYbt4RIKliXTONR2TLAdt MzEHm5KomRi1/VQ8uo+dqp+xp/q1HRBX/Ag9B2nMIJb7/hL6ZX/KEx56t25O57XtpxqV P5ew== MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Mon, 16 Sep 2019 13:31:00 -0000 Message-ID: Subject: Re: [PATCH][ARM] Enable code hoisting with -Os (PR80155) To: Wilco Dijkstra Cc: Prathamesh Kulkarni , GCC Patches , Kyrylo Tkachov , Richard Earnshaw , nd Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00942.txt.bz2 On Mon, Sep 16, 2019 at 2:59 PM Wilco Dijkstra wrote: > > Hi Prathamesh, > > > My only concern with the patch is that the issue isn't specific to > > code-hoisting. > > For this particular case (reproducible with pr77445-2.c), disabling > > jump threading > > doesn't cause the register spill with hoisting enabled. > > Likewise disabling forwprop3 and forwprop4 prevents the spill. > > The last time I tried, setting setting > > max-jump-thread-duplication-stmts to 20 and > > fsm-scale-path-stmts to 3, not only removed the spill but also > > resulted in 9 more hoistings, > > but regressed some other test on jump threading. > > So I was wondering whether we should look into fine-tuning relevant params, > > instead of disabling code hoisting entirely (we will end up regressing > > some test cases either way) ? > > The point is that -fcode-hoisting is the optimization that made some benchmarks > run significantly slower compared to older GCC versions. It's been more than 2.5 > years without progress, so let's just fix it now in the obvious way. The issue with the bugzilla is that it lacked appropriate testcase(s) and thus it is now a mess. There are clear testcases (maybe not in the benchmarks you care about) that benefit from code hoisting as enabler, mainly when control flow can be then converted to data flow. Also note that "size optimizations" are important for all cases where followup transforms have size limits on the IL in place. Richard. > Yes, there are likely better solutions. And if someone writes an acceptable patch > then we can easily enable hoisting again. Surely it is far better to have a fixed > compiler *now* rather than wait a few more years for a solution that has the > same effect but which might not be trivially backportable? > > Cheers, > Wilco >