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 D3B3F3858401 for ; Tue, 11 Oct 2022 14:47:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D3B3F3858401 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=1665499674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RVR8SCPj4d621FQ4C7t9rihYXU5G7SLAZiaxH5swrnA=; b=Llv0hW5l0WEKGvYD57W0oEpeX42CuQnV5/hkws171PEQzY2YRyt7ftJ1Darp7z3k9y27Mp fIu8H8g3TyqN3ZmLuZGjSznt9uK4Qg7sYOrJ8eLp1EutkeRFiLJuBngMu2J/+lfK9hWFpF U4+uGBCOoysQjWeT+wZ7Ku96YDqdung= Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-367-SzUVfQg1Pt6CMdpTQ93sRg-1; Tue, 11 Oct 2022 10:47:52 -0400 X-MC-Unique: SzUVfQg1Pt6CMdpTQ93sRg-1 Received: by mail-il1-f199.google.com with SMTP id h10-20020a056e021d8a00b002f99580de6cso11055427ila.5 for ; Tue, 11 Oct 2022 07:47:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc: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=RVR8SCPj4d621FQ4C7t9rihYXU5G7SLAZiaxH5swrnA=; b=Y5pL6nFDqFIuEquUs6mUd0gdTtT1s0EQfWCPpQ4vQLY9yXhCH6fxcgyd0afr2sH7AQ VCDGDiMFqY1Wpl5U4dyi+FHTd5OUl3Gy1wMz2wHqR2bKoHNUIdYRmO/KEfAM48wuahpx XLk6hZ8+QNCzVXPXrqNJ516uKexydF/PLoLsae3OypcVSvDRn6vI1XEUU+6ii9JVGE9J YILelQMonTT0lgibdx9KNq3CqrlRFyCgWZUQhJ1zu5QAFKECGHJeRJivTMA2uh75NVjD vJn5tWDjbTwTi/OfAVv1yiyETblMOBHocaNqU+5s6Du+brYeOLvQxSLvOEVTsmaOqVny h8Wg== X-Gm-Message-State: ACrzQf28ovgJ59kvX+V/IjOAI/qUs7Dl1/PtMdxQcficsFcs4SAJwtT1 vmi6yCP8h7pNLddBhbjGqQmiEQEdcNYH1U/HKG0+BnuKRy1tdUPMqFkEgL8TuaeHtMkCNoAHnBZ ufJIWR3SUdMXi47hHdQ== X-Received: by 2002:a05:6638:3e13:b0:363:c866:e0e2 with SMTP id co19-20020a0566383e1300b00363c866e0e2mr3588035jab.218.1665499672225; Tue, 11 Oct 2022 07:47:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4HNg/62mkeujtO692qgtXTda43k3h81FCZQyBgKTY718Jjp07L/xqvcbjgJYsT6M+34y4mTQ== X-Received: by 2002:a05:6638:3e13:b0:363:c866:e0e2 with SMTP id co19-20020a0566383e1300b00363c866e0e2mr3588027jab.218.1665499672026; Tue, 11 Oct 2022 07:47:52 -0700 (PDT) Received: from [192.168.0.135] ([192.24.49.19]) by smtp.gmail.com with ESMTPSA id k12-20020a056e02156c00b002fb78f6c166sm3158397ilu.10.2022.10.11.07.47.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Oct 2022 07:47:51 -0700 (PDT) Message-ID: <459b1a9c-2d2a-c850-652d-50abd34370af@redhat.com> Date: Tue, 11 Oct 2022 10:47:51 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH] Avoid calling tracer.trailer() twice. To: Aldy Hernandez Cc: GCC patches References: <20221010185829.312666-1-aldyh@redhat.com> From: Andrew MacLeod In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP 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: perfect. On 10/11/22 10:08, Aldy Hernandez wrote: > Sure. > > OK? > Aldy > > On Tue, Oct 11, 2022 at 3:11 PM Andrew MacLeod wrote: >> It probably should just be changed to a print if it doesn't return.. >> something like >> >> if (idx && res) >> { >> tracer.print (idx, "logical_combine produced"); >> r.dump (dump_file); >> fputc ('\n', dump_file); >> } >> >> Andrew >> >> On 10/10/22 14:58, Aldy Hernandez wrote: >>> [Andrew, you OK with this? I can't tell whether the trailer() call was >>> actually needed.] >>> >>> logical_combine is calling tracer.trailer() one too many times causing >>> the second trailer() call to subtract a 0 indent by 2, yielding an >>> indent of SOMETHING_REALLY_BIG :). You'd be surprised how many tools >>> can't handle incredibly long lines. >>> >>> gcc/ChangeLog: >>> >>> * gimple-range-gori.cc (gori_compute::logical_combine): Avoid >>> calling tracer.trailer(). >>> --- >>> gcc/gimple-range-gori.cc | 10 +--------- >>> 1 file changed, 1 insertion(+), 9 deletions(-) >>> >>> diff --git a/gcc/gimple-range-gori.cc b/gcc/gimple-range-gori.cc >>> index b37d03cddda..469382aa477 100644 >>> --- a/gcc/gimple-range-gori.cc >>> +++ b/gcc/gimple-range-gori.cc >>> @@ -798,20 +798,12 @@ gori_compute::logical_combine (vrange &r, enum tree_code code, >>> // would be lost. >>> if (!range_is_either_true_or_false (lhs)) >>> { >>> - bool res; >>> Value_Range r1 (r); >>> if (logical_combine (r1, code, m_bool_zero, op1_true, op1_false, >>> op2_true, op2_false) >>> && logical_combine (r, code, m_bool_one, op1_true, op1_false, >>> op2_true, op2_false)) >>> - { >>> - r.union_ (r1); >>> - res = true; >>> - } >>> - else >>> - res = false; >>> - if (idx) >>> - tracer.trailer (idx, "logical_combine", res, NULL_TREE, r); >>> + r.union_ (r1); >>> } >>> >>> switch (code)