[Bug tree-optimization/110057] New: Missed devirtualization opportunities

2023-05-31 Thread yongxiangng at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110057 Bug ID: 110057 Summary: Missed devirtualization opportunities Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optim

[Bug ipa/110057] Missed devirtualization opportunities

2023-06-01 Thread yongxiangng at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110057 --- Comment #3 from Ng YongXiang --- I'm giving the example of an array for now, because gcc treatment of the destructor is inconsistent and depends on the length of the array. Clang on the other hand is able to devirtualize the destructor in th

[Bug ipa/110057] Missed devirtualization opportunities

2023-06-01 Thread yongxiangng at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110057 --- Comment #4 from Ng YongXiang --- Would anyone be able to direct me to which portion of the code is responsible for this threshold between len 2 & 3 array? Is this the responsibility of the c++ frontend? or is it still related to the optimize

[Bug ipa/110057] Missed devirtualization opportunities

2023-06-01 Thread yongxiangng at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110057 --- Comment #6 from Ng YongXiang --- That is interesting. Thanks for the reply. However, I'd argue that the 2 bugs mentioned are different from what I am proposing. The 2 bugs linked access virtual functions via ptr (delete p; val->f();) and ar

[Bug ipa/110057] Missed devirtualization opportunities

2023-06-04 Thread yongxiangng at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110057 Ng YongXiang changed: What|Removed |Added CC||yongxiangng at gmail dot com --- Comment

[Bug ipa/110057] Missed devirtualization opportunities

2023-06-04 Thread yongxiangng at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110057 --- Comment #8 from Ng YongXiang --- Just added a patch to illustrate the array destruction issue. What do you think?

[Bug ipa/110057] Missed devirtualization opportunities

2023-07-02 Thread yongxiangng at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110057 --- Comment #9 from Ng YongXiang --- Would anyone be willing to provide some feedback regarding the attachment (https://gcc.gnu.org/bugzilla/attachment.cgi?id=55256&action=diff) that I have created? Thanks.