Question about -moutline-atomic under -mcmodel-large

2020-09-17 Thread Bin.Cheng via Gcc
Hi, Compiling below program: #define STREAM_ARRAY_SIZE (1107296256) double a[STREAM_ARRAY_SIZE], b[STREAM_ARRAY_SIZE], c[STREAM_ARRAY_SIZE]; typedef struct { volatile int locked; } spinlock_t; volatile int cnt32=0; volatile long cnt64=0; void atom(){ __atomic_fetch_add(&cnt32,

Re: cache optimization through samping hardware event

2020-11-18 Thread Bin.Cheng via Gcc
On Tue, Nov 10, 2020 at 3:04 PM 172060045 <172060...@hdu.edu.cn> wrote: > > Hi, > > Recently, I was interested in GCC AutoFDO optimization, which works by > sampling specific PMU event on production machines and using those profiles > to guide optimization. In this way, information such as cache

Re: State of AutoFDO in GCC

2021-04-22 Thread Bin.Cheng via Gcc
On Fri, Apr 23, 2021 at 4:16 AM Martin Liška wrote: > > On 4/22/21 9:58 PM, Eugene Rozenfeld via Gcc wrote: > > GCC documentation for AutoFDO points to create_gcov tool that converts > > perf.data file into gcov format that can be consumed by gcc with > > -fauto-profile (https://gcc.gnu.org/onli

Question about builtin_free doesn't read memory

2021-11-27 Thread Bin.Cheng via Gcc
Hi, In function ref_maybe_used_by_call_p_1, there is below code snippet /* The following builtins do not read from memory. */ case BUILT_IN_FREE: ... return false; I am confused because free function does read from (and even write to) memory pointed to by pas

Re: Question about builtin_free doesn't read memory

2021-11-28 Thread Bin.Cheng via Gcc
On Sun, Nov 28, 2021 at 4:11 PM Jan Hubicka wrote: > > > Hi, > > In function ref_maybe_used_by_call_p_1, there is below code snippet > > /* The following builtins do not read from memory. */ > > case BUILT_IN_FREE: > > ... > >return false; > > > > I am confu