[PATCH] Fix i?86 *mov*insv_1* patterns (PR target/54436)

2012-08-31 Thread Jakub Jelinek
Hi! The following testcase results in an assembler warning on movb $700415, %ch The problem is that the *mov*_insv_1* patterns use SImode or DImode for the source operand, accept CONST_INTs in the constraints and nothing truncates the constants to QImode. While the b modifier in %b1 handles chang

Re: [Jiří Paleček] [PATCH][C++] Fix constant reference in a lambda (PR c++/53488)

2012-08-31 Thread Gabriel Dos Reis
On Fri, Aug 31, 2012 at 6:00 PM, Jason Merrill wrote: > Thanks for the patch! > >> The idea of the fix is to postpone the decision whether or not to capture >> later to the template instantiation. > > > That makes sense. We might as well postpone all default captures to > instantiation time, sinc

Re: [patch] Fix problems with -fdebug-types-section

2012-08-31 Thread Cary Coutant
> I don't believe that it's necessary to copy the children of the class > declaration at all, and this patch simply removes the code that copies > those children. If there's a reference in the type unit to one of the > children of that class, that one child will get copied in as needed. > > Bootstr

[google/gcc-4_7] Fix GDB test suite regression with -fdebug-types-section patch

2012-08-31 Thread Cary Coutant
This patch is for the google/gcc-4_7 branch. This patch fixes a problem caused by the previous patch that removed the code to copy children of a DIE referenced by a type unit. > I don't believe that it's necessary to copy the children of the class > declaration at all, and this patch simply remov

Re: [Jiří Paleček] [PATCH][C++] Fix constant reference in a lambda (PR c++/53488)

2012-08-31 Thread Jason Merrill
Thanks for the patch! The idea of the fix is to postpone the decision whether or not to capture later to the template instantiation. That makes sense. We might as well postpone all default captures to instantiation time, since we need to postpone some of them. +/* This is a hack

Re: vector comparisons in C++

2012-08-31 Thread Marc Glisse
With the patch... On Sat, 1 Sep 2012, Marc Glisse wrote: Hello, this patch copies some more vector extensions from the C front-end to the C++ front-end. There seemed to be some reluctance to add those, but I guess a patch is the best way to ask. Note that I only added the vector x vector op

vector comparisons in C++

2012-08-31 Thread Marc Glisse
Hello, this patch copies some more vector extensions from the C front-end to the C++ front-end. There seemed to be some reluctance to add those, but I guess a patch is the best way to ask. Note that I only added the vector x vector operations, not the vector x scalar ones. I have some issues

Re: [middle-end] Add machine_mode to address_cost target hook

2012-08-31 Thread Alexandre Oliva
On Aug 29, 2012, Oleg Endo wrote: > * config/mn10300/mn10300.c (mn10300_address_cost): Add > machine_mode argument. Use GET_MODE (x) in recursive > invocation. > * config/sh/sh.c (sh_address_cost): Likewise. These are ok, thanks. -- Alexandre Oliva, freedom fighter

Re: [C++ Patch] PR 18747

2012-08-31 Thread Jason Merrill
Since you're traveling, I poked at this myself some more. The issue here is that there are too many template headers for the declaration, so we want to figure out what the right number is and give an appropriate message. Tested x86_64-pc-linux-gnu, applying to trunk. commit 7c8fead9f721b04227

Re: [PATCH,mmix] convert to constraints.md

2012-08-31 Thread Hans-Peter Nilsson
On Fri, 3 Aug 2012, Hans-Peter Nilsson wrote: > On Thu, 2 Aug 2012, Nathan Froyd wrote: > > H-P, if you'd like to test beforehand, that'd be great. > > ...yes, I'd like to test this before, please. Thanks for your > work. (Let's set a timeout at the end of August; ok to commit > Sep 1 have I not

Re: [patch] Make every GIMPLE switch have a default case, always

2012-08-31 Thread Steven Bosscher
Ping! On Sat, Aug 25, 2012 at 1:14 AM, Steven Bosscher wrote: > Hello, > > This patch restores the old invariant that every GIMPLE switch has a > default case. This invariant is only broken by the SJLJ exception > dispatch code, and it's resulted in some code accepting a switch > without a defaul

Re: bug wrt gcc 4.7 and the C++11 memory model

2012-08-31 Thread Steven Bosscher
> Full testing still underway, but I expect it to pass. Can you also update the comment before the function, please? It now reads: /* Read dependence: X is read after read in MEM takes place. There can only be a dependence here if both reads are volatile. */ But that's no longer true after

