From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 4299F3858D1E for ; Tue, 18 Apr 2023 20:12:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4299F3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1a5197f00e9so25384855ad.1 for ; Tue, 18 Apr 2023 13:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681848745; x=1684440745; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=nJRKRzpmVgOdQIZg4EjLDOSCVhUYba5LO3xdWJmDwUE=; b=RgrddfFTAqbNQLeYApiPDVUeFjHwZ/hQQGKfNTImpQ/OeSVbZkIRv+enJ0d+TQ3r4u u474zubnvFWnoa6JwFJ10dejA7+ym8RCcsRPjxniSXdIRw39I3RJ0azmX1qMde7lAdC6 vnq+rJSuQPtkyV0gEppQMN8DQCO9vKqrxs6RgvfzuUGVq8pu/z7H4mby9Vr2E+ZAIuLx yj1gEmpi8U0aIo/EqqHe9n5E7jfU02dYvVtDwCHYEzyeA4R/dQ1oD35ci68IEyHn/9D+ hjG/Vnjh05zf7gnFZnXl5H649d7jZuBnDlUanfI/mcLvouVY7o0FzvSiGY1eVlgZ1Arg yA4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681848745; x=1684440745; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nJRKRzpmVgOdQIZg4EjLDOSCVhUYba5LO3xdWJmDwUE=; b=Cp0qFUnIBWLfraqr/K1YhbTVpROUqiHRuzwkcf5UVfqdHDRfqJTkRz/GuPYOd8Rknt bqN4MiL8o44Ev5m1wEdRGYNLCf5FAmnTKkkCwvr1/tZSsJz6OoR5NjDw81gcpmjtzxrZ 5vex2f7lxqCOZI4CPer5PMLNaqYW8Ge2VF7W3wYpa62zkYhQ/8W5VVf86G0ZLgLv6fLS i4elkY+8sTT0vdPr36bUwpUuLWXY3bwtCNFYmeyhEAKrfpRuJT4MiVRGb8HpBkZsHabp c4IkO9/Wn/wA5CulHMAWbFxXcDXAUs0lQVXQtkpNnb2Za93/LZnKZy0xd2H1tR5V0Wxc VuFw== X-Gm-Message-State: AAQBX9cu/j/MminSHbwhjyj8UsHOrwjsilwBoVkbE8F6l8Pj9TvWtwB0 ox3pBvA7Z8ahPOypmQXqh+c= X-Google-Smtp-Source: AKy350bXB96sKYLgMKozVrFsWaV1xbwPga21U0P8eWApSNTUIloI91lndWzo+gsZVqX7R10sj90nkw== X-Received: by 2002:a17:902:ea0e:b0:1a1:ee8c:eef5 with SMTP id s14-20020a170902ea0e00b001a1ee8ceef5mr3475684plg.7.1681848745004; Tue, 18 Apr 2023 13:12:25 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id x13-20020a170902a38d00b001a64011899asm9937606pla.25.2023.04.18.13.12.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Apr 2023 13:12:24 -0700 (PDT) Message-ID: <6e5a8986-6384-0c98-564a-ec291d6839ab@gmail.com> Date: Tue, 18 Apr 2023 14:12:23 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] ifcvt.cc: Prevent excessive if-conversion for conditional moves Content-Language: en-US To: Takayuki 'January June' Suwa , GCC Patches References: <076a3744-f608-6f31-7244-2bf7ab06cdb1.ref@yahoo.co.jp> <076a3744-f608-6f31-7244-2bf7ab06cdb1@yahoo.co.jp> From: Jeff Law In-Reply-To: <076a3744-f608-6f31-7244-2bf7ab06cdb1@yahoo.co.jp> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 1/10/23 21:20, Takayuki 'January June' Suwa via Gcc-patches wrote: > Currently, cond_move_process_if_block() does the conversion without > balancing the cost of the converted sequence with the original one, but > this should be checked by calling targetm.noce_conversion_profitable_p(). > > Doing so allows us to provide a way based on the target-specific cost > estimate, to prevent unwanted size growth due to excessive conditional > moves on optimizing for size. > > On optimizing for speed, default_noce_conversion_profitable_p() allows > plenty of headroom, so this patch has little impact. > > Also, if the target-specific cost estimate is accurate or allows for > margins, the impact should be similarly small. > > gcc/ChangeLog: > > * ifcvt.cc (cond_move_process_if_block): > Consider the result of targetm.noce_conversion_profitable_p() > when replacing the original sequence with the converted one. THanks. I pushed this to the trunk. Jeff