Re: [PATCH] Implement -fsanitize=float-divide-by-zero

2014-04-29 Thread Tobias Burnus
Marc Glisse wrote: > On Mon, 28 Apr 2014, Marek Polacek wrote: > > > This patch implements -fsanitize=float-divide-by-zero option that can > > be used to detect division by zero even when using floating types. > > Most of the code in ubsan_instrument_division was ready for this > > so this was main

Re: -Wvariadic-macros does not print warning

2014-04-29 Thread Manuel López-Ibáñez
On 23 April 2014 20:03, Prathamesh Kulkarni wrote: > I didn't attach the patch, I am extremely sorry for the noise. > I am re-posting the mail. > This is a follow up mail to > http://gcc.gnu.org/ml/gcc-help/2014-04/msg00096.html > I have attached patch that prints the warning when passed -Wvariad

Re: [PATCH] Implement -fsanitize=float-divide-by-zero

2014-04-29 Thread Jakub Jelinek
On Tue, Apr 29, 2014 at 10:27:58AM +0200, Tobias Burnus wrote: > Thus, I think Fortran users would also prefer not to have > -fsanitize=undefined implying trapping dividing by zero. > > Thus, I wonder whether it wouldn't be more useful to provide a command-line > option > to make the floating-poi

Re: Add post_expand_call_insn hook

2014-04-29 Thread Tom de Vries
On 24-04-14 17:13, Eric Botcazou wrote: The hook is called right after expansion of calls, and allows a target to do additional processing, such as f.i. adding clobbers to CALL_INSN_FUNCTION_USAGE. Instead of using the hook, we could add code to the preparation statements operand of the differen

Re: [PATCH] Cleanup do_per_function, require less push/pop_cfun

2014-04-29 Thread Richard Biener
On Mon, 28 Apr 2014, Jan Hubicka wrote: > > On Wed, 23 Apr 2014, Richard Biener wrote: > > > > > > > > This avoids all the complex work on simple things like > > > clear_last_verified. It also makes eventually inlining all > > > calls (for example the one with the small IPA pass hack) > > > les

Re: PR debug/60929: Fix a few ICEs and other problems with -fdebug-types-sections

2014-04-29 Thread Richard Biener
On Mon, 28 Apr 2014, Cary Coutant wrote: > What are the rules for backporting to 4.9.1? Should I backport this patch? As it fixes a regression, yes. If you think it is safe to do so. Richard. > -cary > > > > 2014-04-25 Cary Coutant > > > > gcc/ > > PR debug/60929 > > * dwa

Re: Changes for if-convert to recognize simple conditional reduction.

