Move powi folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_powi): Delete. (fold_builtin_2): Handle constant powi arguments here. * match.pd: Add rules previously handled by fold_builtin_powi.

Remove constant handling from fold_builtin_{,f}abs

2015-10-26 Thread Richard Sandiford
fold_builtin_fabs and fold_builtin_abs had code to handle constant arguments, but this simply duplicated what the following fold_build1_loc would do for ABS_EXPR. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c

Rename logb and significand folds

2015-10-26 Thread Richard Sandiford
fold_builtin_logb and fold_builtin_significand now only handle constant arguments, so this patch renames them to fold_const..., to match fold_const_builtin_pow. The idea is to differentiate constant-only folds so that they can be moved to a const_binop-like function in future. The functions also

Re: Move min(max...) and max(min...) folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 11:00 AM, Richard Sandiford wrote: > This handles both integer and floating-point arguments. It's needed > for the follow-on patch to move fmin and fmax to match.pd. > > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK

[Ada] Missing error on conflicting declarations

2015-10-26 Thread Arnaud Charlet
With This patch the compiler properly rejects a subprogram body whose signature is type conformant with a previous expression function in the same scope. Compiling same_signature,adb must yield: same_signature.adb:8:04: body conflicts with expression function at line 5 --- with Ada.Text_IO;

[PATCH] Fix VEC_COND_EXPR types when vectorizing conditional expressions

2015-10-26 Thread Alan Hayward
VEC_COND_EXPRs have been changed to use boolean vectors for the first argument. This changes the vectorizing conditional expressions to use this new format, fixing the compiler failures for the 65947-*.c tests. 2015-10-26 Alan Hayward gcc/ PR

Re: [PATCH][auto-inc-dec.c] Account for cost of move operation in FORM_PRE_ADD and FORM_POST_ADD cases

2015-10-26 Thread Bernd Schmidt
On 10/26/2015 11:40 AM, Kyrill Tkachov wrote: In the FORM_POST_ADD case the pass transforms: *a ... b <- a + c into b <- a ... *(b += c) post However, the code in attempt_change that compares the costs of the before and

Re: Move expN folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 11:32 AM, Marc Glisse wrote: > On Mon, 26 Oct 2015, Richard Sandiford wrote: > >> + /* expN(logN(x)) -> x. */ >> + (simplify >> + (exps (logs @0)) >> + @0)) > > > We are not very consistent about it, but wasn't there an idea that we should >

[Ada] Front-end inlining and predicates

2015-10-26 Thread Arnaud Charlet
The front-end cannot inline subprograms that contain certain declarations, such as nested subprograms. If the the subprogram to inline includes a subtype declaration with predicates, it cannot be inlined because the analysis of the predicate will generate (nested) predicate functions. Source:

[Ada] Clean up in s-osinte

2015-10-26 Thread Arnaud Charlet
This patch cleans the way getpagesize() is imported and removes an inconsistency wrt the underlying C routine. No change in functionality. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-26 Arnaud Charlet * s-osinte-hpux.ads, s-osinte-aix.ads,

[Ada] Extraction of components/discriminants of concurrent types

2015-10-26 Thread Arnaud Charlet
This patch allows First_Component and First_Component_Or_Discriminant to apply to protected and task types. No change in behavior, no test needed. The patch is aimed at clients of the compiler front-end. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-26 Hristian Kirtchev

[Ada] In an element iterator, the element is constant if the container is.

2015-10-26 Thread Arnaud Charlet
This patch adds a legality check to element iterators over containers: the element is a constant if the container object is a constant, even if the container type has a Variable_Indexing aspect. Compiling the following must be rejected with: strange_behavior.adb:12:07: left hand side of

Re: Move some bit and binary optimizations in simplify and match

