From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71686 invoked by alias); 31 May 2017 12:25:11 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 71673 invoked by uid 89); 31 May 2017 12:25:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:pxaa, H*i:sk:UwZw4UK, H*MI:pxaa, H*MI:sk:UwZw4UK X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 May 2017 12:25:09 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 29757AD54; Wed, 31 May 2017 12:25:11 +0000 (UTC) Subject: Re: [PATCH v2] Implement no_sanitize function attribute To: Richard Biener , Jakub Jelinek Cc: "Joseph S. Myers" , GCC Patches References: <72103b1d-0119-f05d-043d-ca2edf242bf3@suse.cz> <20170531083543.GQ24023@tucnak> <83f8580a-03e1-81eb-3216-a1c998810b90@suse.cz> <20170531113321.GT24023@tucnak> <20170531115102.GU24023@tucnak> <67e48d3c-0043-41e3-611f-85ae7fa01826@suse.cz> <20170531120152.GV24023@tucnak> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: Date: Wed, 31 May 2017 12:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg02349.txt.bz2 On 05/31/2017 02:06 PM, Richard Biener wrote: > On Wed, May 31, 2017 at 2:01 PM, Jakub Jelinek 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