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: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2015-02-03 Thread Sriraman Tallam
On Thu, Dec 4, 2014 at 8:46 AM, H.J. Lu wrote: > On Thu, Dec 4, 2014 at 4:44 AM, Uros Bizjak wrote: >> On Wed, Dec 3, 2014 at 10:35 PM, H.J. Lu wrote: >> It would probably help reviewers if you pointed to actual path submission [1], which unfortunately contains the explanation

Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2015-02-03 Thread Sriraman Tallam
+davidxl +ccoutant On Tue, Feb 3, 2015 at 11:25 AM, Sriraman Tallam wrote: > On Thu, Dec 4, 2014 at 8:46 AM, H.J. Lu wrote: >> On Thu, Dec 4, 2014 at 4:44 AM, Uros Bizjak wrote: >>> On Wed, Dec 3, 2014 at 10:35 PM, H.J. Lu wrote: >>> >>>>>>>&g

Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2015-02-03 Thread Sriraman Tallam
On Tue, Feb 3, 2015 at 11:36 AM, Jakub Jelinek wrote: > On Tue, Feb 03, 2015 at 11:25:38AM -0800, Sriraman Tallam wrote: >> This was the original patch to i386.c to let global accesses take >> advantage of copy relocations and avoid the GOT. >> >&g

Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2015-02-03 Thread Sriraman Tallam
On Tue, Feb 3, 2015 at 1:29 PM, H.J. Lu wrote: > On Tue, Feb 3, 2015 at 1:20 PM, Sriraman Tallam wrote: >> On Tue, Feb 3, 2015 at 11:36 AM, Jakub Jelinek wrote: >>> On Tue, Feb 03, 2015 at 11:25:38AM -0800, Sriraman Tallam wrote: >>>> This was the original patch to

Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2015-02-04 Thread Sriraman Tallam
On Tue, Feb 3, 2015 at 5:16 PM, H.J. Lu wrote: > On Tue, Feb 3, 2015 at 2:19 PM, Jakub Jelinek wrote: >> On Tue, Feb 03, 2015 at 02:03:14PM -0800, H.J. Lu wrote: >>> So we aren't SYMBOL_REF_EXTERNAL_P nor >>> SYMBOL_REF_LOCAL_P. What do we reference? >> >> That is reasonable. There is no guaran

Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2015-02-04 Thread Sriraman Tallam
On Wed, Feb 4, 2015 at 10:45 AM, H.J. Lu wrote: > On Wed, Feb 4, 2015 at 10:42 AM, Jakub Jelinek wrote: >> On Wed, Feb 04, 2015 at 10:38:48AM -0800, H.J. Lu wrote: >>> Common symbol should be resolved locally for PIE. >> >> binds_local_p yes, binds_to_current_def_p no. >> > > Is SYMBOL_REF_LOCAL_

Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2015-02-04 Thread Sriraman Tallam
On Wed, Feb 4, 2015 at 10:57 AM, H.J. Lu wrote: > On Wed, Feb 4, 2015 at 10:51 AM, Sriraman Tallam wrote: >> On Wed, Feb 4, 2015 at 10:45 AM, H.J. Lu wrote: >>> On Wed, Feb 4, 2015 at 10:42 AM, Jakub Jelinek wrote: >>>> On Wed, Feb 04, 2015 at 10:38:48AM -080

Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2015-02-05 Thread Sriraman Tallam
On Thu, Feb 5, 2015 at 11:59 AM, Richard Henderson wrote: > On 02/05/2015 11:01 AM, H.J. Lu wrote: >> Can you elaborate why it depends on COPY relocation? There >> is no COPY relocation on x86-64. > > Ho hum, we appear to have switched topics mid-thread. > > I agree that we cannot override a weak

Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2015-02-05 Thread Sriraman Tallam
On Thu, Feb 5, 2015 at 2:23 PM, H.J. Lu wrote: > On Thu, Feb 5, 2015 at 2:05 PM, Sriraman Tallam wrote: >> On Thu, Feb 5, 2015 at 11:59 AM, Richard Henderson wrote: >>> On 02/05/2015 11:01 AM, H.J. Lu wrote: >>>> Can you elaborate why it depends on COPY relo

Re: [PATCH v2, i386]: Fix PR 63538, With -mcmodel=medium .lrodata accesses do not use 64-bit addresses

2014-11-04 Thread Sriraman Tallam
On Tue, Nov 4, 2014 at 10:47 AM, Uros Bizjak wrote: > On Tue, Nov 4, 2014 at 10:46 AM, Uros Bizjak wrote: > >>> Following patch fixes PR 63538, where the data in the large data >>> section was accessed through 32bit address. The patch unifies places >>> where large data sections are determined an

Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2014-11-10 Thread Sriraman Tallam
Ping. On Mon, Oct 6, 2014 at 1:43 PM, Sriraman Tallam wrote: > Ping. > > On Mon, Sep 29, 2014 at 10:57 AM, Sriraman Tallam wrote: >> Ping. >> >> On Fri, Sep 19, 2014 at 2:11 PM, Sriraman Tallam wrote: >>> Hi Richard, >>> >>> I also ra

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, wi

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 bet

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

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

