Re: Question about optimizing function pointers for direct function calls

2024-06-12 Thread Hanke Zhang via Gcc
1:57 AM Hanke Zhang wrote: > > > > Richard Biener 于2024年5月24日周五 14:39写道: > > > > > > On Fri, May 24, 2024 at 5:53 AM Hanke Zhang via Gcc > > > wrote: > > > > > > > > Hi, > > > > I got a question about optimizing function pointers for d

Re: Question about optimizing function pointers for direct function calls

2024-06-12 Thread Richard Biener via Gcc
On Wed, Jun 12, 2024 at 11:57 AM Hanke Zhang wrote: > > Richard Biener 于2024年5月24日周五 14:39写道: > > > > On Fri, May 24, 2024 at 5:53 AM Hanke Zhang via Gcc wrote: > > > > > > Hi, > > > I got a question about optimizing function pointers for direct &g

Re: Question about optimizing function pointers for direct function calls

2024-06-12 Thread Hanke Zhang via Gcc
Richard Biener 于2024年5月24日周五 14:39写道: > > On Fri, May 24, 2024 at 5:53 AM Hanke Zhang via Gcc wrote: > > > > Hi, > > I got a question about optimizing function pointers for direct > > function calls in C. > > > > Consider the following scenario: one of t

Re: Question about optimizing function pointers for direct function calls

2024-05-24 Thread Jeff Law via Gcc
On 5/23/24 9:51 PM, Hanke Zhang via Gcc wrote: Hi, I got a question about optimizing function pointers for direct function calls in C. Consider the following scenario: one of the fields of a structure is a function pointer, and all its assignments come from the same function. Can all its

Re: Question about optimizing function pointers for direct function calls

2024-05-23 Thread Richard Biener via Gcc
On Fri, May 24, 2024 at 5:53 AM Hanke Zhang via Gcc wrote: > > Hi, > I got a question about optimizing function pointers for direct > function calls in C. > > Consider the following scenario: one of the fields of a structure is a > function pointer, and all its assignmen

Question about optimizing function pointers for direct function calls

2024-05-23 Thread Hanke Zhang via Gcc
Hi, I got a question about optimizing function pointers for direct function calls in C. Consider the following scenario: one of the fields of a structure is a function pointer, and all its assignments come from the same function. Can all its uses be replaced by direct calls to this function? So