Re: How my codes comply with gcc code formatting?

2014-03-05 Thread Marc Glisse
yet: http://gcc.gnu.org/wiki/FormattingCodeForGCC (you can wrap that in a function and use an autocmd to enable it only for some directories for instance) -- Marc Glisse

[v3] LWG 2106: move_iterator::reference

2014-03-05 Thread Marc Glisse
to a temporary). Tested on x86_64-linux-gnu. Stage 1? 2014-04-01 Marc Glisse marc.gli...@inria.fr PR libstdc++/59434 * include/bits/stl_iterator.h (move_iterator::reference, move_iterator::operator*): Implement LWG 2106. * testsuite/24_iterators/move_iterator/dr2106.cc: New

Re: [v3] LWG 2106: move_iterator::reference

2014-03-05 Thread Marc Glisse
:-) Believe it or not, I did look at other occurences in the code, and didn't hit any that used such a keyword. Now that I know to look for it, there is indeed _GLIBCXX_RESOLVE_LIB_DEFECTS (I'll add it), but it is missing in a lot of places. -- Marc Glisse

Re: [PATCH] Properly do the LTO bytecode version check

2014-03-04 Thread Marc Glisse
, could we downgrade this version mismatch error to a warning and use the non-LTO code? (Or does that need to be done in ld?) The current workaround is to strip the objects involved I think. -- Marc Glisse

Re: calloc = malloc + memset

2014-03-03 Thread Marc Glisse
opt pass (even if it requires making its lattice more generic). Assuming the passes have a chance of being reordered, I'll try to understand how strlen works. Thanks for the comments, -- Marc Glisse

[v3] Slightly improve operator new

2014-03-02 Thread Marc Glisse
on x86_64-linux-gnu. Stage 1? 2014-03-03 Marc Glisse marc.gli...@inria.fr * libsupc++/new_op.cc: Factor the calls to malloc, use __builtin_expect. * libsupc++/new_opnt.cc: Likewise. -- Marc GlisseIndex: libsupc++/new_op.cc

Optimize n?rotate(x,n):x

2014-03-01 Thread Marc Glisse
doesn't have a rotate instruction and the shift amount is almost always 0. Passes bootstrap+testsuite on x86_64-linux-gnu. 2014-03-01 Marc Glisse marc.gli...@inria.fr PR tree-optimization/59100 gcc/ * tree-ssa-phiopt.c (neutral_element_p, absorbing_element_p): New

Re: calloc = malloc + memset

2014-03-01 Thread Marc Glisse
On Sat, 1 Mar 2014, Paolo Carlini wrote: Hi On 28/feb/2014, at 23:48, Marc Glisse marc.gli...@inria.fr wrote: Hello, this is a stage 1 patch, and I'll ping it then, but if you have comments now... Passes bootstrap+testsuite on x86_64-linux-gnu. 2014-02-28 Marc Glisse marc.gli

Re: [PATCH v2] Fix PR c++/25940

2014-03-01 Thread Marc Glisse
previously defined here, previous); It seems strange that both the new and the old declarations are at the same location... -- Marc Glisse

calloc = malloc + memset

2014-02-28 Thread Marc Glisse
Hello, this is a stage 1 patch, and I'll ping it then, but if you have comments now... Passes bootstrap+testsuite on x86_64-linux-gnu. 2014-02-28 Marc Glisse marc.gli...@inria.fr PR tree-optimization/57742 gcc/ * tree-ssa-forwprop.c (simplify_malloc_memset): New function

Re: builtin fe[gs]etround

2014-02-24 Thread Marc Glisse
On Mon, 24 Feb 2014, Richard Biener wrote: On Sun, Feb 23, 2014 at 12:09 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, a natural first step to optimize changes of rounding modes seems to be making these 2 functions builtins. I don't know exactly how far optimizations will be able to go

Re: builtin fe[gs]etround

2014-02-24 Thread Marc Glisse
the 'volatile' in the asms isn't needed. Right, I had it because of PR 56027 where we don't use fesetround but the SSE intrinsics. But according to your comment #3 there, volatile is needed even with fesetround. -- Marc Glisse

[v3] complex functions with expression template reals

2014-02-23 Thread Marc Glisse
for stage 1? 2014-02-23 Marc Glisse marc.gli...@inria.fr * include/std/complex (__complex_exp, pow): Specify the template parameter in calls to std::polar, for expression templates. -- Marc GlisseIndex: libstdc++-v3/include/std/complex

builtin fe[gs]etround

