Re: Missed compiler optimization issue in function select_rtable_names_for_explain

2024-05-22 Thread XChy
在 2024/5/22 18:55, Daniel Gustafsson 写道: I mean that the stores with value "0" after the memset are dead: ``` dpns.subplans = NIL; dpns.ctes = NIL; dpns.appendrels = NULL; ``` since the memset has written zeroes to the object "dpns", and these members are known to be zero. They

Re: Missed compiler optimization issue in function select_rtable_names_for_explain

2024-05-22 Thread XChy
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 For the first question, I don't mean that the mems

Missed compiler optimization issue in function select_rtable_names_for_explain

2024-05-22 Thread XChy
Hi everyone, I'm a compiler developer working on detecting missed optimization in real-world applications. Recently, we found that LLVM missed a dead store elimination optimization in the PostgreSQL code