From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by sourceware.org (Postfix) with ESMTPS id 7A8993858029 for ; Thu, 22 Sep 2022 19:25:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A8993858029 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-pj1-x1034.google.com with SMTP id fs14so10778326pjb.5 for ; Thu, 22 Sep 2022 12:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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; bh=pOc3qMWd/TIE15n+kFyK+lFcWkwiFOanXBAwWb5h4qk=; b=Db2O6A6DsFQgBrx4Pjp86AxUvBMdLxPYVjEI2If8DYHmv8yFcopZz3oOH5rtZhuq1w xXyLvyM2NL6HwOzzuYp8/nsyOKTUcksfkl+QHGvKCJz94q+jg5g+htinuCs/p47OKfCn U4gE7fjTPTffjJ54wAC4XZh5SYPjsv52qz5tUFBsoHAGM6I9NF7jwFZ5Z3Iw+wyJQUMQ jhmoasVXmOt0mF6a0JS5rGLtTW6BgKOSzi9EyCwjeaKHpGI/0N7yqIv5zk+msSIyWXV3 v7DMm7uh/sjPTg1Nb76SAmc/K8d5bbLGr65YPcGFpxMfgSm1co/giL0ir8beH8o3ohD/ aWWg== 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; bh=pOc3qMWd/TIE15n+kFyK+lFcWkwiFOanXBAwWb5h4qk=; b=Prxvk084krkywWZDg/CpIQ+gX0wLAVHDIu5FBIaC7OWSGtidrr+XdTouoGp5gScCYe EWC5fSw/kHvGccmcoiSMJO4tGTKAF6J+LZJfWAsQd4xt95wqAC/lOXvK0cXZ5SuzVFtF SA64LL7MtUQZP6DVDlMS+wEzSDFqru+NMAS0ZmNfNall6RxXyfQrCVdmqxb5VGAfKef5 UQrNkWDoYX6fFVtsm6m7zgjuJmBcRLepAdePyQMs63x3OsUEZW8PsVa0TtUjkkIAYtIC kbrCifIhGhdCnqhWauGmdT7Vga+07Objjv+Oqj5rTnt97utLs5GR0WNhXljYEMMcIXDo UMPQ== X-Gm-Message-State: ACrzQf2qMVPX55qXKgmf01YAMfc825JuqUd1ixI4tpKsJ7fuPkMePNj+ qhRT5iKg+sq6iT4cp15e3D95fLkz/wAiOw== X-Google-Smtp-Source: AMsMyM6mAzHpkd5Lj5vJ2ZeZBH+4MK0WTXPJFwSq/B6W0mIAENXQW2IBDKUFa1mPLJg3RLRW6yKQmQ== X-Received: by 2002:a17:903:2345:b0:179:b6d0:f910 with SMTP id c5-20020a170903234500b00179b6d0f910mr3906084plh.6.1663874729813; Thu, 22 Sep 2022 12:25:29 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id a25-20020a656419000000b0042254fce5e7sm4168390pgv.50.2022.09.22.12.25.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Sep 2022 12:25:29 -0700 (PDT) Message-ID: <71cf6e17-40a1-962e-8288-8258abe2b2bd@gmail.com> Date: Thu, 22 Sep 2022 13:25:28 -0600 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] frange: dump hex values when dumping FP numbers. Content-Language: en-US To: gcc-patches@gcc.gnu.org References: <20220922164911.2566143-1-aldyh@redhat.com> From: Jeff Law In-Reply-To: <20220922164911.2566143-1-aldyh@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.3 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 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 9/22/22 10:49, Aldy Hernandez via Gcc-patches wrote: > It has been suggested that if we start bumping numbers by an ULP when > calculating open ranges (for example the numbers less than 3.0) that > dumping these will become increasingly harder to read, and instead we > should opt for the hex representation. I still find the floating > point representation easier to read for most numbers, but perhaps we > could have both? > > With this patch this is the representation for [15.0, 20.0]: > > [frange] float [1.5e+1 (0x0.fp+4), 2.0e+1 (0x0.ap+5)] > > Would you find this useful, or should we stick to the hex > representation only (or something altogether different)? > > Tested on x86-64 Linux. > > gcc/ChangeLog: > > * value-range-pretty-print.cc (vrange_printer::print_real_value): New. > (vrange_printer::visit): Call print_real_value. > * value-range-pretty-print.h: New print_real_value. The big advantage of the hex representation is you can feed that back into the compiler trivially and be confident the bit pattern hasn't changed.   I've found it invaluable when doing deep FP analysis. jeff