Re: Reviving SH FDPIC target

2015-09-10 Thread Rich Felker
On Thu, Sep 10, 2015 at 11:49:19PM -0400, Rich Felker wrote: > On Fri, Sep 04, 2015 at 04:16:40PM -0400, Rich Felker wrote: > > On Thu, Sep 03, 2015 at 11:53:45AM -0400, Rich Felker wrote: > > > On Thu, Sep 03, 2015 at 02:58:39PM +, Joseph Myers wrote: > > > > On Wed, 2 Sep 2015, Rich Felker wr

Re: Reviving SH FDPIC target

2015-09-10 Thread Rich Felker
On Fri, Sep 04, 2015 at 04:16:40PM -0400, Rich Felker wrote: > On Thu, Sep 03, 2015 at 11:53:45AM -0400, Rich Felker wrote: > > On Thu, Sep 03, 2015 at 02:58:39PM +, Joseph Myers wrote: > > > On Wed, 2 Sep 2015, Rich Felker wrote: > > > > > > > So if __fpscr_values was the only reason for patc

libgo patch committed: Return 0, not NULL, for type int

2015-09-10 Thread Ian Lance Taylor
This patch by Andrew Wilkins fixes libgo to return 0 rather than NULL from main, which does, after all, return int. Bootstrapped on x86_64-unknown-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/go/g

Re: [PATCH: RL78] libgcc fixes for divmodsi, divmodhi and divmodqi

2015-09-10 Thread DJ Delorie
> 2015-08-21 Kaushik Phatak > > * config/rl78/divmodqi.S: Return 0x00 by default for div by 0. > * config/rl78/divmodsi.S: Update return register to r8. > * config/rl78/divmodhi.S: Update return register to r8,r9. > Branch to main_loop_done_himode to pop registers before return. This is OK.

Re: [PATCH 15/22] Add plugin to recursively dump the source-ranges in a tree

2015-09-10 Thread Martin Sebor
On 09/10/2015 02:28 PM, David Malcolm wrote: This patch adds a test plugin that recurses down an expression tree, printing diagnostics showing the ranges of each node in the tree. Screenshot: https://dmalcolm.fedorapeople.org/gcc/2015-09-09/show-trees.html This needs a linker hack, since it's

Re: [PATCH 2/2] shrink-wrap: Rewrite try_shrink_wrapping

2015-09-10 Thread Segher Boessenkool
On Thu, Sep 10, 2015 at 08:14:29AM -0700, Segher Boessenkool wrote: > This patch rewrites the shrink-wrapping algorithm, allowing non-linear > pieces of CFG to be duplicated for use without prologue instead of just > linear pieces. > Bootstrapped and regression tested on powerpc64-linux. Is this

[gomp4] ptx reformatting

2015-09-10 Thread Nathan Sidwell
I've committed this to gomp4 to reduce divergence from trunk. nathan 2015-09-10 Nathan Sidwell * config/nvptx/nvptx.c: Move df.h include earlier. (nvptx_emit_forking, nvptx_emit_joining): Move earlier. (nvptx_expand_call): Restore to earlier position in file. (

[graphite] Refactor graphite-optimize-isl.c

2015-09-10 Thread Aditya Kumar
Refactor graphite-optimize-isl.c. Renamed function name, variable names etc., and indented the source according to gcc style guidelines. Modified comments accordingly. No functional change intended. Passes regtest and bootstap on x86_64. gcc/ChangeLog: 2015-09-10 Aditya Kumar * grap

[PATCH] PR67401: Fix wrong code generated by expand_atomic_compare_and_swap

2015-09-10 Thread John David Anglin
As noted in the PR, expand_atomic_compare_and_swap can generate wrong code when libcalls are emitted for the sync_compare_and_swap and the result comparison test. This is fixed by emitting a move insn to copy the result rtx of the sync_compare_and_swap libcall to target_oval instead of directly

[nvptx] reformatting

2015-09-10 Thread Nathan Sidwell
I've committed this to reduce some divergence between trunk and gomp4. Sadly, 'diff' still goes somewhat bonkers part way through generating a non-minimal diff. hopefully that'll decrease with merging more stuff from gomp4 shortly. nathan 2015-09-10 Nathan Sidwell * config/nvptx/nvptx.c

Re: [PATCH] Update ENABLE_CHECKING to make it usable in "if" conditions

2015-09-10 Thread Jeff Law
On 08/30/2015 11:49 PM, Mikhail Maltsev wrote: Hi, all! This patch removes some conditional compilation from GCC. In this patch I define a macro CHECKING_P, which is equal to 1 when ENABLE_CHECKING is defined and 0 otherwise. The reason for using a new name is the following: currently in GCC the

Re: [PATCH] vectorizing conditional expressions (PR tree-optimization/65947)

2015-09-10 Thread Bill Schmidt
Hi Alan, The cost modeling of the epilogue code seems pretty target-specific ("An EQ stmt and an AND stmt, reduction of the max index and a reduction of the found values, a broadcast of the max value," resulting in two vector_stmts, one vec_to_scalar, and two scalar_to_vecs). On powerpc, this wil

