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.133.124]) by sourceware.org (Postfix) with ESMTPS id 66D9D3857C59 for ; Tue, 11 Oct 2022 13:11:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 66D9D3857C59 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=1665493904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kNbBDW4yEhn4hLk8qVGi1siLQXuttZGBajPKzlsxx0Y=; b=e2vyqaOs10Tof8efcZFBFv8xRSb+pp8nue0IQy8N1iwmZS7FJFsuG6tl5U53PMu033AYzG FMioJdE2Fwy6cMcuI5Z6zgcaI/QTd47qjEl8GvnKhJ4Sz4yqliPz6Nvw/qUXoBmUe1zkj0 x0yXfMK7szGw92vg/LMtfgwiUPVsgAU= 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-472-Bv1utR1DPGaom9357QfkXQ-1; Tue, 11 Oct 2022 09:11:43 -0400 X-MC-Unique: Bv1utR1DPGaom9357QfkXQ-1 Received: by mail-il1-f199.google.com with SMTP id j8-20020a056e02154800b002fc89e9ebeeso1067593ilu.16 for ; Tue, 11 Oct 2022 06:11:43 -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: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=kNbBDW4yEhn4hLk8qVGi1siLQXuttZGBajPKzlsxx0Y=; b=QLHOkef+jpRBH4g/9AVP1L6pJACBitp0zZ7zD2IBPJoFy9h2s4W5xKqzd60jsQEyxQ RLJIbR/rgrjJHCB6852LFdHB1TK+lJ5Otb4qTaLCKar3BxV0k6zfAMaLYem16f1fzE4d HBtmBrBAeYs4cKxgAXFXABfDPxBuUc591sjqm1jBvzDzfsTFi0o+KsGMjgeufpixh+fO kO1aZpk3mxA8KkI6Sf//bAyygX0xI47tfh9iZeQM7nMUwtkI+NKNHsWzSZz008VdSRYR t/AUY8J8pePkYYqkdumsbM9ep2uY7m+kB3yQ+n/z9D/p8qjvt76gvJUdDUG5Fr/rssQR 2bDw== X-Gm-Message-State: ACrzQf3o7xVQKO3x+oJ/EjHmjsvTzKwkWOCFBU53ivMMXeF6ztUrmiMm CtuKgP4vC/nXp9wGAF04PDmsGpp4M6IKLdBVXL+vdltV8XKF+v89dru2jOWtbOnw7pGWrGFvtvE USb1rsz7fpwgIMIYKow== X-Received: by 2002:a05:6e02:1e03:b0:2fa:795f:7acc with SMTP id g3-20020a056e021e0300b002fa795f7accmr11557242ila.310.1665493901099; Tue, 11 Oct 2022 06:11:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5hhiDDPw4StyW/ZA1RIy3H9jfPvKD6zfJy2TSI+FgpfiDOO45hHOER7g2/mXZFXeYQg+bJVw== X-Received: by 2002:a05:6e02:1e03:b0:2fa:795f:7acc with SMTP id g3-20020a056e021e0300b002fa795f7accmr11557227ila.310.1665493900892; Tue, 11 Oct 2022 06:11:40 -0700 (PDT) Received: from [192.168.0.135] ([192.24.49.19]) by smtp.gmail.com with ESMTPSA id w20-20020a056e0213f400b002de7ceafb4esm4871887ilj.20.2022.10.11.06.11.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Oct 2022 06:11:40 -0700 (PDT) Message-ID: Date: Tue, 11 Oct 2022 09:11:40 -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 , GCC patches References: <20221010185829.312666-1-aldyh@redhat.com> From: Andrew MacLeod In-Reply-To: <20221010185829.312666-1-aldyh@redhat.com> 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: 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)