RE: [PATCH Version 2][RFA]Improving register pressure directed hoist

2012-11-08 Thread Bin Cheng
-Original Message- From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches-ow...@gcc.gnu.org] On Behalf Of Bin Cheng Sent: Tuesday, November 06, 2012 9:04 PM To: 'Jeff Law' Cc: gcc-patches@gcc.gnu.org Subject: RE: [PATCH Version 2][RFA]Improving register pressure directed hoist

Re: [PATCH] Vtable pointer verification, gcc changes (patch 2 of 2)

2012-11-08 Thread Florian Weimer
On 11/05/2012 06:48 PM, Caroline Tice wrote: As requested, I have split the original patch into two parts: GCC changes and runtime library changes. The attached patch is fore the gcc changes. Out of curiosity, what's the primary source of wrong vtable values you expect? User-after-free

Re: [PATCH] Fix fold reassociation (PR c++/55137)

2012-11-08 Thread Eric Botcazou
The first (C++) testcase is rejected since my SIZEOF_EXPR folding deferral changes, the problem is that -1 + (int) (sizeof (int) - 1) is first changed into -1 + (int) ((unsigned) sizeof (int) + UINT_MAX) and then fold_binary_loc reassociates it in int type into (int) sizeof (int) +

Re: [PING^2] [C++ PATCH] Add overflow checking to __cxa_vec_new[23]

2012-11-08 Thread Florian Weimer
On 11/06/2012 05:01 PM, Florian Weimer wrote: On 11/06/2012 04:55 PM, Jason Merrill wrote: On 11/05/2012 12:52 PM, Florian Weimer wrote: +// Avoid use of none-overridable new/delete operators in shared Typo: that should be non-overridable Jason Thanks, this patch fixes both instances. I

Re: [PING^2] [C++ PATCH] Add overflow checking to __cxa_vec_new[23]

2012-11-08 Thread Paolo Carlini
On 11/08/2012 10:54 AM, Florian Weimer wrote: I figured I could commit this as obvious, so I did that in r193326. Of course. Thanks again! Paolo. PS: as you may have noticed, I adjusted your new code to not throw, instead abort when __EXCEPTIONS is not defined: in general, we want the

Re: [PATCH] Fix fold reassociation (PR c++/55137)

2012-11-08 Thread Jakub Jelinek
On Thu, Nov 08, 2012 at 10:37:00AM +0100, Eric Botcazou wrote: I guess the natural question is then: if we start to change the type of the operation, why not always reassociate in the unsigned version of the type? int foo (int x, int y) { return (x + 1) + (int) (y + 1); } I was afraid

Re: [patch] PR55191 - ICE in tree-ssa-pre.c due to missing fake edge for an infinite loop

2012-11-08 Thread Jakub Jelinek
On Mon, Nov 05, 2012 at 10:59:45PM +0100, Steven Bosscher wrote: I hadn't expected that cfganal.c's reverse-CFG DFS would actually depend on the order of the basic blocks. The attached patch fixes that small oversight... Bootstrappedtested on powerpc64-unknown-linux-gnu. OK for trunk?

Re: [trans-mem][rfc] Improvements to uninstrumented code paths

2012-11-08 Thread Torvald Riegel
On Wed, 2012-11-07 at 15:01 -0800, Richard Henderson wrote: I wrote the second of these patches first, and I'm uncertain about the desirability of the first of the patches. While working on the uninstrumented code path bulk patch, I noticed that nested transactions within the copy of the

Re: [trans-mem][rfc] Improvements to uninstrumented code paths

2012-11-08 Thread Torvald Riegel
On Wed, 2012-11-07 at 15:08 -0800, Andi Kleen wrote: Richard Henderson r...@redhat.com writes: Is it ever likely that we'd choose an uninstrumented path for a nested transaction, given that we're already executing the instrumented path for an outer transaction? I don't see why not. A

Re: [v3] Fix profile mode failures

2012-11-08 Thread Paolo Carlini
On 11/08/2012 02:58 AM, Paolo Carlini wrote: On 11/08/2012 02:37 AM, Jonathan Wakely wrote: Bah, it's nothing to do with me, the profile-mode list should never have worked! I'm testing this overnight. Ah! Thanks! By the way, I'm also seeing this: WARNING:

