Re: [PATCH] Improve constant vec_perm expansion on i?86 (PR target/68655)

2015-12-03 Thread Uros Bizjak
On Thu, Dec 3, 2015 at 9:52 PM, Jakub Jelinek wrote: > Hi! > > As discussed in the PR, for some permutation we can get better code > if we try to expand it as if it was a permutation in a mode with the > same vector size, but wider vector element. The first attempt to do this > always had mixed r

-fstrict-aliasing fixes 6/6: permit inlining of comdats

2015-12-03 Thread Jan Hubicka
Hi, this is the last patch of the series. It makes operand_equal_p to compare alias sets even in !flag_strict_aliasing before inlining so inlining !flag_strict_aliasing to flag_strict_aliasing is possible when callee is merged comdat. I tried to explain it in greater detail in the comment in ipa

Ping [PATCH] c++/42121 - diagnose invalid flexible array members

2015-12-03 Thread Martin Sebor
[CC Jason for the C++ changes and Joseph for the one C change.] Attached is a reworked and expanded patch for the bug plus three others in the same area that I uncovered while developing and testing the former patch: c++/68689 - flexible array members in unions accepted in C++ c++/68478 - flexib

[PATCH AArch64]Use aarch64_sync_memory_operand in atomic_store pattern

2015-12-03 Thread Bin Cheng
Hi, I noticed atmoic_store pattern is the only one in atomic.md that uses memory_operand as predicate. This seems like a typo to me. It also causes problem. The general address expression supported by memory_operand is kept till LRA finds out it doesn't match the "Q" constraint. As a result LRA

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-12-03 Thread Bin.Cheng
On Thu, Dec 3, 2015 at 6:26 PM, Richard Earnshaw wrote: > On 03/12/15 05:26, Bin.Cheng wrote: >> On Tue, Dec 1, 2015 at 6:25 PM, Richard Earnshaw >> wrote: >>> On 01/12/15 03:19, Bin.Cheng wrote: On Tue, Nov 24, 2015 at 6:18 PM, Richard Earnshaw wrote: > On 24/11/15 09:56, Richard

[PATCH] S/390: Add -mbackchain options to fix test failure.

2015-12-03 Thread Dominik Vogt
On S/390, __builtin_return_address and __builtin_frame_address require the -mbackchain option to work for arbitrary stack frames. The attached patch adds the option to two test cases to make them work. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany gcc/testsuite/ChangeLog * gcc.dg/

Re: [PATCH] [ARC] Add support for atomic memory built-in.