Re: bug wrt gcc 4.7 and the C++11 memory model

2012-08-31 Thread Steven Bosscher
On Fri, Aug 31, 2012 at 6:51 PM, Richard Henderson wrote: > Fixed as follows. This seems to be the only entry point in alias.c that > didn't take ALIAS_SET_MEMORY_BARRIER into account. Getting the above into a > test case is tricky, and I havn't figured out how to match it. > > Full testing st

Re: bug wrt gcc 4.7 and the C++11 memory model

2012-08-31 Thread Richard Henderson
On 2012-08-31 05:48, Andrew MacLeod wrote: > On 08/30/2012 07:04 PM, Richard Henderson wrote: >> Actually, we already have a memory barrier feature in rtl: >> >>ALIAS_SET_MEMORY_BARRIER >> >> but since we already set that in get_builtin_sync_mem, we'll need >> to figure out why that's no longer

[Patch, PR 54128] ira.c change to fix mips bootstrap

2012-08-31 Thread Steve Ellcey
Here is my patch to fix the bootstrap comparision failure (PR 54128) on MIPS. The reason for the comparision failure was a difference in register usage and I tracked it down to build_insn_chain which checked all instructions for register usage in order to set the dead_or_set and live_relevant_regs

Re: [PATCH 3/3] Compute predicates for phi node results in ipa-inline-analysis.c

2012-08-31 Thread Martin Jambor
Hi, On Thu, Aug 30, 2012 at 05:11:35PM +0200, Martin Jambor wrote: > this is a new version of the patch which makes ipa analysis produce > predicates for PHI node results, at least at the bottom of the > simplest diamond and semi-diamond CFG subgraphs. This time I also > analyze the conditions ag

Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-31 Thread Ollie Wild
On Fri, Aug 31, 2012 at 10:37 AM, Jason Merrill wrote: > OK, sorry for the delay. No worries. Thanks. Submitted to trunk and gcc-4_7-branch as r190834 and r190839. Ollie

Re: [PATCH, x86-Atom] Enabling look-ahead scheduling feature for Atom processors

2012-08-31 Thread Kirill Yukhin
>> Looks safe to me. >> >> OK if there are no objections from RMs in the next 24h. > > All testing passed so following will be checked in 4.7. Checked in. http://gcc.gnu.org/ml/gcc-cvs/2012-08/msg00815.html Thanks, K

Re: [PING][Patch,ARM] unwind in epilogue ignore dwarf info

2012-08-31 Thread Ramana Radhakrishnan
On 08/31/12 13:50, Greta Yorsh wrote: Ping http://gcc.gnu.org/ml/gcc-patches/2012-07/msg01025.html From: Greta Yorsh [greta.yo...@arm.com] Sent: Friday, July 20, 2012 7:28 PM To: GCC Patches Cc: Richard Earnshaw; Ramana Radhakrishnan Subject: [Patch,ARM]

Re: [Patch ARM testsuite] fix 3 tests for big-endian

2012-08-31 Thread Janis Johnson
On 08/31/2012 05:05 AM, Christophe Lyon wrote: > Hi, > > Tests gcc.target/arm/pr48252.c, gcc.target/arm/pr51835.c and > gcc.target/arm/neon-vset_lanes8.c currently expect little-endian code > and fail when compiled/executed in big-endian mode. > > The attached patch fixes them. > > Tested with

Re: [PATCH, ARM] Constant vector permute for the Neon vext insn

2012-08-31 Thread Richard Henderson
On 2012-08-31 07:25, Christophe Lyon wrote: > + offset = gen_rtx_CONST_INT (VOIDmode, location); Never call gen_rtx_CONST_INT directly. Use GEN_INT. r~

Re: [PATCH] New command line switch -fada-spec-parent