2015-10-26 Thread Richard Biener
On Sat, Oct 24, 2015 at 11:15 PM, Marc Glisse wrote: > On Fri, 23 Oct 2015, Hurugalawadi, Naveen wrote: > > + (minus (bit_and:cs @0 (bit_not @1)) (bit_and:s @0 @1)) > > I am not sure why we have :c on one bit_and but not the other. Clearly an omission. > + (bit_ior:c

Don't create SSA names until in SSA form

2015-10-26 Thread Richard Sandiford
An upcoming patch adds a fold from hypot(x,x) to fabs(x)*sqrt(2). This is unusual in that it could trigger in the gimplifier but would require new SSA names to be created. This patch makes sure that we don't try to create new SSA names when we're not yet in SSA form. Tested on x86_64-linux-gnu,

Move copysign folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_copysign): Delete. (fold_builtin_2): Handle constant copysign arguments here. * match.pd: Add rules previously handled by

Move fmin and fmax folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_fmin_fmax): Delete. (fold_builtin_2): Handle constant fmin and fmax arguments here. * match.pd: Add rules previously handled by

Re: [PATCH] libjava: fix locale handling when sorting JNI methods

2015-10-26 Thread Andrew Haley
On 23/10/15 04:56, Mike Frysinger wrote: > 2015-10-22 Mike Frysinger > > * scripts/check_jni_methods.sh.in: Run sort with LC_ALL=C, and > combine `sort|uniq` into `sort -u`. Looks OK to me. Andrew.

Re: Move powi folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:48 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_powi): Delete. >

Re: [PATCH, PR68062] Fix uniform vector operation lowering

2015-10-26 Thread Ilya Enkovich
On 26 Oct 10:56, Richard Biener wrote: > On Mon, Oct 26, 2015 at 10:35 AM, Ilya Enkovich > wrote: > > On 26 Oct 10:09, Richard Biener wrote: > >> On Sat, Oct 24, 2015 at 12:29 AM, Ilya Enkovich > >> wrote: > >> > 2015-10-24 0:32 GMT+03:00 Jeff

Re: Move expN folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:50 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_exponent): Delete. >

Re: Move copysign folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:54 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_copysign): Delete. >

Re: Remove constant handling from fold_builtin_{,f}abs

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:56 AM, Richard Sandiford wrote: > fold_builtin_fabs and fold_builtin_abs had code to handle constant > arguments, but this simply duplicated what the following fold_build1_loc > would do for ABS_EXPR. > > Tested on x86_64-linux-gnu,

[Committed] Inline get_vi_for_tree into intra_create_variable_infos

2015-10-26 Thread Tom de Vries
Hi, this no-functional-changes patch inlines get_vi_for_tree into intra_create_variable_infos. It exposes the interaction with create_variable_info_for_1, and makes it clear that we're using none of the constraint handling from create_variable_info_for. Bootstrapped and reg-tested on

[Ada] Pragma Volatile_Function has no effect on subprogram body

2015-10-26 Thread Arnaud Charlet
This patch modifies the analysis of pragmas that appear on package specs and and subprogram bodies. The new model of analysis allows for pragmas to appear out of order, but they are still analyzed according to internal precedence. The patch removes the restrictions concerning the declarations

[PATCH, 1/2] Add handle_param parameter to create_variable_info_for_1

2015-10-26 Thread Tom de Vries
Hi, this no-functional-changes patch copies the restrict var declaration code from intra_create_variable_infos to create_variable_info_for_1. The code was copied rather than moved, since in fipa-pta mode the varinfo p for the parameter t may already exist due to create_function_info_for, in

[PATCH, 2/2] Handle recursive restrict pointer in create_variable_info_for_1

2015-10-26 Thread Tom de Vries
Hi, this patch enables recursive restrict handling in create_variable_info_for_1. This allows us to interpret all restricts in a function parameter "int *restrict *restrict *restrict a". This patch is the first step towards implementing a generic fix for PR67742. Bootstrapped and reg-tested

[PATCH] Fix PR68087

2015-10-26 Thread Markus Trippelsdorf
Hi, the patch below fixes PR68087, an ICE caused by referring to a negative constexpr array element. Bootstrapped and tested on ppc64le. OK for trunk? gcc-5 also needs a slightly different fix. I'll post that as a follow-up, once this one gets approved. PR c++/68087 *

[patch committed SH] Fix PR target/68091

2015-10-26 Thread Kaz Kojima
I've applied the attached one liner as a quick fix for PR target/68091 which is a 6 regression. sh_vector_mode_supported_p returns true even if the target has no mov insns for some vector modes and causes ICEs for several vector tests. Tested on sh4-unknown-linux-gnu. Regards, kaz --

