On 05/31/2017 02:06 PM, Richard Biener wrote: > On Wed, May 31, 2017 at 2:01 PM, Jakub Jelinek <ja...@redhat.com> wrote: >> On Wed, May 31, 2017 at 01:57:48PM +0200, Martin Liška wrote: >>> On 05/31/2017 01:51 PM, Jakub Jelinek wrote: >>>> On Wed, May 31, 2017 at 01:46:00PM +0200, Richard Biener wrote: >>>>> Just wanting to add that "ab-"using options/variables to implement >>>>> what are really >>>>> function attributes doesn't look very clean. Unless the plan is to get >>>>> rid of >>>>> function attributes in favor of per-function options. >>>> >>>> Function attribute here is one thing (the way user writes it) and that >>>> combined with the command line options determines the sanitization >>>> performed >>>> (the function attributes only say what sanitization flags should be >>>> ignored). The proposed per-function variable is just a cache of this >>>> information, because parsing function attributes every time is way too >>>> expensive. >>> >>> But one the other hand every function decorated with such attribute will >>> lead >>> to having a separate copy of struct cl_optimization, which is quite big >>> structure. >> >> Separate? I thought cl_optimization structs are shared, so if you have 2 >> functions that have the same no_sanitize* attributes and all other >> optimization flags same as well, they should share OPTIMIZATION_NODE. > > Yes. For optimizing size we might want to tweak the machinery to use a bool > bitfield instead of {un,}signed ints for things that are really just > flags (true/false).
I've got written that on my TODO list. Will work on that some time in the stage1. Martin > > Richard. > >> Jakub