2014-02-23 Thread Marc Glisse
or advice here? Regtested on x86_64-linux-gnu, certainly not for 4.9. 2014-02-23 Marc Glisse marc.gli...@inria.fr gcc/ * builtins.def (BUILT_IN_FEGETROUND, BUILT_IN_FESETROUND): Add. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1, call_may_clobber_ref_p_1): Handle them

Re: [v3] complex functions with expression template reals

2014-02-23 Thread Marc Glisse
On Sun, 23 Feb 2014, Paolo Carlini wrote: On 02/23/2014 11:32 AM, Marc Glisse wrote: Hello, looking at this question: http://stackoverflow.com/q/21737186/1918193 I was surprised to see that libstdc++'s std::complex basically just works with user-defined types, even weird expression template

[libstdc++-v3] PR 60308: leak in deque constructor

2014-02-22 Thread Marc Glisse
Hello, this fixes a bug I introduced when adding noexcept all over the place by reverting the guilty bit. Tested with no regression on x86_64-linux-gnu, and checked that the leak has disappeared in the PR. 2014-02-22 Marc Glisse marc.gli...@inria.fr PR libstdc++/60308

Re: [C,C++] integer constants in attribute arguments

2014-02-06 Thread Marc Glisse
On Wed, 5 Feb 2014, Andreas Schwab wrote: Marc Glisse marc.gli...@inria.fr writes: On Wed, 5 Feb 2014, Andreas Schwab wrote: Wrt. the function decl it should probably just be changed to a variable decl. Alignments on function decls are kind of exotic. Good idea. How about this patch

Re: [PATCH] Add alloc_align and assume_aligned attributes (PR middle-end/60092)

