From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 00C2D3858D35 for ; Sat, 17 Jun 2023 16:56:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 00C2D3858D35 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-oi1-x22c.google.com with SMTP id 5614622812f47-39ebd5a22e0so379026b6e.3 for ; Sat, 17 Jun 2023 09:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687020991; x=1689612991; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=iPe163k8AGma/sGfU1BKFinJqz3efXp8DsHhG/UXW3A=; b=LQwGw0eEKobJ7Y8X48xfOT1ARwWmXDEvvDtiriChWkG49F7BsLlxpOYL78rNlyCaT4 Whh91sy/l0pW+wpvgTc5rY/fKBD7G+GA3gxFcbtgjP+kcPUhJ2Rvp63ivUnRCdGGn7eA A+wopimDFRWPK1mXaSCPDvpqRzivYV5+cgDrOFjCj/v6w6A5ujXf01JQ6QmsXnsaK8bx jkM/7Z1Sv4Z5rqCx8WkG5dvEjsZZgCnKustOyuWz0uH46n5lxFBCPonFF90O5hQHOT8I 6HS7s/ogI+HT7tFYvpsHrl7qCWWhAlE8feZH4sOTtjaWjTSjDj53y7CIpxpjpCrhCghb ZHRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687020991; x=1689612991; 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=iPe163k8AGma/sGfU1BKFinJqz3efXp8DsHhG/UXW3A=; b=LxIed6kfkh5BdU1+RI9H71/6izO9pX9PbCnUYx+vioRiT2K6SsLUz3sND3ko5mA/Bi NcP3tJ8pu9aByQjvJ3IR0LDQxyiLnoEN+zpJgo+edtyTLQ8pFDRyauyoleDQMjlyVKc+ HTWn+bnUijPF09/4bc+Y+jwPz5jMeVq8vyfD2D8njCM3sOu/SME27ArH2eKegbda3WlB Kmg9lzBcptdtqCwxjQpAb6zFiB7xGJkEOFu8sG6MAKFQWg6MHvBAaubzu3lAzcvwVgo3 u2O/qPOX1FpUrwNC0QXQKaTZPBqrRhi/HNSa7MA5bujm3wYPsNKV2kqiFOdqo1lUqObL ZtfA== X-Gm-Message-State: AC+VfDz14wW3qj/Y72w6DOn1mqSicTz4Hy9P6OZMgtGzcU7GBEPSGc9f LmCw+Oq376EKFUPPMZcMPbo= X-Google-Smtp-Source: ACHHUZ73oEY8Ess/reaPLqBMLk3EyTFlFLPcwplIqjo3xlQ4qpYNYhD0Gb2fQjhlJ8NsZ+bB3yvGkw== X-Received: by 2002:a05:6808:1304:b0:39e:b0f7:e57 with SMTP id y4-20020a056808130400b0039eb0f70e57mr5204036oiv.56.1687020990877; Sat, 17 Jun 2023 09:56:30 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id cu4-20020a17090afa8400b00259980d373dsm3179479pjb.1.2023.06.17.09.56.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 17 Jun 2023 09:56:30 -0700 (PDT) Message-ID: Date: Sat, 17 Jun 2023 10:56:28 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [Ping] Re: [PATCH] avr: Set param_min_pagesize to 0 [PR105523] Content-Language: en-US To: SenthilKumar.Selvaraj@microchip.com, gcc-patches@gcc.gnu.org Cc: chertykov@gmail.com, richard.guenther@gmail.com References: <8089B1FC-D297-4D78-B11D-6FBB4A7CFFBF@microchip.com> <18130d0c4bcc6ac74103849bda5269998d63d711.camel@microchip.com> <499e8a6feacb26215db0547696642e75a17ffa2b.camel@microchip.com> From: Jeff Law In-Reply-To: <499e8a6feacb26215db0547696642e75a17ffa2b.camel@microchip.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FREEMAIL_REPLY,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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 6/16/23 04:17, SenthilKumar.Selvaraj--- via Gcc-patches wrote: > On Fri, 2023-06-02 at 12:32 +0530, Senthil Kumar Selvaraj wrote: >> On Mon, 2023-05-22 at 14:05 +0200, Richard Biener wrote: >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>> >>> On Fri, May 19, 2023 at 7:58 AM wrote: >>>> On 26/04/23, 5:51 PM, "Richard Biener" > wrote: >>>>> On Wed, Apr 26, 2023 at 12:56 PM > wrote: >>>>>> On Wed, Apr 26, 2023 at 3:15 PM Richard Biener via Gcc-patches > wrote: >>>>>>> On Wed, Apr 26, 2023 at 11:42 AM Richard Biener >>>>>>> > wrote: >>>>>>>> On Wed, Apr 26, 2023 at 11:01 AM SenthilKumar.Selvaraj--- via >>>>>>>> Gcc-patches > wrote: >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> This patch fixes PR 105523 by setting param_min_pagesize to 0 for the >>>>>>>>> avr target. For this target, zero and offsets from zero are perfectly >>>>>>>>> valid addresses, and the default value of param_min_pagesize ends up >>>>>>>>> triggering warnings on valid memory accesses. >>>>>>>> >>>>>>>> I think the proper configuration is to have >>>>>>>> DEFAULT_ADDR_SPACE_ZERO_ADDRESS_VALID >>>>>>> >>>>>>> Err, TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID >>>>>> >>>>>> That worked. Ok for trunk and backporting to 13 and 12 branches >>>>>> (pending regression testing)? >>>>> >>>>> OK, but please let Denis time to comment. >>>> >>>> Didn't hear from Denis. When running regression tests with this patch, >>>> I found that some tests with -fdelete-null-pointer-checks were >>>> failing. Commit 19416210b37db0584cd0b3f3b3961324b8973d25 made >>>> -fdelete-null-pointer-checks false by default, while still allowing it >>>> to be overridden from the command line (it was previously >>>> unconditionally false). >>>> >>>> To keep the same behavior, I modified the hook to report zero >>>> addresses as valid only if -fdelete-null-pointer-checks is not set. >>>> With this change, all regression tests pass. >>>> >>>> Ok for trunk and backporting to 13 and 12 branches? >>> >>> I think that's bit backwards - this hook conveys more precise information >>> (it's address-space specific) and it is also more specific. Instead I'd >>> suggest to set the flag to zero in the target like nios2 or msp430 do. >>> In fact we should probably initialize it using this hook (and using the >>> default address space). >> >> Does the below patch work? The hook impl reports that zero address is >> valid, and flag_delete_null_pointer_checks is set to zero if the >> hook says zero is a valid address. >> >> As flag_delete_null_pointer_checks is now always disabled for avr, I >> removed the resetting code in avr-common.cc that disables it for >> OPT_LEVELS_ALL by default, and added avr as a target that always keeps >> null pointer checks in testsuite/lib/target-supports.exp. >> >> I also removed ATTRIBUTE_UNUSED and the parameter name in the target >> hook to address https://gcc.gnu.org/pipermail/gcc-patches/2023-May/619014.html. >> >> PR 105523 >> >> gcc/ChangeLog: >> >> * common/config/avr/avr-common.cc: Remove setting >> of OPT_fdelete_null_pointer_checks. >> * config/avr/avr.cc (avr_option_override): Clear >> flag_delete_null_pointer_checks if zero_address_valid. >> (avr_addr_space_zero_address_valid): New function. >> (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): Provide target >> hook. >> >> gcc/testsuite/ChangeLog: >> >> * lib/target-supports.exp >> (check_effective_target_keeps_null_pointer_checks): Add >> avr. >> * gcc.target/avr/pr105523.c: New test. OK for the trunk. I don't think we're likely to hear from Denis. I haven't heard from him in quite a while, nor has Georg. So no need to wait. jeff