Re: [PATCH 3/5] combine: add regno field to LOG_LINKS

2014-11-25 Thread Segher Boessenkool
On Tue, Nov 25, 2014 at 11:46:52AM -0700, Jeff Law wrote: > On 11/14/14 12:19, Segher Boessenkool wrote: > >With this new field in place, we can have LOG_LINKS for insns that set > >more than one register and distribute them properly in distribute_links. > >This then allows many more PARALLELs to b

Re: [PATCH 4/5] combine: distribute_log_links for PARALLELs of SETs

2014-11-25 Thread Segher Boessenkool
On Tue, Nov 25, 2014 at 12:37:57PM -0700, Jeff Law wrote: > This is OK once prereqs are approved. That is only 3/5 now. > You might consider pushing the two LOG_LINKs related patches forward > independently of the patch to rip apart the PARALLELs. Though I think > that all of the patches are p

Re: [PATCH 2/5] combine: handle I2 a parallel of two SETs

2014-11-25 Thread Segher Boessenkool
On Tue, Nov 25, 2014 at 11:35:14AM -0700, Jeff Law wrote: > On 11/14/14 12:19, Segher Boessenkool wrote: > >If I2 is a PARALLEL of two SETs, split it into two instructions, I1 > >and I2. If there already was an I1, rename it to I0. If there > >already was an I0, don't do anything. > > > >This sur

Re: [PATCH][ARM] testsuite, use arm_eabi #3

2014-11-25 Thread Andreas Tobler
On 11.11.14 00:45, Mike Stump wrote: On Nov 10, 2014, at 2:06 PM, Andreas Tobler wrote: another one. Here I'm not really sure if there are EABI variants which do _not_ support these test cases. I think the patch is fine, just watch for any follow-on comments from an eabi/arm expert. Usuall

Re: [PATCH, Pointer Bounds Checker, Builtins instrumentation 1/5] Builtin codes and decls

2014-11-25 Thread H.J. Lu
On Thu, Nov 6, 2014 at 3:48 AM, Ilya Enkovich wrote: > Hi, > > This is the first patch in a series to enable builtin function calls > instrumentation by Poitner Bounds Checker. Previously builtins > instrumentation was disabled in checker because it allowed two function calls > with the same f

Re: Move dwarf2 frame tables to read-only section for AIX

2014-11-25 Thread Andrew Dixie
Hi, The following patch substantially reduces the memory requirements of GCC compiled C++ programs on AIX. Currently there are two different pieces of code to decide if a read-only or a read-write section is required for exception information: - If the target supports named sections, there is goo

Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-11-25 Thread Jeff Law
On 11/25/14 13:57, Phil Muldoon wrote: On 25/11/14 20:37, Mike Stump wrote: On Nov 23, 2014, at 4:06 PM, FX wrote: One question to build maintainers, and one patch submitted to top-level configure.ac So, not sure who wants to review this. From the darwin perspective, Ok. I mean from my l

Re: [Patch, Fortran] convert almost all {warning,error}_now to common diagnostic

2014-11-25 Thread Tobias Burnus
FX: (a) those majority which might need buffering (gfc_error, gfc_warning); Is there a plan for those in the longer term? Well, the long-term solution is of course to support them. That requires adding buffering+discarding support to the common machinery and to use it then in gfortran. It's

[PATCH] DWARF add DW_AT_noreturn on noreturn function subprogram.

2014-11-25 Thread Mark Wielaard
This implements the DWARFv5 noreturn proposal: http://dwarfstd.org/ShowIssue.php?issue=140331.1 TREE_THIS_VOLATILE on a FUNCTION_DECL node means the function does not return normally. This catches the traditional noreturn GNU attribute, the C11 _Noreturn keyword and the C++11 [[noreturn]] attribut

Re: More weakref fixes

