Re: [RFC] COMDAT Safe Module Level Multi versioning

2016-09-12 Thread Sriraman Tallam
On Mon, Oct 5, 2015 at 2:58 PM, Sriraman Tallam wrote: > On Wed, Sep 9, 2015 at 4:01 PM, Sriraman Tallam wrote: >> On Wed, Sep 2, 2015 at 4:32 PM, Sriraman Tallam wrote: >>> >>> On Tue, Aug 18, 2015 at 9:46 PM, Cary Coutant wrote: >>> >> Thanks, will make those changes. Do you recommend a diff

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-10-05 Thread Sriraman Tallam
On Wed, Sep 9, 2015 at 4:01 PM, Sriraman Tallam wrote: > On Wed, Sep 2, 2015 at 4:32 PM, Sriraman Tallam wrote: >> >> On Tue, Aug 18, 2015 at 9:46 PM, Cary Coutant wrote: >> >> Thanks, will make those changes. Do you recommend a different name >> >> for this flag like -fmake-comdat-functions-st

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-09-09 Thread Sriraman Tallam
On Wed, Sep 2, 2015 at 4:32 PM, Sriraman Tallam wrote: > > On Tue, Aug 18, 2015 at 9:46 PM, Cary Coutant wrote: > >> Thanks, will make those changes. Do you recommend a different name > >> for this flag like -fmake-comdat-functions-static? > > > > Well, the C++ ABI refers to this as "vague linka

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-09-02 Thread Sriraman Tallam
On Tue, Aug 18, 2015 at 9:46 PM, Cary Coutant wrote: >> Thanks, will make those changes. Do you recommend a different name >> for this flag like -fmake-comdat-functions-static? > > Well, the C++ ABI refers to this as "vague linkage." It may be a bit > too long or too ABI-specific, but maybe somet

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-08-18 Thread Cary Coutant
> Thanks, will make those changes. Do you recommend a different name > for this flag like -fmake-comdat-functions-static? Well, the C++ ABI refers to this as "vague linkage." It may be a bit too long or too ABI-specific, but maybe something like -f[no-]use-vague-linkage-for-functions or -f[no-]fu

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-08-18 Thread Sriraman Tallam
On Tue, Aug 18, 2015 at 2:14 PM, Cary Coutant wrote: > Based on Richard's suggestion, I have a patch to localize comdat > functions which seems like a very effective solution to this problem. > The text size increase is limited to the extra comdat copies generated > for the special

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-08-18 Thread Cary Coutant
> +@item -fno-weak-comdat-functions > +@opindex fno-weak-comdat-functions > +Do not use weak symbol support for comdat non-virtual functions, even if it > +is provided by the linker. By default, G++ uses weak symbols if they are > +available. This option is useful when comdat functions generated

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-08-18 Thread Cary Coutant
Based on Richard's suggestion, I have a patch to localize comdat functions which seems like a very effective solution to this problem. The text size increase is limited to the extra comdat copies generated for the specialized modules (modules with unsafe options) which is u

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-08-18 Thread Sriraman Tallam
On Wed, Aug 12, 2015 at 10:36 PM, Sriraman Tallam wrote: > On Tue, Aug 4, 2015 at 11:43 AM, Sriraman Tallam wrote: >> On Tue, Jun 16, 2015 at 4:22 PM, Sriraman Tallam wrote: >>> On Tue, May 19, 2015 at 9:11 AM, Xinliang David Li >>> wrote: > > Hm. But which options are unsafe? Also w

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-08-12 Thread Sriraman Tallam
On Tue, Aug 4, 2015 at 11:43 AM, Sriraman Tallam wrote: > On Tue, Jun 16, 2015 at 4:22 PM, Sriraman Tallam wrote: >> On Tue, May 19, 2015 at 9:11 AM, Xinliang David Li >> wrote: Hm. But which options are unsafe? Also wouldn't it be better to simply _not_ have unsafe options pro

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-08-04 Thread Sriraman Tallam
On Tue, Jun 16, 2015 at 4:22 PM, Sriraman Tallam wrote: > On Tue, May 19, 2015 at 9:11 AM, Xinliang David Li wrote: >>> >>> Hm. But which options are unsafe? Also wouldn't it be better to simply >>> _not_ have unsafe options produce comdats but always make local clones >>> for them (thus emit t

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-06-16 Thread Sriraman Tallam
On Tue, May 19, 2015 at 9:11 AM, Xinliang David Li wrote: >> >> Hm. But which options are unsafe? Also wouldn't it be better to simply >> _not_ have unsafe options produce comdats but always make local clones >> for them (thus emit the comdat with "unsafe" flags dropped)? > > Always localize com

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-05-19 Thread Sriraman Tallam
On Tue, May 19, 2015 at 10:22 AM, Yury Gribov wrote: > On 05/19/2015 09:16 AM, Sriraman Tallam wrote: >> >> We have the following problem with selectively compiling modules with >> -m options and I have provided a solution to solve this. I would >> like to hear what you think. >> >> Multi version

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-05-19 Thread Yury Gribov
On 05/19/2015 09:16 AM, Sriraman Tallam wrote: We have the following problem with selectively compiling modules with -m options and I have provided a solution to solve this. I would like to hear what you think. Multi versioning at module granularity is done by compiling a subset of modules with

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-05-19 Thread Sriraman Tallam
On Tue, May 19, 2015 at 2:39 AM, Richard Biener wrote: > On Tue, May 19, 2015 at 8:16 AM, Sriraman Tallam wrote: >> We have the following problem with selectively compiling modules with >> -m options and I have provided a solution to solve this. I would >> like to hear what you think. >> >> Mult

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-05-19 Thread Xinliang David Li
> > Hm. But which options are unsafe? Also wouldn't it be better to simply > _not_ have unsafe options produce comdats but always make local clones > for them (thus emit the comdat with "unsafe" flags dropped)? Always localize comdat functions may lead to text size increase. It does not work if

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-05-19 Thread Richard Biener
On Tue, May 19, 2015 at 8:16 AM, Sriraman Tallam wrote: > We have the following problem with selectively compiling modules with > -m options and I have provided a solution to solve this. I would > like to hear what you think. > > Multi versioning at module granularity is done by compiling a subse

[RFC] COMDAT Safe Module Level Multi versioning

2015-05-18 Thread Sriraman Tallam
We have the following problem with selectively compiling modules with -m options and I have provided a solution to solve this. I would like to hear what you think. Multi versioning at module granularity is done by compiling a subset of modules with advanced ISA instructions, supported on later ge