Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sk15f-006l7w-T2 for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Aug 2024 12:50:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sk15e-003siy-0S for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Aug 2024 12:50:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sk15d-003sht-ND for pgsql-hackers@lists.postgresql.org; Fri, 30 Aug 2024 12:50:58 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sk15b-002B11-Jx for pgsql-hackers@lists.postgresql.org; Fri, 30 Aug 2024 12:50:57 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 11626888E2 for ; Fri, 30 Aug 2024 14:50:53 +0200 (CEST) Received: from s899.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id F21C8887DD; Fri, 30 Aug 2024 14:50:52 +0200 (CEST) Received: from s472.loopia.se (unknown [172.22.191.5]) by s899.loopia.se (Postfix) with ESMTP id F09992C8BA8F; Fri, 30 Aug 2024 14:50:52 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s472.loopia.se (amavisd-new); dkim=pass (2048-bit key) header.d=proxel.se Received: from s934.loopia.se ([172.22.191.6]) by s472.loopia.se (s472.loopia.se [172.22.190.12]) (amavisd-new, port 10024) with LMTP id 9dgZ4J367VaF; Fri, 30 Aug 2024 14:50:52 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: andreas@proxel.se X-Loopia-Originating-IP: 147.28.75.140 Received: from [192.168.0.121] (customer-147-28-75-140.stosn.net [147.28.75.140]) (Authenticated sender: andreas@proxel.se) by s934.loopia.se (Postfix) with ESMTPSA id 6C4D27CEA62; Fri, 30 Aug 2024 14:50:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proxel.se; s=loopiadkim1707418970; t=1725022252; bh=iVK1/XrjXpUfKsQSDqnJeILgBta+2PQ3Bngsdi8BlNw=; h=Date:Subject:To:References:From:In-Reply-To; b=DZD00T3xYtcuzdAnUrlp17HQOr3A66nGBjnOJeQxERGAXTrgURHhHNk2G90VMHes3 nX+aUsx07xkM1aWQvsDxebPbPt9ItDdmYCwnR2tbF2dbJP+4eq0MFbuuUECZu1Mnie QunhwVQ+tKqxsdiDbK1rfbnYcaReKM8UBldapVsb3QcoiChzxrxLjH7qvOxC7u+OO0 WD2PjVmGlXAOuJYDeebMH24xJ/2RSI19WK1hx7Pn+oj/8ne2a3xtCFWQ0IBMZk5Zmb SOrVuyPcWFhq9luUJ2Rs7sJhcYJ79HBE+maB0fHwdhB+eVZwe1+9QsHLixbNMkokmU fE4EBBAAhfNBg== Message-ID: <13394b72-4116-4a4c-90f8-83031ec8cd89@proxel.se> Date: Fri, 30 Aug 2024 14:50:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: JIT: Remove some unnecessary instructions. To: Xing Guo , pgsql-hackers@lists.postgresql.org References: Content-Language: en-US From: Andreas Karlsson In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/30/24 5:55 AM, Xing Guo wrote: > I find there are some unnecessary load/store instructions being > emitted by the JIT compiler. Well spotted! All of these are obvious dead instructions and while LLVM might be able to optimize them away there is no reason to create extra work for the optimizer. The patch looks good, applies and the tests passes. Andreas