RE: [PATCH] [aarch64] Implemented reciprocal square root (rsqrt) estimation in -ffast-math

2015-06-24 Thread Kumar, Venkataramanan
Hi, If I understand correct, current implementation replaces fdiv fsqrt by frsqrte for i=0 to 3 fmul frsqrts fmul So I think gains depends latency of frsqrts insn. I see patch has patterns for vector versions of frsqrts, but does not enable them? Regards, Venkat. > -Original

Re: [PATCH] i386: Do not modify existing RTL (PR66412)

2015-06-24 Thread Segher Boessenkool
On Wed, Jun 24, 2015 at 09:40:28PM -0600, Jeff Law wrote: > On 06/24/2015 05:29 PM, Segher Boessenkool wrote: > >A few define_split's in the i386 backend modify RTL in place. This does > >not work. This patch fixes all cases that do PUT_MODE on existing RTL. > > * config/i386/i386.md (variou

Re: [patch 4/5] Remove cgraph.h dependence on hard-reg-set.h

2015-06-24 Thread Jeff Law
On 06/16/2015 11:20 AM, Andrew MacLeod wrote: cgraph.h requires hard-reg-set.h in order to compile simply because the cgraph_rtl_info structure contains a HARD_REG_SET element. All accesses to this structure are already handled by returning a pointer to the structure within the cgraph_node. By

Re: [PATCH v2] Rerun loop-header-copying just before vectorization

2015-06-24 Thread Jeff Law
On 06/19/2015 11:32 AM, Alan Lawrence wrote: This is a respin of https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02139.html . Changes are: * Separate the two passes by descending from a common base class, allowing different predicates; * Test flag_tree_vectorize, and loop->force_vectorize/

Re: [Patch SRA] Fix PR66119 by calling get_move_ratio in SRA

2015-06-24 Thread Jeff Law
On 06/23/2015 09:42 AM, James Greenhalgh wrote: On Tue, Jun 23, 2015 at 09:52:01AM +0100, Jakub Jelinek wrote: On Tue, Jun 23, 2015 at 09:18:52AM +0100, James Greenhalgh wrote: This patch fixes the issue by always calling get_move_ratio in the SRA code, ensuring that an up-to-date value is use

Re: [PATCH IRA] save a bitmap check