2014-02-06 Thread Marc Glisse
to the builtin (but it doesn't hurt). -- Marc Glisse

Re: [C,C++] integer constants in attribute arguments

2014-02-05 Thread Marc Glisse
are already tested elsewhere, etc. // { dg-do compile { target x86_64-*linux-gnu } } -- Marc Glisse

Re: [C,C++] integer constants in attribute arguments

2014-02-05 Thread Marc Glisse
On Wed, 5 Feb 2014, Jakub Jelinek wrote: On Wed, Feb 05, 2014 at 09:58:28AM +0100, Marc Glisse wrote: On Wed, 5 Feb 2014, Jakub Jelinek wrote: On Wed, Feb 05, 2014 at 09:28:16AM +0100, Andreas Schwab wrote: Feel free to replace 8 with 16 in the initialization of size (you can commit

Re: [C,C++] integer constants in attribute arguments

2014-02-05 Thread Marc Glisse
, I certainly won't object). -- Marc Glisse

Re: [C,C++] integer constants in attribute arguments

2014-02-05 Thread Marc Glisse
On Wed, 5 Feb 2014, Andreas Schwab wrote: Marc Glisse marc.gli...@inria.fr writes: On Wed, 5 Feb 2014, Dominique Dhumieres wrote: I'll give it a day (it can easily be changed again later). IMO it would be better (more general) to use a dg-require-effective-target with the corresponding

Re: [i386] Replace builtins with vector extensions

2014-02-05 Thread Marc Glisse
Hello, I was wondering if the new #pragma target in *mmintrin.h make this approach more acceptable for 4.10? http://gcc.gnu.org/ml/gcc-patches/2013-04/msg00374.html On Sun, 7 Apr 2013, Marc Glisse wrote: Hello, the attached patch is very incomplete (it passes bootstrap+testsuite

Re: [C,C++] integer constants in attribute arguments

2014-02-04 Thread Marc Glisse
On Tue, 4 Feb 2014, Andreas Schwab wrote: Marc Glisse marc.gli...@inria.fr writes: Index: gcc/testsuite/g++.dg/cpp0x/constexpr-attribute2.C === --- gcc/testsuite/g++.dg/cpp0x/constexpr-attribute2.C (revision 0) +++ gcc

Re: [C,C++] integer constants in attribute arguments

2014-02-03 Thread Marc Glisse
On Mon, 3 Feb 2014, Jason Merrill wrote: On 01/18/2014 05:33 PM, Marc Glisse wrote: So when we have: __attribute__((nonnull(bar,bar))) the parser will keep bar as an identifier for the first argument, but parse the second one as an expr-list and thus find the associated function_decl. OK

Re: [C,C++] integer constants in attribute arguments

2014-02-02 Thread Marc Glisse
On Sun, 2 Feb 2014, Joseph S. Myers wrote: On Sat, 1 Feb 2014, Marc Glisse wrote: Ping http://gcc.gnu.org/ml/gcc-patches/2014-01/msg01168.html As I understand it, this is only relevant to C++ (in C you should have an INTEGER_CST here, and if you don't then default_conversion won't give you

Re: [C,C++] integer constants in attribute arguments

2014-02-01 Thread Marc Glisse
Ping http://gcc.gnu.org/ml/gcc-patches/2014-01/msg01168.html (conversation starts at http://gcc.gnu.org/ml/gcc-patches/2013-11/msg03822.html ) On Sat, 18 Jan 2014, Marc Glisse wrote: On Thu, 2 Jan 2014, Jason Merrill wrote: On 11/30/2013 05:41 AM, Marc Glisse wrote: for some reason one

Re: [C++,doc] vector conditional expression

2014-01-30 Thread Marc Glisse
, but no promise as to when I might get to it. -- Marc Glisse

Re: [PATCH] Fix PR59993

2014-01-30 Thread Marc Glisse
get_prop_source_stmt and defcodefor_name in tree-ssa-forwprop.c, but you don't seem to like them. Do they have a particular drawback or is it just easier to rewrite the code than to remember how to use those? I am asking so I know whether I can / should use them in my future patches. -- Marc Glisse

Re: [C++,doc] vector conditional expression

2014-01-25 Thread Marc Glisse
implemented, it would likely require a different attribute, defining a different type. It would be quite a bit of work introducing that in gcc. -- Marc Glisse

[build] PR 43538: Don't overwrite CXXFLAGS_FOR_TARGET in config/mt-gnu

2014-01-23 Thread Marc Glisse
CXXFLAGS_FOR_TARGET and checked that it now propagates to libstdc++ and others. config/ChangeLog: 2014-01-23 Marc Glisse marc.gli...@inria.fr PR target/43538 * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET. -- Marc GlisseIndex: config/mt-gnu

Re: [C++,doc] vector conditional expression

2014-01-22 Thread Marc Glisse
Gerald, are you ok with this version? Jason's approval is conditional to your opinion ;-) On Tue, 31 Dec 2013, Marc Glisse wrote: On Mon, 2 Dec 2013, Gerald Pfeifer wrote: On Mon, 2 Dec 2013, Marc Glisse wrote: Index: doc/extend.texi

Re: [C PATCH] Warn about unused RHS of COMPOUND_EXPR (PR c/59871)

2014-01-21 Thread Marc Glisse
and update the comment before. (you may need to cast the return of memcpy to void, which makes more sense) -- Marc Glisse

Re: [Patch] Fix regex multiple consecutive quantifiers bug.

2014-01-20 Thread Marc Glisse
. In any case, reducing the testcase can only make it easier to understand the issue. -- Marc Glisse

Re: [C,C++] integer constants in attribute arguments

2014-01-18 Thread Marc Glisse
On Thu, 2 Jan 2014, Jason Merrill wrote: On 11/30/2013 05:41 AM, Marc Glisse wrote: for some reason one of the attributes can see a FUNCTION_DECL where others see an IDENTIFIER_NODE, I didn't try to understand why and just added that check to the code. Please do check. In the C front-end

[C++] PR58950: warn for unused __builtin_shuffle result

2014-01-03 Thread Marc Glisse
Hello, this is the piece of patch you commented on in the PR. Bootstrap+testsuite on x86_64-unknown-linux-gnu. 2014-01-03 Marc Glisse marc.gli...@inria.fr PR c++/58950 gcc/cp/ * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR. gcc/testsuite/ * g++.dg

[C++] PR59378: __builtin_shuffle in templates

2014-01-01 Thread Marc Glisse
Hello, this patch makes build_x_vec_perm_expr more similar to the other build_x_* functions (I don't know why I had imagined it wouldn't be necessary). Bootstrap+testsuite on x86_64-unknown-linux-gnu. 2014-01-01 Marc Glisse marc.gli...@inria.fr PR c++/59378 gcc/cp

[C++] Advertise -fext-numeric-literals in error messages

2014-01-01 Thread Marc Glisse
recognized by -fext-numeric-literals before printing this text, but that's harder, someone else can do that later. No testcase because notes are pruned in the testsuite. Bootstrap+testsuite on x86_64-unknown-linux-gnu. 2014-01-01 Marc Glisse marc.gli...@inria.fr PR c++/59087 gcc/cp

[C++] sfinae implicit-explicit construction

2014-01-01 Thread Marc Glisse
Hello, this patch fixes the issue reported at http://stackoverflow.com/q/20860535/1918193 that the error we get when implicitly constructing from an initializer list using an explicit constructor doesn't have sfinae magic. Bootstrap+testsuite on x86_64-unknown-linux-gnu. 2014-01-01 Marc

Re: [C++,doc] vector conditional expression

2013-12-31 Thread Marc Glisse
On Mon, 2 Dec 2013, Gerald Pfeifer wrote: On Mon, 2 Dec 2013, Marc Glisse wrote: Index: doc/extend.texi === +In C++, the ternary operator @code{?:} is available. @code{a?b:c}, where +@code{b} and @code{c} are vectors of the same

Re: [C,C++] integer constants in attribute arguments

2013-12-31 Thread Marc Glisse
Ping http://gcc.gnu.org/ml/gcc-patches/2013-11/msg03822.html On Sat, 30 Nov 2013, Marc Glisse wrote: Hello, we currently reject: constexpr int s = 32; typedef double VEC __attribute__ ((__vector_size__ (s))); and similarly for other attributes, while we accept s+0 or (int)s, etc. The code

[C++] PR59641: error recovery in vector condition

2013-12-31 Thread Marc Glisse
Hello, here is a simple patch for error recovery. We already check the arguments earlier, but force_rvalue can replace them with errors. Bootstrap+testsuite on x86_64-unknown-linux-gnu. 2014-01-01 Marc Glisse marc.gli...@inria.fr PR c++/59641 gcc/cp/ * call.c

Re: [PR tree-optimization/59149] fail on invalid arguments to flags_from_decl_or_type

2013-12-12 Thread Marc Glisse
On Thu, 12 Dec 2013, Aldy Hernandez wrote: flags_from_decl_or_type() only handles a TYPE or DECL. Make this explicit instead. I also added a check in the use in trans-mem.c, just in case. The subsequent conditionals should take care of the TM case. It would be nice if Marc Glisse could

[C++,doc] vector conditional expression

2013-12-02 Thread Marc Glisse
Ping. On Fri, 13 Sep 2013, Marc Glisse wrote: Ping http://gcc.gnu.org/ml/gcc-patches/2013-08/msg01381.html On Fri, 23 Aug 2013, Marc Glisse wrote: On Sun, 4 Aug 2013, Gerald Pfeifer wrote: On Sat, 13 Jul 2013, Marc Glisse wrote: 2013-07-14 Marc Glisse marc.gli...@inria.fr gcc/cp

Re: [C++,doc] vector conditional expression

2013-12-02 Thread Marc Glisse
size. A vector of 8 int and a vector of 4 long have the same size but not the same number of elements. For semantics, we want the same number of elements. To match the hardware, we want the same size. -- Marc Glisse

[C,C++] integer constants in attribute arguments

2013-11-30 Thread Marc Glisse
-gnu. 2013-11-30 Marc Glisse marc.gli...@inria.fr PR c++/53017 PR c++/59211 gcc/c-family/ * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute, handle_vector_size_attribute, handle_nonnull_attribute): Call default_conversion on the attribute

Re: [PATCH] Handle vector increment/decrement in build_unary_op

2013-11-26 Thread Marc Glisse
On Tue, 26 Nov 2013, Tom de Vries wrote: * g++.dg/pr59032.C: New testcase. * gcc.dg/pr59032.c: Same. I didn't check very carefully, but they look similar. If they are indeed the same, could it move to c-c++-common? -- Marc Glisse

Re: [RFC] replace malloc with a decl on the stack

2013-11-24 Thread Marc Glisse
On Sun, 24 Nov 2013, Florian Weimer wrote: On 11/12/2013 04:22 PM, Marc Glisse wrote: On Tue, 12 Nov 2013, Ondřej Bílka wrote: Anyway you need a better analysis to determine if user called realloc on converted pointer. Note that I am checking if the argument of free is the same

Re: [PATCH] Support addsub/subadd as non-isomorphic operations for SLP vectorizer.

2013-11-23 Thread Marc Glisse
to the trunk, otherwise my patch could not pass the test. It seems that I was wrong in the PR (I can't remember where I read that misleading info at the time), but Uros seems to be handling it just fine :-) -- Marc Glisse

Re: [PATCH] Support addsub/subadd as non-isomorphic operations for SLP vectorizer.

2013-11-22 Thread Marc Glisse
On Thu, 21 Nov 2013, Cong Hou wrote: On Thu, Nov 21, 2013 at 4:39 PM, Marc Glisse marc.gli...@inria.fr wrote: On Thu, 21 Nov 2013, Cong Hou wrote: While I added the new define_insn_and_split for vec_merge, a bug is exposed: in config/i386/sse.md, [ define_expand xop_vmfrczmode2 ] only takes

Re: [PATCH] Support addsub/subadd as non-isomorphic operations for SLP vectorizer.

2013-11-21 Thread Marc Glisse
that this patch should be applied before the one I sent earlier (sorry for sending them in wrong order). This is PR 56788. Your patch seems strange to me and I don't think it fixes the real issue, but I'll let more knowledgeable people answer. -- Marc Glisse

Re: Use MPFR for real.c decimal-string-to-binary conversions (PR 21718)

2013-11-20 Thread Marc Glisse
): Remove prototype. * simplify-rtx.c (simplify_const_unary_operation): Do not fold SQRT using real_sqrt. I think you can close PR 55950 with that one. -- Marc Glisse

Re: Use MPFR for real.c decimal-string-to-binary conversions (PR 21718)

2013-11-20 Thread Marc Glisse
On Wed, 20 Nov 2013, Joseph S. Myers wrote: On Wed, 20 Nov 2013, Marc Glisse wrote: On Wed, 20 Nov 2013, Joseph S. Myers wrote: This patch removes real_sqrt. (I rather hope that in general little if any floating-point constant folding is happening on RTL - it doesn't seem like the sort

Re: [PATCH] add auto_vec

2013-11-18 Thread Marc Glisse
with stack_vec if the initial creation size was a compile time constant or auto_vec otherwise. Why not use stack_vecT, 0? You could partially specialize it if there is waste, and you could make the 0 implicit. -- Marc Glisse

[v3] Missing uglification

2013-11-13 Thread Marc Glisse
Bootstrap and testsuite on x86_64-unknown-linux-gnu. The main other issue in that PR will require a UDL specialist. 2013-11-13 Marc Glisse marc.gli...@inria.fr PR libstdc++/59087 * include/ext/pod_char_traits.h: Uglify V, I and S. -- Marc GlisseIndex: include/ext

Re: [RFC] replace malloc with a decl on the stack

2013-11-12 Thread Marc Glisse
with a more general framework that makes this small case irrelevant, I will gladly welcome it and we can easily remove the small case. -- Marc Glisse

Re: [RFC] replace malloc with a decl on the stack

2013-11-12 Thread Marc Glisse
apparently) considered exit as safe as free :-( -- Marc Glisse

Re: [RFC] replace malloc with a decl on the stack

2013-11-12 Thread Marc Glisse
On Tue, 12 Nov 2013, Ondřej Bílka wrote: On Tue, Nov 12, 2013 at 01:41:24PM +0100, Marc Glisse wrote: On Tue, 12 Nov 2013, Ondřej Bílka wrote: I am trying to get something to actually work and be accepted in gcc. That may mean being conservative. That also may mean that you will cover only

Re: [PATCH] Isolate erroneous paths optimization -- preserve *0.

2013-11-12 Thread Marc Glisse
is the NULL dereference. I assume the second LHS should be RHS. Don't you want to mark it somehow so the next DCE doesn't remove it? For PR59083, signals as yet another control flow mechanism are a pain... -- Marc Glisse

Re: [RFC] replace malloc with a decl on the stack

2013-11-12 Thread Marc Glisse
for the code I started with to be optimized. -- Marc Glisse

Re: [PATCH] Isolate erroneous paths optimization -- preserve *0.

2013-11-12 Thread Marc Glisse
On Tue, 12 Nov 2013, Jeff Law wrote: On 11/12/13 10:14, Marc Glisse wrote: You didn't like Jakub's comment about __builtin_unreachable? No, it's certainly not appropriate for this optimization. The problem with using builtin_unreachable is if you do reach that point, you fall

Re: [RFC] replace malloc with a decl on the stack

2013-11-11 Thread Marc Glisse
On Mon, 11 Nov 2013, Richard Biener wrote: On Sun, Nov 10, 2013 at 4:27 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, I am posting this patch to get some feedback on the approach. The goal is to replace malloc+free with a stack allocation (a decl actually) when the size is a small

Re: [RFC] replace malloc with a decl on the stack

2013-11-11 Thread Marc Glisse
On Mon, 11 Nov 2013, Ondřej Bílka wrote: On Sun, Nov 10, 2013 at 04:27:00PM +0100, Marc Glisse wrote: Hello, I am posting this patch to get some feedback on the approach. The goal is to replace malloc+free with a stack allocation (a decl actually) when the size is a small constant. Why

Missing line (?) in better_state in ipa-pure-const.c

2013-11-11 Thread Marc Glisse
Hello, this patch passed bootstrap+testsuite. I don't have a testcase, the code just looked strange. 2013-11-05 Marc Glisse marc.gli...@inria.fr PR tree-optimization/59077 * ipa-pure-const.c (better_state): Update *state. -- Marc GlisseIndex: gcc/ipa-pure-const.c

[RFC] replace malloc with a decl on the stack

2013-11-10 Thread Marc Glisse
Hello, I am posting this patch to get some feedback on the approach. The goal is to replace malloc+free with a stack allocation (a decl actually) when the size is a small constant. For testing, I highjacked the leaf attribute, but it isn't right, I'll remove it from the list (not sure what

Re: [RFC] replace malloc with a decl on the stack

2013-11-10 Thread Marc Glisse
On Sun, 10 Nov 2013, Marc Glisse wrote: I am posting this patch to get some feedback on the approach. The goal is to replace malloc+free with a stack allocation (a decl actually) when the size is a small constant. A slightly updated version that handles abort and if(VAR==0) where VAR

Re: [RFA][PATCH] Minor fix to aliasing machinery

2013-11-08 Thread Marc Glisse
this small bit of computation with double_int when so much else assumes HWI is enough, but why not... 2013-11-09 Marc Glisse marc.gli...@inria.fr Jeff Law l...@redhat.com gcc/ * tree-ssa-alias.c (stmt_kills_ref_p_1): Use ao_ref_init_from_ptr_and_size for builtins. gcc

Re: [RFA][PATCH] Minor fix to aliasing machinery

2013-11-06 Thread Marc Glisse
[Discussion started in http://gcc.gnu.org/ml/gcc-patches/2013-10/msg02472.html ] On Wed, 30 Oct 2013, Marc Glisse wrote: On Wed, 30 Oct 2013, Richard Biener wrote: Btw, get_addr_base_and_unit_offset may also return an offsetted MEM_REF (from MEM [p_3, 17] for example). As we are interested

Re: [RFA][PATCH] Minor fix to aliasing machinery

2013-11-06 Thread Marc Glisse
On Wed, 6 Nov 2013, Richard Biener wrote: On Wed, Nov 6, 2013 at 1:19 PM, Marc Glisse marc.gli...@inria.fr wrote: [Discussion started in http://gcc.gnu.org/ml/gcc-patches/2013-10/msg02472.html ] On Wed, 30 Oct 2013, Marc Glisse wrote: On Wed, 30 Oct 2013, Richard Biener wrote: Btw

Re: PR 58958: wrong aliasing info

2013-11-05 Thread Marc Glisse
bootstraps: it takes forever and confuses contrib/compare_tests) 2013-11-05 Marc Glisse marc.gli...@inria.fr PR tree-optimization/58958 gcc/ * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Use get_addr_base_and_unit_offset instead of get_ref_base_and_extent. gcc/testsuite

Re: Aliasing: look through pointer's def stmt

2013-11-05 Thread Marc Glisse
On Mon, 4 Nov 2013, Richard Biener wrote: Marc Glisse marc.gli...@inria.fr wrote: On Mon, 4 Nov 2013, Richard Biener wrote: Well, host_integer_p (, 0) looks correct to me. But ... Ok, I'll put it back. Er, actually host_integerp(, 0) can't work, because arithmetic on pointers is done

Re: [RFA][PATCH] Isolate erroneous paths optimization

2013-11-05 Thread Marc Glisse
disable this optimization in the Go frontend. Shouldn't go use -fno-delete-null-pointer-checks by default then? That should disable this optimization and others that rely on the same idea. -- Marc Glisse

Re: Re-factor tree.h - Part 1

2013-11-05 Thread Marc Glisse
probably are better off in their new location, so you can ignore my post. -- Marc Glisse

Re: PR 58958: wrong aliasing info

2013-11-04 Thread Marc Glisse
On Mon, 4 Nov 2013, Richard Biener wrote: On Fri, Nov 1, 2013 at 11:39 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, the issue was described in the PR and the message linked from there. ao_ref_init_from_ptr_and_size calls get_ref_base_and_extent, which may detect an array_ref of variable

Re: PR 58958: wrong aliasing info

2013-11-04 Thread Marc Glisse
On Mon, 4 Nov 2013, Richard Biener wrote: On Mon, Nov 4, 2013 at 11:55 AM, Richard Biener richard.guent...@gmail.com wrote: On Fri, Nov 1, 2013 at 11:39 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, the issue was described in the PR and the message linked from

Re: Aliasing: look through pointer's def stmt

2013-11-04 Thread Marc Glisse
start the function with: HOST_WIDE_INT ssize1 = (HOST_WIDE_INT)size1; and replace size1 with ssize1 through the function. Is the reason of keeping size[12] unsigned for documentation? Or am I missing a reason why I may be breaking things? -- Marc Glisse

Re: PR 58958: wrong aliasing info

2013-11-04 Thread Marc Glisse
On Mon, 4 Nov 2013, Richard Biener wrote: On Mon, Nov 4, 2013 at 12:18 PM, Marc Glisse marc.gli...@inria.fr wrote: On Mon, 4 Nov 2013, Richard Biener wrote: On Mon, Nov 4, 2013 at 11:55 AM, Richard Biener richard.guent...@gmail.com wrote: On Fri, Nov 1, 2013 at 11:39 PM, Marc Glisse

Re: Patch RFA: With -fnon-call-exceptions sync builtins may throw

2013-11-04 Thread Marc Glisse
] Error 1 -- Marc Glisse

Re: [v3 patch] Implement N3421 - make functors greater

2013-11-01 Thread Marc Glisse
, it will be convenient now we have those functors (for my own code, not the STL): templatetypename RandomAccessIterator, typename Compare = std::lessvoid void sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp = {}); -- Marc Glisse

Re: PR 58834: __builtin_shuffle in a template

2013-11-01 Thread Marc Glisse
On Fri, 1 Nov 2013, Jason Merrill wrote: On 10/31/2013 07:03 PM, Marc Glisse wrote: * pt.c (value_dependent_expression_p): Handle null argument. What is calling this with a null argument? The recursive call near the end of the function checks for null there. See http://gcc.gnu.org

Re: PR 58834: __builtin_shuffle in a template

2013-11-01 Thread Marc Glisse
On Fri, 1 Nov 2013, Jason Merrill wrote: On 11/01/2013 11:13 AM, Marc Glisse wrote: position). I can make it not call value_dependent_expression_p with a null argument, but it seems more general to let value_dependent_expression_p handle 0 like a number of other functions already do. OK

PR 58958: wrong aliasing info

2013-11-01 Thread Marc Glisse
. Bootstrap+testsuite on x86_64-unknown-linux-gnu. 2013-11-04 Marc Glisse marc.gli...@inria.fr PR tree-optimization/ gcc/ * tree-dfa.h (get_addr_base_and_unit_offset_1): Add error reporting. * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Use

Re: Aliasing: look through pointer's def stmt

2013-10-31 Thread Marc Glisse
-unknown-linux-gnu). I don't really know how safe it is. I couldn't use host_integerp(,1) since it returns false for (size_t)(-1) on x86_64, and host_integerp(,0) seemed strange, but I could use it if you want. 2013-11-01 Marc Glisse marc.gli...@inria.fr gcc/ * tree-ssa-alias.h

