Re: Use conditional casting with symtab_node

2012-10-05 Thread Nathan Froyd
- Original Message - > I see all these patches with mixed feeling - it puts breaks on all > developers > because they need to learn the new interface which does not bring any > immediate benefit. So I think _your_ development time would be > better > spent by fixing open bugs or by tacklin

Re: patch to fix constant math

2012-10-08 Thread Nathan Froyd
- Original Message - > Btw, as for Richards idea of conditionally placing the length field > in > rtx_def looks like overkill to me. These days we'd merely want to > optimize for 64bit hosts, thus unconditionally adding a 32 bit > field to rtx_def looks ok to me (you can wrap that inside a

[PATCH] reduce size penalty for including C++11 on x86 systems

2015-10-13 Thread Nathan Froyd
From: Nathan Froyd Including in C++11 mode (typically done for std::{min,max,swap}) includes , for std::uniform_int_distribution. On x86 platforms, manages to drag in through x86's opt_random.h header, and has gotten rather large recently with the addition of AVX intrinsics. The compa

[PATCH][PR c++/82888] smarter code for default initialization of scalar arrays

2017-11-16 Thread Nathan Froyd
Default-initialization of scalar arrays in C++ member initialization lists produced rather slow code, laboriously setting each element of the array to zero. It would be much faster to block-initialize the array, and that's what this patch does. The patch works for me, but I'm not sure if it's the

Re: [PATCH][PR c++/82888] smarter code for default initialization of scalar arrays

2017-11-17 Thread Nathan Froyd
On Fri, Nov 17, 2017 at 8:50 AM, Jason Merrill wrote: > On Thu, Nov 16, 2017 at 11:21 AM, Nathan Froyd wrote: >> diff --git a/gcc/cp/init.c b/gcc/cp/init.c >> index c76460d..53d6133 100644 >> --- a/gcc/cp/init.c >> +++ b/gcc/cp/init.c >> @@ -4038,6 +4038,15 @

Re: More informative ODR warnings

2014-07-02 Thread Nathan Froyd
- Original Message - > /aux/hubicka/firefox/netwerk/sctp/datachannel/DataChannel.h:64:0: warning: > field ‘mSpa’ (of type ‘struct BufferedMsg’) violates one definition rule > [-Wodr] Can we reword this warning? The "of type 'struct BufferedMsg'" could be easily taken to mean that the typ

[PATCH] fix generic std::atomic::compare_exchange_{weak,strong}

2013-07-26 Thread Nathan Froyd
Compiling the test program: #include enum x { a, b }; std::atomic v; bool test_strong() { x expected = a; return v.compare_exchange_strong(expected, b, std::memory_order_acq_rel); } bool test_weak() { x expected = a; return v.compare_exchange_weak(expected, b, std::memory_order_acq_re

Re: [PATCH] fix generic std::atomic::compare_exchange_{weak,strong}

2013-07-26 Thread Nathan Froyd
-- Original Message - > > > Hi, > > Nathan Froyd ha scritto: > >Compiling the test program: > > > >#include > > > >enum x { a, b }; > > > >std::atomic v; > > > >bool test_strong() > >{ > > x expected = a; >

Re: [PATCH] fix generic std::atomic::compare_exchange_{weak,strong}

2013-07-26 Thread Nathan Froyd
- Original Message - > On 07/26/2013 08:42 PM, Nathan Froyd wrote: > > Sure, I can do that. For maximum effectiveness, it'd be good to have it > > check the specializations for atomic<>, too. Is there something in the > > libstdc++ testsuite for iteratin

Re: [Patch ARM] Fix PR target/50106

2011-10-19 Thread Nathan Froyd
On 10/19/2011 3:27 PM, Ramana Radhakrishnan wrote: Index: gcc/config/arm/arm.c - live_regs_mask |= extra_mask<< (size / UNITS_PER_WORD); + live_regs_mask |= extra_mask<< ((size + 3) / UNITS_PER_WORD); IIUC, wouldn't ((size + UNITS_PER_WORD - 1) / UNITS_PER_WORD) be clearer? -Nathan

Re: Beyond Complex Register Management

2012-08-08 Thread Nathan Froyd
On Wed, Aug 08, 2012 at 10:52:28AM -0700, Mike Stump wrote: > As we move to C++, I'd love for port maintainers to be able to get together > and hoist _up_ code from the port so other ports can use it and thus, have > more sharing. We make heavily stylized uses, which could be wrapped into a > p

[PATCH] convert m32c to constraints.md

2012-08-17 Thread Nathan Froyd
As $SUBJECT suggests. I haven't tested this. It's possible my dejagnu installation is too old and/or I have forgotten many subtleties for testing embedded targets, but I could not make m32c-sim work and I didn't want to spend an enormous amount of time making it work. Nonetheless, I have compare

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