2014-11-25 Thread H.J. Lu
On Fri, Aug 30, 2013 at 8:54 AM, Jan Hubicka wrote: > Hi, > this patch fixes gcc.dg/tree-ssa/attr-alias.c on x86-64 target. > The problem here is that we attempt to create local alias since we consider > weakref > of test() to be overwritable and at the same time available. > The change in cgraph

[C++ PATCH] Diagnose conversions from string constants to char* as forbidden, not deprecated, in c++11 and above

2014-11-25 Thread Ville Voutilainen
Tested on Linux-x64. Remotely related to pr50645, which we should probably close as invalid. /cp 2014-11-26 Ville Voutilainen Diagnose string constant conversion to char* in c++11 and above as forbidden, not deprecated. * typeck.c (string_conv_p): Do a pedwarn in c++11 and above,

Re: [PATCH v3] gcc/c-family/c-cppbuiltin.c: Let buffer enough to print host wide integer value

2014-11-25 Thread Joseph Myers
On Wed, 26 Nov 2014, Chen Gang wrote: > + gcc_assert (wi::fits_to_tree_p (value, char_type_node) > + || wi::fits_to_tree_p (value, short_integer_type_node) > + || wi::fits_to_tree_p (value, integer_type_node) > + || wi::fits_to_tree_p (value, long_integer_type_node)

Re: [PATCH] pr61324 pr 63649 - fix crash in ipa_comdats

2014-11-25 Thread Trevor Saunders
On Tue, Nov 25, 2014 at 09:59:46PM +0100, Jan Hubicka wrote: > > From: Trevor Saunders > > > > Hi, > > > > the interesting symbol in the test case for pr61324 is __GLOBAL__sub_I_s. > > It > > refers to nothing, and is called by nothing, however it is kept (I believe > > because of -fkeep-inlin

Re: [PATCH] DWARF add DW_AT_noreturn on noreturn function subprogram.

2014-11-25 Thread Jason Merrill
On 11/25/2014 05:57 PM, Mark Wielaard wrote: This implements the DWARFv5 noreturn proposal: http://dwarfstd.org/ShowIssue.php?issue=140331.1 TREE_THIS_VOLATILE on a FUNCTION_DECL node means the function does not return normally. This catches the traditional noreturn GNU attribute, the C11 _Noret

[PATCH 00/05] Fixes to jit.exp

2014-11-25 Thread David Malcolm
Various fixes/improvements to jit.exp Successfully bootstrapped & regrtested on x86_64-unknown-linux-gnu (Fedora 20). OK for trunk? (am not yet officially blessed as the JIT maintainer, so I require review for the non-obvious patches)

[PATCH 00/05] Fixes to jit.exp

2014-11-25 Thread David Malcolm
Various fixes/improvements to jit.exp Successfully bootstrapped & regrtested on x86_64-unknown-linux-gnu (Fedora 20). OK for trunk? (am not yet officially blessed as the JIT maintainer, so I require review for the non-obvious patches)

[PATCH 03/05] jit.exp: fix timeout bug inherited from dejagnu.exp

2014-11-25 Thread David Malcolm
DejaGnu's host_execute has an erroneous line that appears to be a merge conflict that went awry followed up by a reindent, and jit.exp has inherited this bug within "fixed_host_execute". Fix it within jit.exp. Reported to DejaGnu as: http://lists.gnu.org/archive/html/dejagnu/2014-11/msg1.ht

[PATCH 01/05] jit.exp: Avoid embedding full paths into test results

2014-11-25 Thread David Malcolm
This makes it easier to compare jit.sum files from different runs gcc/testsuite/ChangeLog: * jit.dg/jit.exp (jit-dg-test): Use $name rathen than $prog when calling jit_check_compile to avoid embedding the full path of the testcase into the test results. --- gcc/testsuite/j

[PATCH 02/05] PR jit/63854: Add support for running "make check-jit" under valgrind

2014-11-25 Thread David Malcolm
This commit updates jit.exp so that if RUN_UNDER_VALGRIND is present in the environment, all of the built client code using libgccjit.so is run under valgrind, with --leak-check=full. Hence: RUN_UNDER_VALGRIND= make check-jit will run all jit testcases under valgrind (taking 27 mins on my machin

[PATCH 05/05] Add command-line option-parsing to jit testcases

2014-11-25 Thread David Malcolm
Add command-line option-parsing to the testcases, so that we can manipulate them without needing a recompile (e.g. varying optimization levels etc). This uses getopt_long, which is a GNU extension to libc. Is that acceptable? Implement a --num-iterations option, to override the default of 5. Wh

[PATCH 04/05] jit.exp: Verify the exit status of the spawnee

2014-11-25 Thread David Malcolm
gcc/testsuite/ChangeLog: * jit.dg/jit.exp (verify_exit_status): New function. (fixed_host_execute): Verify the exit status of the spawnee. --- gcc/testsuite/jit.dg/jit.exp | 30 ++ 1 file changed, 30 insertions(+) diff --git a/gcc/testsuite/jit.dg/jit.e

[PATCH 00/08] More memory leak fixes

2014-11-25 Thread David Malcolm
Various fixes/improvements to jit.exp Successfully bootstrapped & regrtested on x86_64-unknown-linux-gnu (Fedora 20). OK for trunk?

[PATCH 01/08] PR jit/63854: Fix leak in tree-ssa-math-opts.c

2014-11-25 Thread David Malcolm
Running testsuite/jit.dg/test-functions.c under valgrind showed this leak (amongst others): 400 bytes in 10 blocks are definitely lost in loss record 142 of 181 at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x5DCDF2F: xrealloc (xmalloc.c:177) by 0x537

[PATCH 02/08] PR jit/63854: Fix leak within jit-builtins.c

2014-11-25 Thread David Malcolm
Running testsuite/jit.dg/test-functions.c under valgrind showed this leak (amongst others): 520 (320 direct, 200 indirect) bytes in 5 blocks are definitely lost in loss record 144 of 181 at 0x4A06965: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by

[PATCH 03/08] PR jit/63854: Fix leak in real.c for i386:init_ext_80387_constants

2014-11-25 Thread David Malcolm
Valgrind of testsuite/jit.dg/test-types.c showed this leak in real.c when converting the strings in init_ext_80387_constants to real. 160 bytes in 5 blocks are definitely lost in loss record 89 of 144 at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x30AF4

[PATCH 05/08] PR jit/63854: Fix double-initialization within tree-pretty-print.c

2014-11-25 Thread David Malcolm
Running various JIT testcases under valgrid showed this one-time leak: 8,464 (336 direct, 8,128 indirect) bytes in 1 blocks are definitely lost in loss record 144 of 147 at 0x4A081D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x5DF4EA0: xcalloc (xmalloc.c:162)

[PATCH 04/08] PR jit/63854: Remove xstrdup from ipa/cgraph fprintf calls

2014-11-25 Thread David Malcolm
cgraph*.c and ipa-*.c use xstrdup on strings when dumping them via fprintf, leaking all of the duplicated buffers. Is/was there a reason for doing this? Taking them out fixes these leaks (seen when dumping is enabled): 12 bytes in 1 blocks are definitely lost in loss record 11 of 148 at 0x4A0645

[PATCH 07/08] PR jit/63854: Fix leaks in toyvm.c

2014-11-25 Thread David Malcolm
Introduce a struct toyvm_compiled_function so that we can clean things up fully, avoiding warnings from valgrind. gcc/jit/ChangeLog: PR jit/63854 (toyvm_compiled_function): New typedef. (toyvm_compiled_func) Rename to... (toyvm_compiled_code) ...this. (struc

[PATCH 08/08] PR/64003 workaround (uninit memory in i386.md)

2014-11-25 Thread David Malcolm
I suspect this is papering over a real problem, but I've been applying this workaround locally to keep my valgrind output clean. gcc/ChangeLog: PR/64003 * final.c (shorten_branches): Allocate insn_lengths with XCNEWVEC rather than XNEWVEC; remove subsequent per-element

[PATCH 06/08] Avoid overuse of name "buffer" in tree-pretty-print.c

2014-11-25 Thread David Malcolm
Various functions in tree-pretty-print.c take a param pretty_printer *buffer and there's also a static pretty_printer *buffer; Additionally, pretty_printer instances are not buffers; they *contain* buffers (inasmuch as they have a field "buffer"). This patch renames such params from "buffer" to

Re: [PATCH v3] gcc/c-family/c-cppbuiltin.c: Let buffer enough to print host wide integer value

2014-11-25 Thread Chen Gang
On 11/26/14 8:31, Joseph Myers wrote: > On Wed, 26 Nov 2014, Chen Gang wrote: > >> + gcc_assert (wi::fits_to_tree_p (value, char_type_node) >> + || wi::fits_to_tree_p (value, short_integer_type_node) >> + || wi::fits_to_tree_p (value, integer_type_node) >> + || wi::fits

[PATCH 03/03] jit-playback: Move dso-creation into its own function

2014-11-25 Thread David Malcolm
Continue to refactor playback::context::compile, moving the DSO-generation into its own function. gcc/jit/ChangeLog: * jit-playback.c (gcc::jit::playback::context::compile): Move DSO creation code into... (gcc::jit::playback::context::convert_to_dso): New function.

[PATCH 00/03] JIT refactoring

2014-11-25 Thread David Malcolm
Various cleanups of the jit code Successfully bootstrapped & regrtested on x86_64-unknown-linux-gnu (Fedora 20). OK for trunk? (am not yet officially blessed as the JIT maintainer, so I require review for the non-obvious patches)

[PATCH 01/03] Move gcc_jit_result implementation to a new files jit-result.{h|c}

2014-11-25 Thread David Malcolm
Whilst investigating another issue I found I had trouble locating the gcc::jit::result class. It turned out to be declared in jit-recording.h, but implemented in jit-playback.c. Move it to new files: jit-result.{h|c} gcc/jit/ChangeLog: * Make-lang.in (jit_OBJS): Add jit/jit-result.o.

[PATCH 02/03] jit-playback: Move argv-creation to its own function

2014-11-25 Thread David Malcolm
The body of playback::context::compile is rather long, at 200 lines. Start splitting it out parts of it into smaller member functions. Also, eliminate a fixed-size buffer with bounds check in favor of an auto_vec<>. gcc/jit/ChangeLog: * jit-playback.c (gcc::jit::playback::context::compil

Re: [PATCH v3] gcc/c-family/c-cppbuiltin.c: Let buffer enough to print host wide integer value

2014-11-25 Thread Joseph Myers
On Wed, 26 Nov 2014, Chen Gang wrote: > And I have no any ideas about the attachments in your reply mail. If it > is really related with this thread, please let me know. I don't understand what attachments you are referring to. -- Joseph S. Myers jos...@codesourcery.com

[PATCH 02/02] Improvements to documentation of gcc_jit_context_release

2014-11-25 Thread David Malcolm
gcc/jit/ChangeLog: * docs/examples/tut02-square.c (main): Release the context earlier, to show that this is possible. Update error-handling to avoid a double-release of the context, and to avoid releasing a NULL result. * docs/intro/tutorial02.rst: Discuss g

[PATCH 00/02] Improvements to jit documentation

2014-11-25 Thread David Malcolm
Various improvements to jit documentation Touches one of the tutorial examples, which is also used as part of the testsuite: successfully bootstrapped & regrtested on x86_64-unknown-linux-gnu (Fedora 20). OK for trunk? (am not yet officially blessed as the JIT maintainer, so I require review for

[PATCH 01/02] PR jit/64018: Add description of error-handling to the JIT tutorial

2014-11-25 Thread David Malcolm
gcc/jit/ChangeLog: PR jit/64018 * docs/intro/tutorial02.rst: Spell out lifetime of generated code. Add description of error-handling, taken in part from... * docs/topics/contexts.rst (Error-handling): Expand, and move some content to tutorial02.rst. --- gcc/

Re: [PATCH v3] gcc/c-family/c-cppbuiltin.c: Let buffer enough to print host wide integer value

2014-11-25 Thread Chen Gang
On 11/26/14 9:38, Joseph Myers wrote: > On Wed, 26 Nov 2014, Chen Gang wrote: > >> And I have no any ideas about the attachments in your reply mail. If it >> is really related with this thread, please let me know. > > I don't understand what attachments you are referring to. > Oh, sorry, my Thu

[PATCH 00/02] jit: Fixes to builtins handling

2014-11-25 Thread David Malcolm
Various fixes/improvements to builtins-handling within jit. Successfully bootstrapped & regrtested on x86_64-unknown-linux-gnu (Fedora 20). OK for trunk? (am not yet officially blessed as the JIT maintainer, so I require review for the non-obvious patches)

[PATCH 01/02] jit-builtins.c: Fix segfault on unsupported builtins

2014-11-25 Thread David Malcolm
jit-builtins.c only supports a subset of builtin-types.def, and can fail if the user requests a builtin that uses the unsupported types. Whilst fixing PR jit/64020 I noticed that these failures read through NULL and segfault. Fix it by checking for get_type and make_builtin_function returning NUL

[PATCH 02/02] PR jit/64020: Fixes to handling of builtins

2014-11-25 Thread David Malcolm
Investigating PR jit/64020 showed that tree-ssa-math-opts.c was failing to optimize sin/cos operations within the JIT since this: fndecl = mathfn_built_in (type, BUILT_IN_CEXPI); was returning NULL. Several issues were present: (A) In the JIT we don't pre-build all builtins, just the ones that

Re: patch to fix PR63527

2014-11-25 Thread David Edelsohn
This patch broke bootstrap on AIX /nasfarm/edelsohn/src/src/gcc/ira-lives.c:1149:36: error: 'REAL_PIC_OFFSET_TABLE_REGNUM' was not declared in this scope = (find_regno_fusage (insn, USE, REAL_PIC_OFFSET_TABLE_REGNUM) ^ In file included from /nasfarm/edelsohn/

Re: patch to fix PR63527

2014-11-25 Thread David Edelsohn
It looks like you already fixed it. I had been looking for the patch on GCC Patches. - David On Tue, Nov 25, 2014 at 9:08 PM, David Edelsohn wrote: > This patch broke bootstrap on AIX > > /nasfarm/edelsohn/src/src/gcc/ira-lives.c:1149:36: error: > 'REAL_PIC_OFFSET_TABLE_REGNUM' was not declared

Re: [C++ PATCH] Diagnose conversions from string constants to char* as forbidden, not deprecated, in c++11 and above

2014-11-25 Thread Jason Merrill
On 11/25/2014 09:41 PM, Jason Merrill wrote: Tested how, exactly? It doesn't seem to have run old-deja.exp. I tend to use the toplevel make-c++ target. Er, check-c++. Jason

Re: [C++ PATCH] Diagnose conversions from string constants to char* as forbidden, not deprecated, in c++11 and above

2014-11-25 Thread Jason Merrill
Tested how, exactly? It doesn't seem to have run old-deja.exp. I tend to use the toplevel make-c++ target. +FAIL: g++.old-deja/g++.bob/inherit1.C -std=c++11 depr (test for warnings, line 14) +FAIL: g++.old-deja/g++.bob/inherit1.C -std=c++11 (test for excess errors) +FAIL: g++.old-deja/g++.

path fixing PPC bootstrap

2014-11-25 Thread Vladimir Makarov
Mike Meissner pointed me out that my last patch broke PPC bootstrap. I submitted a quick fix for it and now I am sending the path after bootstrap on ppc is done successfully. Sorry for the inconvinience. 2014-11-25 Vladimir Makarov * ira-lives.c (process_bb_node_lives): Make code

[Patch,wwwdoc]Update 5.0 change for ARM new core cortex-m7

2014-11-25 Thread Terry Guo
Hi there, This patch will document support and tuning for Cortex-M7 in GCC 5.0 changes. Is it ok to commit? BR, Terry 2014-11-26 Terry Guo * htdocs/gcc-5/changes.html: Mention Cortex-M7. Index: htdocs/gcc-5/changes.html ==

RE: [PATCH][MIPS] Fix P5600 memory cost

2014-11-25 Thread Prachi Godbole
Hi Matthew, Sorry for the delay. I was running out of memory to build and test the patch. So was in the process of acquiring more memory. I'll commit the patch in a day or two. Regards, Prachi -Original Message- From: Matthew Fortune Sent: Tuesday, November 25, 2014 8:15 PM To: Prachi

[PATCH, ARM, libgcc] New aeabi_idiv function for armv6-m

2014-11-25 Thread Hale Wang
Hi, This patch ports the aeabi_idiv routine from Linaro Cortex-Strings (https://git.linaro.org/toolchain/cortex-strings.git), which was contributed by ARM under Free BSD license. The new aeabi_idiv routine is used to replace the one in libgcc/config/arm/lib1funcs.S. This replacement happens with

Re: patch to fix PR63527

2014-11-25 Thread Vladimir Makarov
On 2014-11-25 9:21 PM, David Edelsohn wrote: It looks like you already fixed it. I had been looking for the patch on GCC Patches. I did a quick fix as the bootstrap was broken as soon as Mike Meissner wrote me on IRC. The fix was obvious but I postponed to send it until successful bootstra

Re: [PATCH 01/05] jit.exp: Avoid embedding full paths into test results

2014-11-25 Thread Mike Stump
On Nov 25, 2014, at 5:34 PM, David Malcolm wrote: > This makes it easier to compare jit.sum files from different runs > > gcc/testsuite/ChangeLog: >* jit.dg/jit.exp (jit-dg-test): Use $name rathen than $prog >when calling jit_check_compile to avoid embedding the full path of >the test

Re: [PATCH] gcc parallel make check

2014-11-25 Thread Mike Stump
On Nov 25, 2014, at 12:15 PM, Jakub Jelinek wrote: > On Tue, Nov 25, 2014 at 03:27:40PM +0100, Tom de Vries wrote: >> This patch fixes that by ensuring that we print that unsupported message >> only once. >> >> The resulting test result comparison diff is: >> 2014-11-25 Tom de Vries >> >>

Re: [C++ PATCH] Diagnose conversions from string constants to char* as forbidden, not deprecated, in c++11 and above

2014-11-25 Thread Ville Voutilainen
On 26 November 2014 at 04:42, Jason Merrill wrote: > On 11/25/2014 09:41 PM, Jason Merrill wrote: >> >> Tested how, exactly? It doesn't seem to have run old-deja.exp. I tend Too hastily, sorry. I managed to notice that the tests adjusted in the patch failed, and then blissfully didn't look at t

Re: [PATCH v3] gcc/c-family/c-cppbuiltin.c: Let buffer enough to print host wide integer value

2014-11-25 Thread Jakub Jelinek
On Wed, Nov 26, 2014 at 09:41:16AM +0800, Chen Gang wrote: > On 11/26/14 8:31, Joseph Myers wrote: > > On Wed, 26 Nov 2014, Chen Gang wrote: > > > >> + gcc_assert (wi::fits_to_tree_p (value, char_type_node) > >> +|| wi::fits_to_tree_p (value, short_integer_type_node) > >> +|| wi::

<    1   2