PR 58834: __builtin_shuffle in a template

2013-10-31 Thread Marc Glisse
Hello, __builtin_shuffle with 2 arguments is represented as having 3 arguments, the second being 0, which isn't supported here. Bootstrap+testsuite on x86_64-unknown-linux-gnu. 2013-11-01 Marc Glisse marc.gli...@inria.fr PR c++/58834 gcc/cp/ * pt.c

Re: Aliasing: look through pointer's def stmt

2013-10-30 Thread Marc Glisse
On Wed, 30 Oct 2013, Richard Biener wrote: On Wed, Oct 30, 2013 at 1:09 AM, Marc Glisse marc.gli...@inria.fr wrote: On Tue, 29 Oct 2013, Richard Biener wrote: For the POINTER_PLUS_EXPR offset argument you should use int_cst_value () to access it (it will unconditionally sign-extend) and use

Re: [RFA][PATCH] Minor fix to aliasing machinery

2013-10-30 Thread Marc Glisse
On Wed, 30 Oct 2013, Richard Biener wrote: Btw, get_addr_base_and_unit_offset may also return an offsetted MEM_REF (from MEM [p_3, 17] for example). As we are interested in pointers this could be handled by not requiring a memory reference but extracting the base address and offset, covering

Re: patch to improve register preferencing in IRA and to *remove regmove* pass

