From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 979F53858D1E for ; Mon, 24 Apr 2023 15:29:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 979F53858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682350142; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=seudSHGZ/dr2I62g0CcYD5v4t7ZA+Hdm0OzIW5qe5Jk=; b=him0LyiUht4gH2t+xXahQ5jrooVWZwXLcgSufxky7Wl/87jRFS7yCeYK4dFZyQuNkJnghM tz3WnoK2/zAbE8KapDvtXVwT3nR+zvaqHSHLb+6KeGXBrAklVNFngU89FhMF4KcUeJxmrh lqN1CO6ljwwqViET1bz35CNEx0l4460= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-377-acem1l6pPFaOfuQp1ZhZJA-1; Mon, 24 Apr 2023 11:28:58 -0400 X-MC-Unique: acem1l6pPFaOfuQp1ZhZJA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 065EA38237C5; Mon, 24 Apr 2023 15:28:58 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.156]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E0FDC1121318; Mon, 24 Apr 2023 15:28:56 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 33OFSr1K2355902 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 24 Apr 2023 17:28:54 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 33OFSqN52355901; Mon, 24 Apr 2023 17:28:52 +0200 Date: Mon, 24 Apr 2023 17:28:52 +0200 From: Jakub Jelinek To: Peter Bergner Cc: Segher Boessenkool , Ajit Agarwal , gcc-patches , jeff Law , Richard Biener Subject: Re: [PATCH v3 1/4] ree: Default ree pass for O2 and above for rs6000 target. Message-ID: Reply-To: Jakub Jelinek References: <236aab6b-537f-7fb6-125c-220fb63f7521@linux.ibm.com> <20230419200011.GG19790@gate.crashing.org> <809ed95b-686c-e515-584b-a1a1d40e6f68@linux.ibm.com> MIME-Version: 1.0 In-Reply-To: <809ed95b-686c-e515-584b-a1a1d40e6f68@linux.ibm.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Apr 24, 2023 at 10:23:06AM -0500, Peter Bergner wrote: > On 4/19/23 3:00 PM, Segher Boessenkool wrote: > > On Wed, Apr 19, 2023 at 11:23:07PM +0530, Ajit Agarwal wrote: > >> * common/config/rs6000/rs6000-common.cc: Add REE pass as a > >> default rs6000 target pass for O2 and above. > > > > Why only for -O2? Only when optimising at all makes sense, people use > > -O0 only when they want to skip as many optimisations as possible, maybe > > because of compilation time concerns, maybe to avoid an ICE or other > > bug. Isn't REE *always* a good thing, it never degrades code quality? > > Or are there situations where it results in worse code? > > I think this is a case of following what the other architectures are doing. > Namely, x86, aarch64, riscv, sparc, alpha and h8300 all enable -free at > -O2 and above, not -O1. Not to say that is the best answer, but I think > that is why we did the same. I agree I don't think -free can produce > worse code which makes using it with -O1 and above an option. Maybe someone > was worried about compile time??? Doesn't seem like an optimization like > this would be too expensive though. I thought that df_chain_add_problem (DF_UD_CHAIN + DF_DU_CHAIN); is quite expensive (only other pass which does that is SMS pass) and df_mir_add_problem (); as well (REE pass being the only user of that). As -O1 is meant to scale well on huge compiler generated functions, perhaps REE isn't appropriate for those by default. Jakub