2014-04-29 Thread Richard Biener
On Mon, Apr 28, 2014 at 10:05 PM, Richard Henderson wrote: > On 04/17/2014 06:09 AM, Yuri Rumyantsev wrote: >> + /* Build cond expression using COND and constant operand >> + of reduction rhs. */ >> + c = fold_build_cond_expr (TREE_TYPE (rhs1), >> + unshare_expr (con

Re: [PATCH (for next stage 1)] Add return type to gimple function dumps

2014-04-29 Thread Richard Biener
On Tue, Apr 29, 2014 at 2:58 AM, David Malcolm wrote: > On Thu, 2014-04-24 at 15:46 -0600, Jeff Law wrote: >> On 03/10/14 13:22, David Malcolm wrote: >> > Gimple function dumps contain the types of parameters, but not of the >> > return type. >> > >> > The attached patch fixes this omission; here'

Re: [PATCH] Typofixes and a trivial change

2014-04-29 Thread Richard Biener
On Mon, Apr 28, 2014 at 2:44 PM, Patrick Palka wrote: > On Mon, Apr 28, 2014 at 4:57 AM, Richard Biener > wrote: >> On Fri, Apr 25, 2014 at 5:03 PM, Patrick Palka wrote: >>> I forgot the ChangeLog entry: >> >> Ok. >> >> Thanks, >> Richard. > > Thanks for reviewing. May someone please commit thi

Re: [PATCH] Implement -fsanitize=float-divide-by-zero

2014-04-29 Thread Marek Polacek
On Tue, Apr 29, 2014 at 10:46:06AM +0200, Jakub Jelinek wrote: > On Tue, Apr 29, 2014 at 10:27:58AM +0200, Tobias Burnus wrote: > > Thus, I think Fortran users would also prefer not to have > > -fsanitize=undefined implying trapping dividing by zero. > > > > Thus, I wonder whether it wouldn't be m

[PING] [PATCH, ARM] Set max_insns_skipped to MAX_INSN_PER_IT_BLOCK when optimize_size for THUMB2

2014-04-29 Thread Zhenqiang Chen
Ping? OK for trunk? Thanks! -Zhenqiang > -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Zhenqiang Chen > Sent: Tuesday, February 25, 2014 5:35 PM > To: gcc-patches@gcc.gnu.org > Cc: Ramana Radhakrishnan > Subject: [PATCH, AR

[PATCH] Fix PR c++/60994 gcc does not recognize hidden/shadowed enumeration as valid nested-name-specifier

2014-04-29 Thread Momchil Velikov
Hello, gcc version 4.10.0 20140428 (experimental) (GCC) Compiling (with c++ -c -std=c++11 b.cc) the following program enum struct A { n = 3 }; int foo() { int A; return A::n; } results in the error: b.cc: In function 'int foo()': b.cc:10:10: error: 'A' is not a class, namespace, or enum

Re: [RFC] Remove PUSH_ARGS_REVERSED from the RTL expander.

2014-04-29 Thread Richard Earnshaw
On 26/04/14 14:25, Eric Botcazou wrote: >>> 2014-03-21 James Greenhalgh >>> >>> * calls.c (initialize_argument_information): Always treat >>> PUSH_ARGS_REVERSED as 1, simplify code accordingly. >>> (expand_call): Likewise. >>> (emit_library_call_calue_1): Likewise. >>> * expr

Re: [PATCH 1/2] teach mklog to get name / email from git config when available

2014-04-29 Thread Trevor Saunders
On Tue, Apr 29, 2014 at 09:08:50AM +0400, Yury Gribov wrote: > Hi Trevor, > > I think this looks rather useful. sounds great! > > +if (-d .git) { > > What about moving default name/addr (with finger, etc.) to else branch? Well, consider the case git doesn't know, that said I could do if (-d .

Re: [PATCH 2/2] allow running mklog as a filter

2014-04-29 Thread Trevor Saunders
On Tue, Apr 29, 2014 at 09:18:39AM +0400, Yury Gribov wrote: > >+# XXX We should probably accept /dev/stdin or maybe magic autodetection of > >+# being supposed to get the patch from stdin. > >+# > > Can we just set $diff to '-' if @ARGV is empty? sgtm > >+# In any case if we got the diff on std

Re: [patch 3/N] std::regex refactoring - _Executor DFS / BFS

2014-04-29 Thread Jonathan Wakely
On 28/04/14 17:14 -0400, Tim Shen wrote: On Mon, Apr 28, 2014 at 4:18 PM, Jonathan Wakely wrote: I thought I'd make a 5x speedup to the run-time of the regex matching, but I was comparing the wrong version and the improvement actually came from one of your patches yesterday - maybe this one: ht

Re: [PATCH][1/3] Fix PR54733 Optimize endian independent load/store

2014-04-29 Thread Richard Biener
On Fri, Apr 4, 2014 at 7:48 AM, Thomas Preud'homme wrote: >> From: Andreas Schwab [mailto:sch...@suse.de] >> >> Please add m68k-*-*. > >> From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- >> ow...@gcc.gnu.org] On Behalf Of Rainer Orth >> >> Just omit the { target *-*-* } completely, also a

Re: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-04-29 Thread Richard Biener
On Thu, Apr 24, 2014 at 3:34 AM, Thomas Preud'homme wrote: > See updated part 2 of the patch in attachment. Part 1 is unchanged. New > ChangeLog are as follows: > > *** gcc/ChangeLog *** > > 2014-04-23 Thomas Preud'homme > > PR tree-optimization/54733 > * tree-ssa-math-opts.c (

Re: [DOC PATCH] Rewrite docs for inline asm

2014-04-29 Thread dw
While I'm waiting to hear back from Gerald about my responses to his other corrections, I have answered one question: How does the user know what is dialect #0? Same for the others? When I originally wrote that section, I didn't know the answer (which is why I left it vague). Now I think I

Re: [PATCH][3/3] Fix PR54733 Optimize endian independent load/store

2014-04-29 Thread Richard Biener
On Thu, Apr 24, 2014 at 3:37 AM, Thomas Preud'homme wrote: > See updated part 3 of the patch in attachment. New ChangeLog are as follows > > *** gcc/ChangeLog *** > > 2014-04-23 Thomas Preud'homme > > PR tree-optimization/54733 > * tree-ssa-math-opts.c (find_bswap_load): Renamed

[PATH 0/6] ggc finalizers and TLC

2014-04-29 Thread tsaunders
Hi, First we clean up the allocation functions for gc memory by removing macros CXX_MEM_STAT_INFo makes useless, and using templates instead of autogenerating code. Then we can add support for finalizers and automatically install finalizers for types that have non trivial destructors. Trev GI

[PATCH 1/6] rm a bunch of _stat allocation functions

2014-04-29 Thread tsaunders
From: Trevor Saunders Hi, C++ default args allow us to name the function foo instead of foo_stat with a wrapper macro foo. bootstrapped + regtested x86_64-unknown-linux-gnu, ok? Trev gcc/ChangeLog: 2014-04-23 tbsaunde * dwarf2out.c (tree_add_const_value_attribute): Call g

[PATCH 6/6] move many members of target_globals out of gc memory

2014-04-29 Thread tsaunders
From: Trevor Saunders Hi, add a user of gc finalizers. bootstrapped + regtested on x86_64-unknown-linux-gnu, ok? Trev gcc/ChangeLog: * target-globals.c (target_globals::~target_globals): new destructor. (target_globals_extra): Move out of save_target_globals. (save_ta

[PATCH 2/6] don't have gengtype autocreate allocation macros for variably sized types

2014-04-29 Thread tsaunders
From: Trevor Saunders Hi, the template allocation functions won't work with things that are actually variably sized, so its simpler to stop relying on gengtype for them first. However it turns out most of the usage of variably sized things in gengtype is to deal with gengtype badness in

[PATCH 4/6] remove unused function

2014-04-29 Thread tsaunders
From: Trevor Saunders Hi, its unused so rm it. bootstrapped + regtested on x86_64-unknown-linux-gnu ok? Trev gcc/ChangeLog: *ggc.h (ggc_alloc_cleared_simd_clone_stat): Remove function. --- gcc/ggc.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/gcc/ggc.h b/gcc/ggc.h inde

[PATCH 5/6] add finalizers to ggc

2014-04-29 Thread tsaunders
From: Trevor Saunders Hi, This implements finalizers by keeping a list of registered finalizers and after every mark but before sweeping check to see if any of them are for unmarked blocks. bootstrapped + regtested on x86_64-unknown-linux-gnu, ok? Trev gcc/ChangeLog: * ggc-common.c (

Re: [PATCH 2/2] allow running mklog as a filter

2014-04-29 Thread Yury Gribov
I agree stdin gets different semantics than other files but I think that's sort of ok because it means you generated the patch somehow so presumably you can do that again if you need the patch. True but this would be a surpising behavior for ordinary Linux user. We can wait for Diego's opini

Re: [PATCH 1/6] rm a bunch of _stat allocation functions

2014-04-29 Thread Richard Biener
On Tue, Apr 29, 2014 at 1:08 PM, wrote: > From: Trevor Saunders > > Hi, > > C++ default args allow us to name the function foo instead of foo_stat with a > wrapper macro foo. > > bootstrapped + regtested x86_64-unknown-linux-gnu, ok? Ok if it also bootstraps with --enable-gather-detailed-mem-st

Re: [PATCH 4/6] remove unused function

2014-04-29 Thread Richard Biener
On Tue, Apr 29, 2014 at 1:08 PM, wrote: > From: Trevor Saunders > > Hi, > > its unused so rm it. > > bootstrapped + regtested on x86_64-unknown-linux-gnu ok? Ok. Thanks, Richard. > Trev > > gcc/ChangeLog: > > *ggc.h (ggc_alloc_cleared_simd_clone_stat): Remove function. > --- > gcc/gg

Re: [PATCH 1/2] teach mklog to get name / email from git config when available

2014-04-29 Thread Yury Gribov
On 04/29/2014 02:06 PM, Trevor Saunders wrote: +if (-d .git) { What about moving default name/addr (with finger, etc.) to else branch? Well, consider the case git doesn't know I wonder whether it's ok to force user to configure git before running mklog... -Y

Re: [PATCH 2/6] don't have gengtype autocreate allocation macros for variably sized types

2014-04-29 Thread Richard Biener
On Tue, Apr 29, 2014 at 1:08 PM, wrote: > From: Trevor Saunders > > Hi, > > the template allocation functions won't work with things that are > actually variably sized, so its simpler to stop relying on gengtype for them > first. However it turns out most of the usage of variably sized

Re: -Wvariadic-macros does not print warning

2014-04-29 Thread Prathamesh Kulkarni
On Tue, Apr 29, 2014 at 2:07 PM, Manuel López-Ibáñez wrote: > On 23 April 2014 20:03, Prathamesh Kulkarni > wrote: >> I didn't attach the patch, I am extremely sorry for the noise. >> I am re-posting the mail. >> This is a follow up mail to >> http://gcc.gnu.org/ml/gcc-help/2014-04/msg00096.htm

Re: [PATCH AARCH64] One-line tidy of bit-twiddle expression in aarch64.c

2014-04-29 Thread Richard Earnshaw
On 23/04/14 16:20, Alan Lawrence wrote: > This patch is a small tidy of a more-complicated expression that just flips a > single bit and can thus be a simple XOR. > > No regressions on aarch64-none-elf or aarch64_be-none-elf. (I've verified > code > is indeed exercised by dg-torture.exp vshuf-v

Re: [DOC PATCH] Rewrite docs for inline asm

2014-04-29 Thread Richard Earnshaw
On 29/04/14 11:47, dw wrote: > While I'm waiting to hear back from Gerald about my responses to his > other corrections, I have answered one question: > >> How does the user know what is dialect #0? Same for the others? >> >> When I originally wrote that section, I didn't know the answer (which

[PATCH] New target hook: keep_leaf_when_profiled

2014-04-29 Thread Andreas Krebbel
Hi, the attached patch adds a new target hook allowing targets to keep crtl->is_leaf true for leaf functions even if function profiling is being used. This e.g. helps s390 to omit generating a stack frame only due to calling mcount. On S/390 we call mcount before the function prologue so the mco

Re: [PATCH 5/6] add finalizers to ggc

2014-04-29 Thread Richard Biener
On Tue, Apr 29, 2014 at 1:08 PM, wrote: > From: Trevor Saunders > > Hi, > > This implements finalizers by keeping a list of registered finalizers > and after every mark but before sweeping check to see if any of them are > for unmarked blocks. > > bootstrapped + regtested on x86_64-unknown-linux

Re: [RFC][ARM] TARGET_ATOMIC_ASSIGN_EXPAND_FENV hook

2014-04-29 Thread Kugan
On 28/04/14 20:29, Ramana Radhakrishnan wrote: > On 04/26/14 11:26, Kugan wrote: >> Hi, >> >> Attached patch implements TARGET_ATOMIC_ASSIGN_EXPAND_FENV for ARM. With >> this, atomic test-case gcc.dg/atomic/c11-atomic-exec-5.c now PASS. >> >> This implementation is based on SPARC and i386 implemen

Commit: Fix building ARC, M32C and M32R backends

2014-04-29 Thread Nick Clifton
Hi Guys, I am applying the patch below in what I hope will be accepted as an obvious fix for a build problem with the ARC, M32C and M32R backends. The problem looks like this: gcc/config/m32c/m32c.c: In function 'bool m32c_illegal_subreg_p(rtx)': gcc/config/m32c/m32c.c:3178:88: erro

[Committed] [AArch64/ARM 1/3] Add execution + assembler tests of the AArch64 ZIP Intrinsics.

2014-04-29 Thread Alan Lawrence
Committed as revision 209893. Marcus Shawcroft wrote: On 27 March 2014 10:52, Alan Lawrence wrote: This adds DejaGNU tests of the existing AArch64 vzip_* intrinsics, both checking the assembler output and the runtime results. Test bodies are in separate files ready to reuse for ARM in the thir

Re: -Wvariadic-macros does not print warning

2014-04-29 Thread Manuel López-Ibáñez
This hunk in your patch doesn't seem related: @@ -509,6 +509,9 @@ Warn about missing fields in struct init Wsizeof-pointer-memaccess C ObjC C++ ObjC++ Var(warn_sizeof_pointer_memaccess) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) +Wsizeof-array-argument +C Var(warn_sizeof_array_argument) Warn

Re: [PATCH 5/6] add finalizers to ggc

2014-04-29 Thread Trevor Saunders
On Tue, Apr 29, 2014 at 02:58:11PM +0200, Richard Biener wrote: > On Tue, Apr 29, 2014 at 1:08 PM, wrote: > > From: Trevor Saunders > > > > Hi, > > > > This implements finalizers by keeping a list of registered finalizers > > and after every mark but before sweeping check to see if any of them a

[Committed] Added myself to MAINTAINERS (Write After Approval)

2014-04-29 Thread Alan Lawrence
Committed as revision 209896, following rev 209895 in which I added myself in the wrong place :-! Index: MAINTAINERS === --- MAINTAINERS (revision 209890) +++ MAINTAINERS (revision 209896) @@ -441,6 +441,7 @@ Asher Langton

[PATCH PING] Simplify a VEC_SELECT fed by its own inverse

2014-04-29 Thread Bill Schmidt
Hi, I'd like to ping this patch: http://gcc.gnu.org/ml/gcc-patches/2014-04/msg01319.html Thanks! Bill -- Bill Schmidt, Ph.D. IBM Advance Toolchain for PowerLinux IBM Linux Technology Center wschm...@linux.vnet.ibm.com wschm...@us.ibm.com

Re: [wwwdocs] Mention generic functions and explicit lambda templates in gcc-4.9/changes

2014-04-29 Thread Jason Merrill
OK. Jason

[PATCH, MIPS] Alter default number of single-precision registers

2014-04-29 Thread Matthew Fortune
Hi Richard, When MIPSr1 introduced the ability to use odd-numbered single-precision registers some implementations continued to only support even-numbered single-precision registers. Notably, loongson3a in FR=0 mode only permits the even-numbered registers to be used. For this reason and also to

Re: [RFC] Remove PUSH_ARGS_REVERSED from the RTL expander.

2014-04-29 Thread James Greenhalgh
On Fri, Apr 25, 2014 at 09:15:57PM +0100, Jeff Law wrote: > On 03/24/14 05:44, James Greenhalgh wrote: > > Which is much neater. > > > > It seems to me that this would probably be of benefit on all targets. > > > > This would be an argument for setting PUSH_ARGS_REVERSED to 1 by default > > for all

[PATCH 2/2, x86] Add palignr support for AVX2.

2014-04-29 Thread Evgeny Stupachenko
Hi, The patch adds use of palignr instruction, when we have one operand permutation like: {5 6 7 0 1 2 3 4}: Treating this as {5 6 7 8 9 a b c} on 2 operands, and therefore palignr on 5. Bootstrap and make check passed. Is it ok? Evgeny 2014-04-29 Evgeny Stupachenko * config/i386/

Re: [Patch ARM 1/3] Neon intrinsics TLC : Replace intrinsics with GNU C implementations where possible.

2014-04-29 Thread Christophe Lyon
Hi Ramana, FWIW, I have executed the current set of my tests which cover all you changes expect vmul, and I have noticed no regression. Christophe. 2014-04-28 12:44 GMT+02:00 Ramana Radhakrishnan : > I've special cased the ffast-math case for the _f32 intrinsics to prevent > the auto-vectorizer

Commit: MSP430: Fix bugs in MSP430 backend

2014-04-29 Thread Nick Clifton
Hi Guys, I am applying the patch below to the mainline and 4.9 branch. It fixes a few problems in the MSP430 backend. Specifically: * The %O operand operator did not allow for the extra bytes pushed onto the stack in large mode. * The mulhisi3 pattern was disabled inside inte

Re: -Wvariadic-macros does not print warning

2014-04-29 Thread Prathamesh Kulkarni
On Tue, Apr 29, 2014 at 6:49 PM, Manuel López-Ibáñez wrote: > This hunk in your patch doesn't seem related: Oops, Sorry. Removed that, and re-tested. > > @@ -509,6 +509,9 @@ Warn about missing fields in struct init > Wsizeof-pointer-memaccess > C ObjC C++ ObjC++ Var(warn_sizeof_pointer_memaccess

Re: -Wvariadic-macros does not print warning

2014-04-29 Thread Prathamesh Kulkarni
On Tue, Apr 29, 2014 at 7:37 PM, Prathamesh Kulkarni wrote: > On Tue, Apr 29, 2014 at 6:49 PM, Manuel López-Ibáñez > wrote: >> This hunk in your patch doesn't seem related: > Oops, Sorry. Removed that, and re-tested. >> >> @@ -509,6 +509,9 @@ Warn about missing fields in struct init >> Wsizeof-p

Re: Changes for if-convert to recognize simple conditional reduction.

2014-04-29 Thread Yuri Rumyantsev
2014-04-28 16:16 GMT+04:00 Richard Biener : > On Thu, Apr 17, 2014 at 3:09 PM, Yuri Rumyantsev wrote: >> Hi All, >> >> We implemented enhancement for if-convert phase to recognize the >> simplest conditional reduction and to transform it vectorizable form, >> e.g. statement >> if (A[i] != 0) n

Re: [PATCH 5/6] add finalizers to ggc

2014-04-29 Thread Richard Biener
On Tue, Apr 29, 2014 at 3:21 PM, Trevor Saunders wrote: > On Tue, Apr 29, 2014 at 02:58:11PM +0200, Richard Biener wrote: >> On Tue, Apr 29, 2014 at 1:08 PM, wrote: >> > From: Trevor Saunders >> > >> > Hi, >> > >> > This implements finalizers by keeping a list of registered finalizers >> > and

implement __builtin_assert_no_side_effects

2014-04-29 Thread Tom Tromey
This implements __builtin_assert_no_side_effects, aka PR c/57612. The idea is to have an easy way to assert that an expression is side-effect-free. This can be used in macros that expand their arguments more than once, to ensure that the macro's user doesn't pass in a side-effecting expression:

[PATCH][2/n] Make TODO_verify_il handle TODO_verify_stmts and TODO_verify_ssa

2014-04-29 Thread Richard Biener
This is step two - do GIMPLE stmt and SSA verification when the IL is in such state. It needs extra conditionals for IPA pass contexts which may run on inconsistent IL until fixup_cfg had a chance to run and adjust the IL for noreturn and nothrow changes (done only by ipa-pure-const). Bootstrapp

Re: implement __builtin_assert_no_side_effects

2014-04-29 Thread Richard Biener
On Tue, Apr 29, 2014 at 4:37 PM, Tom Tromey wrote: > This implements __builtin_assert_no_side_effects, aka PR c/57612. > > The idea is to have an easy way to assert that an expression is > side-effect-free. This can be used in macros that expand their > arguments more than once, to ensure that th

[committed] Avoid tail call opt if bit field reduction is needed (PR tree-optimization/60971)

2014-04-29 Thread Jakub Jelinek
Hi! I've committed following fix, approved by Richard on IRC and Jeff in the PR. process_assignment was assuming that no code needs to be emitted for gimple_assign_cast_p if the mode is the same, which is usually true, except for the case when REDUCE_BIT_FIELD in expand_expr_real_2 needs to mask o

Re: [PATCH 2/2, x86] Add palignr support for AVX2.

2014-04-29 Thread H.J. Lu
On Tue, Apr 29, 2014 at 6:50 AM, Evgeny Stupachenko wrote: > Hi, > > The patch adds use of palignr instruction, when we have one operand > permutation like: > {5 6 7 0 1 2 3 4}: > > Treating this as {5 6 7 8 9 a b c} on 2 operands, and therefore palignr on 5. > > Bootstrap and make check passed. >

Re: [PATCH (for next stage 1)] Add return type to gimple function dumps

2014-04-29 Thread David Malcolm
On Tue, 2014-04-29 at 11:16 +0200, Richard Biener wrote: > On Tue, Apr 29, 2014 at 2:58 AM, David Malcolm wrote: > > On Thu, 2014-04-24 at 15:46 -0600, Jeff Law wrote: > >> On 03/10/14 13:22, David Malcolm wrote: > >> > Gimple function dumps contain the types of parameters, but not of the > >> > r

[libcpp] modify undef diagnostic

2014-04-29 Thread Prathamesh Kulkarni
Append "evaluates to 0", in Wundef diagnostic. clang prints the following diagnostic for -Wundef: undef.c:1:5: warning: 'FOO' is not defined, evaluates to 0 [-Wundef] #if FOO ^ OK to commit ? [libcpp] * expr.c (eval_token): Modify Wundef diagnostic. [gcc/testsuite/gcc.dg/cpp] * warn-undef.c:

[PING] Contributing new gcc targets: i386-*-dragonfly and x86-64-*-dragonfly

2014-04-29 Thread John Marino
Hi folks, Does anyone have any issues with this set of patches to add support for the DragonFly targets? It's a blocker for other patches of mine that have a more general benefit, but this (relatively simple) one has to go in first. Thanks, John On 4/20/2014 21:04, John Marino wrote: > On 4/20/2

Re: [PATCH 1/2] teach mklog to get name / email from git config when available

2014-04-29 Thread segher
> +# if this is a git tree then take name and email from the git configuration > +if (-d .git) { > + $gitname = `git config user.name`; > + chomp($gitname); > + if ($gitname) { > + $name = $gitname; > + } > + > + $gitaddr = `git config user.email`; > + chomp($gitaddr); > + if ($gitaddr

Re: [PATCH 2/2, x86] Add palignr support for AVX2.

2014-04-29 Thread Richard Henderson
On 04/29/2014 06:50 AM, Evgeny Stupachenko wrote: > + if (d->one_operand_p != true) > +return false; This looks odd. Better as !d->one_operand_p. > + > + /* For an in order permutation with one operand like: {5 6 7 0 1 2 3 4} > + PALIGNR is better than PSHUFB. Check for an order in pe

Re: [PATCH 2/2, x86] Add palignr support for AVX2.

2014-04-29 Thread Evgeny Stupachenko
On Tue, Apr 29, 2014 at 6:58 PM, H.J. Lu wrote: > On Tue, Apr 29, 2014 at 6:50 AM, Evgeny Stupachenko > wrote: >> Hi, >> >> The patch adds use of palignr instruction, when we have one operand >> permutation like: >> {5 6 7 0 1 2 3 4}: >> >> Treating this as {5 6 7 8 9 a b c} on 2 operands, and t

Re: [patch 3/N] std::regex refactoring - _Executor DFS / BFS

2014-04-29 Thread Tim Shen
On Tue, Apr 29, 2014 at 6:17 AM, Jonathan Wakely wrote: > This runs much faster on trunk than with 4.9.0, so we might want to > backport your recent patches to the gcc-4_9-branch. It's faster but nothing to do with optimization. It's because my first patch set the DFS approach by default, which i

[Committed] [AArch64/ARM 2/3] Rewrite AArch64 ZIP Intrinsics using __builtin_shuffle

2014-04-29 Thread Alan Lawrence
Committed as revision 209906. A. Marcus Shawcroft wrote: On 27 March 2014 10:52, Alan Lawrence wrote: This patch replaces the temporary inline assembler for vzip_* in arm_neon.h with equivalent calls to __builtin_shuffle. These are matched by aarch64_expand_vec_perm_const{,_1} to output the s

Re: [patch 3/N] std::regex refactoring - _Executor DFS / BFS

2014-04-29 Thread Jonathan Wakely
On 29/04/14 12:54 -0400, Tim Shen wrote: On Tue, Apr 29, 2014 at 6:17 AM, Jonathan Wakely wrote: This runs much faster on trunk than with 4.9.0, so we might want to backport your recent patches to the gcc-4_9-branch. It's faster but nothing to do with optimization. It's because my first patch

Re: [PATCH 2/2, x86] Add palignr support for AVX2.

2014-04-29 Thread Evgeny Stupachenko
Thanks. The path is fixed according to your comments: diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 002d295..aa6372a 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -42807,6 +42807,79 @@ expand_vec_perm_pshufb (struct expand_vec_perm_d *d) return true;

Re: [PING] Contributing new gcc targets: i386-*-dragonfly and x86-64-*-dragonfly

2014-04-29 Thread Ian Lance Taylor
On Tue, Apr 29, 2014 at 11:37 AM, John Marino wrote: > > Does anyone have any issues with this set of patches to add support for > the DragonFly targets? It's a blocker for other patches of mine that > have a more general benefit, but this (relatively simple) one has to go > in first. It's incon

Re: [PATCH 2/2, x86] Add palignr support for AVX2.

2014-04-29 Thread Jakub Jelinek
On Tue, Apr 29, 2014 at 07:58:39AM -0700, H.J. Lu wrote: > On Tue, Apr 29, 2014 at 6:50 AM, Evgeny Stupachenko > wrote: > > The patch adds use of palignr instruction, when we have one operand > > permutation like: > > {5 6 7 0 1 2 3 4}: > > > > Treating this as {5 6 7 8 9 a b c} on 2 operands, an

Re: [patch 3/N] std::regex refactoring - _Executor DFS / BFS

2014-04-29 Thread Paolo Carlini
.. are we going to add some of these (micro-)benchmarks to the performance testsuite, yes? ;) Paolo.

Re: [PATCH, rs6000] Improve TImode add/sub

2014-04-29 Thread David Edelsohn
On Mon, Apr 28, 2014 at 3:33 PM, Pat Haugen wrote: > On 04/16/2014 10:27 PM, David Edelsohn wrote: >>> >>> >Updated patch with above comments incorporated. Bootstrap/regtest on >>> > BE/LE >>> >with no new regressions. Ok for trunk? >> >> 2014-04-08 Pat Haugen >> >> * config/rs6000/rs600

Re: [PATCH 2/2, x86] Add palignr support for AVX2.

2014-04-29 Thread Richard Henderson
On 04/29/2014 10:13 AM, Evgeny Stupachenko wrote: > + /* For a rotaion permutation with one operand like: {5 6 7 0 1 2 3 4} > + PALIGNR is better than PSHUFB. Check for a rotation in permutation. */ > + for (i = 0; i < nelt; ++i) > +if d->perm[(i + 1) & (nelt - 1)] - d->perm[i])) &

Re: [PATCH 1/2] teach mklog to get name / email from git config when available

2014-04-29 Thread Trevor Saunders
On Tue, Apr 29, 2014 at 10:39:00AM -0500, seg...@kernel.crashing.org wrote: > > +# if this is a git tree then take name and email from the git configuration > > +if (-d .git) { > > + $gitname = `git config user.name`; > > + chomp($gitname); > > + if ($gitname) { > > + $name = $gitname; > > +

C++ PATCH for DR 1351/1397 (implicit EH spec and NSDMI)

2014-04-29 Thread Jason Merrill
DR 1351 says that when calculating the implicit exception-specification for a defaulted default constructor, we need to consider whether an NSDMI could throw. Previously we have represented an uncalculated implicit eh-spec with a list of the subobject constructors that will be called, but that

Re: [PING] Contributing new gcc targets: i386-*-dragonfly and x86-64-*-dragonfly

2014-04-29 Thread John Marino
On 4/29/2014 19:23, Ian Lance Taylor wrote: > On Tue, Apr 29, 2014 at 11:37 AM, John Marino wrote: >> >> Does anyone have any issues with this set of patches to add support for >> the DragonFly targets? It's a blocker for other patches of mine that >> have a more general benefit, but this (relati

Re: [PATCH AARCH64] One-line tidy of bit-twiddle expression in aarch64.c

2014-04-29 Thread Richard Henderson
On 04/29/2014 05:42 AM, Richard Earnshaw wrote: > On 23/04/14 16:20, Alan Lawrence wrote: >> This patch is a small tidy of a more-complicated expression that just flips >> a >> single bit and can thus be a simple XOR. >> >> No regressions on aarch64-none-elf or aarch64_be-none-elf. (I've verified

Re: [C PATCH] Better column info for initializers (PR c/60139)

2014-04-29 Thread Richard Henderson
On 04/25/2014 08:44 AM, Marek Polacek wrote: > 2014-04-25 Marek Polacek > > PR c/60139 > * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn > and pedwarn_init. Use loc insted of input_location. > > * gcc.dg/pr60139.c: New test. Ok. r~

Re: Add post_expand_call_insn hook

2014-04-29 Thread Richard Henderson
On 04/29/2014 01:59 AM, Tom de Vries wrote: > On 24-04-14 17:13, Eric Botcazou wrote: >>> The hook is called right after expansion of calls, and allows a target to do >>> additional processing, such as f.i. adding clobbers to >>> CALL_INSN_FUNCTION_USAGE. >>> >>> Instead of using the hook, we could

Re: [PATCH 1/2] teach mklog to get name / email from git config when available

2014-04-29 Thread Peter Bergner
On Tue, 2014-04-29 at 10:39 -0500, seg...@kernel.crashing.org wrote: > > +# if this is a git tree then take name and email from the git configuration > > +if (-d .git) { > > + $gitname = `git config user.name`; > > + chomp($gitname); > > + if ($gitname) { > > + $name = $gitname; > > + } > >

Re: [C PATCH] Better column info for shift warnings (PR c/60351)

2014-04-29 Thread Richard Henderson
On 04/25/2014 05:45 AM, Marek Polacek wrote: > 2014-04-25 Marek Polacek > > PR c/60351 > * c-typeck.c (build_binary_op): Use location when warning about > shift count. > > * gcc.dg/pr60351.c: New test. Ok. r~

Re: [PATCH][2/n] Make TODO_verify_il handle TODO_verify_stmts and TODO_verify_ssa

2014-04-29 Thread Jeff Law
On 04/29/14 08:40, Richard Biener wrote: This is step two - do GIMPLE stmt and SSA verification when the IL is in such state. It needs extra conditionals for IPA pass contexts which may run on inconsistent IL until fixup_cfg had a chance to run and adjust the IL for noreturn and nothrow changes

Re: [patch 3/N] std::regex refactoring - _Executor DFS / BFS

2014-04-29 Thread Tim Shen
On Tue, Apr 29, 2014 at 1:25 PM, Paolo Carlini wrote: > .. are we going to add some of these (micro-)benchmarks to the performance > testsuite, yes? ;) I think the wregex one is great :) -- Regards, Tim Shen

[C PATCH] Improve warn msg (PR c/43395)

2014-04-29 Thread Marek Polacek
It's correct to warn about returning an address of a local label, but it's clumsy to say it's "local variable. We can easily distinguish between a label and a variable. Regtested/bootstrapped on x86_64-linux, ok for trunk? 2014-04-29 Marek Polacek PR c/43395 c/ * c-typeck.c (

[C PATCH] Warn about booleans in C89 mode (PR c/29467)

2014-04-29 Thread Marek Polacek
Boolean types were introduced with the advent of C99, which means we should pedwarn when _Bool is used in ansi/c89/c90/iso9899:1990 mode with -Wpedantic, similarly what we do for _Complex. We don't warn for system headers, so it's possible to include and then use bool. I made use of that to fix s

[C PATCH] Add -Wdiscarded-qualifiers (PR c/43245)

2014-04-29 Thread Marek Polacek
I think we should have an option to turn off various "discards qualifier" warnings (only for C), or to make them hard errors. This patch adds new option, called -Wdiscarded-qualifiers (as suggested in the BZ) for that. Regtested/bootstrapped on x86_64-linux, ok for trunk? 2014-04-29 Marek Polace

[C PATCH] Another column info tweak (PR c/56989)

2014-04-29 Thread Marek Polacek
At least for function calls we can use their location info to generate better diagnostics. Regtested/bootstrapped on x86_64-linux, ok for trunk? 2014-04-29 Marek Polacek PR c/56989 * c-typeck.c (default_conversion): Use better location for error call. * gcc.dg

Re: [PATCH 1/2] teach mklog to get name / email from git config when available

2014-04-29 Thread Segher Boessenkool
> > > +if (-d .git) { > > "-d .git" is, erm, not so great. > > yeah, the only reason I was willing to do it is the script already > requires being run at top level, but that annoys me too. That, but also it is equivalent to if ((-d $_)."git") { which is probably not what you wanted ;-) "use w

Re: Add post_expand_call_insn hook

2014-04-29 Thread Tom de Vries
On 29-04-14 20:56, Richard Henderson wrote: I've written this concept patch, which tries to address the same problem, but >in a different (and I hope more generic) way. > >It adds a post-emission C-code operand to define_expand. > >As an example of how this could be useful, for the define_expand

Re: [PING] Contributing new gcc targets: i386-*-dragonfly and x86-64-*-dragonfly

2014-04-29 Thread Ian Lance Taylor
On Tue, Apr 29, 2014 at 2:37 PM, John Marino wrote: > >> I don't understand the benefit of libgcc/enable-execute-stack-bsd.c. >> The code seems the same as the existing >> libgcc/enable-execute-stack-mprotect.c. All you are changing is >> omitting need_enable_exec_stack. If you just drop the Fre

Re: [DOC PATCH] Rewrite docs for inline asm

2014-04-29 Thread dw
On 4/29/2014 5:48 AM, Richard Earnshaw wrote: On 29/04/14 11:47, dw wrote: While I'm waiting to hear back from Gerald about my responses to his other corrections, I have answered one question: How does the user know what is dialect #0? Same for the others? When I originally wrote that secti

Go patch committed: Avoid memory overrun for bogus file name

2014-04-29 Thread Ian Lance Taylor
Dominik Vogt pointed out a problem in the Go frontend: it could overwrite memory incorrectly if an archive contains a file whose name is only spaces. This patch fixes the problem. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline and 4.9 branch. Ian diff -r e

[PATCH ARM] Improve ARM memset inlining

2014-04-29 Thread bin.cheng
Hi, This patch expands small memset calls into direct memory set instructions by introducing "setmemsi" pattern. For processors without NEON support, it expands memset using general store instruction. For example, strd for 4-bytes aligned addresses. For processors with NEON support, it expands m

Re: [PATCH], RFC, add support for __float128/__ibm128 types on PowerPC

2014-04-29 Thread Marc Glisse
Minor detail: + if ((flags & OPTION_MASK_FLOAT128) != 0) +rs6000_define_or_undefine_macro (define_p, "__FLOAT128__"); I recently added __SIZEOF_FLOAT128__ to the x86 target to advertise the availability of __float128, it would be good if we had a common macro (it can be in addition to __F

RE: [PATCH][3/3] Fix PR54733 Optimize endian independent load/store

2014-04-29 Thread Thomas Preud'homme
Hi Richard, I addressed all your comments but the ones below. > From: Richard Biener [mailto:richard.guent...@gmail.com] > > + /* Convert the result of load if necessary. */ > + if (!useless_type_conversion_p (TREE_TYPE (tgt), > +

Re: [PATCH, MIPS] Alter default number of single-precision registers

2014-04-29 Thread Richard Sandiford
Matthew Fortune writes: > Hi Richard, > > When MIPSr1 introduced the ability to use odd-numbered single-precision > registers some implementations continued to only support even-numbered > single-precision registers. Notably, loongson3a in FR=0 mode only > permits the even-numbered registers to b

Re: [PATCH] Implement -fsanitize=float-divide-by-zero

2014-04-29 Thread Jakub Jelinek
On Tue, Apr 29, 2014 at 11:34:50AM +0200, Marek Polacek wrote: > Ran ubsan testsuite (-m32/-m64) + bootstrap-ubsan on x86_64-linux, ok now? > > 2014-04-29 Marek Polacek > > * gcc.c (sanitize_spec_function): Handle SANITIZE_FLOAT_DIVIDE. > * builtins.def: Initialize builtins even fo

RE: [PATCH][3/3] Fix PR54733 Optimize endian independent load/store

2014-04-29 Thread Thomas Preud'homme
> From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Thomas Preud'homme > > > From: Richard Biener [mailto:richard.guent...@gmail.com] > > > > + /* Convert the result of load if necessary. */ > > + if (!useless_type_conversio