2012-08-31 Thread Thomas Quinot
* Steven Bosscher, 2012-08-24 : > > * common.opt (-fada-spec-parent): Define new command line switch. > Why here instead of in c-family/c.opt? Makes sense indeed, I'll move the definition there. -- Thomas Quinot, Ph.D. ** qui...@adacore.com ** Senior Software Engineer Ada

Re: [PATCH, AArch64] Allow symbol+offset even if not being used for memory access

2012-08-31 Thread Richard Henderson
On 2012-08-31 07:49, Ian Bolton wrote: > +(define_split > + [(set (match_operand:DI 0 "register_operand" "=r") > + (const:DI (plus:DI (match_operand:DI 1 "aarch64_valid_symref" "S") > + (match_operand:DI 2 "const_int_operand" "i"] > + "" > + [(set (match_dup 0)

Re: [PING][Patch, ARM] Cleanup in arm_expand_epilogue

2012-08-31 Thread Ramana Radhakrishnan
On 08/31/12 13:49, Greta Yorsh wrote: Ping http://gcc.gnu.org/ml/gcc-patches/2012-07/msg01026.html From: Greta Yorsh [greta.yo...@arm.com] Sent: Friday, July 20, 2012 7:33 PM To: GCC Patches Cc: Richard Earnshaw; Ramana Radhakrishnan Subject: [Patch, ARM

Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-31 Thread Jason Merrill
OK, sorry for the delay. Jason

Re: [google/integration] Add a configure option to disable system header canonicalizations (issue6489063)

2012-08-31 Thread Simon Baldwin
On 31 August 2012 17:25, Ollie Wild wrote: > > On Fri, Aug 31, 2012 at 10:01 AM, Simon Baldwin wrote: > > On 31 August 2012 16:31, Ollie Wild wrote: > >> > > > > The patch exactly meets the definition of google/integration only, > > which is that it fixes up something that affects only Google's

Re: [google/integration] Add a configure option to disable system header canonicalizations (issue6489063)

2012-08-31 Thread Ollie Wild
On Fri, Aug 31, 2012 at 10:01 AM, Simon Baldwin wrote: > On 31 August 2012 16:31, Ollie Wild wrote: >> > > The patch exactly meets the definition of google/integration only, > which is that it fixes up something that affects only Google's use of > gcc. The criterion is more subtle than that. Th

Re: [PATCH, x86-Atom] Enabling look-ahead scheduling feature for Atom processors

2012-08-31 Thread Igor Zamyatin
On Tue, Aug 28, 2012 at 1:34 PM, Uros Bizjak wrote: > On Tue, Aug 28, 2012 at 11:24 AM, Igor Zamyatin wrote: > >> I'd like this patch (original version at the bottom) also to be >> backported into 4.7. >> >> Is it safe to backport? > > Looks safe to me. > > OK if there are no objections from RMs

Re: [PATCH 3/3] Compute predicates for phi node results in ipa-inline-analysis.c

2012-08-31 Thread Martin Jambor
Hi, On Fri, Aug 31, 2012 at 10:52:28AM +0200, Jan Hubicka wrote: > > Hi, > > > > this is a new version of the patch which makes ipa analysis produce > > predicates for PHI node results, at least at the bottom of the > > simplest diamond and semi-diamond CFG subgraphs. This time I also > > analyz

Re: [google/integration] Add a configure option to disable system header canonicalizations (issue6489063)

2012-08-31 Thread Simon Baldwin
On 31 August 2012 16:31, Ollie Wild wrote: > > On Fri, Aug 31, 2012 at 7:20 AM, Simon Baldwin wrote: > > Add a configure option to disable system header canonicalizations. > > > > Libcpp may canonicalize system header paths with lrealpath() for > > diagnostics, > > dependency output, and similar.

Re: [C PATCH] Avoid ICEs due to save_expr instead of c_save_expr (PR c/54428)

2012-08-31 Thread Joseph S. Myers
On Fri, 31 Aug 2012, Jakub Jelinek wrote: > 2012-08-31 Jakub Jelinek > > PR c/54428 > * c-convert.c (convert): Don't call fold_convert_loc if > TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e > is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from > CO

[PATCH, AArch64] Allow symbol+offset even if not being used for memory access

2012-08-31 Thread Ian Bolton
Hi, This patch builds on a previous one that allowed symbol+offset as symbol references for memory accesses. It allows us to have symbol+offset even when no memory access is apparent. It reduces codesize for cases such as this one: int arr[100]; uint64_t foo (uint64_t a) { uint64_t con

Re: [PATCH, PR 54394] Compute loops when generating inline summaries

2012-08-31 Thread Martin Jambor
Hi, On Fri, Aug 31, 2012 at 12:06:33PM +0200, Jan Hubicka wrote: > > > > This is not required to make hints working, it is necessary because of > > the following line a in estimate_function_body_sizes: > > > > es->loop_depth = bb_loop_depth (bb); > > > > which always yields zero if we

Re: [google/integration] Add a configure option to disable system header canonicalizations (issue6489063)

2012-08-31 Thread Ollie Wild
On Fri, Aug 31, 2012 at 7:20 AM, Simon Baldwin wrote: > Add a configure option to disable system header canonicalizations. > > Libcpp may canonicalize system header paths with lrealpath() for diagnostics, > dependency output, and similar. If gcc is held in a symlink farm the > canonicalized paths

Re: [PATCH, ARM] Constant vector permute for the Neon vext insn

2012-08-31 Thread Christophe Lyon
This time with the actual patch attached. On 31 August 2012 15:23, Christophe Lyon wrote: > On 24 August 2012 10:54, Christophe Lyon wrote: >> On 24 August 2012 10:40, Richard Earnshaw wrote: >>> >>> Has this been tested for big-endian? >>> >>> R. >> >> No. I'll give a look at it and let you

Re: [PATCH, ARM] Constant vector permute for the Neon vext insn

2012-08-31 Thread Christophe Lyon
On 24 August 2012 10:54, Christophe Lyon wrote: > On 24 August 2012 10:40, Richard Earnshaw wrote: >> >> Has this been tested for big-endian? >> >> R. > > No. I'll give a look at it and let you know. > > Christophe. Here is an updated patch, which now does no optimization in the big-endian case.

[PING][Patch,ARM] unwind in epilogue ignore dwarf info

2012-08-31 Thread Greta Yorsh
Ping http://gcc.gnu.org/ml/gcc-patches/2012-07/msg01025.html From: Greta Yorsh [greta.yo...@arm.com] Sent: Friday, July 20, 2012 7:28 PM To: GCC Patches Cc: Richard Earnshaw; Ramana Radhakrishnan Subject: [Patch,ARM] unwind in epilogue ignore dwarf info Th

[PING][Patch, ARM] Cleanup in arm_expand_epilogue

2012-08-31 Thread Greta Yorsh
Ping http://gcc.gnu.org/ml/gcc-patches/2012-07/msg01026.html From: Greta Yorsh [greta.yo...@arm.com] Sent: Friday, July 20, 2012 7:33 PM To: GCC Patches Cc: Richard Earnshaw; Ramana Radhakrishnan Subject: [Patch, ARM] Cleanup in arm_expand_epilogue The va

[C PATCH] Avoid ICEs due to save_expr instead of c_save_expr (PR c/54428)

2012-08-31 Thread Jakub Jelinek
Hi! This is another case of the issue that save_expr shouldn't be called when parsing C (except for in_late_binary_op), but c_save_expr must be called instead. I wonder if we shouldn't add a langhook, which would do if (in_late_binary_op) save_expr_1 else c_save_expr and ensure that when not par

[google/integration] Add a configure option to disable system header canonicalizations (issue6489063)

2012-08-31 Thread Simon Baldwin
Add a configure option to disable system header canonicalizations. Libcpp may canonicalize system header paths with lrealpath() for diagnostics, dependency output, and similar. If gcc is held in a symlink farm the canonicalized paths may be meaningless to users, and will also conflict with build

[Patch ARM testsuite] fix 3 tests for big-endian

2012-08-31 Thread Christophe Lyon
Hi, Tests gcc.target/arm/pr48252.c, gcc.target/arm/pr51835.c and gcc.target/arm/neon-vset_lanes8.c currently expect little-endian code and fail when compiled/executed in big-endian mode. The attached patch fixes them. Tested with qemu on armeb-none-linux-gnueabi and arm-none-linux-gnueabi. OK?

Re: faster random number engine

2012-08-31 Thread Ulrich Drepper
On Fri, Aug 31, 2012 at 3:59 AM, Miles Bader wrote: > Can this replace the current mersenne twister implementation in > std:: once the endianness issue, etc, have been worked out? No, it produces different numbers.

Re: RFA: libiberty: cope with integer overflow in _objalloc_alloc

2012-08-31 Thread Florian Weimer
On 08/31/2012 12:33 PM, Nick Clifton wrote: Hi DJ, Hi Ian, The _objalloc_alloc() function is currently vulnerable to an integer overflow if it is passed a negative length. For example if called with len = -3 and assuming that OBJALLOC_ALIGN is 4 then: line 122: len = (len + OBJA

RFA: libiberty: cope with integer overflow in _objalloc_alloc

2012-08-31 Thread Nick Clifton
Hi DJ, Hi Ian, The _objalloc_alloc() function is currently vulnerable to an integer overflow if it is passed a negative length. For example if called with len = -3 and assuming that OBJALLOC_ALIGN is 4 then: line 122: len = (len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1); So len

Re: [PATCH, PR 54394] Compute loops when generating inline summaries

2012-08-31 Thread Jan Hubicka
> > This is not required to make hints working, it is necessary because of > the following line a in estimate_function_body_sizes: > > es->loop_depth = bb_loop_depth (bb); > > which always yields zero if we don't have loops computed. So I can > skip the computation only if we don't

Re: [PATCH, PR 54394] Compute loops when generating inline summaries

2012-08-31 Thread Martin Jambor
On Fri, Aug 31, 2012 at 10:53:32AM +0200, Jan Hubicka wrote: > > Hi, > > > > the patch below fixes PR 54394. The problem is that since revision > > 190346 we depend on bb->loop_father being non-NULL to get loop_depth. > > However, with loops not computed, the loop_father is NULL, loop_depth > > i

[PATCH ping, middle-end]: Introduce TARGET_LEGITIMATE_COMBINED_INSN target hook

2012-08-31 Thread Uros Bizjak
On Sun, Aug 26, 2012 at 11:00 AM, Uros Bizjak wrote: > Actually a v3 of TARGET_REJECT_COMBINED_INSN target hook. > > Changes: > - rename the hook and reverse the return value > > 2012-08-25 Uros Bizjak > > * target.def (legitimate_combined_insn): New target hook. > * doc/tm.tex

Re: Memset/memcpy patch

2012-08-31 Thread Jan Hubicka
> On Mon, Dec 12, 2011 at 6:02 AM, Jan Hubicka wrote: > >> Any update? > > > > I will look into it today, but anyway I think it is stage1 material, so we > > have some time to progress on it. > > > > Honza > > Hi Honza, > > The old patch was reverted and the new patch was posted at > > http://

Re: [PATCH, PR 54394] Compute loops when generating inline summaries

2012-08-31 Thread Jan Hubicka
> Hi, > > the patch below fixes PR 54394. The problem is that since revision > 190346 we depend on bb->loop_father being non-NULL to get loop_depth. > However, with loops not computed, the loop_father is NULL, loop_depth > is thus considered zero and call graph edges out of such BB can be > consi

Re: [PATCH 3/3] Compute predicates for phi node results in ipa-inline-analysis.c

2012-08-31 Thread Jan Hubicka
> Hi, > > this is a new version of the patch which makes ipa analysis produce > predicates for PHI node results, at least at the bottom of the > simplest diamond and semi-diamond CFG subgraphs. This time I also > analyze the conditions again rather than extracting information from > CFG edges, wh

Re: [PATCH, PR 54409] Remapping inlining predicates fix

2012-08-31 Thread Jan Hubicka
> Hi, > > this patch fixes PR 54409. The condition for dealing with offset maps > when remapping predicates which I have added recently was wrong, > fortunately a subsequent assert caught this. We cannot shift stuff by > an offset when it is passed by value. > > Conversely, the condition was un

Re: faster random number engine

2012-08-31 Thread Miles Bader
Can this replace the current mersenne twister implementation in std:: once the endianness issue, etc, have been worked out? -miles -- Is it true that nothing can be known? If so how do we know this? -Woody Allen