2015-06-24 Thread Jeff Law
On 06/24/2015 03:54 AM, Zhouyi Zhou wrote: In function assign_hard_reg, checking the bit of conflict_a in consideration_allocno_bitmap is unneccesary, because when retry_p is false, conflicting objects are always inside of the same loop_node (this is ensured in function process_bb_node_lives whi

Re: [PATCH][GSoC] Extend shared_ptr to support arrays

2015-06-24 Thread Tim Shen
On Wed, Jun 24, 2015 at 10:33 AM, Fan You wrote: > Hi, > > Here is the revised patch including all the test case. > > This can also be seen at on branch > > > Any comments? I ran `git diff c7248656569bb0b4549f5c1ed347f7e028a15664 90aff5632fd9f3044d53ce190ae99fb

Re: [patch] fix regrename pass to ensure renamings produce valid insns

2015-06-24 Thread Jeff Law
On 06/23/2015 07:00 PM, Sandra Loosemore wrote: On 06/18/2015 11:32 AM, Eric Botcazou wrote: The attached patch teaches regrename to validate insns affected by each register renaming before making the change. I can see at least two other ways to handle this -- earlier, by rejecting renamings th

Re: [PATCH] i386: Do not modify existing RTL (PR66412)

2015-06-24 Thread Jeff Law
On 06/24/2015 09:40 PM, Jeff Law wrote: On 06/24/2015 05:29 PM, Segher Boessenkool wrote: A few define_split's in the i386 backend modify RTL in place. This does not work. This patch fixes all cases that do PUT_MODE on existing RTL. Bootstrapped and tested; no regressions. Is this okay for t

Re: [PATCH] i386: Do not modify existing RTL (PR66412)

2015-06-24 Thread Jeff Law
On 06/24/2015 05:29 PM, Segher Boessenkool wrote: A few define_split's in the i386 backend modify RTL in place. This does not work. This patch fixes all cases that do PUT_MODE on existing RTL. Bootstrapped and tested; no regressions. Is this okay for trunk? Hrm, this wants the testcase in th

Re: [PATCH][RFC] Add FRE in pass_vectorize

2015-06-24 Thread Jeff Law
On 06/24/2015 01:59 AM, Richard Biener wrote: Redundant, basically two IVs with the same initial value and same step. IVOPTs can deal with this if the initial values and the step are already same "enough" - the vectorizer can end up generating redundant huge expressions for both. Ah, so yes, this

Re: [05/13] Add nofree_ptr_hash

2015-06-24 Thread Jeff Law
On 06/24/2015 02:23 AM, Richard Sandiford wrote: Jeff Law writes: So I'm holding off on approving this one pending further discussion of the use of multiple inheritance for nofree_ptr_hash. I thought that might be controversial. :-) My two main defences are: 1) This is multiple inheritance

[patch] PR debug/66653: avoid late_global_decl on decl_type_context()s

2015-06-24 Thread Aldy Hernandez
The problem here is that we are trying to call dwarf2out_late_global_decl() on a static variable in a template which has a type of TEMPLATE_TYPE_PARM: template class A { static __thread T a; }; We are calling late_global_decl because we are about to remove the unused static from the symbol

Re: [RS6000 1/7] Hide insns not needing to be public

2015-06-24 Thread David Edelsohn
On Tue, Jun 23, 2015 at 8:50 PM, Alan Modra wrote: > * config/rs6000/rs6000.md (addsi3_high, bswaphi2_internal, > ashldi3_internal5, ashldi3_internal8): Prefix with '*'. This patch is okay. The rotate changes need to be discussed and coordinated with Segher. The cost changes are

[patch committed SH] Fix PR target/66563

2015-06-24 Thread Kaz Kojima
The attached patch is to fix PR target/66563 which is a 4.9/5/6 regression. These newer compilers can CSE some expressions on the sequences for getting GOT. The target should make sure it won't happen. See PR target/66563 for details. Tested on sh4-unknown-linux-gnu and committed on trunk. I'll

[PATCH] i386: Do not modify existing RTL (PR66412)

2015-06-24 Thread Segher Boessenkool
A few define_split's in the i386 backend modify RTL in place. This does not work. This patch fixes all cases that do PUT_MODE on existing RTL. Bootstrapped and tested; no regressions. Is this okay for trunk? Hrm, this wants the testcase in that PR added I suppose. Will send it separately. S

[PATCH] Do not constrain on REAL_TYPE

2015-06-24 Thread Aditya Kumar
From: Aditya Kumar gcc/ChangeLog: 2015-06-24 Aditya Kumar Sebastian Pop * graphite-sese-to-poly.c (parameter_index_in_region): Discard REAL_TYPE parameters. (scan_tree_for_params): Handle REAL_CST in scan_tree_for_params. (add_conditions_to_domain): Do n

Re: pr66345.c size_t assumption bug

2015-06-24 Thread DJ Delorie
> OK. Thanks, committed.

[C++ Patch] PR 51911

2015-06-24 Thread Paolo Carlini
Hi, the below implements quite literally the requirements. It does that after the cp_parser_new_initializer call, I think that makes in general for better error recovery. The wording definitely needs a review, though (more concise?). Tested x86_64-linux. Thanks, Paolo. /

Re: [PATCH] config/bfin/bfin.c (hwloop_optimize): Set JUMP_LABEL() after emit jump_insn

2015-06-24 Thread Chen Gang
On 6/24/15 12:25, Jeff Law wrote: > On 06/20/2015 04:48 AM, Chen Gang wrote: >> JUMP_LABLE() must be defined after optimization completed. In this case, >> it is doing optimization, and is almost finished, so it is no chances to >> set JUMP_LABLE() next. The related issue is Bug 65803. >> >> 2015-0

RE: [PATCH] [aarch64] Implemented reciprocal square root (rsqrt) estimation in -ffast-math

2015-06-24 Thread Evandro Menezes
Philipp, I think that execute_cse_reciprocals_1() applies only when the denominator is known at compile-time, otherwise the division stays. It doesn't seem to know whether the target supports the approximate reciprocal or not. Cheers, -- Evandro Menezes Austin, T

Re: [Patch, C++, PR65882] Check tf_warning flag in build_new_op_1

2015-06-24 Thread Mikhail Maltsev
On 06/24/2015 06:52 PM, Christophe Lyon wrote: > Hi Mikhail, > > In the gcc-5-branch, I can see that your new inhibit-warn-2.C test > fails (targets ARM and AArch64). > > I can see this error message in g++.log: > /aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.

Re: [PR fortran/66528] unbalanced IF/ENDIF with -fmax-errors=1 causes invalid free

2015-06-24 Thread Steve Kargl
On Wed, Jun 24, 2015 at 08:36:45PM +0200, Manuel López-Ibáñez wrote: > The problem is that diagnostic_action_after_output tries to delete the > active pretty-printer which tries to delete its output_buffer, which > is normally dynamically allocated via placement-new, but the > output_buffer used by

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-24 Thread Jakub Jelinek
On Wed, Jun 24, 2015 at 11:11:12PM +0300, Ilya Verbin wrote: > Indeed, here is the fix, make check-target-libgomp passed. > > > libgomp/ > * libgomp.h (struct target_var_desc): Add offset and length. > * target.c (gomp_map_vars_existing): New argument tgt_var, fill it. > (gomp_m

Re: Do not take address of empty string front

2015-06-24 Thread François Dumont
On 22/06/2015 17:10, Jonathan Wakely wrote: > On 20/06/15 12:59 +0100, Jonathan Wakely wrote: >> On 20/06/15 12:03 +0200, François Dumont wrote: >>> Hi >>> >>> 2 experimental tests are failing in debug mode because >>> __do_str_codecvt is sometimes taking address of string front() and >>> back()

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-24 Thread Ilya Verbin
On Wed, Jun 24, 2015 at 13:39:03 +0200, Jakub Jelinek wrote: > Thinking about this more, for always modifier this isn't really sufficient. > Consider: > void > foo (int *p) > { > #pragma omp target data (alloc:p[0:32]) > { > #pragma omp target data (always, from:p[7:9]) > { > ...

Re: [PATCH] [aarch64] Implemented reciprocal square root (rsqrt) estimation in -ffast-math

2015-06-24 Thread Dr. Philipp Tomsich
Evandro, Shouldn't ‘execute_cse_reciprocals_1’ take care of this, once the reciprocal-division is implemented? Do you think there’s additional work needed to catch all cases/opportunities? Best, Philipp. > On 24 Jun 2015, at 20:19, Evandro Menezes wrote: > > Benedikt, > > Are you developing

C++ PATCH for c++/66647 (ICE with alias templates)

2015-06-24 Thread Jason Merrill
Another issue with dependent alias template specializations. In this case, we were dealing with an alias template that expands to a function type; dependent_type_p_r was looking at the function type and never considering whether the alias specialization itself was dependent. Fixed by checking

Re: Debug mode enhancements

2015-06-24 Thread François Dumont
Hello Is this one ok ? François On 12/06/2015 19:11, François Dumont wrote: > Hi > > This is a patch to: > > - Enhance __get_distance to get a better feedback about distance between > iterators so that we can take sharper decision about what is right or > not. This function is now aware

[PR fortran/66528] unbalanced IF/ENDIF with -fmax-errors=1 causes invalid free

2015-06-24 Thread Manuel López-Ibáñez
The problem is that diagnostic_action_after_output tries to delete the active pretty-printer which tries to delete its output_buffer, which is normally dynamically allocated via placement-new, but the output_buffer used by the error_buffer of Fortran is statically allocated. Being statically alloca

RE: [PATCH] [aarch64] Implemented reciprocal square root (rsqrt) estimation in -ffast-math

2015-06-24 Thread Evandro Menezes
Benedikt, Are you developing the reciprocal approximation just for 1/x proper or for any division, as in x/y = x * 1/y? Thank you, -- Evandro Menezes Austin, TX > -Original Message- > From: Benedikt Huber [mailto:benedikt.hu...@theobroma-systems.com] > Se

Re: [PATCH][GSoC] Extend shared_ptr to support arrays

2015-06-24 Thread Fan You
Hi, Here is the revised patch including all the test case. This can also be seen at on branch Any comments? 2015-06-23 12:19 GMT+08:00 Tim Shen : > On Sun, Jun 21, 2015 at 3:50 AM, Tim Shen wrote: >> Quickly looked at __shared_ptr<__libfund_v1<_Tp>, _Lp>; wi

Re: C PATCH to use is_global_var

2015-06-24 Thread Joseph Myers
On Wed, 24 Jun 2015, Marek Polacek wrote: > diff --git gcc/c/c-decl.c gcc/c/c-decl.c > index fc1fdf9..ab54db9 100644 > --- gcc/c/c-decl.c > +++ gcc/c/c-decl.c > @@ -2650,9 +2650,8 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, > tree oldtype) > tree_code_size (TREE_CODE

Re: [PATCH] [aarch64] Implemented reciprocal square root (rsqrt) estimation in -ffast-math

2015-06-24 Thread Benedikt Huber
Evandro, Yes, we also have the 1/x approximation. However we do not have the test cases yet, and it also would need some clean up. I am going to provide a patch for that soon (say next week). Also, for this optimization we have *not* yet found a benchmark with significant improvements. Best Rega

Re: fix PR46029: reimplement if conversion of loads and stores

2015-06-24 Thread Jeff Law
On 06/22/2015 10:27 AM, Alan Lawrence wrote: My main thought concerns the direction we are travelling here. A major reason why we do if-conversion is to enable vectorization. Is this is targetted at gathering/scattering loads? Following vectorization, different elements of the vector being load

Re: [02/13] Replace handle_cache_entry with new interface

2015-06-24 Thread Jeff Law
On 06/24/2015 02:16 AM, Richard Sandiford wrote: So for all the keep_cache_entry functions, I guess they're trivial enough that a function comment probably isn't needed. Yeah. For cases like this where the function is implementing a defined interface (described in hash-table.h), I think it's b

Re: fix PR46029: reimplement if conversion of loads and stores

2015-06-24 Thread Jeff Law
On 06/24/2015 10:50 AM, Ramana Radhakrishnan wrote: On 12/06/15 21:50, Abe Skolnik wrote: Hi everybody! In the current implementation of if conversion, loads and stores are if-converted in a thread-unsafe way: * loads were always executed, even when they should have not been. Some so

Re: [patch] fix regrename pass to ensure renamings produce valid insns

2015-06-24 Thread Eric Botcazou
> Yes, the patch is OK, modulo... But you also need the approval of an ARM maintainer. -- Eric Botcazou

Re: C PATCH to use VAR_P

2015-06-24 Thread Jeff Law
On 06/24/2015 06:45 AM, Marek Polacek wrote: On Wed, Jun 24, 2015 at 02:37:30PM +0200, Uros Bizjak wrote: Hello! Similarly to what Gaby did in 2013 for C++ (), this patch makes the c/ and c-family/ code use VAR_P rather than TREE_CO

Re: C PATCH to use VAR_P

2015-06-24 Thread Jeff Law
On 06/24/2015 06:25 AM, Marek Polacek wrote: Similarly to what Gaby did in 2013 for C++ (), this patch makes the c/ and c-family/ code use VAR_P rather than TREE_CODE (t) == VAR_DECL (This is on top of the previous patch with is_globa

Re: [PATCH] [aarch64] Implemented reciprocal square root (rsqrt) estimation in -ffast-math

2015-06-24 Thread Dr. Philipp Tomsich
Evandro, We’ve seen a 28% speed-up on gromacs in SPECfp for the (scalar) reciprocal sqrt. Also, the “reciprocal divide” patches are floating around in various of our git-tree, but aren’t ready for public consumption, yet… I’ll leave Benedikt to comment on potential timelines for getting that

Re: C PATCH to use is_global_var

2015-06-24 Thread Jeff Law
On 06/24/2015 04:22 AM, Marek Polacek wrote: This patch makes the C FE use the predicate is_global_var in place of direct TREE_STATIC (t) || DECL_EXTERNAL (t) It should improve readability a bit and make predicates easier to follow. Bootstrapped/regtested on x86_64-linux, ok for trunk? 201

Re: fix PR46029: reimplement if conversion of loads and stores

2015-06-24 Thread Ramana Radhakrishnan
On 12/06/15 21:50, Abe Skolnik wrote: Hi everybody! In the current implementation of if conversion, loads and stores are if-converted in a thread-unsafe way: * loads were always executed, even when they should have not been. Some source code could be rendered invalid due to null point

Re: [patch] fix regrename pass to ensure renamings produce valid insns

2015-06-24 Thread Eric Botcazou
> Like this? I tested this on nios2 and x86_64-linux-gnu, as before, plus > built for aarch64-linux-gnu and ran the gcc testsuite. Yes, the patch is OK, modulo... > The c6x back end also calls regrename_do_replace. I am not set up to > build or test on that target, and Bernd told me off-list th

RE: [PATCH] [aarch64] Implemented reciprocal square root (rsqrt) estimation in -ffast-math

2015-06-24 Thread Evandro Menezes
Benedikt, You beat me to it! :-) Do you have the implementation for dividing using the Newton series as well? I'm not sure that the series is always for all data types and on all processors. It would be useful to allow each AArch64 processor to enable this or not depending on the data type. BT

Re: Remove redundant AND from count reduction loop

2015-06-24 Thread Jeff Law
On 06/24/2015 05:43 AM, Richard Biener wrote: Note that ISTR code performing exactly the opposite transform in fold-const.c ... That's another reason why I'm worried about just doing the (negate ...) thing without knowing whether the negate can be folded into anything else. I'm not aware of

Re: [Patch, C++, PR65882] Check tf_warning flag in build_new_op_1

2015-06-24 Thread Christophe Lyon
On 22 June 2015 at 18:59, Jason Merrill wrote: > On 06/19/2015 08:23 PM, Mikhail Maltsev wrote: >> >> I see that version 5.2 is set as target milestone for this bug. Should I >> backport the patch? > > > Please. > > Jason > Hi Mikhail, In the gcc-5-branch, I can see that your new inhibit-warn-2.

Re: C++ PATCH for c++/66501 (wrong code with array move assignment)

2015-06-24 Thread Jason Merrill
On 06/23/2015 10:05 AM, Jason Merrill wrote: build_vec_init was assuming that if a class has a trivial copy assignment, then an array assignment is trivial. But overload resolution might not choose the copy assignment operator. So this patch changes build_vec_init to check for any non-trivial a

Re: [C++17] Implement N3928 - Extending static_assert

2015-06-24 Thread Ed Smith-Rowland
On 06/17/2015 03:22 PM, Jason Merrill wrote: On 06/17/2015 01:53 PM, Ed Smith-Rowland wrote: I tried the obvious: an error message with %qE and got 'false'. constexpr values are evaluated early on. Is there a possibility that late folding could help or is that completely different? Late foldi

[gomp4] Additional tests for declare directive and fixes.

2015-06-24 Thread James Norris
Hi! The following patch adds additional testing of the declare directive and fixes for issues that arose from the testing. Committed to gomp-4_0-branch. Jim diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index e7df751..bcbd163 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -1767,12

Re: [PATCH 1/3][AArch64 nofp] Fix ICEs with +nofp/-mgeneral-regs-only and improve error messages

2015-06-24 Thread James Greenhalgh
On Tue, Jun 23, 2015 at 05:02:46PM +0100, Alan Lawrence wrote: > James Greenhalgh wrote: > Bootstrap + check-gcc on aarch64-none-linux-gnu. > > (ChangeLog's identical to v1) > > gcc/ChangeLog: > > * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): New. > > * config/aarc

Re: [PATCH, i386] Fix `misaligned_operand' predicate.

2015-06-24 Thread Uros Bizjak
On Wed, Jun 24, 2015 at 4:35 PM, Kirill Yukhin wrote: > Hello, > > Patch in the bottom uses proper check of valid memory > in `misaligned_operand' predicate. > > gcc/ > * config/i386/predicates.md (misaligned_operand): Properly > check if operand is memory. > > Bootstrapped and reg

Re: [patch] fix regrename pass to ensure renamings produce valid insns

2015-06-24 Thread Sandra Loosemore
On 06/24/2015 01:58 AM, Ramana Radhakrishnan wrote: On 24/06/15 02:00, Sandra Loosemore wrote: On 06/18/2015 11:32 AM, Eric Botcazou wrote: The attached patch teaches regrename to validate insns affected by each register renaming before making the change. I can see at least two other ways to

Re: [C/C++ PATCH] PR c++/66572. Fix Wlogical-op false positive

2015-06-24 Thread Mikhail Maltsev
On 23.06.2015 22:49, Marek Polacek wrote: > On Sat, Jun 20, 2015 at 03:02:06AM +0300, Mikhail Maltsev wrote: >> - /* We do not warn for constants because they are typical of macro >> - expansions that test for features. */ >> - if (CONSTANT_CLASS_P (op_left) || CONSTANT_CLASS_P (op_right)) >

[PATCH, i386] Fix `misaligned_operand' predicate.

2015-06-24 Thread Kirill Yukhin
Hello, Patch in the bottom uses proper check of valid memory in `misaligned_operand' predicate. gcc/ * config/i386/predicates.md (misaligned_operand): Properly check if operand is memory. Bootstrapped and reg-tested. Is it ok for trunk? -- Thanks, K diff --git a/gcc/config/i3

Re: [PATCH 1/8] S/390 Vector ABI GNU Attribute.

2015-06-24 Thread Andreas Krebbel
On 06/24/2015 12:14 PM, Richard Biener wrote: > On Wed, Jun 24, 2015 at 8:57 AM, Andreas Krebbel >> Ideas about how to improve the implementation without creating too >> many false postives are welcome. > > I'd be more conservative and instead hook into > targetm.vector_mode_supported_p (and thus

[PATCH, committed] Fix warning

2015-06-24 Thread Ilya Enkovich
Hi, I've committed this patch to fix a warning for mpx-bootstrap. /export/users/aguskov/MPX/git_branch/source/gcc/tree.h:2858:51: error: 'vectype' may be used uninitialized in this function [-Werror=maybe-uninitialized] tree_check_failed (__t, __f, __l, __g, __c, 0);

[Patch ARM] Fixup testsuite noise with various multilibs in arm.exp

2015-06-24 Thread Ramana Radhakrishnan
Pretty much self explanatory. This fixes up a significant amount of noise in a testsuite run with an -mfloat-abi=soft, -mfpu=fp-armv8 variant in the multilib flags provided for the testsuite run. Tested arm-none-eabi cross with a set of multilibs and applied to trunk. regards ramana 2015-06-2

Re: Remove redundant AND from count reduction loop

2015-06-24 Thread Richard Biener
On Wed, Jun 24, 2015 at 3:37 PM, Richard Sandiford wrote: There is precedence for different expansion paths dependent on optabs (or even rtx cost?). Of course expand_unop doesn't get the original tree ops (expand_expr.c does, where some special-casing using get_gimple_for_expr

Re: [gomp4] Preserve NVPTX "reconvergence" points

2015-06-24 Thread Jakub Jelinek
On Wed, Jun 24, 2015 at 03:11:04PM +0200, Bernd Schmidt wrote: > On 06/19/2015 03:45 PM, Jakub Jelinek wrote: > > >If the loop remains in the IL (isn't optimized away as unreachable or > >isn't removed, e.g. as a non-loop - say if it contains a noreturn call), > >the flags on struct loop should be

Re: Remove redundant AND from count reduction loop

2015-06-24 Thread Richard Sandiford
>>> There is precedence for different >>> expansion paths dependent on optabs (or even rtx cost?). Of course >>> expand_unop doesn't get the original tree ops (expand_expr.c does, >>> where some special-casing using get_gimple_for_expr is). Not sure >>> if expand_unop would get 'cond' in a form w

Re: [gomp4] Preserve NVPTX "reconvergence" points

2015-06-24 Thread Bernd Schmidt
On 06/19/2015 03:45 PM, Jakub Jelinek wrote: If the loop remains in the IL (isn't optimized away as unreachable or isn't removed, e.g. as a non-loop - say if it contains a noreturn call), the flags on struct loop should be still there. For the loop clauses (reduction always, and private/lastpri

Re: Remove redundant AND from count reduction loop

2015-06-24 Thread Richard Biener
On Wed, Jun 24, 2015 at 2:28 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Wed, Jun 24, 2015 at 1:10 PM, Richard Sandiford >> wrote: >>> Richard Biener writes: >> I'm fine with using tree_nop_conversion_p for now. > > I like the suggestion about checking TYPE_VECTOR_SU

Re: C PATCH to use VAR_P

2015-06-24 Thread Marek Polacek
On Wed, Jun 24, 2015 at 02:37:30PM +0200, Uros Bizjak wrote: > Hello! > > > Similarly to what Gaby did in 2013 for C++ > > (), this patch > > makes the c/ and c-family/ code use VAR_P rather than > > > > TREE_CODE (t) == VAR_DECL > > > >

Re: C PATCH to use VAR_P

2015-06-24 Thread Uros Bizjak
Hello! > Similarly to what Gaby did in 2013 for C++ > (), this patch > makes the c/ and c-family/ code use VAR_P rather than > > TREE_CODE (t) == VAR_DECL > > (This is on top of the previous patch with is_global_var.) You could also use

Re: Remove redundant AND from count reduction loop

2015-06-24 Thread Richard Sandiford
Richard Biener writes: > On Wed, Jun 24, 2015 at 1:10 PM, Richard Sandiford > wrote: >> Richard Biener writes: > I'm fine with using tree_nop_conversion_p for now. I like the suggestion about checking TYPE_VECTOR_SUBPARTS and the element mode. How about: (if (VECTO

C PATCH to use VAR_P

2015-06-24 Thread Marek Polacek
Similarly to what Gaby did in 2013 for C++ (), this patch makes the c/ and c-family/ code use VAR_P rather than TREE_CODE (t) == VAR_DECL (This is on top of the previous patch with is_global_var.) Bootstrapped/regtested on x86_64-linux,

Re: [PATCH] Fix PR c++/30044

2015-06-24 Thread Patrick Palka
On Wed, Jun 24, 2015 at 5:08 AM, Markus Trippelsdorf wrote: > On 2015.06.23 at 19:40 -0400, Patrick Palka wrote: >> On Tue, Jun 23, 2015 at 12:38 AM, Jason Merrill wrote: >> > On 06/15/2015 02:32 PM, Patrick Palka wrote: >> >> >> >> On Mon, Jun 15, 2015 at 2:05 PM, Jason Merrill wrote: >> >>> >>

Re: Remove redundant AND from count reduction loop

2015-06-24 Thread Richard Biener
On Wed, Jun 24, 2015 at 1:10 PM, Richard Sandiford wrote: > Richard Biener writes: I'm fine with using tree_nop_conversion_p for now. >>> >>> I like the suggestion about checking TYPE_VECTOR_SUBPARTS and the element >>> mode. How about: >>> >>> (if (VECTOR_INTEGER_TYPE_P (type) >>> &

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-24 Thread Jakub Jelinek
On Tue, Jun 23, 2015 at 02:40:43PM +0300, Ilya Verbin wrote: > On Sat, Jun 20, 2015 at 00:35:14 +0300, Ilya Verbin wrote: > > Given that a mapped variable in 4.1 can have different kinds across nested > > data > > regions, we need to store map-type not only for each var, but also for each > > stru

Re: [06/12] Consolidate string hashers

2015-06-24 Thread Richard Sandiford
Mikhail Maltsev writes: > On 23.06.2015 17:49, Richard Sandiford wrote: >> Index: gcc/config/alpha/alpha.c >> === >> --- gcc/config/alpha/alpha.c 2015-06-23 15:48:30.751788389 +0100 >> +++ gcc/config/alpha/alpha.c 2015-06-23 15:48:30.

Re: Remove redundant AND from count reduction loop

2015-06-24 Thread Richard Sandiford
Richard Biener writes: >>> I'm fine with using tree_nop_conversion_p for now. >> >> I like the suggestion about checking TYPE_VECTOR_SUBPARTS and the element >> mode. How about: >> >> (if (VECTOR_INTEGER_TYPE_P (type) >> && TYPE_VECTOR_SUBPARTS (type) == TYPE_VECTOR_SUBPARTS (TREE_TYPE (@0

Re: New type-based pool allocator code miscompiled due to aliasing issue?

2015-06-24 Thread Martin Liška
On 06/23/2015 09:44 PM, Pat Haugen wrote: On 06/18/2015 06:10 AM, Richard Biener wrote: You are right that we should call ::new just for classes that have m_ignore_type_size == false. >I've come up with following patch, that I tested slightly: > >diff --git a/gcc/alloc-pool.h b/gcc/alloc-pool.h

Re: [PATCH] PR c++/65750

2015-06-24 Thread Paolo Carlini
Hi, On 04/14/2015 11:34 PM, Jason Merrill wrote: On 04/14/2015 05:27 PM, Adam Butcher wrote: On 2015-04-10 15:57, Adam Butcher wrote: + cp_lexer_consume_token (parser->lexer); Actually there should be two of these as the 'auto' isn't consumed yet. OK. I'm finishing retesting the

Re: [PATCH 2/3][AArch64 nofp] Clarify docs for +nofp/-mgeneral-regs-only

2015-06-24 Thread James Greenhalgh
On Tue, Jun 23, 2015 at 05:03:13PM +0100, Alan Lawrence wrote: > James Greenhalgh wrote: <> > To my eye, beginning a sentence in lowercase looks very odd in pdf, and still > a > bit odd in html. Have changed to "That is"...? > > Tested with make pdf & make html. > > gcc/ChangeLog (unchanged):

Re: [PATCH 3/3][AArch64 nofp] Fix another ICE with +nofp/-mgeneral-regs-only

2015-06-24 Thread James Greenhalgh
On Tue, Jun 23, 2015 at 05:03:28PM +0100, Alan Lawrence wrote: > This fixes another ICE, obtained with the attached testcase - yes, there was > a > way to get hold of a float, without passing an argument or going through > movsf/movdf! > > Bootstrapped + check-gcc on aarch64-none-linux-gnu. >

C PATCH to use is_global_var

2015-06-24 Thread Marek Polacek
This patch makes the C FE use the predicate is_global_var in place of direct TREE_STATIC (t) || DECL_EXTERNAL (t) It should improve readability a bit and make predicates easier to follow. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2015-06-24 Marek Polacek * c-common.c (

Re: Remove redundant AND from count reduction loop

2015-06-24 Thread Richard Biener
On Wed, Jun 24, 2015 at 11:57 AM, Richard Sandiford wrote: > Richard Biener writes: >> On Tue, Jun 23, 2015 at 11:27 PM, Marc Glisse wrote: >>> On Tue, 23 Jun 2015, Richard Sandiford wrote: >>> +/* Vector comparisons are defined to produce all-one or all-zero results. */ +(simplif

Re: [PATCH 1/8] S/390 Vector ABI GNU Attribute.

2015-06-24 Thread Richard Biener
On Wed, Jun 24, 2015 at 8:57 AM, Andreas Krebbel wrote: > With this patch .gnu_attribute is used to mark binaries with a vector > ABI tag. This is required since the z13 vector support breaks the ABI > of existing vector_size attribute generated vector types: > > 1. vector_size(16) and bigger vec

Re: [06/12] Consolidate string hashers

2015-06-24 Thread Mikhail Maltsev
On 23.06.2015 17:49, Richard Sandiford wrote: > This patch replaces various string hashers with a single copy > in hash-traits.h. (snip) > Index: gcc/config/alpha/alpha.c > === > --- gcc/config/alpha/alpha.c 2015-06-23 15:48:30.7517

[gomp4.1] Add affinity query routines

2015-06-24 Thread Jakub Jelinek
Hi! This got enacted earlier this week, a couple of routines to query the affinity. 2015-06-24 Jakub Jelinek * omp.h.in (omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids, omp_get_place_num, omp_get_partition_num_places, omp_get_partition_place_nums):

[PATCH] Support conditional view_convert in match.pd

2015-06-24 Thread Richard Biener
Tested on match.pd (same code generation) and a toy pattern. Will apply after bootstrap & regtest on x86_64-unknown-linux-gnu. Richard. 2015-06-24 Richard Biener * genmatch.c (enum tree_code): Add VIEW_CONVERT[012]. (main): Likewise. (lower_opt_convert): Support lowe

Re: Remove redundant AND from count reduction loop

2015-06-24 Thread Richard Sandiford
Richard Biener writes: > On Tue, Jun 23, 2015 at 11:27 PM, Marc Glisse wrote: >> On Tue, 23 Jun 2015, Richard Sandiford wrote: >> >>> +/* Vector comparisons are defined to produce all-one or all-zero results. >>> */ >>> +(simplify >>> + (vec_cond @0 integer_all_onesp@1 integer_zerop@2) >>> + (if

[PATCH IRA] save a bitmap check

2015-06-24 Thread Zhouyi Zhou
In function assign_hard_reg, checking the bit of conflict_a in consideration_allocno_bitmap is unneccesary, because when retry_p is false, conflicting objects are always inside of the same loop_node (this is ensured in function process_bb_node_lives which marks the living objects to death near t

[ARM] Correct spelling of references to ARMv6KZ

2015-06-24 Thread Matthew Wahab
Hello, GCC supports ARM architecture ARMv6KZ but refers to it as ARMv6ZK. This is made visible by the command line option -march=armv6zk and by the predefined macro __ARM_ARCH_6ZK__. This patch corrects the spelling internally and adds -march=armv6kz. To preserve existing behaviour, -march=armv6

Re: Remove redundant AND from count reduction loop

2015-06-24 Thread Richard Biener
On Tue, Jun 23, 2015 at 11:27 PM, Marc Glisse wrote: > On Tue, 23 Jun 2015, Richard Sandiford wrote: > >> +/* Vector comparisons are defined to produce all-one or all-zero results. >> */ >> +(simplify >> + (vec_cond @0 integer_all_onesp@1 integer_zerop@2) >> + (if (tree_nop_conversion_p (type, TRE

Re: [PATCH/AARCH64] Update ThunderX schedule model

2015-06-24 Thread James Greenhalgh
On Tue, Jun 23, 2015 at 10:00:21PM +0100, Andrew Pinski wrote: > Hi, > This patch updates the schedule model to be more accurate and model > SIMD and fp instructions that I had missed out when I had the last > patch. > > OK? Bootstrapped and tested on aarch64-linux-gnu with no regeessions. The

[gomp4, committed] Add replace_uses_in_dominated_bbs

2015-06-24 Thread Tom de Vries
Hi, this patch factors out a new function replace_uses_in_dominated_bbs out of rewrite_virtuals_into_loop_closed_ssa. Committed to gomp-4_0-branch. Thanks, - Tom Add replace_uses_in_dominated_bbs 2015-06-18 Tom de Vries * tree-ssa-loop-manip.c (replace_uses_in_dominated_bbs): Factor out

[gomp4, committed] Add get_virtual_phi

2015-06-24 Thread Tom de Vries
Hi, this patch factors new function get_virtual_phi out of rewrite_virtuals_into_loop_closed_ssa. Committed to gomp-4_0-branch. Thanks, - Tom Add get_virtual_phi 2015-06-18 Tom de Vries * tree-ssa-loop-manip.c (get_virtual_phi): Factor out of ... (rewrite_virtuals_into_loop_closed_ssa)

[gomp4, committed] Add bitmap_get_dominated_by

2015-06-24 Thread Tom de Vries
Hi, this patch adds bitmap_get_dominated_by, a version of get_dominated_by that returns a bitmap rather than a vector. Committed to gomp-4_0-branch. Thanks, - Tom Add bitmap_get_dominated_by 2015-06-18 Tom de Vries * dominance.c (bitmap_get_dominated_by): New function. * dominance.h (b

[gomp4, committed] Move rewrite_virtuals_into_loop_closed_ssa to tree-ssa-loop-manip.c

2015-06-24 Thread Tom de Vries
Hi, this patch moves rewrite_virtuals_into_loop_closed_ssa to tree-ssa-loop-manip.c, as requested here: https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01264.html . Thanks, - Tom Move rewrite_virtuals_into_loop_closed_ssa to tree-ssa-loop-manip.c 2015-06-18 Tom de Vries * tree-parloops.c

[Patch ARM] Fix PR target/63408

2015-06-24 Thread Ramana Radhakrishnan
Hi, The attached patch fixes PR target/63408 and adds a regression test for the same. The problem is essentially that vfp3_const_double_for_fract_bits() needs to be aware that negative values cannot be used in this context. Tested with a bootstrap and regression test run on armhf. Applied to tru

Re: PING: Re: [patch] PR debug/66482: Do not ICE in gen_formal_parameter_die

2015-06-24 Thread Richard Biener
On Tue, Jun 23, 2015 at 6:08 PM, Aldy Hernandez wrote: > On 06/12/2015 10:07 AM, Aldy Hernandez wrote: > > Hi. > > This is now a P2, as it is causing a secondary target bootstrap to fail > (s390). Ok. Thanks, Richard. > Aldy > >> Sigh. I must say my head is spinning with this testcase and what

Re: [05/13] Add nofree_ptr_hash

2015-06-24 Thread Richard Sandiford
Jeff Law writes: > On 06/16/2015 02:55 AM, Richard Sandiford wrote: >> This patch stops pointer_hash from inheriting typed_noop_remove and >> instead creates a new class nofree_ptr_hash that inherits from both. >> It then updates all uses of typed_noop_remove (which are all pointers) >> and pointe

Re: [02/13] Replace handle_cache_entry with new interface

2015-06-24 Thread Richard Sandiford
Jeff Law writes: > On 06/16/2015 02:45 AM, Richard Sandiford wrote: >> As described in the covering note, this patch replaces handle_cache_entry >> with a new function keep_cache_entry. It also ensures that elements are >> deleted using the proper function, so that m_n_deleted is updated. >> >> I

Re: [PATCH][RFC] Add FRE in pass_vectorize

2015-06-24 Thread Richard Biener
On Tue, 23 Jun 2015, Jeff Law wrote: > On 06/10/2015 08:02 AM, Richard Biener wrote: > > > > The following patch adds FRE after vectorization which is needed > > for IVOPTs to remove redundant PHI nodes (well, I'm testing a > > patch for FRE that will do it already there). > Redundant or degenera

Re: [patch] fix regrename pass to ensure renamings produce valid insns

2015-06-24 Thread Ramana Radhakrishnan
On 24/06/15 02:00, Sandra Loosemore wrote: On 06/18/2015 11:32 AM, Eric Botcazou wrote: The attached patch teaches regrename to validate insns affected by each register renaming before making the change. I can see at least two other ways to handle this -- earlier, by rejecting renamings that

Re: [PATCH 4.8] PR66306 Fix reload problem with commutative operands

2015-06-24 Thread Andreas Krebbel
On 06/16/2015 07:40 PM, Ulrich Weigand wrote: > Andreas Krebbel wrote: > >> this fixes a reload problem with match_dup's on commutative operands. >> >> Bootstrapped and regtested on x86-64, ppc64, and s390x. >> >> Ok? >> >> Bye, >> >> -Andreas- >> >> 2015-06-11 Andreas Krebbel >> >> PR rtl

Re: [PATCH][testsuite] Fix TORTURE_OPTIONS overriding

2015-06-24 Thread Richard Biener
On Tue, 23 Jun 2015, James Greenhalgh wrote: > > On Thu, Jun 18, 2015 at 11:10:01AM +0100, Richard Biener wrote: > > > > Currently when doing > > > > make check-gcc RUNTESTFLAGS="TORTURE_OPTIONS=\\\"{ -O3 } { -O2 }\\\" > > dg-torture.exp" > > > > you get -O3 and -O2 but also the two LTO torture o