Re: [trans-mem][rfc] Improvements to uninstrumented code paths

2012-11-08 Thread Torvald Riegel
On Thu, 2012-11-08 at 13:33 +0100, Torvald Riegel wrote: On Wed, 2012-11-07 at 15:01 -0800, Richard Henderson wrote: I wrote the second of these patches first, and I'm uncertain about the desirability of the first of the patches. While working on the uninstrumented code path bulk patch,

Re: [PATCH] Make IPA-CP work on aggregates

2012-11-08 Thread Martin Jambor
Hi, On Wed, Nov 07, 2012 at 03:55:16PM +0100, Jan Hubicka wrote: On Wed, Nov 07, 2012 at 03:39:15PM +0100, Martin Jambor wrote: another bootstrap finishes. I'm not sure if it would be OK to commit it now, given it is stage3, though. OTOH, I think it would be worth it. I'm ok

Re: [PATCH] Make IPA-CP work on aggregates

2012-11-08 Thread Jan Hubicka
Hi, On Wed, Nov 07, 2012 at 03:55:16PM +0100, Jan Hubicka wrote: On Wed, Nov 07, 2012 at 03:39:15PM +0100, Martin Jambor wrote: another bootstrap finishes. I'm not sure if it would be OK to commit it now, given it is stage3, though. OTOH, I think it would be worth it.

Re: [PATCH] Vtable pointer verification, gcc changes (patch 2 of 2)

2012-11-08 Thread Caroline Tice
Most likely use-after-free issues, but any memory use bug lays the program open to these attacks. -- Caroline Tice cmt...@google.com On Thu, Nov 8, 2012 at 1:36 AM, Florian Weimer fwei...@redhat.com wrote: On 11/05/2012 06:48 PM, Caroline Tice wrote: As requested, I have split the original

Re: patch fixing a test for PR55151

2012-11-08 Thread Hans-Peter Nilsson
On Wed, 7 Nov 2012, Vladimir Makarov wrote: On 12-11-07 5:27 PM, H.J. Lu wrote: You should check !ia32 target: /* { dg-do compile { target { ! { ia32 } } } } */ Thanks, H.J. I've just fixed it. Index: testsuite/ChangeLog

Re: patch to fix constant math - first small patch

2012-11-08 Thread Kenneth Zadeck
Joseph, Here is a revised patch with the change you asked for. There have been no other comments. May I commit it? Kenny On 10/05/2012 08:14 PM, Joseph S. Myers wrote: On Fri, 5 Oct 2012, Kenneth Zadeck wrote: +# define HOST_HALF_WIDE_INT_PRINT h This may cause problems on hosts not

Re: [PATCH] Cleanup last_location and update input_location in ipa_prop

2012-11-08 Thread Dehao Chen
ping... On Mon, Nov 5, 2012 at 5:20 PM, Dehao Chen de...@google.com wrote: Hi, This is a patch to do some obvious cleanup and setting correct input_location in ipa_prop (because it invokes gimplification routines). Bootstrapped and passed gcc regression tests. Is it okay for trunk?

Re: [PATCH] Do not dump location for compare_debug

2012-11-08 Thread Dehao Chen
ping... On Wed, Oct 31, 2012 at 5:26 PM, Dehao Chen de...@google.com wrote: Hi, When -fcompare_debug is used, what we really want to do is to compare instructions between the -g version and -gtoggle version. However, current dump file still contains the source line in its rtl dump. This

[PATCH] Remove inline keyword from rs6000 legitimate_indirect_address_p (PR target/54308)

2012-11-08 Thread Jakub Jelinek
Hi! We have in rs6000-protos.h extern bool legitimate_indirect_address_p (rtx, int); and in rs6000.c inline bool legitimate_indirect_address_p (rtx x, int strict) { ... } and in predicates.md call this function. That works fine in C (both -fgnu89-inline mode and C99), the function is inlined

Re: patch to fix constant math - second small patch

