From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [170.10.129.74]) by sourceware.org (Postfix) with ESMTPS id 6861A3856243 for ; Thu, 5 May 2022 13:06:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6861A3856243 Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-517-EHbTpzbcOOOMpcOd3fkInQ-1; Thu, 05 May 2022 09:06:50 -0400 X-MC-Unique: EHbTpzbcOOOMpcOd3fkInQ-1 Received: by mail-qv1-f69.google.com with SMTP id o12-20020a0562140e4c00b0044a67ef728dso3137789qvc.8 for ; Thu, 05 May 2022 06:06:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Ohm5CW3srVlNxRy4Siw/cn9YOTW54UL6HOkOr3vrtHY=; b=JeaZltcTywqlCeAWv1oQLYiMOouXd/XoDuMb1JzdN0VtJZvHgSKYtj48azyV5hUZTn ae/39Qs42k8+XW0AgK+cW7UdhY2DmT2OEetwvdHbAATe0VGbJKEv+ZXkRE6tAzVGAW0m HJClTXv7Ha8JSIe88xGeRt3xKQutkqtMvBZl6xW9X0qIswXSbfzIv8fsbPuYbCOaTj75 rsN3jD5L+4ShWUg7NlzzNkrCow092DYdCE8Mwqv1kAznI7hlgt7yVx5IGa5eIvGjNEUl XryhGllfb+QTLmCF5XYBB7jbPeexHslgZtNtrf+56c7QIOC9ESa98MrUywY7bDSnDzd3 sjkw== X-Gm-Message-State: AOAM532w+tx50Rr/D11MLVfrBVjy79d3U4eBTPUJZHMeSu37kVpOq6YK lISDGEO9xYws91RQGaXW5Z6rKXVJ2D7f1K9E/j9DRY4jwcNTcrEA33D4p9BT28SPKk2Kl0th+Kw ao2nHWzxaKuG0oXl9OQ== X-Received: by 2002:a37:a08c:0:b0:69f:cf00:21c0 with SMTP id j134-20020a37a08c000000b0069fcf0021c0mr16645415qke.12.1651756008374; Thu, 05 May 2022 06:06:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5ovWLLPS+KIGmRrLHozc9FMbgvNdRugm5NKkwipeMBDL3O6q9I2MsQSaFtEHScWpaqE3eZA== X-Received: by 2002:a37:a08c:0:b0:69f:cf00:21c0 with SMTP id j134-20020a37a08c000000b0069fcf0021c0mr16645402qke.12.1651756008120; Thu, 05 May 2022 06:06:48 -0700 (PDT) Received: from redhat.com ([2601:184:4780:4310::f826]) by smtp.gmail.com with ESMTPSA id y193-20020a3764ca000000b0069fd84bc14csm751334qkb.122.2022.05.05.06.06.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 06:06:47 -0700 (PDT) Date: Thu, 5 May 2022 09:06:45 -0400 From: Marek Polacek To: Martin =?utf-8?B?TGnFoWth?= Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Come up with {,UN}LIKELY macros. Message-ID: References: <542d7d88-bf16-3fd7-7bff-f74147d76e67@suse.cz> MIME-Version: 1.0 In-Reply-To: <542d7d88-bf16-3fd7-7bff-f74147d76e67@suse.cz> User-Agent: Mutt/2.1.5 (2021-12-30) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2022 13:06:52 -0000 On Thu, May 05, 2022 at 02:31:05PM +0200, Martin Liška wrote: > Some parts of the compiler already define: > #define likely(cond) __builtin_expect ((cond), 1) > > So the patch should unify it. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > gcc/c/ChangeLog: > > * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY > macros. > (c_parser_binary_expression): Likewise. > > gcc/cp/ChangeLog: > > * cp-gimplify.cc (cp_genericize_r): Use {,UN}LIKELY > macros. > * parser.cc (cp_finalize_omp_declare_simd): Likewise. > (cp_finalize_oacc_routine): Likewise. That's funny, yesterday I added another one: cp/parser.cc:cp_parser_init_declarator which is not replaced in this patch. I would've preferred the name gcc_{,un}likely but I don't want to start a long bikeshedding... Thanks, Marek