Re: [PATCH] c/67882 - improve -Warray-bounds for invalid offsetof

2015-10-26 Thread Bernd Schmidt
On 10/23/2015 10:40 PM, Martin Sebor wrote: The original code deliberately avoids diagnosing the case of last array members with bounds greater than 1 (see the comment about "a poor man's flexible array member" added with a fix for bug 41935) and I didn't want to change that. Jakub added

Re: Drop types_compatible_p from operand_equal_p

2015-10-26 Thread Richard Biener
On Sat, 24 Oct 2015, Jan Hubicka wrote: > Hi, as discussed earlier, the types_compatible_p in operand_equal_p > seems redundant. (it is callers work to figure out how much of type > matching it wants. If not, we probably want to treat most of other > references and casts simlar way). > >

[PATCH]Add -fprofile-use option for check_effective_target_freorder.

2015-10-26 Thread Renlin Li
Hi all, After r228136, flag_reorder_blocks_and_partition is canceled when -fprofile-use is not specified. In this case check_effective_target_freorder() is not able to check the proper target support. This is a simple patch to add "-fprofile-use" option that effective target check. Okay

Move expN folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_exponent): Delete. (fold_builtin_2): Handle constant expN arguments here. * match.pd: Fold expN(logN(x)) -> x. diff --git a/gcc/builtins.c

Re: Move hypot folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:38 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_hypot): Delete. >

Re: [OpenACC 4/11] C FE changes

2015-10-26 Thread Jakub Jelinek
On Mon, Oct 26, 2015 at 09:59:49AM +0100, Jakub Jelinek wrote: > Ok for trunk with those changes fixed. Oops, I've missed that there is no checking of the type (that the expressions have INTEGRAL_TYPE_P); in the C FE, this is sometimes done already during the parsing, sometimes during

Re: Move pow folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:44 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_pow): Delete in favor of... >

Re: Allow more complex call replacements in gimple-fold.c

2015-10-26 Thread Richard Sandiford
Richard Biener writes: > On Mon, Oct 26, 2015 at 10:41 AM, Richard Sandiford > wrote: >> An upcoming patch adds a match.pd rule that folds pow(pow(x,y),z) >> to pow(x,y*z). This fold can reuse the existing pow gimple statement >> and

[Ada] Expression functions, internal bodies and freezing of contracts

2015-10-26 Thread Arnaud Charlet
This patch ensures that only source package and subprogram bodies "freeze" the contract of the nearest enclosing package body. -- Source -- -- expr_funcs.ads package Expr_Funcs with SPARK_Mode, Abstract_State => State is Var_1 : Integer := 1; function

[Ada] Spurious duplicate Default_Iterator error

2015-10-26 Thread Arnaud Charlet
This patch fixes a bug that caused the compiler to issue the error "default iterator must be unique" when one of the alleged "duplicates" is overridden by another. This can happen in cases involving types derived from types declared in generic formal packages. The error message (when it is

[Ada] Local name hides global item

2015-10-26 Thread Arnaud Charlet
This patch modifies the analysis of pragmas Depends, Global, Refined_Depends and Refined_Global when they appear in a subprogram body. The pragmas are now analyzed immediately and in pairs. This preserves the inherent dependency of [Refined_]Depends on [Refined_]Global and prevents a visibility

[Ada] Contracts on protected entries and task units

2015-10-26 Thread Arnaud Charlet
This patch implements pragmas [Refined_]Depends and [Refined_]Global on protected entries and task units. As a prerequisite, the patch implements aspect specifications on entry bodies as specified in Ada 2012 (AI12-0169): ENTRY_BODY ::= entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART

[Ada] Spurious errors with -gnatE and -gnatwl

2015-10-26 Thread Arnaud Charlet
This patch removes spurious errors triggered by the switches -gnatE (Dynamic elaboration) and -gnatwl (list elaboration warnings) when the elaboration call is appears in the prefix of an access attribute. Compiling gcc -c dds-translator.adb -gnatE -gnatwl must yield:

[Ada] Spawning processes with no PATH

2015-10-26 Thread Arnaud Charlet
This patch fixes a bug in which GNAT.Expect.Non_Blocking_Spawn fails to find an executable when the PATH environment variable is not set. The executable should be found if it contains a directory name. The following test should execute quietly. gnatmake -q do_nothing.adb gnatmake -q spawn.adb

Re: Move some bit and binary optimizations in simplify and match

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:26 AM, Richard Biener wrote: > On Sat, Oct 24, 2015 at 11:15 PM, Marc Glisse wrote: >> On Fri, 23 Oct 2015, Hurugalawadi, Naveen wrote: >> >> + (minus (bit_and:cs @0 (bit_not @1)) (bit_and:s @0 @1)) >> >> I am not sure

Move hypot folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_hypot): Delete. (fold_builtin_2): Handle constant hypot arguments here. * match.pd: Fold hypot(x, 0) and hypot(0, x) to x. Canonicalize