2013-10-30 Thread Marc Glisse
be better to run a full CSE/propogation pass on it through, bu +but that has not yet been attempted. bu? through - though? -- Marc Glisse

Re: free is a killer

2013-10-29 Thread Marc Glisse
On Mon, 28 Oct 2013, Jeff Law wrote: On 10/28/13 16:05, Marc Glisse wrote: I checked and it does the wrong thing (I don't have the testcase handy anymore, but it shouldn't be hard to recreate one), I even wrote a patch (attached) but it is related to: http://gcc.gnu.org/ml/gcc-patches/2013-10

Re: [RFA][PATCH] Minor fix to aliasing machinery

2013-10-29 Thread Marc Glisse
) -- Marc Glisse

Re: Aliasing: look through pointer's def stmt

2013-10-29 Thread Marc Glisse
we ignore in enough other places similar to this to ignore ... Like this? (passes bootstrap+testsuite on x86_64-linux-gnu) 2013-10-30 Marc Glisse marc.gli...@inria.fr gcc/ * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Look for a POINTER_PLUS_EXPR in the defining

Re: Apply attribute returns_nonnull in libiberty

2013-10-28 Thread Marc Glisse
On Fri, 11 Oct 2013, Marc Glisse wrote: Hello, here are some uses for returns_nonnull in libiberty. Bootstrap+testsuite (default languages) on x86_64-unknown-linux-gnu. 2013-10-11 Marc Glisse marc.gli...@inria.fr PR tree-optimization/58689 include/ * ansidecl.h