2015-12-03 Thread Joern Wolfgang Rennecke
On 16/11/15 10:18, Claudiu Zissulescu wrote: +/* Expand code to perform a 8 or 16-bit compare and swap by doing + 32-bit compare and swap on the word containing the byte or + half-word. The difference between a weak and a strong CAS is that + the weak version may simply fail. The stro

Re: [PATCH] RFC: Use Levenshtein spelling suggestions in Fortran FE

2015-12-03 Thread Steve Kargl
On Thu, Dec 03, 2015 at 02:53:06PM +0100, Mikael Morin wrote: > Le 03/12/2015 10:29, Janne Blomqvist a écrit : > > On Tue, Dec 1, 2015 at 7:51 PM, Bernhard Reutner-Fischer > > wrote: > >> As said, we could as well use a list of candidates with NULL as record > >> marker. > >> Implementation cosme

Re: [C] Issue an error on scalar va_list with reverse storage order

2015-12-03 Thread Joseph Myers
On Thu, 3 Dec 2015, Eric Botcazou wrote: > Hi, > > further testing revealed an issue with va_arg handling and reverse scalar > storage order on some platforms: when va_list is scalar, passing a field of a > structure with reverse SSO as first argument to va_start/va_arg/va_end > doesn't > wor

Re: [PATCH] Handle OBJ_TYPE_REF in FRE

2015-12-03 Thread Jan Hubicka
> >may lead to wrong code. > > Can you try generating a testcase? > Because with equal vptr and voffset I can't see how that can happen unless > some pass extracts information from the pointer types without sanity checking > with the pointers and offsets. I am not sure I can get a wrong code w

[C++ PATCH] fix canonical type node ICE when from satisfy_argument_deduction_constraint function (PR c++/68683)

2015-12-03 Thread Ryan Burn
When determining if a constraint is satisfied, the function satisfy_argument_deduction_constraint temporarily changes the PLACEHOLDER_TYPE_CONSTRAINTS of an tree node. Since PLACEHOLDER_TYPE_CONSTRAINTS are taken into account when determining the equality of two types, this means that the node's ca

[PATCH] Use ECF_MAY_BE_ALLOCA for __builtin_alloca_with_align (PR tree-optimization/68680)

2015-12-03 Thread Jakub Jelinek
Hi! As mentioned in the PR, GCC 4.7+ seems to have regressed for -fstack-protector*, functions containing VLAs and no other arrays are not protected anymore. Before 4.7, VLAs were gimplified as __builtin_alloca call, which sets ECF_MAY_BE_ALLOCA and in turn cfun->calls_alloca. These two are used

Re: [PATCH 02/10] Fix g++.dg/cpp0x/nsdmi-template14.C

2015-12-03 Thread Jason Merrill
On 12/03/2015 04:43 PM, David Malcolm wrote: On Thu, 2015-12-03 at 15:33 -0500, Jason Merrill wrote: On 12/03/2015 09:55 AM, David Malcolm wrote: This patch adds bulletproofing to detect purged tokens, and avoid using them. Alternatively, is it OK to access purged tokens for this kind of thing

Re: [PATCH 07/10] Fix g++.dg/template/ref3.C

2015-12-03 Thread David Malcolm
On Thu, 2015-12-03 at 15:38 -0500, Jason Merrill wrote: > On 12/03/2015 09:55 AM, David Malcolm wrote: > > Testcase g++.dg/template/ref3.C: > > > > 1 // PR c++/28341 > > 2 > > 3 template struct A {}; > > 4 > > 5 template struct B > > 6 { > >

Re: [PATCH][ARC] Refurbish emitting DWARF2 for epilogue.

2015-12-03 Thread Joern Wolfgang Rennecke
On 27/11/15 13:53, Claudiu Zissulescu wrote: @@ -2502,11 +2540,18 @@ arc_expand_epilogue (int sibcall_p) /* Restore any saved registers. */ if (frame_pointer_needed) { - rtx addr = gen_rtx_POST_INC (Pmode, stack_pointer_rtx); + insn = emit_insn (gen_blockage ());

Re: [PATCH 02/10] Fix g++.dg/cpp0x/nsdmi-template14.C

2015-12-03 Thread David Malcolm
On Thu, 2015-12-03 at 15:33 -0500, Jason Merrill wrote: > On 12/03/2015 09:55 AM, David Malcolm wrote: > > This patch adds bulletproofing to detect purged tokens, and avoid using > > them. > > > > Alternatively, is it OK to access purged tokens for this kind of thing? > > If so, would it make more

Re: C PATCH for c/68668 (grokdeclarator and wrong type of PARM_DECL)

2015-12-03 Thread Joseph Myers
On Thu, 3 Dec 2015, Marek Polacek wrote: > > I think you also need to decrement orig_qual_indirect, which counts the > > number of levels of array type derivation from orig_qual_type. > > Thus: > > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2015-12-03 Marek Polacek > >

Re: C PATCH for c/68668 (grokdeclarator and wrong type of PARM_DECL)

2015-12-03 Thread Marek Polacek
On Thu, Dec 03, 2015 at 06:11:42PM +, Joseph Myers wrote: > On Thu, 3 Dec 2015, Marek Polacek wrote: > > > This ought to fix the fallout from PR c/68162 fix. Here the problem is that > > grokdeclarator created a wrong type for PARM_DECL "p". It created this decl > > with type "const int[] *"

Re: [PATCH 2/2] [graphite] fix invalid bounds on array refs

2015-12-03 Thread Sebastian Pop
Richard Biener wrote: > On Wed, Dec 2, 2015 at 10:36 PM, Sebastian Paul Pop wrote: > > Do you recommend that we add a gcc_assert that min is always lower than max? > > No, min can be one less than max if the array has size zero. Maybe a typo: do you mean max can be one less than min? If the arr

Re: [PATCH 2/4][AArch64] Increase the loop peeling limit

2015-12-03 Thread Evandro Menezes
On 11/20/2015 05:53 AM, James Greenhalgh wrote: On Thu, Nov 19, 2015 at 04:04:41PM -0600, Evandro Menezes wrote: On 11/05/2015 02:51 PM, Evandro Menezes wrote: 2015-11-05 Evandro Menezes gcc/ * config/aarch64/aarch64.c (aarch64_override_options_internal): Increase loop peel

Re: [PATCH][AArch64] Replace insn to zero up DF register

2015-12-03 Thread Evandro Menezes
On 11/09/2015 04:59 PM, Evandro Menezes wrote: Hi, Marcus. Have you an update from the architecture folks about this? Thank you, Marcus? -- Evandro Menezes

[PATCH] Fix reassoc range test vs. value ranges (PR tree-optimization/68671)

2015-12-03 Thread Jakub Jelinek
Hi! As mentioned in the PR, maybe_optimize_range_tests considers basic blocks with not just the final GIMPLE_COND (or for last_bb store feeding into PHI), but also assign stmts that don't trap, don't have side-effects and where the SSA_NAMEs they set are used only in their own bb. Now, if we decid

Re: [PATCH 3b/4][AArch64] Add scheduling model for Exynos M1

2015-12-03 Thread Evandro Menezes
On 11/20/2015 11:17 AM, James Greenhalgh wrote: On Tue, Nov 10, 2015 at 11:54:00AM -0600, Evandro Menezes wrote: 2015-11-10 Evandro Menezes gcc/ * config/aarch64/aarch64-cores.def: Use the Exynos M1 sched model. * config/aarch64/aarch64.md: Include "exynos-m1.md".

[PATCH] Improve constant vec_perm expansion on i?86 (PR target/68655)

2015-12-03 Thread Jakub Jelinek
Hi! As discussed in the PR, for some permutation we can get better code if we try to expand it as if it was a permutation in a mode with the same vector size, but wider vector element. The first attempt to do this always had mixed results, lots of improvements, lots of pessimizations, this one at

Re: [PATCH 4/4][AArch64] Add cost model for Exynos M1

2015-12-03 Thread Evandro Menezes
On 11/05/2015 06:09 PM, Evandro Menezes wrote: 2015-10-25 Evandro Menezes gcc/ * config/aarch64/aarch64-cores.def: Use the Exynos M1 cost model. * config/aarch64/aarch64.c (exynosm1_addrcost_table): New variable. (exynosm1_regmove_cost): Likewise. (exynosm1_ve

Re: [PATCH] Handle OBJ_TYPE_REF in FRE

2015-12-03 Thread Richard Biener
On December 3, 2015 6:40:07 PM GMT+01:00, Jan Hubicka wrote: >> >> The following patch handles CSEing OBJ_TYPE_REF which was omitted >> because it is a GENERIC expression even on GIMPLE (for whatever > >Why it is generic? It is part of gimple grammar :) > >> reason...). Rather than changing this

Re: [PATCH 07/10] Fix g++.dg/template/ref3.C

2015-12-03 Thread Jason Merrill
On 12/03/2015 09:55 AM, David Malcolm wrote: Testcase g++.dg/template/ref3.C: 1 // PR c++/28341 2 3 template struct A {}; 4 5 template struct B 6 { 7 A<(T)0> b; // { dg-error "constant|not a valid" } 8 A a; // { dg-error "constant|not a valid"

Re: [PATCH 02/10] Fix g++.dg/cpp0x/nsdmi-template14.C

2015-12-03 Thread Jason Merrill
On 12/03/2015 09:55 AM, David Malcolm wrote: This patch adds bulletproofing to detect purged tokens, and avoid using them. Alternatively, is it OK to access purged tokens for this kind of thing? If so, would it make more sense to instead leave their locations untouched when purging them? I thi

Re: [PATCH][PR tree-optimization/67816] Fix jump threading when DOM removes conditionals in jump threading path

2015-12-03 Thread Jeff Law
On 12/02/2015 08:35 AM, Richard Biener wrote: The most interesting side effect, and one I haven't fully analyzed yet is an unexpected jump thread -- which I've traced back to differences in what the alias oracle is able to find when we walk unaliased vuses. Which makes totally no sense that it'

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Segher Boessenkool
On Thu, Dec 03, 2015 at 12:31:53PM +0100, Bernd Schmidt wrote: > On 12/02/2015 07:21 PM, Segher Boessenkool wrote: > >After shrink-wrapping has found the "tightest fit" for where to place > >the prologue, it tries move it earlier (so that frame saves are run > >earlier) -- but without copying any m

[PATCH] Fix missing range information for "%q+D" format code

2015-12-03 Thread David Malcolm
There are about 220 or so diagnostics in trunk that use "%q+D" in their format string, which, as well as printing a quoted decl, overwrites any location_t supplied to the diagnostic, instead using the location of the associated decl. During development of the location range patch kit I adjusted th

Re: [Fortran, Patch] (RFC, Coarray) Implement TS18508's EVENTS

2015-12-03 Thread Alessandro Fanfarillo
Yes please. Thanks. 2015-12-02 23:00 GMT+01:00 Steve Kargl : > Committed as revision 231208. > > Alessandro, Tobias, is this a candidate for a commit to > the 5-branch when it is re-opened? > > -- > steve > > On Wed, Dec 02, 2015 at 03:16:05PM +0100, Alessandro Fanfarillo wrote: >> *PING* >> >> 2

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Segher Boessenkool
On Thu, Dec 03, 2015 at 12:35:51PM +0100, Bernd Schmidt wrote: > On 12/02/2015 07:21 PM, Segher Boessenkool wrote: > >After shrink-wrapping has found the "tightest fit" for where to place > >the prologue, it tries move it earlier (so that frame saves are run > >earlier) -- but without copying any m

Re: Add fuzzing coverage support

2015-12-03 Thread Dmitry Vyukov
On Thu, Dec 3, 2015 at 7:34 PM, Dmitry Vyukov wrote: > I've attached updated patch (also reuploaded > https://codereview.appspot.com/280140043). > Fixed ChangeLog. > Added invoke.texi. > Fixed style issues. > > The function is defined only in kernel at the moment. Here is my patch: > https://githu

Re: [hsa] Make copy_gimple_seq_and_replace_locals copy seqs in omp clauses

2015-12-03 Thread Jakub Jelinek
On Thu, Dec 03, 2015 at 07:26:20PM +0100, Martin Jambor wrote: > this is a fix to the last "last" ICE of the hsa branch. THe problem > turned out not to be in the gridification itself but, depending your > point of view, in the gimple and tree walking infrastructure or in > function copy_gimple_se

Re: Add fuzzing coverage support

2015-12-03 Thread Dmitry Vyukov
I've attached updated patch (also reuploaded https://codereview.appspot.com/280140043). Fixed ChangeLog. Added invoke.texi. Fixed style issues. The function is defined only in kernel at the moment. Here is my patch: https://github.com/dvyukov/linux/commit/f86eda0c895c47ea02ee37e981aeade7b03014d7 I

[hsa] Make copy_gimple_seq_and_replace_locals copy seqs in omp clauses

2015-12-03 Thread Martin Jambor
Hi, this is a fix to the last "last" ICE of the hsa branch. THe problem turned out not to be in the gridification itself but, depending your point of view, in the gimple and tree walking infrastructure or in function copy_gimple_seq_and_replace_locals from tree-inline.c on which hsa gridification

Re: [PATCH] Add options -finstrument-functions-include-{file,function}-list

2015-12-03 Thread Bert Wesarg
Hi, better write your own instrumentation plug-in and do the filtering on your own. The plug-in interface exists since 4.5 so you have a much greater version base that can support your feature already, than some future version of GCC which may have this patch. While we didn't announced it here on

[hsa] Useful checking assert in scan_omp_1_op

2015-12-03 Thread Martin Jambor
Hi, I have found that adding the following checking assert very useful when debugging omp lowering issues, so I have added it to the hsa branch. I hope that nobody will mind, but it of course is not an essential thing to have if someone does. Thanks, Martin 2015-12-03 Martin Jambor

Re: C PATCH for c/68668 (grokdeclarator and wrong type of PARM_DECL)

2015-12-03 Thread Joseph Myers
On Thu, 3 Dec 2015, Marek Polacek wrote: > This ought to fix the fallout from PR c/68162 fix. Here the problem is that > grokdeclarator created a wrong type for PARM_DECL "p". It created this decl > with type "const int[] *" while it should be "const int *". > > I think the problem is that we w

[PATCH] Add options -finstrument-functions-include-{file,function}-list

2015-12-03 Thread Andi Drebes
By default -finstrument-functions instruments all functions. To limit instrumentation to certain functions or files it is necessary to specify the complement using -finstrument-functions-exclude-file-list or -finstrument-functions-exclude-function-list. The new options -finstrument-functions-inclu

C PATCH for c/68668 (grokdeclarator and wrong type of PARM_DECL)

2015-12-03 Thread Marek Polacek
This ought to fix the fallout from PR c/68162 fix. Here the problem is that grokdeclarator created a wrong type for PARM_DECL "p". It created this decl with type "const int[] *" while it should be "const int *". I think the problem is that we weren't using TREE_TYPE on orig_qual_type and thus c_

[RFA][PATCH] Run CFG cleanups after reassociation as needed

2015-12-03 Thread Jeff Law
This is something I noticed while working on fixing 67816. Essentially I was seeing trivially true or trivially false conditionals left in the IL for DOM to clean up. While DOM can and will clean that crud up, but a trivially true or trivially false conditional ought to be detected and cleane

[gomp4] backport fortran array reduction changes

2015-12-03 Thread Cesar Philippidis
This patch backports the recent array reduction changes in trunk to gomp-4_0-branch. It's mostly straightforward, except I couldn't include changes to reduction-2.f95 because the gimplifier is reordering the loop clauses slightly different in trunk and gomp4. I'm not sure why. Thomas, that's someth

Re: [PATCH] Handle OBJ_TYPE_REF in FRE

2015-12-03 Thread Jan Hubicka
> > The following patch handles CSEing OBJ_TYPE_REF which was omitted > because it is a GENERIC expression even on GIMPLE (for whatever Why it is generic? It is part of gimple grammar :) > reason...). Rather than changing this now the following patch > simply treats it properly as such. Thanks