Move pow folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_pow): Delete in favor of... (fold_const_builtin_pow): ...this new function. Only handle constant arguments. (fold_builtin_2):

Split constant handling out of fold_builtin_fma

2015-10-26 Thread Richard Sandiford
Just makes an upcoming patch a bit clearer. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_fma): Remove constant handling. (fold_builtin_3): Handle constant fma arguments here. diff --git

Re: Don't create SSA names until in SSA form

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:36 AM, Richard Sandiford wrote: > An upcoming patch adds a fold from hypot(x,x) to fabs(x)*sqrt(2). > This is unusual in that it could trigger in the gimplifier but would > require new SSA names to be created. This patch makes sure that we >

Re: [Patch, Fortran, 66927, v2.1] [6 Regression] ICE in gfc_conf_procedure_call

2015-10-26 Thread Andre Vehreschild
Hi all, unfortunately did my last patch create a segfault on some 32-bit system. This happens because in the scalarizer the lower bound of the deferred length array of the source= expression was taken to be constant zero instead of taking that information from the array descriptor. This patch

Re: Move signbit folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:52 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_signbit): Delete. >

Re: [patch] Extend former fold_widened_comparison to all integral types

2015-10-26 Thread Eric Botcazou
> I think excluding enums had sth to do with C++ -f[no-]strict-enums > (whatever is the default). Just tried to figure where the check > came from ... both calls are keyed on INTEGER_TYPE... Here's the relevant block of code from the C++ front-end: /* The middle-end currently assumes that

Re: Split constant handling out of fold_builtin_fma

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:57 AM, Richard Sandiford wrote: > Just makes an upcoming patch a bit clearer. > > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > *

Re: [PATCH 5/9] ENABLE_CHECKING refactoring: pool allocators

2015-10-26 Thread Mikhail Maltsev
On 10/26/2015 12:47 PM, Richard Biener wrote: > I committed the attached to fix build with the valgrind annotations active. > > Richard. > Doh! Sorry for breakage. -- Regards, Mikhail Maltsev

[comitted] Add make_restrict_var_constraints

2015-10-26 Thread Tom de Vries
Hi, this no-functional-changes patch factors a new function make_restrict_var_constraints out of intra_create_variable_infos. Bootstrapped and reg-tested on x86_64. Committed as trivial. Thanks, - Tom Add make_restrict_var_constraints 2015-10-26 Tom de Vries *

Re: Move ldexp, scalbn and scalbln folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 11:08 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_load_exponent): Rename to... >

Re: [PATCH] Fix VEC_COND_EXPR types when vectorizing conditional expressions

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 12:12 PM, Alan Hayward wrote: > VEC_COND_EXPRs have been changed to use boolean vectors for the first > argument. > This changes the vectorizing conditional expressions to use this new > format, > fixing the compiler failures for the 65947-*.c tests.

Re: [PATCH][auto-inc-dec.c] Account for cost of move operation in FORM_PRE_ADD and FORM_POST_ADD cases

2015-10-26 Thread Bernd Schmidt
On 10/26/2015 12:12 PM, Bernd Schmidt wrote: But isn't that balanced by the fact that it doesn't seem to take into account the gain of removing the inc_insn either? So I think this can't be right. Argh, misread the code. The patch is OK with the change I suggested. Bernd