2012-11-08 Thread Kenneth Zadeck
I have added the proper doc. OK to commit? Kenny On 10/08/2012 05:06 AM, Richard Guenther wrote: On Sat, Oct 6, 2012 at 12:48 AM, Kenneth Zadeck zad...@naturalbridge.com wrote: This patch adds machinery to genmodes.c so that largest possible sizes of various data structures can be

Re: [PATCH,RX] Support Bit Manipulation on Memory Operands

2012-11-08 Thread Richard Henderson
Now looking at the patch past the first hunk... +(define_insn *iorbset_reg + [(set (match_operand:SI 0 register_operand +r) + (ior:SI (match_dup 0) + (match_operand 1 const_int_operand Intso)))] + satisfies_constraint_Intso (operands[1]) + bset\\t%D1,%0 + [(set_attr

Re: [PATCH] Remove inline keyword from rs6000 legitimate_indirect_address_p (PR target/54308)

2012-11-08 Thread David Edelsohn
On Thu, Nov 8, 2012 at 12:42 PM, Jakub Jelinek ja...@redhat.com wrote: We have in rs6000-protos.h extern bool legitimate_indirect_address_p (rtx, int); and in rs6000.c inline bool legitimate_indirect_address_p (rtx x, int strict) { ... } and in predicates.md call this function. That works

[PATCH] Attribute for unused warning for variables of non-trivial types

2012-11-08 Thread Lubos Lunak
Hello, could somebody please review http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55203 (patch also attached)? The patch implements an attribute for marking types for which gcc cannot on its own issue warnings about unused variables (e.g. because the ctor is external), but for which such a

[PATCH] Fix -grecord-dwarf-switches with PCH (PR debug/53145)

2012-11-08 Thread Jakub Jelinek
Hi! This PR reports a problem on some PCH tests due to -grecord-dwarf-switches, sometimes .debug_str section is emitted in different order with PCH than without. I can't reproduce the issue unless -fno-eliminate-unused-debug-types, but anyway, I hope this patch should cure it. The problem is

[PATCH] Fix up assembly thunks with -gstabs+ (PR debug/54499)

2012-11-08 Thread Jakub Jelinek
Hi! Cary added recently a debug_hooks-source_line call for asm thunks, but that breaks e.g. for -gstabs+, which emits a relocation relative to whatever label is emitted in the begin_prologue debug hook, so obviously doesn't work well if called before the begin_prologue debug hook. Fixed by

[PATCH] Fix make_range_step with -fwrapv (PR tree-optimization/55236)

2012-11-08 Thread Jakub Jelinek
Hi! With -fwrapv the range test optimization miscompiles the following testcase (both inter-bb version in 4.8+ in first function and the pure fold-const.c one since 3.4). The problem is that with -fwrapv and signed type -x in [-,b] doesn't imply x in [-b,-] and -x in [a,-] doesn't imply x in

Re: [PATCH] Fix up assembly thunks with -gstabs+ (PR debug/54499)

2012-11-08 Thread Richard Henderson
On 2012-11-08 11:55, Jakub Jelinek wrote: 2012-11-08 Jakub Jelinek ja...@redhat.com PR debug/54499 * cgraphunit.c (assemble_thunk): Don't call source_line debug hook here, instead call insn_locations_{init,finalize} and initialize prologue_location. *

Re: [PATCH] PR 54789: Fix driver error when GCC_COMPARE_DEBUG is defined

2012-11-08 Thread Jakub Jelinek
On Fri, Oct 05, 2012 at 06:49:25AM +0400, Dmitry Gorbachev wrote: This patch simplifies process_command a bit by using save_switch and sets the known switch field to true. gcc/ChangeLog: 2012-10-05 Dmitry Gorbachev d.g.gorbac...@gmail.com PR driver/54789 * gcc.c

Re: [PATCH] Fix -grecord-dwarf-switches with PCH (PR debug/53145)

2012-11-08 Thread Richard Henderson
On 2012-11-08 11:49, Jakub Jelinek wrote: 2012-11-07 Jakub Jelinek ja...@redhat.com PR debug/53145 * dwarf2out.c (gen_compile_unit_die): Don't call gen_producer_string here, instead add if producer_string is NULL. (dwarf2out_finish): Call gen_producer_string here,

Re: [Bug libstdc++/54075] [4.7.1] unordered_map insert still slower than 4.6.2

2012-11-08 Thread François Dumont
Attached patch applied to trunk and 4.7 branch. 2012-11-08 François Dumont fdum...@gcc.gnu.org PR libstdc++/54075 * include/bits/hashtable.h (_Hashtable::rehash): Reset hash policy state if no rehash. * testsuite/23_containers/unordered_set/modifiers/reserve.cc (test02):

RE: [RFC] New feature to reuse one multilib among different targets

2012-11-08 Thread Joseph S. Myers
On Thu, 8 Nov 2012, Terry Guo wrote: To convert such statements to data structure used by multilib_raw, I refactor codes in genmultilib into two functions combo_to_dir and The function keyword for creating shell functions is not POSIX, and I don't know if we ensure that $SHELL is a shell

Re: [C++ Patch] for c++/11750

2012-11-08 Thread Jason Merrill
On 08/13/2012 04:49 PM, Fabien Chêne wrote: + /* Optimize away vtable lookup if we know that this +function can't be overridden. We need to check if +the context and the instance type are the same, +actually FN migth be defined in a

[PR 55238] More careful pass-through handling in find_aggregate_values_for_callers_subset

2012-11-08 Thread Martin Jambor
Hi, when writing find_aggregate_values_for_callers_subset, I omitted a test that is present in propagate_aggs_accross_jump_function and that lead to triggering an assert in the former. Fixed by moving the test into a separate predicate function in the following patch. Bootstrapped and tested on

Go patch committed: Update index.go in testsuite

2012-11-08 Thread Ian Lance Taylor
This patch to the Go testsuite updates index.go to the version currently in mainline. This required adding some new support to the Go testsuite driver. This fixes PR go/55228. Ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian Index: go.test/test/index0.go

[PATCH] Handle abortTransaction with RTM

2012-11-08 Thread Richard Henderson
On 2012-11-08 15:32, Torvald Riegel wrote: On Thu, 2012-11-08 at 15:38 +, Lai, Konrad wrote: The xabort argument is the only escape currently allowed in RTM. So it is not possible to use a separate Boolean in memory. No, that's not what I meant. The boolean would be used in libitm's

Re: [PATCH] Fix up assembly thunks with -gstabs+ (PR debug/54499)

2012-11-08 Thread Cary Coutant
jakub 2012-11-08 Jakub Jelinek ja...@redhat.com jakub jakub PR debug/54499 jakub * cgraphunit.c (assemble_thunk): Don't call source_line debug hook jakub here, instead call insn_locations_{init,finalize} and initialize jakub prologue_location. jakub jakub *

Re: [PATCH] Handle abortTransaction with RTM

2012-11-08 Thread Andi Kleen
Richard Henderson r...@redhat.com writes: static inline void -htm_abort () +htm_abort_retry () { // ??? According to a yet unpublished ABI rule, 0xff is reserved and // supposed to signal a busy lock. Source: andi.kl...@intel.com _xabort(0xff); } +static inline void

Re: [C++11] PR54413 Option for turning off compiler extensions for numeric literals.

2012-11-08 Thread Ed Smith-Rowland
On 11/07/2012 10:29 AM, Jakub Jelinek wrote: On Wed, Nov 07, 2012 at 10:22:57AM -0500, Jason Merrill wrote: I thought about that. We'd need some machinery that would allow cpp to query what has been declared already. Or alternately, always treat them as user-defined in C++ mode and have the

[PATCH] Fix array access beyond bounds in test cases

2012-11-08 Thread Siddhesh Poyarekar
Hi, I found that some test cases access arrays beyond their bounds. I looked up their originating bugzillas and found that the test cases for pr22506 and pr34005 were likely to be typos since the original test cases in the report do not have this problem. For pr31227 however, I am inclined to

RE: [RFC] New feature to reuse one multilib among different targets

2012-11-08 Thread Terry Guo
-Original Message- From: Joseph Myers [mailto:jos...@codesourcery.com] Sent: Friday, November 09, 2012 5:10 AM To: Terry Guo Cc: gcc-patches@gcc.gnu.org Subject: RE: [RFC] New feature to reuse one multilib among different targets On Thu, 8 Nov 2012, Terry Guo wrote: To