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

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

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,

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

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 tmsri...@google.com wrote: On Tue, Aug 4, 2015 at 11:43 AM, Sriraman Tallam tmsri...@google.com wrote: On Tue, Jun 16, 2015 at 4:22 PM, Sriraman Tallam tmsri...@google.com wrote: On Tue, May 19, 2015 at 9:11 AM, Xinliang David Li

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 usually only a few.

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 ccout...@gmail.com 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

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

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 in

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 tmsri...@google.com wrote: On Tue, Jun 16, 2015 at 4:22 PM, Sriraman Tallam tmsri...@google.com wrote: On Tue, May 19, 2015 at 9:11 AM, Xinliang David Li davi...@google.com wrote: Hm. But which options are unsafe? Also wouldn't it be better

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 tmsri...@google.com wrote: On Tue, May 19, 2015 at 9:11 AM, Xinliang David Li davi...@google.com 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

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 davi...@google.com 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

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 tmsri...@google.com wrote: We have the following problem with selectively compiling modules with -misa 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

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 richard.guent...@gmail.com wrote: On Tue, May 19, 2015 at 8:16 AM, Sriraman Tallam tmsri...@google.com wrote: We have the following problem with selectively compiling modules with -misa options and I have provided a solution to solve this. I

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 the

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 -misa 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

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 y.gri...@samsung.com wrote: On 05/19/2015 09:16 AM, Sriraman Tallam wrote: We have the following problem with selectively compiling modules with -misa options and I have provided a solution to solve this. I would like to hear what you think.