Re: free is a killer

2013-10-28 Thread Marc Glisse
On Mon, 28 Oct 2013, Jeff Law wrote: On 10/26/13 01:15, Marc Glisse wrote: Hello, this patch teaches gcc that free kills the memory its argument points to. The equality test is probably too strict, I guess we can loosen it later (unless you have suggestions?). Note that the corresponding

free is a killer

2013-10-26 Thread Marc Glisse
it is testing for equality between a pointer and a mem_ref, which is unlikely to happen. Bootstrap+testsuite on x86_64-unknown-linux-gnu. 2013-10-27 Marc Glisse marc.gli...@inria.fr PR tree-optimization/19831 gcc/ * tree-ssa-alias.c (stmt_kills_ref_p_1): Handle BUILT_IN_FREE

Re: Aliasing: look through pointer's def stmt

2013-10-26 Thread Marc Glisse
On Fri, 25 Oct 2013, Marc Glisse wrote: On Fri, 25 Oct 2013, Richard Biener wrote: you can followup with handling POINTER_PLUS_EXPR if you like. Like this? (bootstrap+testsuite on x86_64-unknown-linux-gnu) 2013-10-26 Marc Glisse marc.gli...@inria.fr gcc/ * tree-ssa-alias.c

Re: Aliasing: look through pointer's def stmt

