From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.23]) by sourceware.org (Postfix) with ESMTPS id A43003858D35 for ; Mon, 20 Nov 2023 09:54:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A43003858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gjlay.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=gjlay.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A43003858D35 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=85.215.255.23 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700474048; cv=pass; b=kSgCb8TkzpEip+zkcq2IvKNvT2dTi4RFgyiPfRgs5X7yo6JSY9j8jMmvShHdlbkAb/dayJhN+Yuh9pF76ZHDAvJcu/VIhj0/qdZGtMqV+YG3NI7IrYpQw7yFgi66Qc91YvHDEFuHfePqkwIipAJThnuBrGpVUu6/t5jRMLq0MCA= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700474048; c=relaxed/simple; bh=1f8JnSKav9AFVPRF07zInDbgoQqYGqej5jk2N8W3af8=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=UAvW525lfBk4Zw7/P8sOZhL9xhoS4GzRuccBHujaq+9C0+RoCNLcd9IM4EnWDylhcEe+Dj19PwJ/KnlkC/c38dw9ZArMSU0ip8DcqqJNm/6ovediJAcl+NkV7qqkGpBFmM6ary2DnAxR3cDI2ep7YgxOuMC48NCd+LrM1g00a8M= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1700474042; cv=none; d=strato.com; s=strato-dkim-0002; b=FMzzAvxoRj9kYeg28Ka6Hi7cDpfvqdZR8H/G6K9bWdRsAonxReK2lTWueOKvaxwERk kjJPZvn7GVkwYRFrCngoGMRlIj2lkf2GldpoZAtizmTfWJBZQUTQFaBcpJXGgnTSW8i2 rNH5zhudWPs+EbXGzR2XDYXiAwhnG21MltzneOOL89hPHQKSjdwOc0BiscL5s92mY08S YbloJRG/WXeEXKKLH4LImMJwBZnS7gOdR6s5VIGjKnsAaqiKpC4rPZCRQw0kdlLokINO FJgzTa5xkfhlbnv9kKTMTOLTtfz8CAuiUfk+95DiQx/xkWD6HvN2CKdDgNAuqHmavhKz yM9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1700474042; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date: From:Subject:Sender; bh=b0CWin4kdBoBMF0px+f/cZ9pZQoYLp2lmLxhGxRITNQ=; b=KgTzbGmK0m2+eYdgHlV5INVkfnWrq4vd9LRnrlRQyGqOsRVK+14SakgNsIuZxaz5AV K4LkiWl/rkkzlT16yqGLwRpO5PBxnJh1HeQ+CsTw9P1PxOPGK5Dd++RDkEnQvCfIGoDS 7tMgSrMWF3BF44bos4pIoe8eaxp/wScW5N+WrHi2QeoNPMJX48URwH+sCvAh26viybyI CPqySDeuLW9j0wNGPUGjOvmDbMZLIXUPXq8bfGm79zIRcvzvDaTZNWYlI5o6a/Dryzxx s327xNLw75rVBbox/IyJ68O8T/oq9In1inBkl3oh87XOV/qYDMvtdwikloZ//24b7D5F CV/w== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1700474042; s=strato-dkim-0002; d=gjlay.de; h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date: From:Subject:Sender; bh=b0CWin4kdBoBMF0px+f/cZ9pZQoYLp2lmLxhGxRITNQ=; b=sdBpEg/L+gdBWigGMcltyzcKhtdGuC/PfeQj9s5a+GgHu4FTPBrgNGdC+7ThXC3M8V OW+/nDQejfT9a25R8VfqyGTwuvygeorl2b+cpVY4t6aYxmPPZQQLDjyl1+ch/xSizF1E 1XaXB+hmWx/xJGw4+6+I1sBPi7z5G3I/iZo8wQ8akg8MRSiG1CflLsz4D9B6Ll/pR9/0 Rkn7fDVpGlPd9kMsETeRdhrU3byWFfb2jqDIp+J4WTnbvPxQunw2lHw1WKAvL8k6HTmm liuxJXruL2h6yBfkwTlqGRdi7Vlb7iZ1Sjz0jCJ/EyL6Z/Fai/da2f9+RkBescteLyRb 88nw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1700474042; s=strato-dkim-0003; d=gjlay.de; h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date: From:Subject:Sender; bh=b0CWin4kdBoBMF0px+f/cZ9pZQoYLp2lmLxhGxRITNQ=; b=Uei3t+LaJJ+gRL2P3nA8Vt1XSX/MfOhvTO+w4/ohvwjPbu+iphUjJBtz1mCAEo1EhT qTJbeD4aE4/d5OJIbUCw== X-RZG-AUTH: ":LXoWVUeid/7A29J/hMvvT3koxZnKT7Qq0xotTetVnKkbjtK7q2y9LkX3hYlnPQ==" Received: from [192.168.2.102] by smtp.strato.de (RZmta 49.9.1 DYNA|AUTH) with ESMTPSA id v1b9a8zAK9s00zq (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 20 Nov 2023 10:54:00 +0100 (CET) Message-ID: <1bb0700a-f415-4c55-ba35-202f315f5cec@gjlay.de> Date: Mon, 20 Nov 2023 10:53:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: LRA for avr: Maintain live range info for pseudos assigned to FP? Content-Language: en-US To: SenthilKumar.Selvaraj@microchip.com, vmakarov@redhat.com Cc: gcc@gcc.gnu.org References: <8a903bb0d2f0446e59825dcd2f684ae20fcb6b8b.camel@microchip.com> From: Georg-Johann Lay In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE,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: Am 20.11.23 um 08:14 schrieb SenthilKumar.Selvaraj--- via Gcc: > On Thu, 2023-10-05 at 15:33 -0400, Vladimir Makarov wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >> >> On 9/7/23 07:21, SenthilKumar.Selvaraj@microchip.com wrote: >>> Hi, >>> >>> One more execution failure for the avr target, this time from >>> gcc.c-torture/execute/bitfld-3.c. >>> >>> Steps to reproduce >>> >>> Enable LRA in avr.cc by removing TARGET_LRA_P hook, build with >>> >>> $ make all-host && make install-host >>> >>> and then >>> >>> $ avr-gcc gcc/testsuite/gcc.c-torture/execute/bitfld-3.c -S -Os -mmcu=avr51 -fdump-rtl-all >>> >>> When lra_update_fp2sp_elimination runs and pseudos assigned to the >>> FP have to be spilled to stack slots, they sometimes end up in a >>> slot that already has a reg with an overlapping live range. This is >>> because lra_reg_info[regno].live_ranges is NULL for such spilled >>> pseudos, and therefore when assign_stack_slot_num_and_sort_pseduos >>> checks if lra_intersected_live_ranges_p, it always returns false. >>> >>> In the below reload dump, all the pseudos assigned to FP get >>> allocated to slot 0. The live ranges for some of them (r1241 for >>> e.g.) conflicts with r603 that was originally assigned to slot 0, >>> but they still end up in the same slot, causing the execution failure. >>> >> Sorry for the delay with the answer, Senthil. Avr is unusual target and >> needs some changes in LRA but the changes improves LRA portability. So >> thank you for your work on porting LRA to AVR. >> >> The patch is ok for me. The only comment is that making calculation of >> the set only once would be nice. Live range calculation in LRA can take >> a lot of time, code of update_pseudo_point is hot and the worst the set >> will be really used rarely but it is calculated every time. >> >> You can commit the current patch and I'll do it by myself or, if you >> want, you can modify the patch by yourself and submit it for review and >> I'll review as soon as possible. Either way works for me. > > Apologies for the extreme delay in responding - had to sort out some medical issues. > > Is it ok if I commit the patch now? I have one more patch in ira.cc, after > which I'm hoping the regression results would be good enough to switch the > avr target to LRA. > > Regards > Senthil I have two questions: 1) Is there a command line option to switch back to IRA? 2) Will the X register be used for memory accesses? I am asking because as far as I understand, there is no replacement for LEGITIMIZE_RELOAD_ADDRESS. Regards, Johann