[patch] Reduce memory overhead for build_insn_chain

2012-08-07 Thread Steven Bosscher
Hello, In the test case for PR54146, build_insn_chain spends almost all its time in this loop: FOR_EACH_BB_REVERSE (bb) { bitmap_iterator bi; rtx insn; CLEAR_REG_SET (live_relevant_regs); -- memset (live_subregs_used, 0, max_regno * sizeof (int)); The test case has

[patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Steven Bosscher
Hello, In the test case for PR54146, compute_global_livein allocates/frees a worklist for 400,000 basic blocks on each invocation. And it's called a lot, for rewrite_into_loop_closed_ssa. But the maximum number of basic blocks ever on the work list was only ~6500. So the work list can be much

Re: add strnlen to libiberty (was Re: Assembly output optimisations)

2012-08-07 Thread Ian Lance Taylor
On Mon, Aug 6, 2012 at 10:44 PM, Dimitrios Apostolou ji...@gmx.net wrote: What else is missing to make this patch appropriate for libiberty? Should I change the prolog in strnlen.c, since I only copied it intact from gnulib? We generally try to avoid straight GPL source code without runtime

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-07 Thread Richard Guenther
On Tue, Aug 7, 2012 at 2:35 AM, Lawrence Crowl cr...@google.com wrote: Convert double_int from a struct with function into a class with operators and methods. This patch adds the methods and operators. In general functions of the form double_int_whatever become member functions whatever or,

Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Richard Guenther
On Tue, Aug 7, 2012 at 8:24 AM, Steven Bosscher stevenb@gmail.com wrote: Hello, In the test case for PR54146, compute_global_livein allocates/frees a worklist for 400,000 basic blocks on each invocation. And it's called a lot, for rewrite_into_loop_closed_ssa. But the maximum number of

Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Steven Bosscher
On Tue, Aug 7, 2012 at 10:31 AM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Aug 7, 2012 at 8:24 AM, Steven Bosscher stevenb@gmail.com wrote: Hello, In the test case for PR54146, compute_global_livein allocates/frees a worklist for 400,000 basic blocks on each invocation.

Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Richard Guenther
On Tue, Aug 7, 2012 at 11:03 AM, Steven Bosscher stevenb@gmail.com wrote: On Tue, Aug 7, 2012 at 10:31 AM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Aug 7, 2012 at 8:24 AM, Steven Bosscher stevenb@gmail.com wrote: Hello, In the test case for PR54146,

Re: add strnlen to libiberty (was Re: Assembly output optimisations)

2012-08-07 Thread Hans-Peter Nilsson
On Mon, 6 Aug 2012, Ian Lance Taylor wrote: On Mon, Aug 6, 2012 at 10:44 PM, Dimitrios Apostolou ji...@gmx.net wrote: What else is missing to make this patch appropriate for libiberty? Should I change the prolog in strnlen.c, since I only copied it intact from gnulib? We generally try to

Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Steven Bosscher
On Tue, Aug 7, 2012 at 11:22 AM, Richard Guenther richard.guent...@gmail.com wrote: Another optimization would be to do @@ -440,13 +442,13 @@ compute_global_livein (bitmap livein ATT ! bitmap_bit_p (def_blocks, pred_index) bitmap_set_bit (livein, pred_index))

Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Richard Guenther
On Tue, Aug 7, 2012 at 11:45 AM, Steven Bosscher stevenb@gmail.com wrote: On Tue, Aug 7, 2012 at 11:22 AM, Richard Guenther richard.guent...@gmail.com wrote: Another optimization would be to do @@ -440,13 +442,13 @@ compute_global_livein (bitmap livein ATT ! bitmap_bit_p

Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Steven Bosscher
On Tue, Aug 7, 2012 at 11:52 AM, Richard Guenther richard.guent...@gmail.com wrote: So I wonder why simply looping over all SSA defs in a loop body and checking whether a use is outside of it is not enough to compute this information ... (yes, we might end up creating too many loop closed PHIs,

[ping] Re: [patch v2] support for multiarch systems

2012-08-07 Thread Matthias Klose
ping? re-attaching the updated patch with the fixed comment in genmultilib. Matthias On 08.07.2012 20:48, Matthias Klose wrote: Please find attached v2 of the patch updated for trunk 20120706, x86 only, tested on x86-linux-gnu, KFreeBSD and the Hurd. I left in the comment about the

[PATCH] Make gimple_phi_set_result adjust SSA_NAME_DEF_STMT

2012-08-07 Thread Richard Guenther
It's the only LHS setter that does not so and that results in the asymmetry of create_phi_node needing a SSA_NAME_DEF_STMT adjustment if you fed it an SSA name result as opposed to a VAR_DECL result in which case it will be already adjusted. Bootstrapped and tested on x86_64-unknown-linux-gnu,

Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Richard Guenther
On Tue, Aug 7, 2012 at 11:58 AM, Steven Bosscher stevenb@gmail.com wrote: On Tue, Aug 7, 2012 at 11:52 AM, Richard Guenther richard.guent...@gmail.com wrote: So I wonder why simply looping over all SSA defs in a loop body and checking whether a use is outside of it is not enough to compute

[PATCH] Remove clobbers as we go into SSA

2012-08-07 Thread Richard Guenther
This makes sure clobbers of SSA names are never retained in the IL. First by verifying that in the gimple verifier, second by removing them when we go into SSA form. Third by catching those we have to get rid of when un-nesting - this avoids stuff like finally { D.1234 = CLOBBER;

Re: libgo patch committed: Support NumCPU on more platforms

2012-08-07 Thread Richard Earnshaw
On 07/08/12 05:43, Ian Lance Taylor wrote: This patch to libgo, from Shenghou Ma, adds support for NumCPU on additional platforms: Solaris, Irix, *BSD, Darwin. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian Wouldn't it be more useful on Linux

Re: [PATCH] Set correct source location for deallocator calls

2012-08-07 Thread Richard Guenther
On Tue, Aug 7, 2012 at 12:07 AM, Dehao Chen de...@google.com wrote: Ping... Richard, could you shed some lights on this? Thanks, Dehao On Mon, Jul 30, 2012 at 8:29 PM, Dehao Chen de...@google.com wrote: Hi, This patch fixes the source location for automatically generated calls to

Re: [google/main] Omit TARGET_LIB_PATH from RPATH_ENVVAR in HOST_EXPORTS on bootstrap builds (issue6441093)

2012-08-07 Thread Diego Novillo
On Thu, Aug 2, 2012 at 7:37 AM, Simon Baldwin sim...@google.com wrote: Omit TARGET_LIB_PATH from RPATH_ENVVAR in HOST_EXPORTS on bootstrap builds. Discussion and rationale at: http://gcc.gnu.org/ml/gcc/2012-06/msg00314.html For google/main. Tested for bootstrap and regression. 2012-08-02

Re: add strnlen to libiberty (was Re: Assembly output optimisations)

2012-08-07 Thread Ian Lance Taylor
On Tue, Aug 7, 2012 at 2:30 AM, Hans-Peter Nilsson h...@bitrange.com wrote: Just don't forget that libiberty isn't a target library anymore. To wit, the (GCC) run-time exception is moot for that code, AFAIK. Maybe enough reason to abandon that rule so its code can be truly and freely shared

[PATCH][3/n] Allow anonymous SSA names, add copy_ssa_name

2012-08-07 Thread Richard Guenther
This adds copy_ssa_name similar to duplicate_ssa_name but not copying any annotations (thus, just make a new SSA name that looks similar to a template). This avoids a bunch of SSA_NAME_VAR uses which will no longer work to create SSA names off. The 2nd part is stuff I came along when working on

Re: [ping] Re: [patch v2] support for multiarch systems

2012-08-07 Thread Ian Lance Taylor
On Tue, Aug 7, 2012 at 3:31 AM, Matthias Klose d...@ubuntu.com wrote: ping? On 08.07.2012 20:48, Matthias Klose wrote: Please find attached v2 of the patch updated for trunk 20120706, x86 only, tested on x86-linux-gnu, KFreeBSD and the Hurd. +[case ${withval} in +yes|no|auto-detect)

[RFA 4.7/4.6] Re: [PATCH v2] Target-specific limits on vector alignment

2012-08-07 Thread Ulrich Weigand
Richard Guenther wrote: On Fri, Jul 27, 2012 at 5:24 PM, Ulrich Weigand uweig...@de.ibm.com wrote: ChangeLog: * target.def (vector_alignment): New target hook. * doc/tm.texi.in (TARGET_VECTOR_ALIGNMENT): Document new hook. * doc/tm.texi: Regenerate. *

Re: [RFA 4.7/4.6] Re: [PATCH v2] Target-specific limits on vector alignment

2012-08-07 Thread Richard Guenther
On Tue, Aug 7, 2012 at 4:56 PM, Ulrich Weigand uweig...@de.ibm.com wrote: Richard Guenther wrote: On Fri, Jul 27, 2012 at 5:24 PM, Ulrich Weigand uweig...@de.ibm.com wrote: ChangeLog: * target.def (vector_alignment): New target hook. * doc/tm.texi.in

Re: add strnlen to libiberty (was Re: Assembly output optimisations)

2012-08-07 Thread Joseph S. Myers
On Tue, 7 Aug 2012, Ian Lance Taylor wrote: On Tue, Aug 7, 2012 at 2:30 AM, Hans-Peter Nilsson h...@bitrange.com wrote: Just don't forget that libiberty isn't a target library anymore. To wit, the (GCC) run-time exception is moot for that code, AFAIK. Maybe enough reason to abandon that

Re: [RFA 4.7/4.6] Re: [PATCH v2] Target-specific limits on vector alignment

2012-08-07 Thread Richard Earnshaw
On 07/08/12 16:04, Richard Guenther wrote: On Tue, Aug 7, 2012 at 4:56 PM, Ulrich Weigand uweig...@de.ibm.com wrote: Richard Guenther wrote: On Fri, Jul 27, 2012 at 5:24 PM, Ulrich Weigand uweig...@de.ibm.com wrote: ChangeLog: * target.def (vector_alignment): New target hook.

Re: [RFA 4.7/4.6] Re: [PATCH v2] Target-specific limits on vector alignment

2012-08-07 Thread Ramana Radhakrishnan
(Note that while the patch contains changes to common code, those should be no-ops for all targets that do not implement the new hook.) I'll defer the decision to the target maintainers. I'd rather have this consistent across all maintained release branches today than to leave this for an

Re: [PATCH] put exception tables for comdat functions in comdat, too

2012-08-07 Thread Richard Henderson
On 08/06/2012 05:45 PM, Sandra Loosemore wrote: OK to commit the patch as originally posted? Yes. I mis-read skimming the part of that function about relocations. r~

Re: libgo patch committed: Support NumCPU on more platforms

2012-08-07 Thread Ian Lance Taylor
On Tue, Aug 7, 2012 at 5:21 AM, Richard Earnshaw rearn...@arm.com wrote: Wouldn't it be more useful on Linux to check the task's affinity settings? Then when a task is locked to a limited set of cores it won't overload those cores with threads. Good question. I'm not sure. This patch does

Re: [PATCH v3] s390: Convert from sync to atomic optabs

2012-08-07 Thread Ulrich Weigand
Richard Henderson wrote: [ This ought to be exactly the patch you bootstrapped. It does not include the SEQ follow-up. ] Split out s390_two_part_insv from s390_expand_cs_hqi to try harder to use bit insertion instructions in the CAS loop. Reorg s390_expand_insv to aid that. Try RISBG

Re: s390: Avoid CAS boolean output inefficiency

2012-08-07 Thread Ulrich Weigand
Richard Henderson wrote: On 08/06/2012 11:34 AM, Ulrich Weigand wrote: There is one particular inefficiency I have noticed. This code: if (!__atomic_compare_exchange_n (v, expected, max, 0 , 0, 0)) abort (); from atomic-compare-exchange-3.c gets compiled into: l

Re: [patch] Reduce memory overhead for build_insn_chain

2012-08-07 Thread Vladimir Makarov
On 08/07/2012 02:22 AM, Steven Bosscher wrote: Hello, In the test case for PR54146, build_insn_chain spends almost all its time in this loop: FOR_EACH_BB_REVERSE (bb) { bitmap_iterator bi; rtx insn; CLEAR_REG_SET (live_relevant_regs); -- memset

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-07 Thread Mike Stump
On Aug 6, 2012, at 5:35 PM, Lawrence Crowl wrote: Convert double_int from a struct with function into a class with operators and methods. We have a wide_int class that replaces this class. :-( It would have been better to just convert it. Do you guys have a timeframe for the cxx-conversion

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-07 Thread Diego Novillo
On 12-08-07 13:22 , Mike Stump wrote: On Aug 6, 2012, at 5:35 PM, Lawrence Crowl wrote: Convert double_int from a struct with function into a class with operators and methods. We have a wide_int class that replaces this class. :-( It would have been better to just convert it. Do you guys

[RFH / Patch] PR 54191

2012-08-07 Thread Paolo Carlini
Hi, this is an update on C++/54191, where in a number of cases, having to do with inaccessible bases, we don't handle correctly access control under SFINAE. The attached draft patch p fixes a number of tests (and passes regression testing), where we are currently emitting inaccessible base

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-07 Thread Lawrence Crowl
On 8/7/12, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Aug 7, 2012 at 2:35 AM, Lawrence Crowl cr...@google.com wrote: Convert double_int from a struct with function into a class with operators and methods. This patch adds the methods and operators. In general functions of

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-07 Thread Lawrence Crowl
On 8/7/12, Mike Stump mikest...@comcast.net wrote: On Aug 6, 2012, at 5:35 PM, Lawrence Crowl wrote: Convert double_int from a struct with function into a class with operators and methods. We have a wide_int class that replaces this class. :-( Really? Where? I don't see neither definition

[patch] PR54150

2012-08-07 Thread Steven Bosscher
Hello, This patch fixes PR54150. The patch was approved by Richi in Bugzilla, but I won't commit this for a few days so that others can speak up if they don't agree. Ciao! Steven PR54150.diff Description: Binary data

Re: [patch] PR54150

2012-08-07 Thread Gabriel Dos Reis
On Tue, Aug 7, 2012 at 1:54 PM, Steven Bosscher stevenb@gmail.com wrote: Hello, This patch fixes PR54150. The patch was approved by Richi in Bugzilla, but I won't commit this for a few days so that others can speak up if they don't agree. Ciao! Steven OK. Thanks for the cleanup! --

Re: PATCH: PR rtl-optimization/54157: [x32] -maddress-mode=long failures

2012-08-07 Thread H.J. Lu
On Sun, Aug 5, 2012 at 12:47 AM, Richard Sandiford rdsandif...@googlemail.com wrote: For the record, I can't approve this, but... H.J. Lu hjl.to...@gmail.com writes: i386,md has (define_expand extzv [(set (match_operand:SI 0 register_operand) (zero_extract:SI (match_operand 1

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-07 Thread Mike Stump
On Aug 7, 2012, at 11:38 AM, Lawrence Crowl wrote: Hm. There seems to be significant opinion that there should not be any implicit conversions. I am okay with operations as above, but would like to hear the opinions of others. If there is an agreed upon and expected semantic, having them are

Re: C++ PATCH for c++/48370 (extending lifetime of temps in aggregate initialization)

2012-08-07 Thread H.J. Lu
On Tue, Jun 12, 2012 at 10:00 PM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, Nov 3, 2011 at 8:50 PM, Jason Merrill ja...@redhat.com wrote: 12.2 states that a temporary bound to a reference lives as long as the reference itself. We have done that for reference variables, but not in other

Re: [google/gcc-4_7] Backport patch to add line info to non-virtual thunks

2012-08-07 Thread Rong Xu
Looks good to me for google-4_7 branches. -Rong On Mon, Aug 6, 2012 at 5:03 PM, Cary Coutant ccout...@google.com wrote: This patch is for the google/gcc-4_7 branch. It backports the following patch from trunk at r190190: http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00321.html GCC

[PATCH][Cilkplus] Remove unwanted static chain.

2012-08-07 Thread Iyer, Balaji V
Hello Everyone, This patch is for the Cilk Plus branch affecting mainly the C++ compiler. This patch will store the initial value of a loop correctly and remove the unnecessary static chain usage for some cases of Cilk_for. Thanks, Balaji V. Iyer. Index: parser.c

RE: [PATCH][Cilkplus] Remove unwanted static chain.

2012-08-07 Thread Iyer, Balaji V
Sorry, I was in the wrong directory when I was creating the patch. Here is the fixed patch. Thanks, Balaji V. Iyer. -Original Message- From: Iyer, Balaji V Sent: Tuesday, August 07, 2012 4:18 PM To: 'gcc-patches@gcc.gnu.org' Subject: [PATCH][Cilkplus] Remove unwanted static chain.

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-07 Thread Mike Stump
On Aug 7, 2012, at 11:42 AM, Lawrence Crowl wrote: On 8/7/12, Mike Stump mikest...@comcast.net wrote: On Aug 6, 2012, at 5:35 PM, Lawrence Crowl wrote: Convert double_int from a struct with function into a class with operators and methods. We have a wide_int class that replaces this class.

[PATCH, MIPS] fix MIPS16 hard-float function stub bugs

2012-08-07 Thread Sandra Loosemore
This patch fixes a group of bugs that were causing link errors on hard-float MIPS16 code built with a mips-linux-gnu toolchain. This is Mark Mitchell's analysis of the original problem: The MIPS16 instruction set cannot directly access hard-float registers, so helper functions in libgcc are

[PATCH, debug]: Fix PR 54177, Segfault in cselib_lookup due to NULL_RTX passed from vt_add_function_parameter

2012-08-07 Thread Uros Bizjak
Hello! We can exit early from var_lowpart for matched modes. This avoids situation, where var_lowpart tries to change (gdb) p debug_rtx (incoming) (concat:SC (reg:SF 48 $f16 [ x ]) (reg:SF 49 $f17 [ x+4 ])) $1 = void to SCmode, and returning NULL_RTX, since the RTX is neither REG, neither

Re: Assembly output optimisations (was: PR 51094 - fprint_w() in output_addr_const() reinstated)

2012-08-07 Thread Dimitrios Apostolou
I should mention that with my patch .ascii is used more aggresively than before, so if a string is longer than ELF_STRING_LIMIT it will be written as .ascii all of it, while in the past it would use .string for the string's tail. Example diff to original behaviour: .LASF15458: -

Re: Value type of map need not be default copyable

2012-08-07 Thread Ollie Wild
On Sat, Aug 4, 2012 at 10:34 AM, Paolo Carlini paolo.carl...@oracle.com wrote: First, I think we should add libstdc++ in CC. Thus, I would recommend people working in this area to begin with unordered_map, because in that case emplace is already available, assuming that's really the point

Re: Value type of map need not be default copyable

2012-08-07 Thread Paolo Carlini
Hi, (adding in CC Francois too) On 08/07/2012 11:43 PM, Ollie Wild wrote: On Sat, Aug 4, 2012 at 10:34 AM, Paolo Carlini paolo.carl...@oracle.com wrote: First, I think we should add libstdc++ in CC. Thus, I would recommend people working in this area to begin with unordered_map, because in

Re: s390: Avoid CAS boolean output inefficiency

2012-08-07 Thread Richard Henderson
On 08/07/2012 10:02 AM, Ulrich Weigand wrote: The following patch changes the builtin expander to pass a MEM oldval as-is to the back-end expander, so that the back-end can move the store to before the CC operation. With that patch I'm also seeing all the IPMs disappear. ... What do you

Re: Assembly output optimisations (was: PR 51094 - fprint_w() in output_addr_const() reinstated)

2012-08-07 Thread Ian Lance Taylor
On Tue, Aug 7, 2012 at 2:24 PM, Dimitrios Apostolou ji...@gmx.net wrote: BTW I can't find why ELF_STRING_LIMIT is only 256, it seems GAS supports arbitrary lengths. I'd have to change my code if we ever set it too high (or even unlimited) since I allocate the buffer on the stack. See the

[google] Remove deprecated pfmon-specific functions/structs from pmu-profile.c (issue6442086)

2012-08-07 Thread Chris Manghane
Removes references in libgcov.c to functions and structs removed from pmu-profile.c For google/main. Tested with crosstools and bootstrap. 2012-08-07 Chris Manghane cm...@google.com * libgcc/pmu-profile.c (enum pmu_tool_type): Remove pfmon-specific functions/structs.

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-07 Thread Richard Henderson
On 08/06/2012 05:35 PM, Lawrence Crowl wrote: +inline double_int +double_int::operator ++ () +{ + *this + double_int_one; + return *this; +} + +inline double_int +double_int::operator -- () +{ + *this - double_int_one; + return *this; +} Surely unused results there? r~

[v3] libstdc++/54005

2012-08-07 Thread Benjamin De Kosnik
Pretty minor change, as per PR. This version seems more appropriate for templatized types. I'll wait a bit before putting this on 4.7_branch -benjamin tested x86/linux 2012-08-07 Benjamin Kosnik b...@redhat.com PR libstdc++/54005 * include/std/atomic: Use

Re: Assembly output optimisations (was: PR 51094 - fprint_w() in output_addr_const() reinstated)

2012-08-07 Thread Dimitrios Apostolou
On Tue, 7 Aug 2012, Ian Lance Taylor wrote: On Tue, Aug 7, 2012 at 2:24 PM, Dimitrios Apostolou ji...@gmx.net wrote: BTW I can't find why ELF_STRING_LIMIT is only 256, it seems GAS supports arbitrary lengths. I'd have to change my code if we ever set it too high (or even unlimited) since I

Re: Assembly output optimisations (was: PR 51094 - fprint_w() in output_addr_const() reinstated)

2012-08-07 Thread Ian Lance Taylor
On Tue, Aug 7, 2012 at 4:27 PM, Dimitrios Apostolou ji...@gmx.net wrote: On Tue, 7 Aug 2012, Ian Lance Taylor wrote: On Tue, Aug 7, 2012 at 2:24 PM, Dimitrios Apostolou ji...@gmx.net wrote: BTW I can't find why ELF_STRING_LIMIT is only 256, it seems GAS supports arbitrary lengths. I'd have

[patch] Fix problems with -fdebug-types-section and local types

2012-08-07 Thread Cary Coutant
With --std=c++11, a template parameter can refer to a local type defined within a function. Because that local type doesn't qualify for its own type unit, we copy it as an unworthy type into the type unit that refers to it, but we copy too much, leading to a comdat type unit that contains a DIE

Re: [PATCH] Intrinsics for ADCX

2012-08-07 Thread Michael Zolotukhin
Hi, Here is the patch with some obvious fixes. If there are no objections, could anyone please check it in? Changelog entry: 2012-08-08 Michael Zolotukhin michael.v.zolotuk...@intel.com * common/config/i386/i386-common.c (OPTION_MASK_ISA_ADX_SET): New.