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

2013-03-18 Thread Alan Modra
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 another library is just asking for trouble with current glibc.

Re: [PING^5] PR 54805: __gthread_tsd* in vxlib-tls.c

2013-03-18 Thread rbmj
On 16-Feb-13 23:21, Maxim Kuvyrkov wrote: On 14/02/2013, at 10:18 AM, rbmj wrote: Here's the updated, (trivial) patch. Thanks. I'll apply this once 4.8 branches and trunk is back into development mode. Since GCC 4.9 has branched now are you still willing to commit (maybe after the outage

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

2013-03-18 Thread Xinliang David Li
Interesting idea about lazy IFUNC relocation. David On Mon, Mar 18, 2013 at 2:02 AM, Richard Biener wrote: > On Fri, Mar 15, 2013 at 10: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 pa

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

2013-03-18 Thread Paul Pluzhnikov
On Mon, Mar 18, 2013 at 10:18 AM, Richard Biener wrote: > "H.J. Lu" wrote: >>We can pass environment variables to IFUNC selector. Maybe we can >>enable it for debug build. Enabling this for just debug builds would not cover my use case. If the environment variable is used at loader initializ

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

2013-03-18 Thread Paul Pluzhnikov
+cc libc-alpha On Mon, Mar 18, 2013 at 9:05 AM, Xinliang David Li wrote: > Interesting idea about lazy IFUNC relocation. > On Mon, Mar 18, 2013 at 2:02 AM, Richard Biener > wrote: >> On Fri, Mar 15, 2013 at 10:55 PM, Sriraman Tallam >> wrote: >>>This patch is meant for google/gcc-4_7 bu

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

2013-03-18 Thread H.J. Lu
On Mon, Mar 18, 2013 at 10:02 AM, Paul Pluzhnikov wrote: > +cc libc-alpha > > On Mon, Mar 18, 2013 at 9:05 AM, Xinliang David Li wrote: >> Interesting idea about lazy IFUNC relocation. > >> On Mon, Mar 18, 2013 at 2:02 AM, Richard Biener >> wrote: > >>> On Fri, Mar 15, 2013 at 10:55 PM, Sriraman

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

2013-03-18 Thread Richard Biener
"H.J. Lu" wrote: >On Mon, Mar 18, 2013 at 10:02 AM, Paul Pluzhnikov > wrote: >> +cc libc-alpha >> >> On Mon, Mar 18, 2013 at 9:05 AM, Xinliang David Li > wrote: >>> Interesting idea about lazy IFUNC relocation. >> >>> On Mon, Mar 18, 2013 at 2:02 AM, Richard Biener >>> wrote: >> On Fri, Mar

Re: [PATCH 1/4] Mark all member functions with memory models always inline

2013-03-18 Thread Jonathan Wakely
On 16 March 2013 13:29, Andi Kleen wrote: > > With inline __attribute__((always_inline)) these functions > get inlined even with -O0. > > I hardcoded the attribute in the header for now, assuming > that all compilers that support libstdc++ have attribute > always_inline too. If not it would need to

Re: [PATCH 1/4] Mark all member functions with memory models always inline

2013-03-18 Thread Jonathan Wakely
On 18 March 2013 16:28, Jonathan Wakely wrote: > On 16 March 2013 13:29, Andi Kleen wrote: >> >> With inline __attribute__((always_inline)) these functions >> get inlined even with -O0. >> >> I hardcoded the attribute in the header for now, assuming >> that all compilers that support libstdc++ have

Re: [PATCH 1/4] Mark all member functions with memory models always inline

2013-03-18 Thread Andi Kleen
On Mon, Mar 18, 2013 at 04:28:13PM +, Jonathan Wakely wrote: > On 16 March 2013 13:29, Andi Kleen wrote: > > > > With inline __attribute__((always_inline)) these functions > > get inlined even with -O0. > > > > I hardcoded the attribute in the header for now, assuming > > that all compilers tha

PATCH: PR target/56560: [4.6/4.7 regression] vzeroupper clobbers argument with AVX

2013-03-18 Thread H.J. Lu
Hi, ix86_function_arg sets cfun->machine->callee_pass_avx256_p from the current argument. It clears callee_pass_avx256_p when ix86_function_arg is called to generate a library call to passs an argument. This patch adds callee_pass_avx256_p and callee_return_avx256_p to ix86_args to store the AVX

Re: [PATCH] libgcc: Add DWARF info to aeabi_ldivmod and aeabi_uldivmod

2013-03-18 Thread Meador Inge
Ping. On 03/05/2013 12:15 PM, Meador Inge wrote: > Hi All, > > This patch fixes a minor annoyance that causes backtraces to disappear > inside of aeabi_ldivmod and aeabi_uldivmod due to the lack of appropriate > DWARF information. I fixed the problem by adding the necessary cfi_* > macros in the

Re: [PATCH] Fix PR56605

2013-03-18 Thread Eric Botcazou
> 2013-03-13 Bill Schmidt > Steven Bosscher > > PR rtl-optimization/56605 > * loop-iv.c (implies_p): Handle equal RTXs and subregs. > > gcc/testsuite: > > 2013-03-13 Bill Schmidt wschm...@linux.vnet.ibm.com> > > PR rtl-optimization/56605 > * gcc.target/po

[Patch, microblaze]: Extend jump insn to accept bri to SYMBOL_REFS

2013-03-18 Thread David Holsgrove
Changelog 2013-03-18 David Holsgrove * gcc/config/microblaze/microblaze.md (jump): Account for jumps to SYMBOL_REFs. Signed-off-by: David Holsgrove 0007-Patch-microblaze-Extend-jump-insn-to-accept-bri-to-S.patch Description: 0007-Patch-microblaze-Extend-jump-insn-to-accept-bri-to-S.pat

[PATCH] Speedup PTA

2013-03-18 Thread Richard Biener
This patch, long on my TODO list, speeds up PTA by removing the costly hashtable lookup when looking for related fields of a sub-variable. Instead we now keep a pointer to the first field. For space-savings I changed head/next to be the variable info ID instead. This speeds up a fortran testcas

[Patch, microblaze]: Add SIZE_TYPE and PTRDIFF_TYPE to microblaze.h

2013-03-18 Thread David Holsgrove
Changelog 2013-03-18 David Holsgrove * gcc/config/microblaze/microblaze.h: Define SIZE_TYPE and PTRDIFF_TYPE. Signed-off-by: David Holsgrove 0006-Patch-microblaze-Add-SIZE_TYPE-and-PTRDIFF_TYPE-to-m.patch Description: 0006-Patch-microblaze-Add-SIZE_TYPE-and-PTRDIFF_TYPE-to-m.patch

[Patch, microblaze]: Remove SECONDARY_MEMORY_NEEDED

2013-03-18 Thread David Holsgrove
MicroBlaze doesn't have restrictions that would force us to reload regs via memory. Don't define SECONDARY_MEMORY_NEEDED. Fixes an ICE when compiling OpenSSL for linux. Changelog 2013-03-18 Edgar E. Iglesias * gcc/config/microblaze/microblaze.h: Remove SECONDARY_MEMORY_NEEDED definition.

[Patch, microblaze]: Add TARGET_ASM_OUTPUT_MI_THUNK to support varargs thunk

2013-03-18 Thread David Holsgrove
Changelog 2013-03-18 David Holsgrove * gcc/config/microblaze/microblaze.c: Add microblaze_asm_output_mi_thunk and define TARGET_ASM_OUTPUT_MI_THUNK and TARGET_ASM_CAN_OUTPUT_MI_THUNK Signed-off-by: David Holsgrove 0003-Patch-microblaze-Add-TARGET_ASM_OUTPUT_MI_THUNK-to-s.patch Descript

[Patch, microblaze]: Add atomic builtin implementation

2013-03-18 Thread David Holsgrove
Add sync_compare_and_swapsi and sync_test_and_setsi implementations for MicroBlaze. Changelog 2013-03-18 David Holsgrove * gcc/config/microblaze/sync.md: New file. * gcc/config/microblaze/microblaze.md: Add UNSPEC_SYNC_CAS, UNSPEC_SYNC_XCHG and include sync.md. * gcc/config/microblaze/mi

[Patch, microblaze]: Enable DWARF exception handling support

2013-03-18 Thread David Holsgrove
Add DWARF exception handling support for MicroBlaze. Changelog 2013-03-18 Edgar E. Iglesias David Holsgrove * common/config/microblaze/microblaze-common.c: Remove TARGET_EXCEPT_UNWIND_INFO definition. * config/microblaze/microblaze-protos.h: Add microblaze_eh_return prototype

[Patch, microblaze]: Add -fstack-usage support

2013-03-18 Thread David Holsgrove
Changelog 2013-03-18 David Holsgrove * gcc/config/microblaze/microblaze.c (microblaze_expand_prologue): Add check for flag_stack_usage to handle -fstack-usage support Signed-off-by: David Holsgrove 0004-Patch-microblaze-Add-fstack-usage-support.patch Description: 0004-Patch-microblaze-

Re: [PATCH] Fix cselim ICE (PR tree-optimization/56635)

2013-03-18 Thread Richard Biener
On Mon, Mar 18, 2013 at 1:00 PM, Jakub Jelinek wrote: > Hi! > > On the attached testcase we ICE, because cselim uses >if (!is_gimple_reg_type (TREE_TYPE (lhs)) >|| !operand_equal_p (lhs, gimple_assign_lhs (else_assign), 0)) > to guard an optimization, and we have two MEM_REFs where ope

[PATCH] Fix cselim ICE (PR tree-optimization/56635)

2013-03-18 Thread Jakub Jelinek
Hi! On the attached testcase we ICE, because cselim uses if (!is_gimple_reg_type (TREE_TYPE (lhs)) || !operand_equal_p (lhs, gimple_assign_lhs (else_assign), 0)) to guard an optimization, and we have two MEM_REFs where operand_equal_p is true, but they don't have compatible types (the fi

[PATCH][ARM] Handle unordered comparison cases in NEON vcond

2013-03-18 Thread Kyrylo Tkachov
Hi all, Given code: #define MAX(a, b) (a > b ? a : b) void foo (int ilast, float* w, float* w2) { int i; for (i = 0; i < ilast; ++i) { w[i] = MAX (0.0f, w2[i]); } } compiled with -O1 -funsafe-math-optimizations -ftree-vectorize -mfpu=neon -mfloat-abi=hard on arm-none-eabi will cause

[PATCH] PTA TLC

2013-03-18 Thread Richard Biener
This is a collection of changes that cleanup PTA. Bootstrap and regtest pending on x86_64-unknown-linux-gnu. Richard. 2013-03-18 Richard Biener * tree-ssa-structalias.c (find): Use gcc_checking_assert. (unite): Likewise. (merge_node_constraints): Likewise. (b

[PATCH] Vectorizer TLC

2013-03-18 Thread Richard Biener
The following is a collection of TLC sitting in my local tree, mostly resulting in less obscure IL after vectorization. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2013-03-18 Richard Biener * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks):

[PATCH] Exchange late VRP and DOM passes

2013-03-18 Thread Richard Biener
This moves VRP after late DOM. This is because VRP has a hard time dealing with non-copyproped (and not CSEd) IL and conveniently DOM provides both. I noticed this when working on PR56273 where we miss quite some VRP opportunities because of this. I cannot think of a good reason to have the curr

Re: Fold VEC_COND_EXPR to abs, min, max

2013-03-18 Thread Richard Biener
On Mon, Mar 18, 2013 at 12:06 PM, Marc Glisse wrote: > On Mon, 18 Mar 2013, Richard Biener wrote: > >> On Mon, Mar 18, 2013 at 11:27 AM, Marc Glisse >> wrote: >>> >>> On Mon, 18 Mar 2013, Richard Biener wrote: You mean that the VEC_COND_EXPRs can never be used as an lvalue in the C

Re: Fold VEC_COND_EXPR to abs, min, max

2013-03-18 Thread Marc Glisse
On Mon, 18 Mar 2013, Richard Biener wrote: On Mon, Mar 18, 2013 at 11:27 AM, Marc Glisse wrote: On Mon, 18 Mar 2013, Richard Biener wrote: You mean that the VEC_COND_EXPRs can never be used as an lvalue in the C++ frontend? Yes, as I mention in the ChangeLog. Not just the C++ front-end, it

Re: Fold VEC_COND_EXPR to abs, min, max

2013-03-18 Thread Richard Biener
On Mon, Mar 18, 2013 at 11:27 AM, Marc Glisse wrote: > On Mon, 18 Mar 2013, Richard Biener wrote: > >>> 2013-03-17 Marc Glisse >>> >>> gcc/ >>> * fold-const.c (fold_cond_expr_with_comparison): Use >>> build_zero_cst. >>> VEC_COND_EXPR cannot be lvalues. >>> (fold_ternary

Commit: XStormy16: Remove spurious backslash

2013-03-18 Thread Nick Clifton
Hi Guys, I am applying this small patch to remove a spurious backslash escape at the end of a line in stormy16.c. Cheers Nick gcc/ChangeLog 2013-03-18 Nick Clifton * config/stormy16/stormy16.c (xstormy16_expand_prologue): Remove spurious backslash. Index: gcc/config/st

Commit: MN10300: Add missing comment line

2013-03-18 Thread Nick Clifton
Hi Guys I am applying this patch as obvious. It adds a line missing from the comment describing the mn10300_get_live_callee_saved_regs function. Cheers Nick gcc/ChangeLog 2013-03-18 Nick Clifton * config/mn10300/mn10300.c (mn10300_get_live_callee_saved_regs): Add missi

[PATCH] Handle string/character search functions in PTA / oracle

2013-03-18 Thread Richard Biener
This fixes an issue that shows up in PR56210. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2013-03-18 Richard Biener PR tree-optimization/56210 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Handle string / character

[PATCH] Fix PR56483

2013-03-18 Thread Richard Biener
This fixes PR56483 by properly testing for boolean values during expansion of conditionals. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2013-03-18 Richard Biener PR middle-end/56483 * cfgexpand.c (expand_gimple_cond): Inline gimple_cond_si

Re: Fold VEC_COND_EXPR to abs, min, max

2013-03-18 Thread Marc Glisse
On Mon, 18 Mar 2013, Richard Biener wrote: 2013-03-17 Marc Glisse gcc/ * fold-const.c (fold_cond_expr_with_comparison): Use build_zero_cst. VEC_COND_EXPR cannot be lvalues. (fold_ternary_loc) : Call fold_cond_expr_with_comparison. gcc/cp/ * call.c (build_cond

Re: [PATCH][1/n] Vectorizer TLC: re-organize data dependence checking

2013-03-18 Thread Richard Biener
On Wed, Feb 27, 2013 at 4:49 PM, Richard Biener wrote: > > This splits data reference group analysis away from data dependence > checking and splits the latter into loop and a BB vectorization > functions. This allows us to perform the now no longer quadratic > but O(n * log (n)) data reference g

Re: [v3] libstdc++/55979 (+ notes about 55977)

2013-03-18 Thread Paolo Carlini
Hi, On 03/17/2013 06:45 PM, Jonathan Wakely wrote: On 17 March 2013 17:14, Paolo Carlini wrote: I guess we could at least work around the problem by going back to _M_get_Tp_allocator().construct in _M_create_node (or, better, the allocator_traits<>::construct equivalent, per the recent fix for

Re: Fold VEC_COND_EXPR to abs, min, max

2013-03-18 Thread Richard Biener
On Sun, Mar 17, 2013 at 4:46 PM, Marc Glisse wrote: > Hello, > > this patch adds a bit of folding to VEC_COND_EXPR so it is possible to > generate ABS_EXPR and MAX_EXPR for vectors without relying on the > vectorizer. I would have preferred to merge the COND_EXPR and VEC_COND_EXPR > cases, but the

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

2013-03-18 Thread Richard Biener
On Fri, Mar 15, 2013 at 10: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 > test for code coverage of multiversioned functions. Here is a > motivating example: > > __att

Re: [PATCH] Fix PR3713

2013-03-18 Thread Richard Biener
On Wed, Jan 16, 2013 at 4:57 PM, Richard Biener wrote: > > This fixes PR3713 by properly propagating ->has_constants in SCCVN. > With that we are able to simplify (unsigned) Bar & 1 properly. > Only copyprop later turns the call into a direct one though, > so I'm testing the important fact - that

Re: [PATCH] Fix ???s in find_uses_to_rename and vect_transform_loop

2013-03-18 Thread Richard Biener
On Mon, Feb 11, 2013 at 4:45 PM, Richard Biener wrote: > > This fixes the compile-time sink in find_uses_to_rename, that we > scan the whole function when nothing is to do (well, appearantly). > > -O3 bootstrap and regtest on x86_64-unknown-linux-gnu in progress, > scheduled for stage1. Committed

Re: [PATCH][RFC] Fix PR56113 more

2013-03-18 Thread Richard Biener
On Fri, 8 Feb 2013, Richard Biener wrote: > On Fri, 1 Feb 2013, Richard Biener wrote: > > > On Fri, 1 Feb 2013, Jakub Jelinek wrote: > > > > > On Fri, Feb 01, 2013 at 10:00:00AM +0100, Richard Biener wrote: > > > > > > > > This reduces compile-time of the testcase in PR56113 (with n = 4) >

Re: [PATCH][0/n] tree LIM TLC - series part for backporting, limit LIM

2013-03-18 Thread Richard Biener
On Fri, 15 Mar 2013, Richard Biener wrote: > On Thu, 14 Mar 2013, Richard Biener wrote: > > > > > This extracts pieces from the already posted patch series that are > > most worthwhile and applicable for backporting to both 4.8 and 4.7. > > It also re-implements the limiting of the maximum numbe