Re: Missed compiler optimization issue in function select_rtable_names_for_explain - Mailing list pgsql-general

From Daniel Gustafsson
Subject Re: Missed compiler optimization issue in function select_rtable_names_for_explain
Date
Msg-id 05C4ADF5-5E8C-49EC-8E0A-804BB946F1C7@yesql.se
Whole thread Raw
In response to Missed compiler optimization issue in function select_rtable_names_for_explain  (XChy <xxs_chy@outlook.com>)
Responses Re: Missed compiler optimization issue in function select_rtable_names_for_explain
List pgsql-general
> On 22 May 2024, at 11:27, XChy <xxs_chy@outlook.com> wrote:
>
> Hi everyone,
> I'm a compiler developer working on detecting missed optimization in real-world applications. Recently, we found that
LLVMmissed a dead store elimination optimization in the PostgreSQL code
(https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/ruleutils.c#L3794)in the master branch. 

How is the memset in select_rtable_names_for_explain a dead-store?  Even memset
calls could be optimized away from the EXPLAIN codepath I have a feeling it
would have to be many in a tight loop for it to be measurable even?

--
Daniel Gustafsson




pgsql-general by date:

Previous
From: XChy
Date:
Subject: Missed compiler optimization issue in function select_rtable_names_for_explain
Next
From: XChy
Date:
Subject: Re: Missed compiler optimization issue in function select_rtable_names_for_explain