2013-10-25 Thread Marc Glisse
On Thu, 24 Oct 2013, Jeff Law wrote: On 10/24/13 23:23, Marc Glisse wrote: Hello, I noticed that in some cases we were failing to find aliasing information because we were only looking at an SSA_NAME variable, missing the fact that it was really an ADDR_EXPR. The attached patch passes

Re: Aliasing: look through pointer's def stmt

2013-10-25 Thread Marc Glisse
On Fri, 25 Oct 2013, Richard Biener wrote: On Fri, Oct 25, 2013 at 10:59 AM, Richard Biener richard.guent...@gmail.com wrote: On Fri, Oct 25, 2013 at 8:11 AM, Marc Glisse marc.gli...@inria.fr wrote: On Thu, 24 Oct 2013, Jeff Law wrote: On 10/24/13 23:23, Marc Glisse wrote: Hello, I

Re: Aliasing: look through pointer's def stmt

2013-10-25 Thread Marc Glisse
, int *i) { *i = 42; __builtin_memcpy (i + 1, c, sizeof (int)); if (*i != 42) __builtin_abort(); } The patch is ok with the volatile check removed, you can followup with handling POINTER_PLUS_EXPR if you like. Thanks. -- Marc Glisse

Re: Aliasing: look through pointer's def stmt

2013-10-25 Thread Marc Glisse
On Fri, 25 Oct 2013, Tobias Burnus wrote: Marc Glisse wrote: I noticed that in some cases we were failing to find aliasing information because we were only looking at an SSA_NAME variable, missing the fact that it was really an ADDR_EXPR. The attached patch passes bootstrap+testsuite, does

Re: Aliasing: look through pointer's def stmt

2013-10-25 Thread Marc Glisse
On Fri, 25 Oct 2013, Richard Biener wrote: you can followup with handling POINTER_PLUS_EXPR if you like. Like this? (bootstrap+testsuite on x86_64-unknown-linux-gnu) 2013-10-26 Marc Glisse marc.gli...@inria.fr gcc/ * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Look

Aliasing: look through pointer's def stmt

2013-10-24 Thread Marc Glisse
information for instance) I didn't investigate the 2 tests where I had to remove dg-bogus, because removing dg-bogus sounds like a bonus... 2013-10-25 Marc Glisse marc.gli...@inria.fr gcc/ * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Look for an ADDR_EXPR

<    6   7   8   9   10   11   12   13   14   15   >