RE: [PATCH] MIPS/GCC/doc: Reorder `-mcompact-branches='

2015-12-03 Thread Matthew Fortune
Maciej Rozycki writes: > Move the `-mcompact-branches=' option out of the middle of a block of > floating-point options. The option is not related to FP in any way. > Place it immediately below other branch instruction selection options. > > gcc/ > * doc/invoke.texi (Option Summary)

Re: [PATCH][install.texi] Add note against GNAT 4.8 on ARM targets.

2015-12-03 Thread Gerald Pfeifer
On Thu, 3 Dec 2015, Alan Lawrence wrote: >> doc/install.texi: Add note against GNAT 4.8 on ARM targets. This looks fine (provided it builds and looks okay). Just... >> +Building the Ada frontend commonly fails (an infinite loop executing >> @code{xsinfo}) if the host compiler is GNAT 4.8.

Re: [Patch,tree-optimization]: Add new path Splitting pass on tree ssa representation

2015-12-03 Thread Jeff Law
On 12/03/2015 07:38 AM, Richard Biener wrote: This pass is now enabled by default with -Os but has no limits on the amount of stmts it copies. It also will make all loops with this shape have at least two exits (if the resulting loop will be disambiguated the inner loop will have two exits). Ha

Re: [PATCH][install.texi] Add note against GNAT 4.8 on ARM targets.