Re: Handle OBJ_TYPE_REF in operand_equal_p

2015-10-26 Thread Richard Biener
On Sat, Oct 24, 2015 at 7:31 PM, Jan Hubicka wrote: > Hello, > this patch adds OBJ_TYPE_REF that is the only code handled by ipa-icf-gimple > but not bu operand_equal_p. I tried to make the following testcase: > > /* { dg-do compile } */ > /* { dg-options "-O2 -fdump-tree-pre" }

Re: [PATCH, PR68062] Fix uniform vector operation lowering

2015-10-26 Thread Ilya Enkovich
On 26 Oct 10:09, Richard Biener wrote: > On Sat, Oct 24, 2015 at 12:29 AM, Ilya Enkovich > wrote: > > 2015-10-24 0:32 GMT+03:00 Jeff Law : > >> On 10/23/2015 09:26 AM, Ilya Enkovich wrote: > >>> > >>> Hi, > >>> > >>> This patch checks optab exists before

Move signbit folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_signbit): Delete. (fold_builtin_2): Handle constant signbit arguments here. * match.pd: Add rules previously handled by

Re: [patch] Extend former fold_widened_comparison to all integral types

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 9:39 AM, Eric Botcazou wrote: > Hi, > > this patch extends the simplification formerly done in fold_widened_comparison > and now in match.pd to all integral types instead of just integer types, and > comes with an Ada testcase for the enumeral type

Move min(max...) and max(min...) folds to match.pd

2015-10-26 Thread Richard Sandiford
This handles both integer and floating-point arguments. It's needed for the follow-on patch to move fmin and fmax to match.pd. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * fold-const.c (fold_minmax): Delete.

Move ldexp, scalbn and scalbln folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_load_exponent): Rename to... (fold_const_builtin_load_exponent): ...this and only handle constant arguments. (fold_builtin_2):

Re: [OpenACC 5/11] C++ FE changes

2015-10-26 Thread Jakub Jelinek
On Sat, Oct 24, 2015 at 02:11:41PM -0700, Cesar Philippidis wrote: > @@ -29582,6 +29592,144 @@ cp_parser_oacc_data_clause_deviceptr (cp_parser > *parser, tree list) >return list; > } > > +/* OpenACC 2.0: > + auto > + independent > + nohost > + seq */ > + > +static tree >

[Ada] SPARK_Mode on synchronized units and entry declarations

2015-10-26 Thread Arnaud Charlet
This patch implements the following semantic rules: The SPARK_Mode aspect can be used in the following places in the code: * on a library-level subprogram spec or body (which now includes entry declarations) * on a library-level task spec or body * on a library-level protected

Re: Allow more complex call replacements in gimple-fold.c

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 11:30 AM, Richard Sandiford wrote: > Richard Biener writes: >> On Mon, Oct 26, 2015 at 10:41 AM, Richard Sandiford >> wrote: >>> An upcoming patch adds a match.pd rule that folds

Re: [PATCH][auto-inc-dec.c] Account for cost of move operation in FORM_PRE_ADD and FORM_POST_ADD cases

2015-10-26 Thread Kyrill Tkachov
On 26/10/15 11:28, Bernd Schmidt wrote: On 10/26/2015 12:12 PM, Bernd Schmidt wrote: But isn't that balanced by the fact that it doesn't seem to take into account the gain of removing the inc_insn either? So I think this can't be right. Argh, misread the code. The patch is OK with the

[Ada] Overloaded indexing operations of a derived type

