http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55975



--- Comment #34 from Kostya Serebryany <kcc at gcc dot gnu.org> 2013-01-23 
13:50:31 UTC ---

> Do you really want to make kHighMemEnd dynamic always?  Shouldn't it be 
> dynamic

> only when needed (i.e. for configurations like ppc64 which now require it)?



If we make this dynamic on PPC and constant elsewhere, we risk breaking

PPC frequently because we typically don't test on PPC (we don't even have a

bot!).

We can easily introduce a change that will assume kHighMemEnd is a constant. 



> Otherwise it will slow down many of the inlines that use this heavily.



Hopefully, not that bad. 

unless an application is malloc-bound, we don't enter asan-rt too often. 

If it is malloc-bound, we are in trouble anyway, because the allocator is very

expensive in all other parts. 



> Furthermore, in configurations where kHighMemEnd is dynamic, also IMHO all

> asan_mapping.h defines that are based on it should also be global variables

> to avoid unnecessary runtime computations everywhere.

> I mean kHighMemBeg, kHighShadowBeg, kHighShadowEnd, kShadowGapEnd.



Hm... I would not change that w/o some proof (benchmarks results). 

When e.g. we access two of these variables, we will be doing two loads instead

of one load and arithmetic. Not a clear choice.

Reply via email to