2012-09-12 Thread Nathan Froyd
- Original Message - > Nathan, again thanks. There are a few minor tweaks compared to your > version: Thanks for fixing this up! > - Keeping old layout of "mmix_reg_or_8bit_operand". That looked like > a spurious change and I prefer the ior construct to the > if_then_else. ISTR wit

Re: __int256

2012-07-13 Thread Nathan Froyd
On Fri, Jul 13, 2012 at 10:36:35AM -0700, Mike Stump wrote: > I just checked all in tree gcc targets, and none claim OImode support. ./s390/s390-modes.def:23:INT_MODE (OI, 32); ./spu/spu-modes.def:29:INT_MODE (OI, 32); ./ia64/ia64-modes.def:68:INT_MODE (OI, 32); ./i386/i386-modes.def:88:INT_MODE (

[PATCH] convert target_expmed macro accessors into inline functions

2012-07-27 Thread Nathan Froyd
As suggested by rth here: http://gcc.gnu.org/ml/gcc-patches/2012-07/msg01281.html this patch converts all the #define accessors in expmed.h to use inline functions instead. By itself, doing that conversion is not very exciting. Followup patches might: * Move setters into expmed.c; * Reduce spa

[PATCH] delete last traces of GO_IF_MODE_DEPENDENT_ADDRESS

2012-07-27 Thread Nathan Froyd
Subject says it all, really. Two targets with redundant definitions, and two targets with trivial definitions. Time to remove this. Tested on x86_64-unknown-linux-gnu. Crosses to {alpha,vax}-linux-gnu built as well. OK to commit? -Nathan * defaults.h (GO_IF_MODE_DEPENDENT_ADDRESS): D

[PATCH] shrink storage for target_expmed cost fields

2012-07-30 Thread Nathan Froyd
Now that we can freely change the representation of the cost fields in struct target_expmed, the patch below does so, by only requiring arrays to hold enough storage for integer modes and/or vector integer modes, as appropriate. default_target_expmed shrinks from ~200KB to ~85KB on x86_64-unknown-

Re: ORDERED_EXPR in invert_tree_comparison

2012-08-02 Thread Nathan Froyd
On Thu, Aug 02, 2012 at 02:48:08PM +0200, Marc Glisse wrote: > I am redoing the bootstrap+regtest, then I'll commit if I don't hear > protests about the testcase. > > gcc/ChangeLog > 2012-06-15 Marc Glisse > > PR tree-optimization/53805 > * fold-const.c (invert_tree_comparison): Do

Re: ORDERED_EXPR in invert_tree_comparison

2012-08-02 Thread Nathan Froyd
On Thu, Aug 02, 2012 at 05:20:24PM +0200, Marc Glisse wrote: > On Thu, 2 Aug 2012, Nathan Froyd wrote: > >>PR tree-optimization/53805 > >>* fold-const.c (invert_tree_comparison): Do invert ORDERED_EXPR and > >>UNORDERED_EXPR for floating point. > >

[PATCH] [mep] delete unused constraint-related macros and functions

2012-08-02 Thread Nathan Froyd
mep uses {constraints,predicates}.md and #if 0'd out the old macro versions. In the interest of not keeping dead code around, I'd like to delete these. I think this falls under the obvious rule, so I'll commit this in a couple of days after waiting to hear from DJ. Tested by building mep-elf. -Na

[PATCH,mmix] convert to constraints.md

2012-08-02 Thread Nathan Froyd
As $SUBJECT says. There's not too much interesting here. I did a fairly literal-minded conversion, so it's possible there's smarter ways to do some things. Compiled with cross to mmix-knuth-mmixware and spot-checked by comparing libgcc object files. I have no idea how to set up a simulator envi

Re: [PATCH] Fix part of PR30442

2012-06-05 Thread Nathan Froyd
On Tue, Jun 05, 2012 at 02:35:30PM +0200, Richard Guenther wrote: > Index: gcc/tree-vect-data-refs.c > ! gimple stmt = gsi_stmt (gsi); > ! if (!find_data_references_in_stmt (NULL, stmt, > ! &BB_VINFO_DATAREFS (bb_vinfo))) > ! { > !

Re: [AVR,committed]: ad PR45099: change error to warning

2011-09-21 Thread Nathan Froyd
On 9/21/2011 5:49 AM, Georg-Johann Lay wrote: As proposed in PR45099, avr-gcc will now just print a warning instead of an error when a fixed register is needed to pass a parameter to a function. Where's the proposal in the PR? I see a problem report that was addressed four months ago by addin

Re: [google] Linker plugin to do function reordering using callgraph edge profiles (issue5124041)

2011-09-26 Thread Nathan Froyd
On 9/23/2011 6:03 PM, Sriraman Tallam wrote: This patch adds a new linker plugin to re-order functions. This is great stuff. We were experimenting with using the coverage files to generate an ordering for --section-ordering-file, but this might be even better, will have to experiment with it

Re: [SH] PR 50751 - add HImode displacement addressing support

2012-04-10 Thread Nathan Froyd
- Original Message - > > BTW, do you have the numbers of CSiBE with this? > > Only for "-m4-single -ml -O2 -mpretend-cmove" so far. > Not so spectacular :T > I'll also do a comparison of more variants to see if something went > really bad. It's a bit difficult to isolate the degradations

Re: [PATCH] Don't optimize away non-pure/const calls during ccp (PR tree-optimization/51683)

2011-12-28 Thread Nathan Froyd
- Original Message - > else if (is_gimple_call (def_stmt)) > { > + int flags = gimple_call_flags (def_stmt); > + > + /* Don't optimize away calls that have side-effects. */ > + if ((flags & (ECF_CONST|ECF_PURE)) == 0 > + || (flags & ECF_LOOPING_CONST_OR_PURE)) This patch does this computat

[PATCH] don't use TYPE_ARG_TYPES when calling c-family:check_function_arguments

2011-05-21 Thread Nathan Froyd
The calling interface for check_function_arguments requires the caller to extract TYPE_ATTRIBUTES and TYPE_ARG_TYPES prior to calling it. This is somewhat silly, as well as being incompatible with an eventual removal of TYPE_ARG_TYPES. The patch below changes things to pass the FUNCTION_TYPE itse

[PATCH] get rid of some TYPE_ARG_TYPES usage by introducing nth_arg_type

2011-05-23 Thread Nathan Froyd
Various places in the compiler grab TYPE_ARG_TYPES and grovel through it when what they're really trying to do is index into the list of argument types. The patch below introduces nth_arg_type for such situatiosn and changes a hodgepodge of places to use it. You could, of course, use function_arg

Re: [PATCH] get rid of some TYPE_ARG_TYPES usage by introducing nth_arg_type

2011-05-23 Thread Nathan Froyd
On 05/23/2011 10:05 AM, Richard Guenther wrote: > On Mon, May 23, 2011 at 3:53 PM, Nathan Froyd > wrote: >> +/* Return the Nth argument type from FNTYPE. */ >> + >> +tree >> +nth_arg_type (const_tree fntype, int n) >> +{ >> + function_arg

Re: [PING][PATCH 13/18] move TS_EXP to be a substructure of TS_TYPED

2011-05-23 Thread Nathan Froyd
On 05/17/2011 11:31 AM, Nathan Froyd wrote: > On 05/10/2011 04:18 PM, Nathan Froyd wrote: >> On 03/10/2011 11:23 PM, Nathan Froyd wrote: >>> After all that, we can finally make tree_exp inherit from typed_tree. >>> Quite anticlimatic. >> >> Ping. http://gcc.

Re: [PATCH] split tree_type, a.k.a. "tuplifying types"

2011-05-23 Thread Nathan Froyd
On 05/22/2011 02:24 PM, Tom de Vries wrote: > Now that struct tree_type does not exist anymore, 'sizeof (struct tree_type)' > generates an error in the following assert in fold_checksum_tree: > ... > gcc_assert ((sizeof (struct tree_exp) + 5 * sizeof (tree) > <= sizeof (struct tree_f

Re: external declaration of dominance debug functions

2011-05-23 Thread Nathan Froyd
On 05/23/2011 04:23 PM, Richard Guenther wrote: >> So I don't buy Richie's argument. Otherwise, someone would propose a >> patch to remove the hundreds of debug_ declarations in public header >> files (i.e. those visible to plugins), and if he did, I hope such a >> naughty patch won't be accepted.

Re: [PING][PATCH 13/18] move TS_EXP to be a substructure of TS_TYPED

2011-05-24 Thread Nathan Froyd
`0On Mon, May 23, 2011 at 04:58:06PM +0200, Richard Guenther wrote: > On Mon, May 23, 2011 at 4:18 PM, Nathan Froyd > wrote: > > On 05/17/2011 11:31 AM, Nathan Froyd wrote: > >> On 05/10/2011 04:18 PM, Nathan Froyd wrote: > >>> On 03/10/2011 11:23 PM, Nathan F

[PATCH PING] unreviewed tree-slimming patches

2011-05-25 Thread Nathan Froyd
These patches: (C, C++, middle-end) [PATCH 14/18] move TS_STATEMENT_LIST to be a substructure of TS_TYPED http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00560.html (C, Java, middle-end) [PATCH 18/18] make TS_BLOCK a substructure of TS_BASE http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00

Re: [PATCH PING] unreviewed tree-slimming patches

2011-05-25 Thread Nathan Froyd
On 05/25/2011 02:06 PM, Tom Tromey wrote: >>>>>> "Nathan" == Nathan Froyd writes: > > Nathan> (C, Java, middle-end) > Nathan> [PATCH 18/18] make TS_BLOCK a substructure of TS_BASE > Nathan> http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00

Re: [PATCH][4.6] detect C++ errors to fix 2288 and 18770

2011-05-25 Thread Nathan Froyd
x86_64-unknown-linux-gnu; tests in progress for libstdc++. OK to commit? -Nathan gcc/cp/ 2011-xx-xx Janis Johnson Nathan Froyd PR c++/2288 PR c++/18770 * name-lookup.h (enum scope_kind): Add sk_cond. * name-lookup.c (pushdecl_maybe_friend): Get scope of shadowed loca

Re: C++ PATCH for c++/45698 (crash with variadics)

2011-05-25 Thread Nathan Froyd
On 05/25/2011 03:45 PM, Jason Merrill wrote: > While looking at this, I also noticed that print_node expects everything to > have TREE_TYPE, which is no longer correct. Technically, I think this is not true; everything inherits from tree_common; or at least tree_typed. (I had the bit of print_nod

Re: [PATCH][4.6] detect C++ errors to fix 2288 and 18770

2011-05-25 Thread Nathan Froyd
On Wed, May 25, 2011 at 03:22:07PM -0400, Nathan Froyd wrote: > The patch just requires some shuffling of logic to catch issues now; > below is a version that works for me on the trunk. > > This new checking does require modifying g++.dg/cpp0x/range-for5.C. > > Tested wit

Re: [PATCH PING] unreviewed tree-slimming patches

2011-05-25 Thread Nathan Froyd
On 05/25/2011 10:18 AM, Jason Merrill wrote: > On 05/25/2011 10:00 AM, Nathan Froyd wrote: >> Jason commented on the TS_STATEMENT_LIST patch, but >> the discussion didn't come to a resolution. > > Right, from your last mail I thought that you were investigating my que

Re: [PATCH PING] unreviewed tree-slimming patches

2011-05-26 Thread Nathan Froyd
On 05/26/2011 09:39 AM, Jason Merrill wrote: > On 05/25/2011 10:21 PM, Nathan Froyd wrote: >> An alternative solution would be to initialize cur_stmt_list somewhere with >> an >> actual 1-element VEC; > > Or just push NULL onto the stack and let append_to_statemen

Re: [PATCH 18/18] make TS_BLOCK a substructure of TS_BASE

2011-05-26 Thread Nathan Froyd
On Thu, Mar 10, 2011 at 11:23:26PM -0500, Nathan Froyd wrote: > Now that we've encapsulated all uses of BLOCK_CHAINON properly, we can > make BLOCKs inherit from tree_base and redirect BLOCK_CHAINON to use a > tree_block-private field instead of tree_common's chain. Doing s

Re: [PATCH PING] unreviewed tree-slimming patches

2011-05-26 Thread Nathan Froyd
On Thu, May 26, 2011 at 09:39:30AM -0400, Jason Merrill wrote: > On 05/25/2011 10:21 PM, Nathan Froyd wrote: > >An alternative solution would be to initialize cur_stmt_list somewhere with > >an > >actual 1-element VEC; > > Or just push NULL onto the stack and let

Re: [pph] More C++ Tree Nodes (issue4526083)

2011-05-26 Thread Nathan Froyd
On 05/26/2011 10:24 PM, Lawrence Crowl wrote: > Index: gcc/cp/cp-objcp-common.c > === > --- gcc/cp/cp-objcp-common.c (revision 174301) > +++ gcc/cp/cp-objcp-common.c (working copy) > @@ -99,6 +99,8 @@ cp_tree_size (enum tree_code cod

MAINTAINERS: update my email address

2011-05-27 Thread Nathan Froyd
nemoking...@gmail.com Thomas Fitzsimmons fitz...@redhat.com Brian Ford f...@vss.fsi.com John Freeman jfreema...@gmail.com -Nathan Froyd

[PATCH,C/C++/ObjC/C++] get rid of build_function_call

2011-06-17 Thread Nathan Froyd
build_function_call uses an outdated interface (a TREE_LIST containing the arguments passed to the function) and is only used by the ObjC/C++ FEs. The patch below deletes it and introduces a new build_function_call_nary interface modeled after cp_build_function_call_nary. The C/C++ changes are mi

[PATCH] parallelize g++ testing a bit more

2011-06-17 Thread Nathan Froyd
I've done a lot of g++-only testsuite runs lately and I noticed that it didn't parallelize all that well. The patch below adds a couple more .exp files to the parallel infrastructure. dg-torture.exp is the big one; it takes about as much time as old-deja.exp. Other valid candidates are lto.exp a

Re: [Patch, Fortran] Add runtime_error function to libgfortran/caf/mpi.c

2011-07-15 Thread Nathan Froyd
On 7/9/2011 8:02 AM, Tobias Burnus wrote: Tobias Burnus wrote: This patch adds a run-time error function to mpi.c, which gives a proper error message including the image number. Additionally, it allows to clean up the error handling, avoiding the duplicated declaration of strings. +static void

Re: [PATCH] add statistics counting to postreload, copy-rename, and math-opts

2011-04-12 Thread Nathan Froyd
On Tue, Apr 12, 2011 at 04:27:01PM +0200, Richard Guenther wrote: > On Tue, Apr 12, 2011 at 4:16 PM, Nathan Froyd > wrote: > > It's a shame more passes don't make use of the statistics_* > > infrastructure.  This patch is a step towards rectifying that and adds > &

Re: [PATCH] add statistics counting to postreload, copy-rename, and math-opts

2011-04-12 Thread Nathan Froyd
On Tue, Apr 12, 2011 at 04:37:42PM +0200, Richard Guenther wrote: > On Tue, Apr 12, 2011 at 4:32 PM, Nathan Froyd > wrote: > > Thanks.  I may go twiddle that patch to do something similar to mine and > > submit that.  Do you use your patch for checking that the same set of >

Re: [PATCH] add statistics counting to postreload, copy-rename, and math-opts

2011-04-12 Thread Nathan Froyd
On Tue, Apr 12, 2011 at 04:54:43PM +0200, Richard Guenther wrote: > On Tue, Apr 12, 2011 at 4:51 PM, Nathan Froyd > wrote: > > True, but maybe those testcases should be adjusted--per-pass flags, > > rather than blindly assuming -O2 includes them.  And it's not clear to

Re: [PATCH 02/18] enforce TREE_CHAIN and TREE_TYPE accesses

2011-04-12 Thread Nathan Froyd
On Thu, Mar 10, 2011 at 11:23:10PM -0500, Nathan Froyd wrote: > Now that we have a structure where not every node might include > TREE_CHAIN or TREE_TYPE, we need to make sure that when we call said > accessors that the argument is properly typed. This requires a number > of ch

Re: [PATCH] add statistics counting to postreload, copy-rename, and math-opts

2011-04-13 Thread Nathan Froyd
On Wed, Apr 13, 2011 at 11:07:15AM +0200, Richard Guenther wrote: > On Tue, Apr 12, 2011 at 5:09 PM, Nathan Froyd > wrote: > > Granted, but that fact should still be recorded.  The situation we have > > today, for something like: > > > > func1: statistic for &

Re: [PATCH PING] c++-specific bits of tree-slimming patches

2011-04-14 Thread Nathan Froyd
On Fri, Apr 08, 2011 at 01:50:24PM -0400, Jason Merrill wrote: > On 03/24/2011 09:15 AM, Nathan Froyd wrote: >> + tree t = make_node (CASE_LABEL_EXPR); >> + >> + TREE_TYPE (t) = void_type_node; >> + SET_EXPR_LOCATION (t, input_location); > > As jsm and richi sai

Re: [PATCH,c++] fix PR objc++/48479, ICE in cxx_mark_addressable

2011-04-14 Thread Nathan Froyd
On Thu, Apr 07, 2011 at 09:37:17AM -0400, Nathan Froyd wrote: > My recent patch removing DECL_RTL from CONST_DECLs caused regressions in > the ObjC++ testsuite on Darwin targets. The problem is that > DECL_REGISTER was being called on CONST_DECLs; DECL_REGISTER says: > > /*

[PATCH] factor asm op chaining out from stmt.c:expand_asm_stmt

2011-04-15 Thread Nathan Froyd
There are several cut-and-pasted loops in expand_asm_stmt that could be parameterized by the functions used to access the particular operands. The patch below does that. Tested on x86_64-unknown-linux-gnu. OK to commit? -Nathan * stmt.c (chain_asm_ops): New function. (expand_as

[PATCH] refactor gimple asm memory clobber checking

2011-04-15 Thread Nathan Froyd
There are a couple places that check GIMPLE_ASMs for clobbering memory; this patch centralizes the logic in gimple.c. Tested on x86_64-unknown-linux-gnu. OK to commit? -Nathan * gimple.h (gimple_asm_clobbers_memory_p): Declare. * gimple.c (gimple_asm_clobbers_memory_p): Define.

Re: [PATCH, SMS] Free sccs field

2011-04-15 Thread Nathan Froyd
On Fri, Apr 15, 2011 at 06:27:05PM +0300, Revital Eres wrote: > + if (all_sccs->sccs) > +free (all_sccs->sccs); No need to check for non-NULL prior to free'ing. -Nathan

Re: [PATCH] Fix PR48650

2011-04-18 Thread Nathan Froyd
On Mon, Apr 18, 2011 at 12:46:52PM +0200, Richard Guenther wrote: > STRING_CST is now derived from tree_typed but we still clear a > tree_common sized chunk. Nathan, maybe grep for other sizeof()s > around the tree? Ouch, thanks for fixing. I grepped for 'struct tree_common' and turned up a few

Re: Allow more PowerPC sibling calls

2011-04-18 Thread Nathan Froyd
On Sat, Apr 09, 2011 at 12:21:46PM +0930, Alan Modra wrote: > a) Allow sibling calls via function pointer. At the time >rs6000_function_ok_for_sibcall was written, I don't think access to >arg types of function pointer calls was available in the target >hook/macro. > > + /* Functi

Re: [PATCH] make LABEL_DECL has its own rtx field for its associated CODE_LABEL

2011-04-19 Thread Nathan Froyd
On Tue, Apr 05, 2011 at 05:55:33PM +0200, Michael Matz wrote: > I have a preference in having just one DECL_RTL field for conceptual > reasons: > > Most DECLs are actually objects (there are some prominent exceptions, but > those always would be better described with something like NAMED_ENTITY,

[PATCH] make Ada runtime function building use build_function_type_list

2011-04-20 Thread Nathan Froyd
This patch changes most of the uses of build_function_type in the Ada to use build_function_type_list. There are a handful of build_function_type calls left; replacing those will have to wait until we get a build_function_type_{n,vec} interface. Tested on x86_64-unknown-linux-gnu. OK to commit?

[PATCH] use build_function_type_list a few places in the ObjC frontend

2011-04-20 Thread Nathan Froyd
Just as $SUBJECT suggests. All the other uses of build_function_type_list are tied up with get_arg_type_list and will therefore have to wait for a better FUNCTION_TYPE builder. Tested on x86_64-unknown-linux-gnu. IIUC the changes to objc-next-runtime-abi-02.c would not be tested on that platform

[PATCH] use build_function_type_list in the alpha backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to alpha-elf. OK to commit? -Nathan * config/alpha/alpha.c (alpha_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 5e85e2b..237e9b3 100644

[PATCH] use build_function_type_list in the bfin backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to bfin-elf. OK to commit? -Nathan * config/bfin/bfin.c (bfin_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 5d08437..03a833d 100644 --- a/g

[PATCH] use build_function_type_list in the frv backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to frv-elf. OK to commit? -Nathan * config/frv/frv.c (frv_init_builtins): Delete `endlink' variable. Call builtin_function_type_list instead of builtin_function_type. (UNARY, BINARY, TRINARY, QUAD): Likewise. diff --git a/gcc/conf

[PATCH] use build_function_type_list in the i386 backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. There's still one use of build_function_type; replacing that type will have to wait for an improved FUNCTION_TYPE-building interface. Tested on x86_64-unknown-linux-gnu. OK to commit? -Nathan * config/i386/i386.c (ix86_code_end): Call build_function_type_list

[PATCH] use build_function_type_list in the ia64 backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to ia64-linux-gnu. OK to commit? -Nathan * config/ia64/ia64.c (ia64_init_builtins): Call build_function_type_list instead of builtin_function_type. diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 5f22b17..166ec43 100644

[PATCH] use build_function_type_list in the iq2000 backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to iq2000-elf. OK to commit? -Nathan * config/iq2000/i2000.c (iq2000_init_builtins): Call build_function_type_list instead of build_function_type. Delete `endlink' variable. diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2

[PATCH] use build_function_type_list in the mep backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to mep-elf. OK to commit? -Nathan * config/mep/mep.c (mep_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index 02c825a..b8ef440 100644 --- a/gcc/confi

[PATCH] use build_function_type_list in the mips backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to mips-elf. OK to commit? -Nathan * config/mips/mips.c (mips16_build_function_stub): Call build_function_type_list instead of build_function_type. (mips16_build_call_stub): Likewise. diff --git a/gcc/config/mips/mips.c b/gcc/conf

[PATCH] use build_function_type_list in the s390 backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to s390-linux-gnu. OK to commit? -Nathan * config/s390/s390.c (s390_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index caee077..adacfa3 100644 -

[PATCH] use build_function_type_list in the sparc backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to sparc-elf. OK to commit? -Nathan * config/sparc/sparc.c (sparc_file_end): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 03b5e66..e7dd75b 100644 ---

[PATCH] use build_function_type_list in the xtensa backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to xtensa-elf. OK to commit? -Nathan * config/xtensa/xtensa.c (xtensa_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index fe70270..574e08

[PATCH] use build_function_type_list in the rs6000 backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. The only tricky part is in builtin_function_type, where we fill in unused args with NULL_TREE so that passing extra arguments to build_function_type_list doesn't matter. Tested with cross to powerpc-eabi. OK to commit? -Nathan * config/rs6000/rs6000.c (spe_init_bu

[PATCH] use build_function_type_list in the picochip backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to picochip-elf. OK to commit? -Nathan * config/picochip/picochip.c (picochip_init_builtins): Call build_function_type_list instead of build_function_type. Delete `endlink' variable. diff --git a/gcc/config/picochip/picochip.c b/g

[PATCH] use build_function_type_list in the avr backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to avr-elf. OK to commit? -Nathan * config/avr/avr.c (avr_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 500a5b2..6dbf8b4 100644 --- a/gcc/confi

[PATCH] use build_function_type_list in the pa backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to hppa-linux-gnu. OK to commit? -Nathan * config/pa/pa.c (pa_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index e05cf19..aeb8061 100644 --- a/gcc/confi

[PATCH] use build_function_type_list in the arm backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. There's one remaining use of build_function_type, but replace that will have to wait until we have a better FUNCTION_TYPE-building interface. Tested with cross to arm-eabi. OK to commit? -Nathan * config/arm/arm.c (arm_init_iwmmxt_builtins): Call build_fun

Re: [PATCH] use build_function_type_list in the ia64 backend

2011-04-20 Thread Nathan Froyd
On Wed, Apr 20, 2011 at 03:29:19PM -0400, Nathan Froyd wrote: > As $SUBJECT suggests. Tested with cross to ia64-linux-gnu. OK to > commit? > > - ftype = build_function_type (float128_type, void_list_node); > - decl = add_builtin_function ("__

[PATCH] use build_function_type_list in the spu backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. The only tricky bit is initializing all the args to NULL_TREE so that we can safely pass all the args to build_function_type_list. Tested with cross to spu-elf; I couldn't build all of libgcc, but that appears to be a pre-existing problem. OK to commit? -Nathan *

[PATCH] use build_function_type_list in the stormy16 backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. For safety's sake, we initialize all the arguments to NULL before passing them to build_function_type_list. This is not necessary currently, as we always completely fill in the args array, but it might save some future coder from quite some grief... Tested with cross to xst

[PATCH] use build_function_type_list in the sh backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. The only tricky bit is the initialization of `args' to NULL_TREEs so that we can safely pass all of the relevant args to build_function_type_list, regardless of whether the function type in question has that many args. Tested with cross to sh-elf. OK to commit? -Nathan

Re: [PATCH] use build_function_type_list in the ia64 backend

2011-04-20 Thread Nathan Froyd
On Wed, Apr 20, 2011 at 02:09:49PM -0700, Steve Ellcey wrote: > I am not sure what the patch would look like then. You removed the > assignment to decl, so what are you putting in ia64_builtins? Can you > send the full correct patch. Sure. Updated patch below, which probably looks somewhat more

[PATCH] centralize builtin function type building

2011-04-21 Thread Nathan Froyd
This patch does two things: - centralizes some infrastructure for defining builtin function types for frontends by providing a common function that DEF_FUNCTION_TYPE_FOO macros can call; and - in order to do that well, it also introduces build{,_varargs}_function_type_array for cases when

Re: [PATCH] make LABEL_DECL has its own rtx field for its associated CODE_LABEL

2011-04-21 Thread Nathan Froyd
On Thu, Apr 21, 2011 at 05:54:28PM +0200, Michael Matz wrote: > > > In particular, FIELD_DECLs have a size, but they have no RTL associated > > > with them.  And LABEL_DECLs have RTL, but no size. > > Blaeh. So far about nice clean ideas :) One hacky idea: change my > proposal to this: > > de

Re: [PATCH PING] c++-specific bits of tree-slimming patches

2011-04-21 Thread Nathan Froyd
On Fri, Apr 08, 2011 at 01:50:24PM -0400, Jason Merrill wrote: > On 03/24/2011 09:15 AM, Nathan Froyd wrote: >> + tree t = make_node (CASE_LABEL_EXPR); >> + >> + TREE_TYPE (t) = void_type_node; >> + SET_EXPR_LOCATION (t, input_location); > > As jsm and richi sai

Re: [PATCH PING] c++-specific bits of tree-slimming patches

2011-04-21 Thread Nathan Froyd
On Thu, Apr 21, 2011 at 10:49:05PM -0400, Jason Merrill wrote: > On 04/21/2011 08:50 PM, Nathan Froyd wrote: >> On Fri, Apr 08, 2011 at 01:50:24PM -0400, Jason Merrill wrote: >>> As jsm and richi said, using input_location like this is a regression. >>> Can we use DECL_

Re: [PATCH PING] c++-specific bits of tree-slimming patches

2011-04-22 Thread Nathan Froyd
On Fri, Apr 22, 2011 at 11:12:01AM +0200, Richard Guenther wrote: > On Fri, Apr 22, 2011 at 8:13 AM, Mike Stump wrote: > > Unsurprising...  It will never fail during testsuite run, and won't > > always fail during a bootstrap. > > > >> I can't think what the comment would be talking about with poi

Re: [PATCH] centralize builtin function type building

2011-04-22 Thread Nathan Froyd
On Thu, Apr 21, 2011 at 05:36:42PM +0200, Richard Guenther wrote: > On Thu, Apr 21, 2011 at 5:04 PM, Nathan Froyd > wrote: > > This patch does two things: > > > > - centralizes some infrastructure for defining builtin function types > >  for frontends by pr

Re: [PATCH] centralize builtin function type building

2011-04-22 Thread Nathan Froyd
On Fri, Apr 22, 2011 at 02:58:31PM -0400, Michael Meissner wrote: > On Thu, Apr 21, 2011 at 11:04:47AM -0400, Nathan Froyd wrote: > > - centralizes some infrastructure for defining builtin function types > > for frontends by providing a common function that > > DEF_FUNCTIO

Re: [PATCH PING] c++-specific bits of tree-slimming patches

2011-04-25 Thread Nathan Froyd
On Fri, Apr 22, 2011 at 12:59:21AM -0400, Jason Merrill wrote: > On 04/21/2011 10:55 PM, Nathan Froyd wrote: >> On Thu, Apr 21, 2011 at 10:49:05PM -0400, Jason Merrill wrote: >>> Hunh. How does that work? They fill in CASE_LABEL later? Can that be >>>

Re: [PATCH] make Ada runtime function building use build_function_type_list

2011-04-27 Thread Nathan Froyd
On Wed, Apr 20, 2011 at 10:08:21AM -0700, Nathan Froyd wrote: > This patch changes most of the uses of build_function_type in the Ada to > use build_function_type_list. There are a handful of > build_function_type calls left; replacing those will have to wait until > we get a build_fu

Re: trial fix to null pointer free

2011-04-27 Thread Nathan Froyd
On Wed, Apr 27, 2011 at 04:23:42PM -0700, Xinliang David Li wrote: > This can happen when the module does not have function bodies. > > - VEC_free (cgraph_node_ptr, heap, cgraph_node_map); > - cgraph_node_map = NULL; > + if (cgraph_node_map) > +VEC_free (cgraph_node_ptr, heap, cgraph_node_

Re: [google] Add -fstrict-enum-precision flag (issue4433083)

2011-04-28 Thread Nathan Froyd
On Thu, Apr 28, 2011 at 03:50:45PM -0400, Diego Novillo wrote: > Committed to google/main. Jason, Silvius, what do you think would be > the best approach to merge this into trunk? When this code does get merged to trunk, can the testcases abort() on failure rather than returning 1? This is frien

[PATCH] convert nonlocal_goto_handler_labels to a VEC

2011-04-29 Thread Nathan Froyd
As $SUBJECT suggests. The memory savings from this conversion is negligible; the real benefit, IMHO, is use of a proper container instead of EXPR_LIST. remove_node_from_expr_list is unused after this patch; I will delete it as an obvious followon patch if this patch is approved. Tested on x86_64

[PATCH] convert forced_labels to a VEC

2011-04-29 Thread Nathan Froyd
As $SUBJECT suggests. Just like the nonlocal_goto_handler_labels, the real benefit is a proper container instead of an EXPR_LIST. in_expr_list_p is unused after this patch; I will delete it as obvious in a followon patch if this patch is approved. Tested on x86_64-unknown-linux-gnu. OK to commi

[PATCH,c++] delete TREE_NEGATED_INT

2011-04-29 Thread Nathan Froyd
As $SUBJECT suggests. It is write-only; I'm not sure what it was ever used for. Tested on x86_64-unknonw-linux-gnu. OK to commit? -Nathan gcc/cp/ * cp-tree.h (TREE_NEGATED_INT): Delete. * semantics.c (finish_unary_op_expr): Don't try to set it. diff --git a/gcc/cp/cp-tree.h b/

Re: [google] Add new warning -Wreal-conversion (issue4436068)

2011-04-29 Thread Nathan Froyd
On Fri, Apr 29, 2011 at 10:59:31AM -0400, Diego Novillo wrote: > * g++.dg/warn/Wreal-conversion-1.C: New. > * gcc.dg/Wreal-conversion-1.c: New. Could a single copy of the test be placed in c-c++-common, instead? -Nathan

Re: Turn streamer cache to pointer_map

2011-05-02 Thread Nathan Froyd
On Mon, May 02, 2011 at 04:46:23PM +0200, Richard Guenther wrote: > >> *** typedef void (lto_free_section_data_f) ( > >> *** 346,355 > >>  struct lto_streamer_cache_d > >>  { > >>    /* The mapping between tree nodes and slots into the nodes array.  */ > >> !   htab_t node_map; > >

Re: [Patch,AVR]: Fix PR45099

2011-05-02 Thread Nathan Froyd
On Mon, May 02, 2011 at 05:23:48PM +0200, Georg-Johann Lay wrote: > PR45099 is an extension that gives an error when a fixed register is > needed to pass a parameter to a function. > > Because the program will show malfunction when such code is generated, > anyway, I think an error is more appropr

  1   2   3   >