Using -ffunction-sections and -p

2012-11-04 Thread Sriraman Tallam
Hi, Currently, using -ffunction-sections and -p together results in a warning. I ran into this problem when compiling the kernel. This is discussed in this thread: http://gcc.gnu.org/ml/gcc-help/2008-11/msg00128.html Ian's reply suggests this warning is no longer necessary and can be removed.

Re: User directed Function Multiversioning via Function Overloading (issue5752064)

2012-11-06 Thread Sriraman Tallam
On Tue, Nov 6, 2012 at 7:52 AM, Jason Merrill wrote: > On 11/05/2012 09:38 PM, Sriraman Tallam wrote: >> >> + /* For multi-versioned functions, more than one match is just fine. >> >> +Call decls_match to make sure they are different because the

Re: User directed Function Multiversioning via Function Overloading (issue5752064)

2012-11-09 Thread Sriraman Tallam
Hi Jason, Made all the changes and attached patch. Ok to commit? Thanks, -Sri. On Tue, Nov 6, 2012 at 7:52 AM, Jason Merrill wrote: > On 11/05/2012 09:38 PM, Sriraman Tallam wrote: >> >> + /* For multi-versioned functions, more than one match is just fine. >

Re: User directed Function Multiversioning via Function Overloading (issue5752064)

2012-11-12 Thread Sriraman Tallam
Hi Jason, Made the changes. Also fixed one more segfault bug when ifunc is not supported. Thanks, -Sri. On Sun, Nov 11, 2012 at 9:04 PM, Jason Merrill wrote: > On 11/09/2012 08:33 PM, Sriraman Tallam wrote: >> >> + /* Skip calling decls_match for vers

Re: User directed Function Multiversioning via Function Overloading (issue5752064)

2012-11-13 Thread Sriraman Tallam
Patch committed now after making the changes. Thanks, -Sri. On Mon, Nov 12, 2012 at 6:39 PM, Jason Merrill wrote: > On 11/12/2012 08:11 PM, Sriraman Tallam wrote: >> >> + && !targetm.target_option.function_versions (fn, >> +TREE_PURPO

Re: Using -ffunction-sections and -p

2012-11-14 Thread Sriraman Tallam
On Sun, Nov 4, 2012 at 9:03 PM, Ian Lance Taylor wrote: > On Sun, Nov 4, 2012 at 8:04 PM, Sriraman Tallam wrote: >> >>Currently, using -ffunction-sections and -p together results in a >> warning. I ran into this problem when compiling the kernel. This is >&g

[PATCH] Function Multiversioning Bug, checking for function versions

2012-11-15 Thread Sriraman Tallam
Hi, Currently, function multiversioning determines that two functions are different by comparing the arch type and isa flags that are set after the target string is processed. This leads to cases where the versions become identical when the command-line target options are altered. For example

Re: [PATCH] Function Multiversioning Bug, checking for function versions

2012-11-16 Thread Sriraman Tallam
Hi, The previous patch was incomplete because the front-end strips off invalid target attributes which I did not consider. The attached updated patch handles this with updated test cases. Thanks, -Sri. On Thu, Nov 15, 2012 at 2:08 PM, Sriraman Tallam wrote: > Hi, > >Currently,

Re: Using -ffunction-sections and -p

2012-12-04 Thread Sriraman Tallam
On Tue, Dec 4, 2012 at 1:31 PM, Jeff Law wrote: > On 12/03/2012 01:08 PM, Sriraman Tallam wrote: >> >> Hi Jeff, >> >> Wondering if you got a chance to do this? > > Hmm, thinking more about this, it couldn't have been a 32 bit HPUX issue. > First t

Re: Using -ffunction-sections and -p

2012-12-07 Thread Sriraman Tallam
efetch_loop_arrays > 0) { Thanks, -Sri. On Tue, Dec 4, 2012 at 1:43 PM, Sriraman Tallam wrote: > On Tue, Dec 4, 2012 at 1:31 PM, Jeff Law wrote: >> On 12/03/2012 01:08 PM, Sriraman Tallam wrote: >>> >>> Hi Jeff, >>> >>> Wondering if yo

Re: [PATCH] Generate a label for the split cold function while using -freorder-blocks-and-partition

2013-04-25 Thread Sriraman Tallam
On Tue, Apr 23, 2013 at 9:59 PM, Jakub Jelinek wrote: > On Tue, Apr 23, 2013 at 03:58:06PM -0700, Sriraman Tallam wrote: >> This patch generates labels for cold function parts that are split when >> using the option -freorder-blocks-and-partition. The cold label name >

Re: [PATCH] Generate a label for the split cold function while using -freorder-blocks-and-partition

2013-04-25 Thread Sriraman Tallam
Attaching an updated patch. Thanks Sri On Thu, Apr 25, 2013 at 4:42 PM, Sriraman Tallam wrote: > On Tue, Apr 23, 2013 at 9:59 PM, Jakub Jelinek wrote: >> On Tue, Apr 23, 2013 at 03:58:06PM -0700, Sriraman Tallam wrote: >>> This patch generates labels for cold function pa

Re: GCC does not support *mmintrin.h with function specific opts

2013-04-29 Thread Sriraman Tallam
On Thu, Apr 25, 2013 at 12:41 PM, Joseph S. Myers wrote: > On Tue, 16 Apr 2013, Sriraman Tallam wrote: > >> Ok, it is on by default now. There is a way to turn it off, with >> -mno-generate-builtins. > > Any new option needs documenting in invoke.texi. Added and new pat

Re: GCC does not support *mmintrin.h with function specific opts

2013-05-02 Thread Sriraman Tallam
Ping. On Mon, Apr 29, 2013 at 10:47 AM, Sriraman Tallam wrote: > On Thu, Apr 25, 2013 at 12:41 PM, Joseph S. Myers > wrote: >> On Tue, 16 Apr 2013, Sriraman Tallam wrote: >> >>> Ok, it is on by default now. There is a way to turn it off, with >>> -mno-gen

Re: [PATCH] Generate a label for the split cold function while using -freorder-blocks-and-partition

2013-05-07 Thread Sriraman Tallam
Ping. On Thu, Apr 25, 2013 at 4:50 PM, Sriraman Tallam wrote: > Attaching an updated patch. > > Thanks > Sri > > On Thu, Apr 25, 2013 at 4:42 PM, Sriraman Tallam wrote: >> On Tue, Apr 23, 2013 at 9:59 PM, Jakub Jelinek wrote: >>> On Tue, Apr 23, 2013 at 03:58:

Re: GCC does not support *mmintrin.h with function specific opts

2013-05-07 Thread Sriraman Tallam
Ping. On Thu, May 2, 2013 at 3:51 PM, Sriraman Tallam wrote: > Ping. > > On Mon, Apr 29, 2013 at 10:47 AM, Sriraman Tallam wrote: >> On Thu, Apr 25, 2013 at 12:41 PM, Joseph S. Myers >> wrote: >>> On Tue, 16 Apr 2013, Sriraman Tallam wrote: >>> >>&g

Re: GCC does not support *mmintrin.h with function specific opts

2013-05-09 Thread Sriraman Tallam
cc:Diego On Tue, May 7, 2013 at 2:41 PM, Sriraman Tallam wrote: > Ping. > > On Thu, May 2, 2013 at 3:51 PM, Sriraman Tallam wrote: >> Ping. >> >> On Mon, Apr 29, 2013 at 10:47 AM, Sriraman Tallam >> wrote: >>> On Thu, Apr 25, 2013 at 12:41 PM, Josep

Re: [PATCH] Generate a label for the split cold function while using -freorder-blocks-and-partition

2013-05-09 Thread Sriraman Tallam
cc:Diego On Tue, May 7, 2013 at 2:41 PM, Sriraman Tallam wrote: > Ping. > > On Thu, Apr 25, 2013 at 4:50 PM, Sriraman Tallam wrote: >> Attaching an updated patch. >> >> Thanks >> Sri >> >> On Thu, Apr 25, 2013 at 4:42 PM, Sriraman Tallam wrot

[PATCH] Dynamic dispatch of multiversioned functions and CPU mocks for code coverage.

2013-05-09 Thread Sriraman Tallam
Hi, This patch is an enhancement to the Function Multiversioning feature. This patch achieves two things: * Primarily, this patch makes it easy to test for code coverage of multiversioned functions. * Secondary, It makes function multiversioning work when there is no ifunc support. Sin

Re: [PATCH] Dynamic dispatch of multiversioned functions and CPU mocks for code coverage.

2013-05-10 Thread Sriraman Tallam
On Fri, May 10, 2013 at 6:34 AM, Joseph S. Myers wrote: > On Thu, 9 May 2013, Sriraman Tallam wrote: > >> Then, I plan to add the following hooks to libgcc (in a different patch) : >> >> int set_mock_cpu_is (const char *cpu); >> int set_mock_cpu_supports (const ch

Re: GCC does not support *mmintrin.h with function specific opts

2013-05-13 Thread Sriraman Tallam
Ping. On Thu, May 9, 2013 at 2:20 PM, Sriraman Tallam wrote: > cc:Diego > > On Tue, May 7, 2013 at 2:41 PM, Sriraman Tallam wrote: >> Ping. >> >> On Thu, May 2, 2013 at 3:51 PM, Sriraman Tallam wrote: >>> Ping. >>> >>> On Mon, Apr 29, 2013

Re: [PATCH] Generate a label for the split cold function while using -freorder-blocks-and-partition

2013-05-13 Thread Sriraman Tallam
Ping. On Thu, May 9, 2013 at 2:22 PM, Sriraman Tallam wrote: > cc:Diego > > On Tue, May 7, 2013 at 2:41 PM, Sriraman Tallam wrote: >> Ping. >> >> On Thu, Apr 25, 2013 at 4:50 PM, Sriraman Tallam wrote: >>> Attaching an updated patch. >>> >>&g

Re: GCC does not support *mmintrin.h with function specific opts

2013-05-15 Thread Sriraman Tallam
On Tue, May 14, 2013 at 3:04 AM, Jakub Jelinek wrote: > On Tue, May 14, 2013 at 10:39:13AM +0200, Jakub Jelinek wrote: >> When trying with -O2 -mno-avx: >> #ifndef __AVX__ >> #pragma GCC push_options >> #pragma GCC target("avx") >> #define __DISABLE_AVX__ >> #endif >> typedef float __v8sf __attrib

Re: GCC does not support *mmintrin.h with function specific opts

2013-05-16 Thread Sriraman Tallam
any thing to def_builtin. I have included 4 test case, where intrinsics_4.c uses your example with __mm256_and_ps. I had to fix a bug with lzcnt builtins in i386-common.c as that was not handled there. Thanks Sri On Wed, May 15, 2013 at 7:25 PM, Sriraman Tallam wrote: > On Tue, May 14, 2013

Re: GCC does not support *mmintrin.h with function specific opts

2013-05-16 Thread Sriraman Tallam
On Thu, May 16, 2013 at 3:55 PM, Marc Glisse wrote: > On Thu, 16 May 2013, Sriraman Tallam wrote: > >> Hi Jakub, >> >> I have taken your proposed changes and made patch for this. Please >> let me know what you think. I have changed only the headers mmintri

Re: GCC does not support *mmintrin.h with function specific opts

2013-05-20 Thread Sriraman Tallam
On Fri, May 17, 2013 at 11:21 PM, Jakub Jelinek wrote: > On Fri, May 17, 2013 at 09:00:21PM -0700, Sriraman Tallam wrote: >> --- ipa-inline.c (revision 198950) >> +++ ipa-inline.c (working copy) >> @@ -374,7 +374,33 @@ can_early_inline_edge_p (struct cgraph_edge

[patch] PR 57362

2013-05-22 Thread Sriraman Tallam
Hi, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57362 This ICE reported here happens because the array storing the function versions that should be processed is not indexed correctly. This patch fixes this. This only happens when some versions cannot be dispatched because a dispatcher for t

Re: GCC does not support *mmintrin.h with function specific opts

2013-05-23 Thread Sriraman Tallam
Ping, for review of ipa-inline.c change. Sri On Mon, May 20, 2013 at 11:04 AM, Sriraman Tallam wrote: > On Fri, May 17, 2013 at 11:21 PM, Jakub Jelinek wrote: >> On Fri, May 17, 2013 at 09:00:21PM -0700, Sriraman Tallam wrote: >>> --- ipa-inline.c (revision 198950) &g

Re: [patch] PR 57362

2013-06-04 Thread Sriraman Tallam
Hi, Sorry for the long delay. Test case added and patch attached. OK to commit? Thanks Sri On Wed, May 22, 2013 at 5:14 PM, H.J. Lu wrote: > On Wed, May 22, 2013 at 4:20 PM, Sriraman Tallam wrote: >> Hi, >> >>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57362 >&

Re: GCC does not support *mmintrin.h with function specific opts

2013-06-04 Thread Sriraman Tallam
Ping. On Thu, May 23, 2013 at 2:41 PM, Sriraman Tallam wrote: > Ping, for review of ipa-inline.c change. > > Sri > > On Mon, May 20, 2013 at 11:04 AM, Sriraman Tallam wrote: >> On Fri, May 17, 2013 at 11:21 PM, Jakub Jelinek wrote: >>> On Fri, May 17, 2013 at 09:

PR57548 - Call to multiversioned function from global namespace

2013-06-07 Thread Sriraman Tallam
Hi, See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57548 The ICE here is because of a multi-versioned function called from global namespace and has no caller. This ICEs in target hook ix86_can_inline_p as caller is 0x0. The following simple patch attached fixes this problem. * cp/call

Re: PR57548 - Call to multiversioned function from global namespace

2013-06-10 Thread Sriraman Tallam
On Sat, Jun 8, 2013 at 4:03 PM, David Edelsohn wrote: > FYI, gcc/cp has it's own ChangeLog file. Yes, it is confusing that > some directories have their own and others do not. Fixed now. Sri. > > - David

Re: GCC does not support *mmintrin.h with function specific opts

2013-06-10 Thread Sriraman Tallam
Ping. On Tue, Jun 4, 2013 at 2:41 PM, Sriraman Tallam wrote: > Ping. > > On Thu, May 23, 2013 at 2:41 PM, Sriraman Tallam wrote: >> Ping, for review of ipa-inline.c change. >> >> Sri >> >> On Mon, May 20, 2013 at 11:04 AM, Sriraman Tallam >> wrote

Re: [patch] PR 57362

2013-06-10 Thread Sriraman Tallam
Ping. On Tue, Jun 4, 2013 at 11:55 AM, Sriraman Tallam wrote: > Hi, > >Sorry for the long delay. Test case added and patch attached. OK to > commit? > > Thanks > Sri > > On Wed, May 22, 2013 at 5:14 PM, H.J. Lu wrote: >> On Wed, May 22, 2013 at 4:20 P

Re: GCC does not support *mmintrin.h with function specific opts

2013-06-12 Thread Sriraman Tallam
. * gcc.target/i386/inline_error.c: New test. Thanks Sri On Mon, Jun 10, 2013 at 4:10 PM, Sriraman Tallam wrote: > Ping. > > On Tue, Jun 4, 2013 at 2:41 PM, Sriraman Tallam wrote: >> Ping. >> >> On Thu, May 23, 2013 at 2:41 PM, Sriraman Tallam wrote: >>&

Re: GCC does not support *mmintrin.h with function specific opts

2013-06-13 Thread Sriraman Tallam
On Thu, Jun 13, 2013 at 10:07 AM, Jan Hubicka wrote: >> Can you create a helper function to flag the error and perhaps also >> put that check inside can_inline_edge_p ? >> >> David >> >> >> On Wed, Jun 12, 2013 at 6:00 PM, Sriraman Tallam wrote: >&

Re: GCC does not support *mmintrin.h with function specific opts

2013-06-13 Thread Sriraman Tallam
; David >> >> >> >> >> >> On Wed, Jun 12, 2013 at 6:00 PM, Sriraman Tallam >> >> wrote: >> >> > Hi Honza, >> >> > >> >> >I have isolated the ipa-inline.c part into a separate patch with a >> &g

Re: GCC does not support *mmintrin.h with function specific opts

2013-06-13 Thread Sriraman Tallam
On Thu, Jun 13, 2013 at 12:40 PM, Jan Hubicka wrote: >> * tree-inline.c (expand_call_inline): Allow the error to be flagged >> in early inline pass. >> * ipa-inline.c (inline_always_inline_functions): Pretend always_inline >> functions are inlined during failures to flag an

Re: GCC does not support *mmintrin.h with function specific opts

2013-06-14 Thread Sriraman Tallam
On Fri, Jun 14, 2013 at 1:43 AM, Richard Biener wrote: > On Fri, Jun 14, 2013 at 4:52 AM, Sriraman Tallam wrote: >> On Thu, Jun 13, 2013 at 12:40 PM, Jan Hubicka wrote: >>>> * tree-inline.c (expand_call_inline): Allow the error to be flagged >>&g

Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2014-09-08 Thread Sriraman Tallam
On Tue, Sep 2, 2014 at 1:40 PM, Richard Henderson wrote: > On 06/20/2014 05:17 PM, Sriraman Tallam wrote: >> Index: config/i386/i386.c >> === >> --- config/i386/i386.c(revision 211826) >

Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2014-09-19 Thread Sriraman Tallam
. I linked with gold to make the test pass. Could you please take another look at this patch? Thanks Sri On Mon, Sep 8, 2014 at 3:19 PM, Sriraman Tallam wrote: > On Tue, Sep 2, 2014 at 1:40 PM, Richard Henderson wrote: >> On 06/20/2014 05:17 PM, Sriraman Tallam wrote: >>&g

Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2014-09-29 Thread Sriraman Tallam
Ping. On Fri, Sep 19, 2014 at 2:11 PM, Sriraman Tallam wrote: > Hi Richard, > > I also ran the gcc testsuite with > RUNTESTFLAGS="--tool_opts=-mcopyrelocs" to check for issues. The only > test that failed was g++.dg/tsan/default_options.C. It uses -fpie > -pie and

Re: GCC does not support *mmintrin.h with function specific opts

2013-06-17 Thread Sriraman Tallam
On Fri, Jun 14, 2013 at 11:08 AM, Sriraman Tallam wrote: > On Fri, Jun 14, 2013 at 1:43 AM, Richard Biener > wrote: >> On Fri, Jun 14, 2013 at 4:52 AM, Sriraman Tallam wrote: >>> On Thu, Jun 13, 2013 at 12:40 PM, Jan Hubicka wrote: >>>>> * tree-inli

Re: GCC does not support *mmintrin.h with function specific opts

2013-06-18 Thread Sriraman Tallam
On Mon, Jun 17, 2013 at 10:49 AM, Sriraman Tallam wrote: > On Fri, Jun 14, 2013 at 11:08 AM, Sriraman Tallam wrote: >> On Fri, Jun 14, 2013 at 1:43 AM, Richard Biener >> wrote: >>> On Fri, Jun 14, 2013 at 4:52 AM, Sriraman Tallam >>> wrote: >>>>

[wwwdocs] Release note for x86 intrinsics usability

2013-06-24 Thread Sriraman Tallam
Hi, I recently committed a patch: http://gcc.gnu.org/ml/gcc-patches/2013-06/msg01349.html to allow x86 intrinsics to be called from functions with appropriate target attributes without having to compile the entire file with -mxxx. I have added a release note for this. Please see if this is ok

Re: [wwwdocs] Release note for x86 intrinsics usability

2013-06-24 Thread Sriraman Tallam
On Mon, Jun 24, 2013 at 2:55 PM, Gerald Pfeifer wrote: > On Mon, 24 Jun 2013, Sriraman Tallam wrote: >> IA-32/x86-64 > ^ > Ahem, no. :-) Please use id="x86" instead. > >> >> It is now possible to call x86 intrinsics from select func

[patch,i386] Cannot inline sse*.* functions into avx functions

2013-06-28 Thread Sriraman Tallam
Hi, Inlining sse* functions into avx is broken? Here is an example: __attribute__((always_inline,target("sse3"))) inline int callee () { return 0; } __attribute__((target("avx"))) inline int caller () { return callee (); } main () { return caller (); } $ g++ -O2 foo.cc error: inlining f

Re: [patch,i386] Cannot inline sse*.* functions into avx functions

2013-07-01 Thread Sriraman Tallam
Hi, So, something like the patch attached? * config/i386/i386.c (ix86_option_override_internal): Turn on all -mavx target flags by default as they are dependent on AVX anyway. Thanks Sri On Sun, Jun 30, 2013 at 2:56 AM, Uros Bizjak wrote: > On Sun, Jun 30, 2013 at

Re: [patch,i386] Cannot inline sse*.* functions into avx functions

2013-07-02 Thread Sriraman Tallam
On Mon, Jul 1, 2013 at 2:12 PM, Uros Bizjak wrote: > On Mon, Jul 1, 2013 at 8:01 PM, Sriraman Tallam wrote: > >>So, something like the patch attached? >> >> * config/i386/i386.c (ix86_option_override_internal): Turn >> on all -mavx targe

[PATCH] Fix for PR57698

2013-07-12 Thread Sriraman Tallam
Patch attached to fix this: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57698 Here is what is going on. In rev. 200179, this change to tree-inline.c Index: tree-inline.c === --- tree-inline.c (revision 200178) +++ tree-inline.c

[google][4.8] Expose all target specific builtins unconditionally for LIPO builds

2013-07-24 Thread Sriraman Tallam
The following test-case fails in LIPO mode during profile-use build: main.cc __attribute__((target("sse4.2"))) unsigned int problem_aux (unsigned int A, unsigned int B); int main (int argc, char *argv[]) { return problem_aux (0, 0); } aux.cc - __attribute__((target("sse4.

Re: [google][4.8] Expose all target specific builtins unconditionally for LIPO builds

2013-07-25 Thread Sriraman Tallam
usage around 100MB and greater). For some small modules, whose initial parser memory usage is around 2MB, I see a 80% increase. Thanks Sri > > thanks, > > David > > On Wed, Jul 24, 2013 at 3:14 PM, Sriraman Tallam wrote: >> The following test-case fails in LIPO mode during

Re: [PATCH, libgcc] Fix licenses on several files

2013-07-30 Thread Sriraman Tallam
On Sun, Jul 28, 2013 at 3:03 PM, Maxim Kuvyrkov wrote: > While verifying license compliance for GCC and its libraries I noticed that > several libgcc files that end up in the final library are licensed under > GPL-3.0+ instead of GPL-3.0-with-GCC-exception. > > This is, obviously, was not the in

[PATCH][i386]Fix PR 57756

2013-08-13 Thread Sriraman Tallam
Hi, I have attached a patch to fix PR57756. Description: The following program, __attribute__((always_inline,target("sse4.2"))) __inline int callee () { return 0; } __attribute__((target("sse"))) __inline int caller () { return callee(); } does not generate an error and callee is inli

Re: [PATCH][i386]Fix PR 57756

2013-08-14 Thread Sriraman Tallam
On Wed, Aug 14, 2013 at 3:38 AM, Richard Biener wrote: > On Wed, Aug 14, 2013 at 2:02 AM, Sriraman Tallam > wrote: >> >> Hi, >> >> I have attached a patch to fix PR57756. Description: The >> following program, >> >> __attribute__((always_

[PATCH] cpuid check code in libgcc, fix cpuinfo code for sandybridge detection

2013-03-07 Thread Sriraman Tallam
Hi, I committed this simple patch to check for sandybridge processors when cpuid model number is 0x2d. This is the model for SandyBridge-E processors : http://software.intel.com/en-us/articles/intel-architecture-and-processor-identification-with-cpuid-model-and-family-numbers Index: config/i

[google][4.7]Using CPU mocks to test code coverage of multiversioned functions

2013-03-15 Thread Sriraman Tallam
Hi, This patch is meant for google/gcc-4_7 but I want this to be considered for trunk when it opens again. This patch makes it easy to test for code coverage of multiversioned functions. Here is a motivating example: __attribute__((target ("default"))) int foo () { ... return 0; } __attribute_

Re: [google][4.7]Using CPU mocks to test code coverage of multiversioned functions

2013-03-15 Thread Sriraman Tallam
On Fri, Mar 15, 2013 at 3:37 PM, Xinliang David Li wrote: > On Fri, Mar 15, 2013 at 2:55 PM, Sriraman Tallam wrote: >> Hi, >> >>This patch is meant for google/gcc-4_7 but I want this to be >> considered for trunk when it opens again. This patch makes it easy to &

Re: [google][4.7]Using CPU mocks to test code coverage of multiversioned functions

2013-03-25 Thread Sriraman Tallam
Hi, On Mon, Mar 18, 2013 at 10:44 PM, Alan Modra wrote: > On Mon, Mar 18, 2013 at 06:18:58PM +0100, Richard Biener wrote: >> I was asking for the ifunc selector to be >> Overridable by ld_preload or a similar mechanism at dynamic load time. > > Please don't. Calling an ifunc resolver function in

GCC does not support *mmintrin.h with function specific opts

2013-04-11 Thread Sriraman Tallam
Hi, *mmintrin headers does not work with function specific opts. Example 1: #include __attribute__((target("sse4.1"))) __m128i foo(__m128i *V) { return _mm_stream_load_si128(V); } $ g++ test.cc smmintrin.h:31:3: error: #error "SSE4.1 instruction set not enabled" # error "SSE4.1 ins

Re: GCC does not support *mmintrin.h with function specific opts

2013-04-11 Thread Sriraman Tallam
me? Right now, an error is generated if a function accesses an unsupported builtin. Since the intrinsic functions are marked inline and call some target builtin, this will always be caught. Sri > > thanks, > > David > > On Thu, Apr 11, 2013 at 12:05 PM, Sriraman Tallam wrote: >>

Re: GCC does not support *mmintrin.h with function specific opts

2013-04-11 Thread Sriraman Tallam
On Thu, Apr 11, 2013 at 1:05 PM, Sriraman Tallam wrote: > On Thu, Apr 11, 2013 at 12:43 PM, Xinliang David Li > wrote: >> What is the compile time impact for turning it on? Code not including >> the intrinsic headers should not be affected too much. If the impact >> i

Re: GCC does not support *mmintrin.h with function specific opts

2013-04-16 Thread Sriraman Tallam
Hi, I have attached an updated patch that addresses all the comments raised. On Fri, Apr 12, 2013 at 1:58 AM, Jakub Jelinek wrote: > On Thu, Apr 11, 2013 at 12:05:41PM -0700, Sriraman Tallam wrote: >> I have attached a patch that fixes this. I have added an option >> "-mgen

Re: GCC does not support *mmintrin.h with function specific opts

2013-04-17 Thread Sriraman Tallam
+HJ On Tue, Apr 16, 2013 at 1:54 PM, Sriraman Tallam wrote: > Hi, > > I have attached an updated patch that addresses all the comments raised. > > On Fri, Apr 12, 2013 at 1:58 AM, Jakub Jelinek wrote: >> On Thu, Apr 11, 2013 at 12:05:41PM -0700, Sriraman Tallam wrote:

[google][4.7] Generate a label for the split cold function while using -freorder-blocks-and-partition

2013-04-19 Thread Sriraman Tallam
Hi, This patch generates labels for cold function parts that are split when using the option -freorder-blocks-and-partition. The cold label name is generated by suffixing ".cold" to the assembler name of the hot function. This is useful when getting back traces from gdb when the cold functio

Re: [google][4.7] Generate a label for the split cold function while using -freorder-blocks-and-partition

2013-04-19 Thread Sriraman Tallam
Updated patch attached. Thanks Sri On Fri, Apr 19, 2013 at 1:43 PM, Sriraman Tallam wrote: > Hi, > > This patch generates labels for cold function parts that are split when > using the option -freorder-blocks-and-partition. The cold label name > is generated by suffixing

Re: [google][4.7] Generate a label for the split cold function while using -freorder-blocks-and-partition

2013-04-20 Thread Sriraman Tallam
Fixed a bug in the previous patch sent, where I did not check if the switch section was actually to the cold function part. Updated patch attached. Thanks Sri On Fri, Apr 19, 2013 at 1:58 PM, Sriraman Tallam wrote: > Updated patch attached. > > Thanks > Sri > > On Fri, Ap

Re: GCC does not support *mmintrin.h with function specific opts

2013-04-20 Thread Sriraman Tallam
Ping. On Wed, Apr 17, 2013 at 7:13 PM, Sriraman Tallam wrote: > +HJ > > On Tue, Apr 16, 2013 at 1:54 PM, Sriraman Tallam wrote: >> Hi, >> >> I have attached an updated patch that addresses all the comments raised. >> >> On Fri, Apr 12, 2013 at 1:58 AM, J

[PATCH] Generate a label for the split cold function while using -freorder-blocks-and-partition

2013-04-23 Thread Sriraman Tallam
Hi, This patch generates labels for cold function parts that are split when using the option -freorder-blocks-and-partition. The cold label name is generated by suffixing ".cold" to the assembler name of the hot function. This is useful when getting back traces from gdb when the cold functio

[PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2014-05-15 Thread Sriraman Tallam
Optimize access to globals with -fpie, x86_64 only: Currently, with -fPIE/-fpie, GCC accesses globals that are extern to the module using the GOT. This is two instructions, one to get the address of the global from the GOT and the other to get the value. If it turns out that the global gets defi

Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations

2014-05-19 Thread Sriraman Tallam
Ping. On Thu, May 15, 2014 at 11:34 AM, Sriraman Tallam wrote: > Optimize access to globals with -fpie, x86_64 only: > > Currently, with -fPIE/-fpie, GCC accesses globals that are extern to the > module > using the GOT. This is two instructions, one to get the address of the gl

Re: [PATCH] C++ thunk section names

2014-05-19 Thread Sriraman Tallam
Ping. On Thu, Apr 17, 2014 at 10:41 AM, Sriraman Tallam wrote: > Ping. > > On Wed, Feb 5, 2014 at 4:31 PM, Sriraman Tallam wrote: >> Hi, >> >> I would like this patch reviewed and considered for commit when >> Stage 1 is active again. >> >> Patch

[google gcc-4_8][x86_64]Optimize access to globals in "-fpie -pie" builds with copy relocations

2014-05-22 Thread Sriraman Tallam
This patch is pending review for trunk. Please see if this is ok to commit to google/gcc-4_8 branch. Please see this for more details: https://gcc.gnu.org/ml/gcc-patches/2014-05/msg01215.html Patch attached. Thanks Sri Index: config/i386/i386.c ===

Re: [google gcc-4_8][x86_64]Optimize access to globals in "-fpie -pie" builds with copy relocations

2014-05-23 Thread Sriraman Tallam
On Thu, May 22, 2014 at 5:04 PM, Xinliang David Li wrote: > Also missing documentation in invoke.texi? Other than that, ok. I have made the changes and committed my patch. Sri > > David > > On Thu, May 22, 2014 at 5:00 PM, Paul Pluzhnikov > wrote: >> On Thu, May 22, 2

[google gcc-4_8] Tree Loop Unrolling - Relax code size increase with -O2

2014-01-21 Thread Sriraman Tallam
Hi, Currently, tree unrolling pass(cunroll) does not allow any code size growth in O2 mode. Code size growth is permitted only if O3 or funroll-loops/fpeel-loops is used. I have created a patch to allow partial code size increase in O2 mode. With funroll-loops the maximum allowed code growt

Re: [google gcc-4_8] Tree Loop Unrolling - Relax code size increase with -O2

2014-01-21 Thread Sriraman Tallam
_PEELED_INSN parameter at O2). > > By so doing, we don't need to have a hard coded factor of 2. Patch attached with that change. Sri > > In the longer run, we really need better cost/benefit analysis, but > that is independent. > > David > > On Tue, Jan 21, 20

Re: [google gcc-4_8] Tree Loop Unrolling - Relax code size increase with -O2

2014-01-27 Thread Sriraman Tallam
unds access which is now caught. Ok to commit? Thanks Sri On Tue, Jan 21, 2014 at 4:51 PM, Xinliang David Li wrote: > ok. > > David > > On Tue, Jan 21, 2014 at 4:46 PM, Sriraman Tallam wrote: >> On Tue, Jan 21, 2014 at 2:49 PM, Xinliang David Li >> wrote: &g

[PATCH] C++ thunk section names

2014-02-05 Thread Sriraman Tallam
Hi, I would like this patch reviewed and considered for commit when Stage 1 is active again. Patch Description: A C++ thunk's section name is set to be the same as the original function's section name for which the thunk was created in order to place the two together. This is done in cp/metho

Re: [google gcc-4_8][patch] Thunk section names

2014-02-06 Thread Sriraman Tallam
Patch attached. On Thu, Feb 6, 2014 at 2:18 PM, Sriraman Tallam wrote: > I sent the following patch for review for trunk commit here. Details here: > http://gcc.gnu.org/ml/gcc-patches/2014-02/msg00328.html > > This is important for function layout for the following reason. &g

[google gcc-4_8][patch] Thunk section names

2014-02-06 Thread Sriraman Tallam
I sent the following patch for review for trunk commit here. Details here: http://gcc.gnu.org/ml/gcc-patches/2014-02/msg00328.html This is important for function layout for the following reason. Without this patch, the thunk's section name is the same as the original function's section name for wh

[google][gcc-4_8][patch]Handle Split functions in the Function Reordering Plugin

2014-02-10 Thread Sriraman Tallam
Hi Teresa, I have attached a patch to recognize and reorder split functions in the function reordering plugin. Please review. Thanks Sri This enhances the linker plugin to reorder functions that are split when using -freorder-blocks-and-partition. Index: function_reordering_plugin/callgraph.h

Re: [google][gcc-4_8][patch]Handle Split functions in the Function Reordering Plugin

2014-02-11 Thread Sriraman Tallam
On Tue, Feb 11, 2014 at 1:32 PM, Teresa Johnson wrote: > On Mon, Feb 10, 2014 at 7:15 PM, Sriraman Tallam wrote: >> Hi Teresa, >> >>I have attached a patch to recognize and reorder split functions in >> the function reordering plugin. Please review. >

<    1   2   3   4   >