PING^2: [RFC] Whole Program Devirtualization

2021-09-13 Thread Feng Xue OS via Gcc
Ping again. Thanks, Feng From: Feng Xue OS Sent: Wednesday, September 1, 2021 9:46 AM To: Martin Liška; Jan Hubicka; gcc@gcc.gnu.org Cc: JiangNing OS Subject: PING: [RFC] Whole Program Devirtualization Honza, How do you think about proposal in this RF

PING: [RFC] Whole Program Devirtualization

2021-08-31 Thread Feng Xue OS via Gcc
Honza, How do you think about proposal in this RFC? Thanks a lot. Best Regards, Feng From: Martin Liška Sent: Friday, August 20, 2021 9:45 PM To: Feng Xue OS; gcc@gcc.gnu.org Cc: JiangNing OS; Jan Hubicka Subject: Re: [RFC] Whole Program Devirtualizatio

Re: GCC [RFC] Whole Program Devirtualization

2021-08-22 Thread Feng Xue OS via Gcc
We are not going to create a new devirtualization framework from scratch, just hope it to be an enhancement on current speculative devirtualization. The process does not need parse native code in library, but only resort to existing lightweight symbol resolution by LTO-prelinker. And C++ virtual di

[RFC] Whole Program Devirtualization

2021-08-20 Thread Feng Xue OS via Gcc
1. Background C++ Devirtualization is meant to determine all possible class type identities of a virtual dynamic call, and try to transform it to direct static call, or certain kind of statements with lower runtime cost. Current implementation in GCC tends to adopt a somewhat conservative scheme,

Question about non-POD class type

2021-05-14 Thread Feng Xue OS via Gcc
Sorry, sent to wrong mail list. From: Feng Xue OS Sent: Friday, May 14, 2021 4:30 PM To: gcc-patc...@gcc.gnu.org Subject: Question about non-POD class type For an instance of a non-POD class, can I always assume that any operation on it should be type-safe

Re: [RFC] A memory gathering optimization for loop

2021-05-06 Thread Feng Xue OS via Gcc
>> To simplify explanation of this memory gathering optimization, pseudo >> code on original nested loops is given as: >> >> outer-loop ( ) { /* data in inner loop are also invariant in outer loop. >> */ >> ... >> inner-loop (iter, iter_count) { /* inner loop to apply MGO */ >> >>

Re: [RFC] A memory gathering optimization for loop

2021-01-17 Thread Feng Xue OS via Gcc
>> -Original Message- >> From: Feng Xue OS >> Sent: Thursday, January 14, 2021 12:28 PM >> To: gcc@gcc.gnu.org >> Cc: JiangNing OS ; Hao Liu OS >> >> Subject: [RFC] A memory gathering optimization for loop >> >> 1. Background >> >> In a loop, it is optimal if only one memory stream is act

[RFC] A memory gathering optimization for loop

2021-01-13 Thread Feng Xue OS via Gcc
1. Background In a loop, it is optimal if only one memory stream is activated, that is, all memory operations sequentially access one data region. But that is always not the case, such as traversing link list and manipulating discrete arrays. In this scenario, the loop would contain multiple scatt

[RFC] A memory gathering optimization for loop

2021-01-13 Thread Feng Xue OS via Gcc
1. Background In a loop, it is optimal if only one memory stream is activated, that is, all memory operations sequentially access one data region. But that is always not the case, such as traversing link list and manipulating discrete arrays. In this scenario, the loop would contain multiple scatt

Re: [RFC] Add new flag to specify output constraint in match.pd

2020-09-02 Thread Feng Xue OS via Gcc
>> >> > >> >> >> >> >> There is a match-folding issue derived from pr94234. A piece of >> >> >> code like: >> >> >> >> >> >> int foo (int n) >> >> >> { >> >> >> int t1 = 8 * n; >> >> >> int t2 = 8 * (n - 1); >> >> >> >> >> >> return t1 - t2; >> >> >> } >> >> >> >> >> >> It

Re: [RFC] Add new flag to specify output constraint in match.pd

2020-09-02 Thread Feng Xue OS via Gcc
> >> >> >> There is a match-folding issue derived from pr94234. A piece of code >> >> like: >> >> >> >> int foo (int n) >> >> { >> >> int t1 = 8 * n; >> >> int t2 = 8 * (n - 1); >> >> >> >> return t1 - t2; >> >> } >> >> >> >> It can be perfectly caught by the rule "(A * C)

Re: [RFC] Add new flag to specify output constraint in match.pd

2020-08-23 Thread Feng Xue OS via Gcc
>> There is a match-folding issue derived from pr94234. A piece of code like: >> >> int foo (int n) >> { >> int t1 = 8 * n; >> int t2 = 8 * (n - 1); >> >> return t1 - t2; >> } >> >> It can be perfectly caught by the rule "(A * C) +- (B * C) -> (A +- B) * >> C", and >>

[RFC] Add new flag to specify output constraint in match.pd

2020-08-20 Thread Feng Xue OS via Gcc
Hi, There is a match-folding issue derived from pr94234. A piece of code like: int foo (int n) { int t1 = 8 * n; int t2 = 8 * (n - 1); return t1 - t2; } It can be perfectly caught by the rule "(A * C) +- (B * C) -> (A +- B) * C", and be folded to constant "8". But thi