2015-12-03 Thread Alan Lawrence
On 16/11/15 15:08, Alan Lawrence wrote: This follows from the discussion here: https://gcc.gnu.org/ml/gcc/2015-10/msg00082.html . OK for trunk? --Alan gcc/ChangeLog: doc/install.texi: Add note against GNAT 4.8 on ARM targets. --- gcc/doc/install.texi | 2 ++ 1 file changed, 2 inse

Re: [RFA] [PR tree-optimization/68599] Avoid over-zealous optimization with -funsafe-loop-optimizations

2015-12-03 Thread Jeff Law
On 12/03/2015 02:36 AM, Richard Biener wrote: On Wed, Dec 2, 2015 at 5:27 PM, Jeff Law wrote: I strongly recommend reading the analysis in pr45122 since pr68599 uses the same testcase and just triggers the same bug in the RTL optimizers instead of the tree optimziers. As noted in 45122, with

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Richard Sandiford
Segher Boessenkool writes: > On Wed, Dec 02, 2015 at 08:19:05PM +0100, Jakub Jelinek wrote: >> On Wed, Dec 02, 2015 at 06:21:47PM +, Segher Boessenkool wrote: >> > --- a/gcc/shrink-wrap.c >> > +++ b/gcc/shrink-wrap.c >> > @@ -752,7 +752,11 @@ try_shrink_wrapping (edge *entry_edge, bitmap_head

Re: [RTL] canonical form of AND-immediate within COMPARE?

2015-12-03 Thread Eric Botcazou
> Some ISAs have instructions to perform a bitwise AND operation with an > immediate and compare the result with zero. Many of them I'd say. > Is there a good way to fix this? It would seem rather weird to have extra MD > patterns to match the zero_extract forms explicitly. Maybe teaching the > a

Re: Documentation tweaks for internal-fn-related optabs

2015-12-03 Thread Richard Sandiford
Bernd Schmidt writes: > On 12/03/2015 02:06 PM, Richard Sandiford wrote: >> As Bernd requested, this patch adds "This pattern cannot FAIL" to the >> documentation of optabs that came to be mapped to interal functions. >> For consistency I did the same for optabs that were already being >> used for

Re: [PATCH] Empty redirect_edge_var_map after each pass and function

2015-12-03 Thread Richard Biener
On Thu, 3 Dec 2015, Alan Lawrence wrote: > On 03/12/15 12:58, Richard Biener wrote: > > On Thu, 3 Dec 2015, Alan Lawrence wrote: > > > > > On 02/12/15 14:13, Jeff Law wrote: > > > > On 12/02/2015 01:33 AM, Richard Biener wrote: > > > > > > Right. So the question I have is how/why did DOM leave a

[PATCH 01/10] C++ FE: expression ranges v4

2015-12-03 Thread David Malcolm
Changes in this version: - removal of gcc_assert (m_loc != UNKNOWN_LOCATION) from cp_expr ctor - uses protected_set_expr_location or cp_expr::set_location/set_range, rather than attempting to add location_t arguments - adds location support and test coverage based on issues seen in the analogou

Re: [PATCH] Empty redirect_edge_var_map after each pass and function

2015-12-03 Thread Alan Lawrence
On 03/12/15 12:58, Richard Biener wrote: On Thu, 3 Dec 2015, Alan Lawrence wrote: On 02/12/15 14:13, Jeff Law wrote: On 12/02/2015 01:33 AM, Richard Biener wrote: Right. So the question I have is how/why did DOM leave anything in the map. And if DOM is fixed to not leave stuff lying around,

[C] Issue an error on scalar va_list with reverse storage order

2015-12-03 Thread Eric Botcazou
Hi, further testing revealed an issue with va_arg handling and reverse scalar storage order on some platforms: when va_list is scalar, passing a field of a structure with reverse SSO as first argument to va_start/va_arg/va_end doesn't work because the machinery takes its address and this is not

[PATCH 06/10] Fix g++.dg/template/pseudodtor3.C

2015-12-03 Thread David Malcolm
gcc/testsuite/ChangeLog: * g++.dg/template/pseudodtor3.C: Update column numbers in dg-error directives. --- gcc/testsuite/g++.dg/template/pseudodtor3.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/g++.dg/template/pseudodtor3.C b/gcc/testsui

[RTL] canonical form of AND-immediate within COMPARE?

2015-12-03 Thread Kyrill Tkachov
Hi all, Some ISAs have instructions to perform a bitwise AND operation with an immediate and compare the result with zero. For example, the aarch64 TST instruction. This is represented naturally in the MD file as: (define_insn "*and3nr_compare0" [(set (reg:CC_NZ CC_REGNUM) (compare:CC_NZ

Re: [Patch,tree-optimization]: Add new path Splitting pass on tree ssa representation

2015-12-03 Thread Richard Biener
On Thu, Dec 3, 2015 at 3:38 PM, Richard Biener wrote: > On Sat, Nov 14, 2015 at 12:35 AM, Jeff Law wrote: >> On 11/13/2015 01:23 PM, Jeff Law wrote: >>> >>> On 11/13/2015 11:09 AM, Richard Biener wrote: >>> > > BTW Do we have an API for indicating that new blocks have been added to >

[PATCH 05/10] Fix location of dg-error within g++.dg/template/pr64100.C

2015-12-03 Thread David Malcolm
Here's what it now emits (if caret-printing were enabled): g++.dg/template/pr64100.C: In instantiation of ‘class foo’: g++.dg/template/pr64100.C:8:16: required from here g++.dg/template/pr64100.C:5:41: error: invalid use of incomplete type ‘class foo’ static_assert(noexcept(((foo *)1)->~fo

[PATCH 00/10] C++ expression ranges v4

2015-12-03 Thread David Malcolm
On Wed, 2015-11-25 at 16:26 -0500, Jason Merrill wrote: > > It's not clear to me whether I should be passing in UNKNOWN_LOCATION > > or input_location to the various functions. > > > > cp_build_unary_op used input_location in various places internally, > > so I've passed that in wherever there isn'

[PATCH 09/10] Fix g++.dg/warn/pr35635.C

2015-12-03 Thread David Malcolm
This testcase was broken by the patch kit; upon investigation the best fix is to try to use the location of the relevant expression when warning about conversions, rather than input_location, falling back to the latter via EXPR_LOC_OR_LOC. One dg-warning needed moving, since the caret is on the "?

[PATCH 02/10] Fix g++.dg/cpp0x/nsdmi-template14.C

2015-12-03 Thread David Malcolm
When building new-expressions, we use cp_lexer_previous_token and access its location to get the final position in the source range. Within g++.dg/cpp0x/nsdmi-template14.C, the previous token within a new expr can have been purged, leading to UNKNOWN_LOCATION. g++.dg/cpp0x/nsdmi-template14.C:11

[PATCH 07/10] Fix g++.dg/template/ref3.C

2015-12-03 Thread David Malcolm
Testcase g++.dg/template/ref3.C: 1 // PR c++/28341 2 3 template struct A {}; 4 5 template struct B 6 { 7A<(T)0> b; // { dg-error "constant|not a valid" } 8A a; // { dg-error "constant|not a valid" } 9 }; 10 11 B b; The output of t

[PATCH 03/10] Fix g++.dg/gomp/loop-1.C

2015-12-03 Thread David Malcolm
The patch kit affects the locations of the errors reported by g++.dg/gomp/loop-1.C. I reviewed the new locations, and they seemed sane. This patch updates the locations of omp_for_cond to use the location of the cond if available, falling back to the existing behavior of using input_location othe

Re: [Patch,tree-optimization]: Add new path Splitting pass on tree ssa representation

2015-12-03 Thread Richard Biener
On Sat, Nov 14, 2015 at 12:35 AM, Jeff Law wrote: > On 11/13/2015 01:23 PM, Jeff Law wrote: >> >> On 11/13/2015 11:09 AM, Richard Biener wrote: >> BTW Do we have an API for indicating that new blocks have been added to a loop? If so, then we can likely drop the LOOPS_NEED_FIXU

[PATCH 08/10] Fix g++.dg/ubsan/pr63956.C

2015-12-03 Thread David Malcolm
With the location patch, various errors in g++.dg/ubsan/pr63956.C change: 8 constexpr int 9 fn1 (int a, int b) 10 { 11if (b != 2) 12 a <<= b; 13return a; 14 } 15 16 constexpr int i1 = fn1 (5, 3); 17 constexpr int i2 = fn1 (5, -2); // { d

[PATCH 10/10] Fix g++.dg/warn/Wconversion-real-integer2.C

2015-12-03 Thread David Malcolm
This testcase's output is changed by the patchkit from printing at the "=": BEFORE: g++.dg/warn/Wconversion-real-integer2.C: In function 'void h()': g++.dg/warn/Wconversion-real-integer2.C:32:12: warning: conversion to 'float' alters 'int' constant value [-Wfloat-conversion] vfloat = INT_MAX

[PATCH 04/10] Fix g++.dg/template/crash55.C

2015-12-03 Thread David Malcolm
The patch kit changes the output of this case: 1 //PR c++/27668 2 3 template // { dg-error "nested-name-specifier|two or more|valid type" } 4 struct A {}; 5 6 template void foo(A); // { dg-error "cast|argument" "" { target c++98_only } } but only for c++98, from: g++.dg/templ

Re: [PR67383][ARM][4.9]Backport of "Allow any register for DImode values in Thumb2"

2015-12-03 Thread Christophe Lyon
On 27 November 2015 at 12:26, Ramana Radhakrishnan wrote: > > > On 27/11/15 09:40, Renlin Li wrote: >> Hi Ramana, >> >> On 16/10/15 14:54, Renlin Li wrote: >>> >>> The command line implies we remove r7 (frame pointer in Thumb2 - historical accident, fno-omit-frame-pointer), r9 (ffixed-r

Re: [PATCH] S/390: Fix warning in "*movstr" pattern.

2015-12-03 Thread Dominik Vogt
Version 5 with two fixes to the test case. :-/ (ChangeLog is the same.) Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany >From 5965f62501b271285bacb90b11ef3f748338d1cf Mon Sep 17 00:00:00 2001 From: Dominik Vogt Date: Tue, 3 Nov 2015 18:03:02 +0100 Subject: [PATCH] S/390: Fix warning in "*

Re: [PATCH,RFC] Introduce RUN_UNDER_VALGRIND in test-suite

2015-12-03 Thread Bernd Schmidt
On 11/23/2015 10:34 AM, Martin Liška wrote: On 11/21/2015 05:26 AM, Hans-Peter Nilsson wrote: IIRC you can replace the actual dg-runtest proc with your own (implementing a wrapper). Grep aroung, I think we do that already. That's certainly preferable instead of touching all callers. You are

[PTX] reorganize data space handling

2015-12-03 Thread Nathan Sidwell
The PTX backend superficially looks like it is using the address space extension mechanism to handle the various PTX data areas. However, it is not really doing that -- the ADDR_SPACE #define values are not registered with the address space handling. The addr_space_t enumeration is used to hol

Re: [1/2] OpenACC routine support

2015-12-03 Thread Cesar Philippidis
On 12/03/2015 12:36 AM, Thomas Schwinge wrote: >> Here's the updated patch. > > ENOPATCH. Here it is. >> The test cases were written in a way such that >> none of them needed to be updated with these changes. > > ... which potentially means they'd match for all kinds of "random" > diagnostics.

Re: [gomp-nvptx 2/9] nvptx backend: new "uniform SIMT" codegen variant

2015-12-03 Thread Alexander Monakov
On Wed, 2 Dec 2015, Nathan Sidwell wrote: > On 12/02/15 12:09, Alexander Monakov wrote: > > > I meant the PTX linked (post PTX-JIT link) image, so regardless of support, > > it's not an issue. E.g. check early in gomp_nvptx_main if .weak > > __nvptx_has_simd != 0. It would only break if there wa

Re: [Patch,microblaze]: Instruction prefetch optimization for microblaze.

2015-12-03 Thread Michael Eager
On 12/01/2015 12:49 AM, Ajit Kumar Agarwal wrote: The changes are made in this patch for the instruction prefetch optimizations for Microblaze. Reg tested for Microblaze target. The changes are made for instruction prefetch optimizations for Microblaze. The "wic" microblaze instruction is the

Re: [PATCH] RFC: Use Levenshtein spelling suggestions in Fortran FE

2015-12-03 Thread Mikael Morin
Le 03/12/2015 10:29, Janne Blomqvist a écrit : On Tue, Dec 1, 2015 at 7:51 PM, Bernhard Reutner-Fischer wrote: As said, we could as well use a list of candidates with NULL as record marker. Implementation cosmetics. Steve seems to not be thrilled by the overall idea in the first place, so unles

Re: Documentation tweaks for internal-fn-related optabs

2015-12-03 Thread Bernd Schmidt
On 12/03/2015 02:06 PM, Richard Sandiford wrote: As Bernd requested, this patch adds "This pattern cannot FAIL" to the documentation of optabs that came to be mapped to interal functions. For consistency I did the same for optabs that were already being used for internal functions. Many of the o

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/68624: Clean up logic that checks for clobbering conflicts across basic blocks

2015-12-03 Thread Bernd Schmidt
On 12/03/2015 10:33 AM, Kyrill Tkachov wrote: PR rtl-optimization/68624 * ifcvt.c (noce_try_cmove_arith): Check clobbers of temp regs in both blocks if they exist and simplify the logic choosing the order to emit them in. 2015-12-03 Kyrylo Tkachov PR rtl-optimization

Re: [PATCH] Empty redirect_edge_var_map after each pass and function

2015-12-03 Thread Richard Biener
On Thu, 3 Dec 2015, Richard Biener wrote: > On Thu, 3 Dec 2015, Alan Lawrence wrote: > > > On 02/12/15 14:13, Jeff Law wrote: > > > On 12/02/2015 01:33 AM, Richard Biener wrote: > > > > > Right. So the question I have is how/why did DOM leave anything in > > > > > the > > > > > map. > > > > > A

Documentation tweaks for internal-fn-related optabs

2015-12-03 Thread Richard Sandiford
As Bernd requested, this patch adds "This pattern cannot FAIL" to the documentation of optabs that came to be mapped to interal functions. For consistency I did the same for optabs that were already being used for internal functions. Many of the optabs weren't documented in the first place, so I a

Re: [PATCH] Empty redirect_edge_var_map after each pass and function

2015-12-03 Thread Richard Biener
On Thu, 3 Dec 2015, Alan Lawrence wrote: > On 02/12/15 14:13, Jeff Law wrote: > > On 12/02/2015 01:33 AM, Richard Biener wrote: > > > > Right. So the question I have is how/why did DOM leave anything in the > > > > map. > > > > And if DOM is fixed to not leave stuff lying around, can we then asse

Re: [PATCH] Empty redirect_edge_var_map after each pass and function

2015-12-03 Thread Alan Lawrence
On 02/12/15 14:13, Jeff Law wrote: On 12/02/2015 01:33 AM, Richard Biener wrote: Right. So the question I have is how/why did DOM leave anything in the map. And if DOM is fixed to not leave stuff lying around, can we then assert that nothing is ever left in those maps between passes? There's c

Re: [ARM] Fix PR middle-end/65958

2015-12-03 Thread Eric Botcazou
> I can understand this restriction, but... > > > + /* See the same assertion on PROBE_INTERVAL above. */ > > + gcc_assert ((first % 4096) == 0); > > ... why isn't this a test that FIRST is aligned to PROBE_INTERVAL? Because that isn't guaranteed, FIRST is related to the size of the protectio

Re: [PATCH, 4/16] Implement -foffload-alias

2015-12-03 Thread Tom de Vries
On 11/11/15 12:00, Jakub Jelinek wrote: On Wed, Nov 11, 2015 at 11:51:02AM +0100, Richard Biener wrote: The option -foffload-alias=pointer instructs the compiler to assume that objects references in an offload region do not alias. The option -foffload-alias=all instructs the compiler to make no

Re: [PATCH, PR46032] Handle BUILT_IN_GOMP_PARALLEL in ipa-pta

2015-12-03 Thread Tom de Vries
On 30/11/15 14:32, Jakub Jelinek wrote: On Mon, Nov 30, 2015 at 02:24:18PM +0100, Richard Biener wrote: OK for stage3 trunk if bootstrap and reg-test succeeds? -|| node->address_taken); +|| (node->address_taken +&& !no

Re: Add fuzzing coverage support

2015-12-03 Thread Bernd Schmidt
On 12/02/2015 06:38 PM, Dmitry Vyukov wrote: One thing to consider would be whether you really need this split between O0/optimize versions, or whether you can find a place in the queue where to insert it unconditionally. Have you considered this at all or did you just follow asan/tsan? I inser

Re: Add an rsqrt_optab and IFN_RSQRT internal function

2015-12-03 Thread Richard Biener
On Thu, Dec 3, 2015 at 10:39 AM, Jakub Jelinek wrote: > On Thu, Dec 03, 2015 at 09:21:03AM +, Richard Sandiford wrote: >> * internal-fn.def (RSQRT): New function. >> * optabs.def (rsqrt_optab): New optab. >> * doc/tm.texi (rsqrtM2): Document > > Missing full stop. > > Otherwi

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Bernd Schmidt
On 12/02/2015 07:21 PM, Segher Boessenkool wrote: After shrink-wrapping has found the "tightest fit" for where to place the prologue, it tries move it earlier (so that frame saves are run earlier) -- but without copying any more basic blocks. Another question would be - is there really a good r

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Bernd Schmidt
On 12/02/2015 07:21 PM, Segher Boessenkool wrote: After shrink-wrapping has found the "tightest fit" for where to place the prologue, it tries move it earlier (so that frame saves are run earlier) -- but without copying any more basic blocks. Unfortunately a candidate block we select can be insi

Re: [Patch, fortran] PR68534 - No error on mismatch in number of arguments between submodule and module interface

2015-12-03 Thread Paul Richard Thomas
Dear Steve, I'll take a look at this this afternoon. Thanks for bringing it to my attention. Cheers Paul On 3 December 2015 at 07:43, Steve Kargl wrote: > On Wed, Dec 02, 2015 at 10:26:30PM -0800, Steve Kargl wrote: >> On Wed, Dec 02, 2015 at 10:02:33PM -0800, Steve Kargl wrote: >> > Paul, >>

Re: [PATCH] Handle BUILT_IN_GOACC_PARALLEL in ipa-pta

2015-12-03 Thread Jakub Jelinek
On Thu, Dec 03, 2015 at 12:09:04PM +0100, Tom de Vries wrote: > The flag is set here in expand_omp_target: > ... > 12682 /* Prevent IPA from removing child_fn as unreachable, > since there are no > 12683refs from the parent function to child_fn in offload >

Re: [PATCH] Handle BUILT_IN_GOACC_PARALLEL in ipa-pta

2015-12-03 Thread Richard Biener
On Thu, 3 Dec 2015, Tom de Vries wrote: > On 03/12/15 09:59, Richard Biener wrote: > > On Thu, 3 Dec 2015, Tom de Vries wrote: > > > > > On 03/12/15 01:10, Tom de Vries wrote: > > > > > > > > I've managed to reproduce it. The difference between pass and fail is > > > > whether the compiler is co

Re: [PATCH] Handle BUILT_IN_GOACC_PARALLEL in ipa-pta

2015-12-03 Thread Tom de Vries
On 03/12/15 09:59, Richard Biener wrote: On Thu, 3 Dec 2015, Tom de Vries wrote: On 03/12/15 01:10, Tom de Vries wrote: I've managed to reproduce it. The difference between pass and fail is whether the compiler is configured with or without accelerator. I'll look into it. In the configurat

Re: [ARM] Fix PR middle-end/65958

2015-12-03 Thread Richard Earnshaw
Sorry for the delay, very busy on other things these days... On 16/11/15 20:00, Eric Botcazou wrote: >> More comments inline. > > Revised version attached, which addresses all your comments and in particular > removes the > > +#if PROBE_INTERVAL > 4096 > +#error Cannot use indexed addressing mode

Re: [UPC 02/22] tree-related changes

2015-12-03 Thread Richard Biener
On Wed, 2 Dec 2015, Gary Funck wrote: > On 12/01/15 12:26:32, Richard Biener wrote: > > On Mon, 30 Nov 2015, Gary Funck wrote: > > > -struct GTY(()) tree_type_common { > > > +struct GTY((user)) tree_type_common { > > >struct tree_common common; > > >tree size; > > >tree size_unit; > >

[PATCH, CHKP] Fix bounds returned for structures

2015-12-03 Thread Ilya Enkovich
Hi, Currently multiple return-struct-* tests from MPX testsuite fail. This patch fixes it. Bootstrapped and tested on x86_64-unknown-linux-gnu. Applied to trunk. I'm going to port it to GCC5 after 5.3 release. Thanks, Ilya -- gcc/ 2015-12-03 Ilya Enkovich * cfgexpand.c (expand_

[PATCH] Handle OBJ_TYPE_REF in FRE

2015-12-03 Thread Richard Biener
The following patch handles CSEing OBJ_TYPE_REF which was omitted because it is a GENERIC expression even on GIMPLE (for whatever reason...). Rather than changing this now the following patch simply treats it properly as such. Bootstrap & regtest running on x86_64-unknown-linux-gnu. Note that t

Re: [gomp-nvptx 4/9] nvptx backend: add -mgomp option and multilib

2015-12-03 Thread Alexander Monakov
On Wed, 2 Dec 2015, Jakub Jelinek wrote: > Can you post sample code with assembly for -msoft-stack and -muniform-simt > showing how are short interesting cases expanded? Here's short examples; please let me know if I'm misunderstanding and you wanted something else. First, -muniform-simt effect

  1   2   >