Re: [libgo] Use stat_atim.go on Solaris 12+

2015-09-10 Thread Ian Lance Taylor
On Wed, Aug 26, 2015 at 4:14 AM, Rainer Orth wrote: > Solaris 12 changes the stat_[amc]tim members of struct stat from > timestruc_t to timespec_t for XPG7 compatiblity, thus breaking the libgo > build. The following patch checks for this change and uses the common > stat_atim.go if appropriate.

Re: [Patch] Teach RTL ifcvt to handle multiple simple set instructions

2015-09-10 Thread Jeff Law
On 09/10/2015 12:23 PM, Bernd Schmidt wrote: > No testcase provided, as currently I don't know of targets with a high > enough branch cost to actually trigger the optimisation. Hmm, so the code would not actually be used right now? In that case I'll leave it to others to decide whether we wan

Re: [PATCH 21/22] Use Levenshtein distance for various misspellings in C frontend

2015-09-10 Thread Andi Kleen
David Malcolm writes: > + { > + error_at_rich_loc > + (&richloc, > + "%qT has no member named %qE; did you mean %qE?", > + type, component, field); > + /* FIXME: error recovery: should we try to keep going, > + with "fi

Re: [PATCH] PR bootstrap/67363: Fix setenv/unsetenv declaration issue in gcc.c

2015-09-10 Thread Jeff Law
On 09/10/2015 02:11 PM, John David Anglin wrote: The attached patch fixes bootstrap on hppa-hpux and possibly other older systems without setenv and unsetenv. The setenv and unsetenvy functions are available in libiberty. All that is needed is to add declaration configure checks and the missing

[PATCH 22/22] Add fixit hints to spellchecker suggestions

2015-09-10 Thread David Malcolm
Screenshot: https://dmalcolm.fedorapeople.org/gcc/2015-09-10/spellcheck-with-fixits.html gcc/c/ChangeLog: * c-parser.c (c_parser_declaration_or_fndef): Add fix-it hint to "did you mean" suggestion. * c-typeck.c (build_component_ref): Likewise. gcc/testsuite/ChangeLog:

[PATCH 21/22] Use Levenshtein distance for various misspellings in C frontend

2015-09-10 Thread David Malcolm
Screenshot: https://dmalcolm.fedorapeople.org/gcc/2015-09-10/spellcheck.html There are a couple of FIXMEs here: * where to call levenshtein_distance_unit_tests * should we attempt error-recovery in c-typeck.c:build_component_ref gcc/ChangeLog: * Makefile.in (OBJS): Add spellcheck.o.

[PATCH 16/22] C/C++ frontend: use tree ranges in various diagnostics

2015-09-10 Thread David Malcolm
Screenshot: https://dmalcolm.fedorapeople.org/gcc/2015-09-09/tree-ranges.html This mostly affects the C frontend, but it touches c-common.h so the C++ frontend needs a slight adjustment. gcc/c-family/ChangeLog: * c-common.c: Include gcc-rich-location.h. (binary_op_error): Add par

[PATCH 17/22] libcpp: add location tracking within string literals

2015-09-10 Thread David Malcolm
This has not been optimized yet. gcc/c-family/ChangeLog: * c-common.c (fname_as_string): Initialize loc field of "cstr", and call init_raw on strname.loc. * c-lex.c (cb_ident): Initialize loc field of "cstr". libcpp/ChangeLog: * charset.c (struct _cpp_strbuf): Add

[PATCH 18/22] Track locations within string literals in tree_string

2015-09-10 Thread David Malcolm
This patch uses the string-literal location generated in libcpp in the previous patch, and stores it in tree_string (adding a new field there). This hasn't been optimized. Perhaps the case of a single unbroken run of 1-column per-char is the most common case, so we could only bother to store the

[PATCH 19/22] gcc-rich-location.[ch]: add debug methods for cpp_string_location

2015-09-10 Thread David Malcolm
gcc/ChangeLog: * gcc-rich-location.c (cpp_string_fragment_location::debug): New. (cpp_string_location::debug): New. --- gcc/gcc-rich-location.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/gcc/gcc-rich-location.c b/gcc/gcc-rich-location.c index 00

[PATCH 15/22] Add plugin to recursively dump the source-ranges in a tree

2015-09-10 Thread David Malcolm
This patch adds a test plugin that recurses down an expression tree, printing diagnostics showing the ranges of each node in the tree. Screenshot: https://dmalcolm.fedorapeople.org/gcc/2015-09-09/show-trees.html This needs a linker hack, since it's the only user of gcc_rich_location::add_expr

[PATCH 14/22] C: capture tree ranges for various expressions

2015-09-10 Thread David Malcolm
This patch updates the C frontend to capture source_range information for various kinds of tree expression. It adds a unit test via a plugin, to verify the source ranges are correct for many kinds of expression. Screenshot: https://dmalcolm.fedorapeople.org/gcc/2015-09-09/tree-range-unit-test.ht

[PATCH 12/22] Add source-ranges for trees

2015-09-10 Thread David Malcolm
This patch adds a way to associate source range information with tree expressions and decls, for later use by diagnostics. It's a poor implementation which is unacceptable on multiple grounds: for starters, it adds a source_range (8 bytes) to struct tree_exp and to struct tree_decl_minimal. (It a

[PATCH 04/22] Reimplement diagnostic_show_locus, introducing rich_location classes

2015-09-10 Thread David Malcolm
This patch rewrites diagnostic_show_locus so that it can display underlined source ranges in addition to the main caret. It does this by introducing a new "rich_location" class, containing a location and (potentially) some source ranges. These are to be allocated on the stack when generating diag

[PATCH 05/22] Add overloads of inform, warning_at, etc that take a source_range

2015-09-10 Thread David Malcolm
Various followup patches convert variables from "location_t" to "source_range". For the places where we issue diagnostics using these variables, it's useful to have overloaded variants of "warning_at" etc that take a source_range, allowing these diagnostics to display underlines without needing to

[PATCH 20/22] Use rich locations in c-family/c-format.c

2015-09-10 Thread David Malcolm
This is a proof-of-concept of (a) using the string-literal location info to show locations of errors in format strings, and (b) underlining the corresponding argument where applicable (no more having to guess what the compiler means by "argument 2") In particular, this can handle format strings

[PATCH 06/22] PR/62314: add ability to add fixit-hints

2015-09-10 Thread David Malcolm
This patch adds the ability to add "fix-it hints" to a rich_location, which will be displayed when the corresponding diagnostic is printed. It does not actually add any fix-it hints (that comes in a later patch), but it adds test coverage of the machinery and printing, by using the existing diagno

[PATCH 09/22] C frontend: store and use token ranges in c_declspecs

2015-09-10 Thread David Malcolm
This patch replaces the source_location in c_declspecs with a source_range, and uses it for various diagnostics to gain underlines. Screenshot: https://dmalcolm.fedorapeople.org/gcc/2015-09-09/bad-c-decls.html gcc/c/ChangeLog: * c-decl.c (declspecs_add_addrspace): Convert param 1 from

[PATCH 10/22] C++ FE: Use token ranges for various diagnostics

2015-09-10 Thread David Malcolm
Screenshot: https://dmalcolm.fedorapeople.org/gcc/2015-09-09/c++-token-ranges.html gcc/cp/ChangeLog: * parser.c (cp_parser_string_literal): Show ranges of both string literals in the "unsupported concatenation" error. (cp_parser_primary_expression): Use token range rather

[PATCH 08/22] C frontend: use token ranges in various diagnostics

2015-09-10 Thread David Malcolm
This patch makes use of token ranges in the C frontend to add underlines to various diagnostics. Screenshot: https://dmalcolm.fedorapeople.org/gcc/2015-09-09/diagnostic-token-ranges.html gcc/c/ChangeLog: * c-decl.c (undeclared_variable): Convert param "loc" from a location_t to a

[PATCH 07/22] Implement token range tracking within libcpp and C/C++ FEs

2015-09-10 Thread David Malcolm
This patch adds source *range* information to libcpp's cpp_token, and to c_token and cp_token in the C and C++ frontends respectively. To minimize churn, I kept the existing location_t fields, though in theory these are always just equal to the start of the source range. cpplib.h's struct cpp_tok

[PATCH 13/22] gcc-rich-location.[ch]: add methods for working with tree ranges

2015-09-10 Thread David Malcolm
gcc/ChangeLog: * gcc-rich-location.c (get_range_for_expr): New function. (gcc_rich_location::add_expr): New method. (gcc_rich_location::maybe_add_expr): New method. (gcc_rich_location::add_expr_with_caption_va): New method. (gcc_rich_location::add_expr_with_c

[PATCH 11/22] Objective C: c/c-parser.c: use token ranges in two places

2015-09-10 Thread David Malcolm
I don't yet have an explicit test case for these. gcc/c/ChangeLog: * c-parser.c (c_parser_declaration_or_fndef): Use token range rather than location for a couple of warnings. --- gcc/c/c-parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/c/c-pars

[PATCH 02/22] Testsuite: add dg-{begin|end}-multiline-output commands

2015-09-10 Thread David Malcolm
This patch adds an easy way to write tests for expected multiline output. For example we can test carets and underlines for a particular diagnostic with: /* { dg-begin-multiline-output "" } typedef struct _GMutex GMutex; ^~~ { dg-end-multiline-output "" } */ It is used ex

[PATCH 01/22] Change of location_get_source_line signature

2015-09-10 Thread David Malcolm
location_get_source_line takes an expanded_location, but the column is irrelevant; it just needs a filename and line number. This change is used by, but independent of, the new implementation of diagnostic_show_locus later in the kit, so am breaking this out early. gcc/ChangeLog: * input.

[PATCH 03/22] Move diagnostic_show_locus and friends out into a new source file

2015-09-10 Thread David Malcolm
The function "diagnostic_show_locus" gains new functionality in the next patch, so this preliminary patch breaks it out into a new source file, diagnostic-show-locus.c, along with a couple of related functions. gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Add diagnostic-show-locus.o.

[PATCH 00/22] RFC: Overhaul of diagnostics

2015-09-10 Thread David Malcolm
This is a followup to the ideas posted at: https://gcc.gnu.org/ml/gcc-patches/2015-03/msg00837.html I've been experimenting with capturing and printing richer information for our diagnostics, underlining pertinent source ranges when printing them, and potentially providing "fix-it" hints. Attac

[PATCH] PR bootstrap/67363: Fix setenv/unsetenv declaration issue in gcc.c

2015-09-10 Thread John David Anglin
The attached patch fixes bootstrap on hppa-hpux and possibly other older systems without setenv and unsetenv. The setenv and unsetenvy functions are available in libiberty. All that is needed is to add declaration configure checks and the missing declarations when they are not available on th

New power of 2 hash policy

2015-09-10 Thread François Dumont
Hi Here is a patch to offer an alternative hash policy. This one is using power of 2 number of buckets allowing a faster modulo operation. This is obvious when running the performance test that I have adapted to use this alternative policy. Something between current implementation and the tr1

[patch] Two small libstdc++ testsuite tweaks

2015-09-10 Thread Jonathan Wakely
For the custom pointer type in testsuite_allocator.h to satisfy the RandomAccessIterator requirements it needs operator[], so this adds it. I'm not sure what 21_strings/basic_string/operators/char/1.cc was testing originally, but we might as well verify the string contents that the comments say w

Re: Fix reload1.c warning for some targets

2015-09-10 Thread Richard Sandiford
Jeff Law writes: > On 09/03/2015 02:39 AM, Richard Sandiford wrote: >> so for now how about just turning -Wmaybe-uninitialized into >> a warning for this function? The patch will mean that it becomes >> a warning even if someone turns off warnings on the command line, >> but I don't think that's

Re: [PATCH 1/2] shrink-wrap: Header hygiene

2015-09-10 Thread H.J. Lu
On Thu, Sep 10, 2015 at 12:09 PM, Segher Boessenkool wrote: > On Thu, Sep 10, 2015 at 11:49:33AM -0700, H.J. Lu wrote: >> On Thu, Sep 10, 2015 at 8:14 AM, Segher Boessenkool >> wrote: >> > This makes a few functions used only in shrink-wrap.c static, and >> > removes their declarations from shrin

Re: [PATCH 1/2] shrink-wrap: Header hygiene

2015-09-10 Thread Segher Boessenkool
On Thu, Sep 10, 2015 at 11:49:33AM -0700, H.J. Lu wrote: > On Thu, Sep 10, 2015 at 8:14 AM, Segher Boessenkool > wrote: > > This makes a few functions used only in shrink-wrap.c static, and > > removes their declarations from shrink-wrap.h . > It breaks build on i386: Sorry about that. I did gr

Re: [PATCH 1/2] shrink-wrap: Header hygiene

2015-09-10 Thread Jeff Law
On 09/10/2015 12:49 PM, H.J. Lu wrote: On Thu, Sep 10, 2015 at 8:14 AM, Segher Boessenkool wrote: This makes a few functions used only in shrink-wrap.c static, and removes their declarations from shrink-wrap.h . Bootstrapped and regression checked on powerpc64-linux. Is this okay for mainline

Re: [PATCH, rs6000] Extend LE swap optimization to handle vector permutes with constant masks

2015-09-10 Thread Bill Schmidt
On Thu, 2015-09-10 at 19:55 +0200, Bernhard Reutner-Fischer wrote: > On September 10, 2015 7:48:10 PM GMT+02:00, David Edelsohn > wrote: > >On Thu, Sep 10, 2015 at 1:41 PM, Bill Schmidt > > wrote: > >> Currently the little-endian swap optimization is disabled for > >> computations that include ve

Re: [PATCH 1/2] shrink-wrap: Header hygiene

2015-09-10 Thread H.J. Lu
On Thu, Sep 10, 2015 at 8:14 AM, Segher Boessenkool wrote: > This makes a few functions used only in shrink-wrap.c static, and > removes their declarations from shrink-wrap.h . > > Bootstrapped and regression checked on powerpc64-linux. Is this > okay for mainline? > > > Segher > > > 2015-09-10

Re: [Patch, fortran] PR66681 - Wrong result in assigning this_image() to a complex coarray

2015-09-10 Thread Paul Richard Thomas
Dear FX, I am puzzled by this business of the SAVE_EXPR: First, I agree entirely that it is a mystery as to why the SAVE_EXPR appears. It does not do so for array elements nor for arrays. Secondly, as far as I can tell, SAVE_EXPR_RESOLVED_P(…) merely implies that a pointer to a tree is returned.

Re: [PATCH] Make sure that contrib/download_prerequisites is run from correct place

2015-09-10 Thread Jeff Law
On 09/10/2015 01:33 AM, Markus Trippelsdorf wrote: A user complained on the gcc-help list that download_prerequisites wasn't working for him, because he ran it from the wrong directory. Tested on x86_64-pc-linux-gnu. OK for trunk and active branches? * download_prerequisites: Make sure

Go patch committed: report errors from very large types

2015-09-10 Thread Ian Lance Taylor
This patch by Chris Manghane fixes the Go frontend to report an ordinary error for a type that is too large to represent in Go, rather than crashing. This fixes https://golang.org/issue/11554 . Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian 2015-09-10

Re: [Patch] Teach RTL ifcvt to handle multiple simple set instructions

2015-09-10 Thread Bernd Schmidt
On 09/08/2015 04:53 PM, James Greenhalgh wrote: One big question I have with this patch is how I ought to write a meaningful cost model I've used. It seems like yet another misuse of RTX costs, and another bit of stuff for targets to carefully balance. Now, if the relative cost of branches and co

Re: [PATCH, rs6000] Extend LE swap optimization to handle vector permutes with constant masks

2015-09-10 Thread Bernhard Reutner-Fischer
On September 10, 2015 7:48:10 PM GMT+02:00, David Edelsohn wrote: >On Thu, Sep 10, 2015 at 1:41 PM, Bill Schmidt > wrote: >> Currently the little-endian swap optimization is disabled for >> computations that include vector permute instructions. We generate a >> vperm in a variety of ways, and fo

[gomp4] Use cuda library's error strings

2015-09-10 Thread Nathan Sidwell
The cuda library has had an errnum->string converter documented and present since at least Cuda 5.5. Unfortunately it was only declared in the header file from cuda 7. This patch uses that interface, and locally declares the interface if the cuda version is too low. Applied to gomp4 branc

[gomp4] Remove more gang local bits

2015-09-10 Thread Nathan Sidwell
I've committed this to gomp4 branch. It removes more now-obsolete bits of gang local handling. nathan 2015-09-10 Nathan Sidwell include/ * gomp-constants.h (GOMP_MAP_FLAG_GANGLOCAL): Delete. (enum gomp_map_kind): Remove GOMP_MAP_GANGLOCAL, GOMP_MAP_FORCE_TO_GANGLOCAL). libgomp/ * oac

Re: [PATCH, rs6000] Extend LE swap optimization to handle vector permutes with constant masks

2015-09-10 Thread David Edelsohn
On Thu, Sep 10, 2015 at 1:41 PM, Bill Schmidt wrote: > Currently the little-endian swap optimization is disabled for > computations that include vector permute instructions. We generate a > vperm in a variety of ways, and for the most general cases, we can't > replace a vperm with a swap-equivale

[PATCH, rs6000] Extend LE swap optimization to handle vector permutes with constant masks

2015-09-10 Thread Bill Schmidt
Currently the little-endian swap optimization is disabled for computations that include vector permute instructions. We generate a vperm in a variety of ways, and for the most general cases, we can't replace a vperm with a swap-equivalent sequence without cost modeling. However, the most common us

Re: [PATCH 1/2] shrink-wrap: Header hygiene

2015-09-10 Thread Bernd Schmidt
On 09/10/2015 05:14 PM, Segher Boessenkool wrote: > > * shrink-wrap.c (requires_stack_frame_p): Make static. > (prepare_shrink_wrap): Likewise. > (dup_block_and_redirect): Likewise. > * shrink-wrap.h: Remove declarations of those functions. This is ok. Bernd

Re: [patch] Enable lightweight checks with _GLIBCXX_ASSERTIONS.

2015-09-10 Thread Martin Sebor
On 09/10/2015 10:38 AM, Florian Weimer wrote: On 09/10/2015 06:30 PM, Martin Sebor wrote: On 09/09/2015 09:58 AM, Florian Weimer wrote: On 09/08/2015 05:45 PM, Jonathan Wakely wrote: I doubt we can achieve the complexity goals in all cases. I expect that for (int i = 0; i < 1; ++i) {

Re: [x86 PATCH] Improve performance for Haswell family.

2015-09-10 Thread Uros Bizjak
Hello! > Here is updated patch introducing new .md file describing Haswell > pipeline. Reassociation width for float-point instructions was > increased to 4 for Haswell family. > > Regression testing did not show any new failures. > Is it OK for trunk? > > ChangeLog > 2015-09-10 Yuri Rumyantsev

Re: [x86 PATCH] Improve performance for Haswell family.

2015-09-10 Thread H.J. Lu
On Thu, Sep 10, 2015 at 9:39 AM, Yuri Rumyantsev wrote: > Hi All, > > Here is updated patch introducing new .md file describing Haswell > pipeline. Reassociation width for float-point instructions was > increased to 4 for Haswell family. > > Regression testing did not show any new failures. > Is i

[x86 PATCH] Improve performance for Haswell family.

2015-09-10 Thread Yuri Rumyantsev
Hi All, Here is updated patch introducing new .md file describing Haswell pipeline. Reassociation width for float-point instructions was increased to 4 for Haswell family. Regression testing did not show any new failures. Is it OK for trunk? ChangeLog 2015-09-10 Yuri Rumyantsev * config/i386

Re: [patch] Enable lightweight checks with _GLIBCXX_ASSERTIONS.

2015-09-10 Thread Florian Weimer
On 09/10/2015 06:30 PM, Martin Sebor wrote: > On 09/09/2015 09:58 AM, Florian Weimer wrote: >> On 09/08/2015 05:45 PM, Jonathan Wakely wrote: >> I doubt we can achieve the complexity goals in all cases. I expect that for (int i = 0; i < 1; ++i) { vector[i];

Re: [patch] Enable lightweight checks with _GLIBCXX_ASSERTIONS.

2015-09-10 Thread Martin Sebor
On 09/09/2015 09:58 AM, Florian Weimer wrote: On 09/08/2015 05:45 PM, Jonathan Wakely wrote: I doubt we can achieve the complexity goals in all cases. I expect that for (int i = 0; i < 1; ++i) { vector[i]; } is optimized away in default mode, but with _GLIBCXX_ASSERTIONS, it is n

PING: [gcc-5-branch][PATCH] PR rtl-optimization/67029: gcc-5.2.0 unable to find a register to spill with O3 fsched-pressure fschedule-insns

2015-09-10 Thread H.J. Lu
On Fri, Aug 7, 2015 at 12:38 PM, H.J. Lu wrote: > On Thu, Aug 6, 2015 at 11:19 AM, Richard Sandiford > wrote: >> "H.J. Lu" writes: >>> Since ira_implicitly_set_insn_hard_regs may be called outside of >>> ira-lives.c, it can't use the local variable, preferred_alternatives. >>> This patch adds an

Re: [Patch, fortran] PR66993 - Spurious ambiguous symbol error with submodules

2015-09-10 Thread Paul Richard Thomas
Committed as revision 227648. Thanks for the review and for the PR. Paul On 10 September 2015 at 16:22, FX wrote: >> 2015-08-10 Paul Thomas >> >>PR fortran/66993 >>* module.c (read_module): If a symtree exists and the symbol has >>been associated in a submodule from a parent (s

Re: [PATCH 2/2] shrink-wrap: Rewrite try_shrink_wrapping

2015-09-10 Thread Segher Boessenkool
On Thu, Sep 10, 2015 at 10:41:53AM -0500, Segher Boessenkool wrote: > > > * shrink-wrap.c (requires_stack_frame_p): Fix formatting. > > > (dup_block_and_redirect): Delete function. > > > (can_dup_for_shrink_wrapping): New function. > > > (fix_fake_fallthrough_edge):

Re: [PATCH 2/2] shrink-wrap: Rewrite try_shrink_wrapping

2015-09-10 Thread Segher Boessenkool
On Thu, Sep 10, 2015 at 04:22:34PM +0100, Jiong Wang wrote: > > Segher Boessenkool writes: > > > 2015-09-10 Segher Boessenkool > > > > * shrink-wrap.c (requires_stack_frame_p): Fix formatting. > > (dup_block_and_redirect): Delete function. > > (can_dup_for_shrink_wrappi

Re: [PATCH 2/2] shrink-wrap: Rewrite try_shrink_wrapping

2015-09-10 Thread Jiong Wang
Segher Boessenkool writes: > 2015-09-10 Segher Boessenkool > > * shrink-wrap.c (requires_stack_frame_p): Fix formatting. > (dup_block_and_redirect): Delete function. > (can_dup_for_shrink_wrapping): New function. > (fix_fake_fallthrough_edge): New function. >

Re: [PATCH 00/10] removal of typedefs that hide pointerness episode 1

2015-09-10 Thread David Malcolm
On Thu, 2015-09-03 at 11:48 +0200, Richard Biener wrote: > On Thu, Sep 3, 2015 at 7:26 AM, wrote: > > From: Trevor Saunders > > > > Hi, > > > > Personally I think hiding that variables are pointers is confusing, and I > > believe consensus is we should move away from this style. So this series

[PATCH 1/2] shrink-wrap: Header hygiene

2015-09-10 Thread Segher Boessenkool
This makes a few functions used only in shrink-wrap.c static, and removes their declarations from shrink-wrap.h . Bootstrapped and regression checked on powerpc64-linux. Is this okay for mainline? Segher 2015-09-10 Segher Boessenkool * shrink-wrap.c (requires_stack_frame_p): Make

[PATCH 2/2] shrink-wrap: Rewrite try_shrink_wrapping

2015-09-10 Thread Segher Boessenkool
This patch rewrites the shrink-wrapping algorithm, allowing non-linear pieces of CFG to be duplicated for use without prologue instead of just linear pieces. On PowerPC, this enables shrink-wrapping of about 2%-3% more functions. I expected more, but in most cases this would help we cannot yet shr

[SH][committed] Fix PR 67506

2015-09-10 Thread Oleg Endo
Hi, I've committed the following fix for PR 67506 as r227646 on trunk and as r227647 on the gcc-5 branch. The patch was tested by Kaz on sh4-linux. I've added the testcase and briefly checked it with make all and make -k check RUNTESTFLAGS="compile.exp=pr67506.c --target_board=sh-sim \{-m2/-ml,-

[PATCH] vectorizing conditional expressions (PR tree-optimization/65947)

2015-09-10 Thread Alan Hayward
Hi, This patch (attached) adds support for vectorizing conditional expressions (PR 65947), for example: int condition_reduction (int *a, int min_v) { int last = 0; for (int i = 0; i < N; i++) if (a[i] < min_v) last = a[i]; return last; } To do this the loop is vectorised to create

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/67465: Handle pairs of complex+simple blocks and empty blocks more gracefully

2015-09-10 Thread Kyrill Tkachov
On 10/09/15 12:43, Rainer Orth wrote: Hi Kyrill, Rainer, could you please check that this patch still fixes the SPARC regressions? unfortunately, it breaks sparc-sun-solaris2.10 bootstrap: compiling stage2 libiberty/regex.c FAILs: Thanks for providing the preprocessed file. I've reproduce

Re: [Patch, fortran] PR66993 - Spurious ambiguous symbol error with submodules

2015-09-10 Thread FX
> 2015-08-10 Paul Thomas > >PR fortran/66993 >* module.c (read_module): If a symtree exists and the symbol has >been associated in a submodule from a parent (sub)module, attach >the symbol to a 'unique symtree' and the new symbol to the >existing symtree. > > 2015-08-10 Pa

[Committed] S/390: Fix mode iterators vmal, vmah, and vmalh.

2015-09-10 Thread Andreas Krebbel
gcc/ChangeLog: 2015-09-10 Andreas Krebbel * config/s390/vx-builtins.md ("vec_vmal", "vec_vmah") ("vec_vmalh"): Change mode iterator from VI_HW to VI_HW_QHS. --- gcc/config/s390/vx-builtins.md | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-

[Committed] S/390: Add V1TImode to constant pool modes.

2015-09-10 Thread Andreas Krebbel
gcc/ChangeLog: 2015-09-10 Andreas Krebbel * config/s390/s390.c: Add V1TImode to constant pool modes. --- gcc/config/s390/s390.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index cbfc800..a664443 100644 --- a/

[Committed] S/390: Don't use vgm for v1ti and v1tf.

2015-09-10 Thread Andreas Krebbel
gcc/ChangeLog: 2015-09-10 Andreas Krebbel * config/s390/s390.c (s390_contiguous_bitmask_vector_p): Reject if the vector element is bigger than 64 bit. gcc/testsuite/ChangeLog: 2015-09-10 Andreas Krebbel * gcc.target/s390/vector/vec-genbytemask-1.c: Add check for V

Backports of Solaris 12 patches to gcc 5 branch

2015-09-10 Thread Rainer Orth
I've now backported the following two patches [boehm-gc] Avoid unstructured procfs on Solaris https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01591.html [build] Use __cxa_atexit on Solaris 12+ https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01593.html to the gcc 5 bra

[gomp4.1] Initial #pragma omp ordered simd support

2015-09-10 Thread Jakub Jelinek
Hi! This patch just makes sure (for now) that we don't vectorize loops with #pragma omp ordered simd in them (directly or inlined into them). Later on we can teach the vectorizer to handle some of the cases (but supposedly the markers would need to become stronger barriers, so that earlier optimiz

[AArch64] Fix vcvt_high_f64_f32 and vcvt_figh_f32_f64 intrinsics.

2015-09-10 Thread James Greenhalgh
On Wed, Sep 09, 2015 at 10:28:28AM +0100, Christophe Lyon wrote: > On 9 September 2015 at 10:31, James Greenhalgh > wrote: > > > > Hi, > > > > This patch clears up some remaining confusion in the vector lane orderings > > for the two intrinsics mentioned in the title. > > > > Bootstrapped on aar

Re: Ping^2 Re: Pass -foffload targets from driver to libgomp at link time

2015-09-10 Thread Bernd Schmidt
On 09/10/2015 03:41 PM, Joseph Myers wrote: > Ping^2. This patch > is still > pending review. No fundamental objections, but I have some questions. Cuold you describe what the handling of flags/lang_mask accomplishes in this patch? Woul

Unreviewed libgo patch

2015-09-10 Thread Rainer Orth
The following libgo patch [libgo] Use stat_atim.go on Solaris 12+ https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01590.html has remained unreviewed for two weeks. It's required to allow bootstrap on Solaris 12. Rainer -- -

Ping^2 Re: Pass -foffload targets from driver to libgomp at link time

2015-09-10 Thread Joseph Myers
Ping^2. This patch is still pending review. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 0/3] remove tm.h from libobjc/sendmsg.c

2015-09-10 Thread Joseph Myers
On Thu, 10 Sep 2015, tbsaunde+...@tbsaunde.org wrote: > I thought I'd see how hard it is to get tm.h out of libobjc/ so it wouldn't be > necessary to check there for uses of target macros. The issue is PR libobjc/24775, so include that in the ChangeLog entry for any relevant patch (and if finish

Re: [PATCH 0/3] remove tm.h from libobjc/sendmsg.c

2015-09-10 Thread pinskia
> On Sep 10, 2015, at 7:57 PM, tbsaunde+...@tbsaunde.org wrote: > > From: Trevor Saunders > > Hi, > > I thought I'd see how hard it is to get tm.h out of libobjc/ so it wouldn't be > necessary to check there for uses of target macros. I once had a branch which did this and then I got busy

Re: [C++ Patch] PR 67318 ("[6 regression] Parsing error when using abbreviated integral type names in template parameter pack declaration")

2015-09-10 Thread Jason Merrill
OK. Jason

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/67465: Handle pairs of complex+simple blocks and empty blocks more gracefully

2015-09-10 Thread Kyrill Tkachov
Hi Rainer, On 10/09/15 12:43, Rainer Orth wrote: Hi Kyrill, Rainer, could you please check that this patch still fixes the SPARC regressions? unfortunately, it breaks sparc-sun-solaris2.10 bootstrap: compiling stage2 libiberty/regex.c FAILs: Thanks for trying it out. I'll try reproducing wi

Re: [PATCH 3/3] stop including tm.h in sendmsg.c

2015-09-10 Thread Bernd Schmidt
On 09/10/2015 01:57 PM, tbsaunde+...@tbsaunde.org wrote: > From: Trevor Saunders > > libobjc/ChangeLog: > > 2015-09-10 Trevor Saunders > > * sendmsg.c (tm.h): Remove include. Ok for this and the previous one too. If it turns out we still need this information we'll figure something ou

Re: [PATCH 1/3] remove STRUCT_VALUE macro

2015-09-10 Thread Bernd Schmidt
On 09/10/2015 01:57 PM, tbsaunde+...@tbsaunde.org wrote: > From: Trevor Saunders > > It is undocumented so the meaning is unclear, but it is only ever > defined to 0, which the one user in libobjc treats the same as being > undefined. Apparently it was converted to TARGET_STRUCT_VALUE_RTX in 200

[gomp4] predicate register caching

2015-09-10 Thread Nathan Sidwell
I've committed this to gomp4. Rather than recalculate the 'not lane 0' predicate on each use, we calculate it at the top of the function and use throughout. This appears to be the recommended approach. nathan 2015-09-10 Nathan Sidwell * config/nvptx/nvptx.c (nvptx_init_axis_predicate): N

[PATCH 3/3] stop including tm.h in sendmsg.c

2015-09-10 Thread tbsaunde+gcc
From: Trevor Saunders libobjc/ChangeLog: 2015-09-10 Trevor Saunders * sendmsg.c (tm.h): Remove include. --- libobjc/sendmsg.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libobjc/sendmsg.c b/libobjc/sendmsg.c index ba31930..8eb6d54 100644 --- a/libobjc/sendmsg.c +++ b/libobj

[PATCH 1/3] remove STRUCT_VALUE macro

2015-09-10 Thread tbsaunde+gcc
From: Trevor Saunders It is undocumented so the meaning is unclear, but it is only ever defined to 0, which the one user in libobjc treats the same as being undefined. gcc/ChangeLog: 2015-09-10 Trevor Saunders * config/arc/arc.h: Remove define of STRUCT_VALUE. * config/lm32/

[PATCH 0/3] remove tm.h from libobjc/sendmsg.c

2015-09-10 Thread tbsaunde+gcc
From: Trevor Saunders Hi, I thought I'd see how hard it is to get tm.h out of libobjc/ so it wouldn't be necessary to check there for uses of target macros. each patch individually bootstrapped + regtested on x86_64-linux-gnu, ok? Trev Trevor Saunders (3): remove STRUCT_VALUE macro remov

[PATCH 2/3] remove unused defines from sendmsg.c

2015-09-10 Thread tbsaunde+gcc
From: Trevor Saunders libobjc/ChangeLog: 2015-09-10 Trevor Saunders * sendmsg.c (gen_rtx): Remove macro. (gen_rtx_MEM): Likewise. (gen_rtx_REG): Likewise. (rtx): Likewise. --- libobjc/sendmsg.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/libobjc

[Patch, fortran] PR66993 - Spurious ambiguous symbol error with submodules

2015-09-10 Thread Paul Richard Thomas
Dear All, This is a very straight forward patch of a problem picked up by Mikael. Since module symbols host associated in the submodule statement are read using the use association mechanism, the can be wrongly detected as being ambiguous with use associated symbols. The latter have precedence, si

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/67465: Handle pairs of complex+simple blocks and empty blocks more gracefully

2015-09-10 Thread Rainer Orth
Hi Kyrill, > Rainer, could you please check that this patch still fixes the SPARC > regressions? unfortunately, it breaks sparc-sun-solaris2.10 bootstrap: compiling stage2 libiberty/regex.c FAILs: In file included from /vol/gcc/src/hg/trunk/local/libiberty/regex.c:640:0: /vol/gcc/src/hg/trunk/lo

[AArch64] Simplify TLS pattern by hardcoding relocation modifiers into pattern

2015-09-10 Thread Jiong Wang
TLS instruction sequences are always with fixed format, there is no need to use operand modifier, we can hardcode the relocation modifiers into instruction pattern, all those redundant checks in aarch64_print_operand can be removed. OK for trunk? 2015-09-10 Jiong Wang gcc/ * config/aarch64

[hsa] Fix insn type in gen_hsa_ternary_atomic_for_builtin

2015-09-10 Thread Martin Jambor
Hi, it turns out I got the HSA types wrong in gen_hsa_ternary_atomic_for_builtin. The following patch makes the disassembler/verifier happy. Committed to the branch. Martin 2015-09-10 Martin Jambor * hsa-gen.c (gen_hsa_ternary_atomic_for_builtin): Fix instruction type, add

  1   2   >