2015-10-26 Thread Arnaud Charlet
This patch fixes the handling of overloaded indexing operations that are inherited by a type derived from one that carries an indexing aspect. Source: --- with Ada.Text_Io; use Ada.Text_Io; with References; procedure Main is A : aliased References.Iterated; begin A (1) := 42; Put_Line ("A

Re: Possible patch for PR fortran/66056

2015-10-26 Thread FX
> I ran "make && make install && make check-fortran" at the top level on > x86_64-pc-linux-gnu. (I always do that before I post a patch and again > before I actually check anything in. I sometimes forget to include files > when I finally commit, but I'm always confident that the ones I

Allow more complex call replacements in gimple-fold.c

2015-10-26 Thread Richard Sandiford
An upcoming patch adds a match.pd rule that folds pow(pow(x,y),z) to pow(x,y*z). This fold can reuse the existing pow gimple statement and simply replace the operands with x and y*z. However, the y*z itself requires a separate gimple statement and the code wasn't prepared to handle that. Tested

Re: [PATCH 5/9] ENABLE_CHECKING refactoring: pool allocators

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 2:18 AM, Mikhail Maltsev wrote: > On 10/21/2015 01:57 PM, Richard Biener wrote: >> Ugh (stupid templates). >> >> @@ -387,10 +389,10 @@ base_pool_allocator ::allocate () >>block = m_virgin_free_list; >>header = (allocation_pool_list*)

Re: [OpenACC 4/11] C FE changes

2015-10-26 Thread Jakub Jelinek
On Sat, Oct 24, 2015 at 02:10:26PM -0700, Cesar Philippidis wrote: > +static tree > +c_parser_oacc_shape_clause (c_parser *parser, omp_clause_code kind, > + const char *str, tree list) > +{ > + const char *id = "num"; > + tree ops[2] = { NULL_TREE, NULL_TREE }, c; > +

Re: [PATCH, PR68062] Fix uniform vector operation lowering

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:35 AM, Ilya Enkovich wrote: > On 26 Oct 10:09, Richard Biener wrote: >> On Sat, Oct 24, 2015 at 12:29 AM, Ilya Enkovich >> wrote: >> > 2015-10-24 0:32 GMT+03:00 Jeff Law : >> >> On 10/23/2015 09:26 AM,

Re: Allow more complex call replacements in gimple-fold.c

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:41 AM, Richard Sandiford wrote: > An upcoming patch adds a match.pd rule that folds pow(pow(x,y),z) > to pow(x,y*z). This fold can reuse the existing pow gimple statement > and simply replace the operands with x and y*z. However, the y*z >

Re: [PATCH 1/2] s/390: Implement "target" attribute.

2015-10-26 Thread Dominik Vogt
On Fri, Sep 25, 2015 at 02:59:41PM +0100, Dominik Vogt wrote: > The following set of two patches implements the function > __attribute__ ((target("..."))) and the corresponding #pragma GCC > target("...") on S/390. It comes with certain limitations: > > * It is not possible to change any

Re: Move expN folds to match.pd

2015-10-26 Thread Marc Glisse
On Mon, 26 Oct 2015, Richard Sandiford wrote: + /* expN(logN(x)) -> x. */ + (simplify + (exps (logs @0)) + @0)) We are not very consistent about it, but wasn't there an idea that we should use non_lvalue in most such places? -- Marc Glisse

[PATCH][auto-inc-dec.c] Account for cost of move operation in FORM_PRE_ADD and FORM_POST_ADD cases

2015-10-26 Thread Kyrill Tkachov
Hi all, The auto_inc_dec pass can handle 4 types of sequences, described in the comment at the start of auto-inc-dec.c. In two of those: FORM_PRE_ADD and FORM_POST_ADD the resulting sequence is a move followed by a POST_INC or PRE_INC memory operation. In the FORM_POST_ADD case the pass

Re: Move fmin and fmax folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 11:02 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_fmin_fmax): Delete. >

Re: Rename logb and significand folds

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 11:05 AM, Richard Sandiford wrote: > fold_builtin_logb and fold_builtin_significand now only handle > constant arguments, so this patch renames them to fold_const..., > to match fold_const_builtin_pow. The idea is to differentiate >

[Committed] Add vars in intra_create_variables_info

2015-10-26 Thread Tom de Vries
Hi, this no-functional-changes patch adds some vars in intra_create_variables_info. Bootstrapped and reg-tested on x86_64. Committed as trivial. Thanks, - Tom Add vars in intra_create_variables_info 2015-10-26 Tom de Vries * tree-ssa-structalias.c

Re: [PATCH] c/67882 - improve -Warray-bounds for invalid offsetof

2015-10-26 Thread Jakub Jelinek
On Mon, Oct 26, 2015 at 12:40:18PM +0100, Bernd Schmidt wrote: > On 10/23/2015 10:40 PM, Martin Sebor wrote: > > > >The original code deliberately avoids diagnosing the case of last > >array members with bounds greater than 1 (see the comment about > >"a poor man's flexible array member" added

Re: Move cexp simplifications to match.pd

2015-10-26 Thread Richard Biener
On Fri, Oct 23, 2015 at 5:03 PM, Richard Sandiford wrote: > This required reinstating support for captures in the result > of a simplification. That part (genmatch.c) is by Richard B. > > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to

Re: [gomp4] Adjust UNQUE ifn

2015-10-26 Thread Thomas Schwinge
Hi Nathan! On Sun, 25 Oct 2015 10:01:55 -0400, Nathan Sidwell wrote: > I've applied this patch to gomp4 branch. It's the reworking of IFN_UNIQUE > suggested by Richard & Jakub. > > 1) IFN_UNIQUE is a ctrl-altering call, and thus ends up at the end of a BB. > 2) tracer only

[patch] Extend former fold_widened_comparison to all integral types

2015-10-26 Thread Eric Botcazou
Hi, this patch extends the simplification formerly done in fold_widened_comparison and now in match.pd to all integral types instead of just integer types, and comes with an Ada testcase for the enumeral type case. The patch introduces a failure in the C testsuite: FAIL:

Re: [patch] Extend former fold_widened_comparison to all integral types

2015-10-26 Thread Andrew Pinski
On Mon, Oct 26, 2015 at 4:39 PM, Eric Botcazou wrote: > Hi, > > this patch extends the simplification formerly done in fold_widened_comparison > and now in match.pd to all integral types instead of just integer types, and > comes with an Ada testcase for the enumeral type

Re: Possible patch for PR fortran/66056

2015-10-26 Thread Louis Krupp
A patch with ChangeLog diffs is attached. I ran "make && make install && make check-fortran" at the top level on x86_64-pc-linux-gnu. (I always do that before I post a patch and again before I actually check anything in. I sometimes forget to include files when I finally commit, but I'm

Re: Possible patch for PR fortran/66056

2015-10-26 Thread FX
> The problem: Statement labels within a type declaration are put in the > statement label tree belonging to the type declaration's namespace's (instead > of the current namespace). When the line is otherwise empty and an error is > issued, gfc_free_st_label tries to delete the label from the

Re: [PATCH] PR fortran/36192 -- Check for valid BT_INTEGER

2015-10-26 Thread FX
> 2015-10-25 Steven G. Kargl > > PR fortran/36192 > * array.c (gfc_ref_dimen_size): Check for BT_INTEGER before calling > mpz_set. > > > 2015-10-25 Steven G. Kargl > > PR fortran/36192 > * gfortran.dg/pr36192.f90: New

Re: [PATCH] tree-scalar-evolution.c: Handle LSHIFT by constant

2015-10-26 Thread Richard Biener
On Fri, Oct 23, 2015 at 5:15 PM, Alan Lawrence wrote: > On 19/10/15 12:49, Richard Biener wrote: > >> Err, you should always do the shift in the type of rhs1. You should also >> avoid the chrec_convert of rhs2 above for shifts. > > Err, yes, indeed. Needed to keep the

Re: [PATCH, PR68062] Fix uniform vector operation lowering

2015-10-26 Thread Richard Biener
On Sat, Oct 24, 2015 at 12:29 AM, Ilya Enkovich wrote: > 2015-10-24 0:32 GMT+03:00 Jeff Law : >> On 10/23/2015 09:26 AM, Ilya Enkovich wrote: >>> >>> Hi, >>> >>> This patch checks optab exists before using it vector vector statement >>> lowering. It fixes

Re: RFC: PATCH to pointer_int_sum vs. pointer-arith-10.c

2015-10-26 Thread Richard Biener
On Sat, Oct 24, 2015 at 5:14 AM, Jason Merrill wrote: > On 10/21/2015 12:16 AM, Richard Biener wrote: >> >> On Tue, Oct 20, 2015 at 9:10 PM, Jason Merrill wrote: >>> >>> I made this change on the delayed folding branch and then noticed that it >>> broke

Re: [OpenACC 5/11] C++ FE changes

2015-10-26 Thread Cesar Philippidis
On 10/26/2015 03:20 AM, Jakub Jelinek wrote: > On Sat, Oct 24, 2015 at 02:11:41PM -0700, Cesar Philippidis wrote: >> --- a/gcc/cp/semantics.c >> +++ b/gcc/cp/semantics.c >> @@ -5911,6 +5911,31 @@ finish_omp_clauses (tree clauses, bool allow_fields, >> bool declare_simd) >>

[MCORE] Hookize GO_IF_LEGITIMATE_ADDRESS

2015-10-26 Thread Anatoliy Sokolov
Hi. This patch removes obsolete GO_IF_LEGITIMATE_ADDRESS macros from the MCORE back end in the GCC and introduce equivalent TARGET_LEGITIMATE_ADDRESS_P target hook. Regression tested on mcore-unknown-elf. Only compile test run. OK for trunk? 2015-08-24 Anatoly Sokolov *

Re: [gomp4] Adjust UNQUE ifn

2015-10-26 Thread Nathan Sidwell
On 10/26/15 07:36, Richard Biener wrote: Looks better now. + { #ifdef HAVE_oacc_fork (etc.) can you use target-insn.def and targetm.have_oacc_fork () instead? I've committed this to gomp4. Will port and update the patches for trunk. nathan 2015-10-26 Nathan Sidwell

Re: [PATCH] rs6000: p8vector-builtin-8.c test requires int128

2015-10-26 Thread David Edelsohn
On Sun, Oct 25, 2015 at 8:59 PM, Segher Boessenkool wrote: > For 32-bit targets p8vector_ok does not imply we have int128. > > Tested with -m32,-m32/-mpowerpc64,-m64; okay for trunk? > > > Segher > > > 2015-10-26 Segher Boessenkool > >

Re: [gomp4.1] Handle new form of #pragma omp declare target

2015-10-26 Thread Jakub Jelinek
On Mon, Oct 26, 2015 at 09:35:52PM +0300, Ilya Verbin wrote: > On Fri, Jul 17, 2015 at 15:05:59 +0200, Jakub Jelinek wrote: > > As the testcases show, #pragma omp declare target has now a new form (well, > > two; with some issues on it pending), where it is used just as a single > > declarative

C++ PATCH for DR 2179 (ambiguous partial specialization after instantiation)

2015-10-26 Thread Jason Merrill
While discussing issue 2179 at the meeting last week, I noticed that we were crashing when a partial specialization made a previous instantiation ambiguous. Fixed thus. Tested x86_64-pc-linux-gnu, applying to trunk. commit cb0817f19d7f4ce9878922412c2c1b2d07eb66d7 Author: Jason Merrill

[Fortran, committed] Statement label on empty line in derived type declaration (PR 66056)

2015-10-26 Thread Louis Krupp
Revision 229390... Louis

Re: [PATCH][wwwdocs] Mention arm target attributes and pragmas in GCC 6 changes

2015-10-26 Thread Gerald Pfeifer
On Mon, 26 Oct 2015, Kyrill Tkachov wrote: Here's a patch to mention the new target attributes for arm, in the same wording as for aarch64. This looks good to me, thanks. Gerald

Re: [PATCH] Add missing INCLUDE_DEFAULTS_MUSL_LOCAL

2015-10-26 Thread Doug Evans
On Fri, Oct 23, 2015 at 11:34 AM, Szabolcs Nagy wrote: > On 23/10/15 18:39, Doug Evans wrote: >> >> On Fri, Oct 23, 2015 at 10:08 AM, Bernd Schmidt >> wrote: >>> >>> >>> On 10/21/2015 09:00 PM, Doug Evans wrote: I happened to notice

Re: [PATCH] rs6000: Fix tests for xvmadd and xvnmsub

2015-10-26 Thread David Edelsohn
On Sun, Oct 25, 2015 at 8:59 PM, Segher Boessenkool wrote: > The patterns involved can create vmadd resp. vnmsub instructions instead. > This patch changes the testcases to allow those. > > Tested with -m32,-m32/-mpowerpc64,-m64; okay for trunk? > > > Segher > > >

  1   2   3   >