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 type of

[4.7 PATCH 00/18] slim down a number of tree nodes

2011-03-10 Thread Nathan Froyd
not developed in this order; the checking bits were introduced first, then any bootstrap or testsuite failures were fixed up, then the patches were committed in the proper order. Nathan Froyd (18): add typed_tree structure enforce TREE_CHAIN and TREE_TYPE accesses remove TREE_CHAIN from *_CST nodes

[PATCH 03/18] remove TREE_CHAIN from *_CST nodes

2011-03-10 Thread Nathan Froyd
*_CST nodes don't need TREE_CHAIN. Make them include typed_tree instead, mark them as such in initialize_tree_contains_struct, and don't print out their TREE_CHAIN. -Nathan gcc/ * tree.h (struct tree_int_cst, struct real_value): Include typed_tree instead of tree_common.

[PATCH 04/18] remove TREE_CHAIN from SSA_NAME nodes

2011-03-10 Thread Nathan Froyd
This conversion is straightforward. The tricky part is converting FREE_SSANAMES into a VEC to eliminate the only use of TREE_CHAIN on SSA_NAMEs. -Nathan gcc/ * tree-flow.h (struct gimple_df): Make free_ssanames a VEC. * tree-ssanames.c (fini_ssanames): VEC_free it.

[PATCH 06/18] define CASE_CHAIN accessor for CASE_LABEL_EXPR

2011-03-10 Thread Nathan Froyd
This patch begins a subseries of patches aimed at removing TREE_CHAIN from expression trees. tree-cfg.c uses TREE_CHAIN for some analysis steps on CASE_LABEL_EXPRs. I looked at this for a while, thinking it'd be easy to use VECs instead, but AFAICS, it wasn't. I went for the next best thing,

[PATCH 07/18] generalize build_case_label to the rest of the compiler

2011-03-10 Thread Nathan Froyd
If we're going to add another TREE_OPERAND to CASE_LABEL_EXPR, then we'd have to update a number of calls to buildN or similar to know about the new operand. But that's not a good idea; the new operand is a strictly private thing and FEs in particular shouldn't have to know anything about it.

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

2011-03-10 Thread Nathan Froyd
After all that, we can finally make tree_exp inherit from typed_tree. Quite anticlimatic. -Nathan gcc/ * tree.h (struct tree_exp): Inherit from struct typed_tree. * tree.c (initialize_tree_contains_struct): Mark TS_EXP as TS_TYPED instead of TS_COMMON. diff --git

[PATCH 16/18] make TS_IDENTIFIER be a substructure of TS_BASE

2011-03-10 Thread Nathan Froyd
Now that we've done the requisite surgery on the C++ FE, we can eliminate TREE_CHAIN and TREE_TYPE from IDENTIFIER_NODEs. Doing so turns up a couple different places that need to be tweaked. The bit I'm not quite sure about is free_lang_data_in_decl and find_decls_types_r. Previously, due to

[PATCH 12/18] make CASE_LABEL_EXPR not abuse TREE_CHAIN

2011-03-10 Thread Nathan Froyd
Move CASE_CHAIN into a local operand for CASE_LABEL_EXPR. Nothing to see here. -Nathan gcc/ * tree.def (CASE_LABEL_EXPR): Add an operand. * tree.h (CASE_CHAIN): Use TREE_OPERAND instead of TREE_CHAIN. diff --git a/gcc/tree.def b/gcc/tree.def index eb94ad2..9c6606d 100644 ---

Re: [PATCH 17/18] introduce block_chainon and use BLOCK_CHAIN more

2011-03-11 Thread Nathan Froyd
On Fri, Mar 11, 2011 at 02:15:20PM +0100, Richard Guenther wrote: On Fri, Mar 11, 2011 at 5:23 AM, Nathan Froyd froy...@codesourcery.com wrote: BLOCKs have a TREE_CHAIN and a TREE_TYPE; TREE_TYPE is useless for blocks, but we can't remove TREE_TYPE without also removing TREE_CHAIN

Re: [PATCH 15/18] move REAL_IDENTIFIER_TYPE_VALUE to be a field of lang_identifier

2011-03-11 Thread Nathan Froyd
On Fri, Mar 11, 2011 at 08:40:24AM -0500, Jason Merrill wrote: On 03/10/2011 11:23 PM, Nathan Froyd wrote: I'm not overly fond of the conditionals (especially in error_operand_p) but I don't think it's reasonable to make IDENTIFIER_NODE bigger and penalize the other FEs just because the C++ FE

Re: [PATCH 15/18] move REAL_IDENTIFIER_TYPE_VALUE to be a field of lang_identifier

2011-03-11 Thread Nathan Froyd
On Fri, Mar 11, 2011 at 06:04:45AM -0800, Nathan Froyd wrote: On Fri, Mar 11, 2011 at 08:40:24AM -0500, Jason Merrill wrote: On 03/10/2011 11:23 PM, Nathan Froyd wrote: The C++ FE expects that we can check the TREE_TYPE of anything that appears as an expression, and uses IDENTIFIER_NODE

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

2011-03-21 Thread Nathan Froyd
On Sat, Mar 12, 2011 at 01:08:23PM +0100, Eric Botcazou wrote: gcc/ada/ * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. * gcc-interface/misc.c (gnat_init_ts): New function. (LANG_HOOKS_INIT_TS): Define. I presume that

Re: [PATCH 2/2] refactor emit_*_{after,before}{,_setloc} using common functions

2011-03-22 Thread Nathan Froyd
On Tue, Mar 22, 2011 at 02:28:30PM -0700, Richard Henderson wrote: On 03/21/2011 08:18 PM, Nathan Froyd wrote: +/* Insert PATTERN before BEFORE, setting its INSN_LOCATION to LOC. + MAKE_RAW indicates how to turn PATTERN into a real insn. INSNP + indicates if PATTERN is meant

Re: [PATCH 2/2] refactor emit_*_{after,before}{,_setloc} using common functions

2011-03-23 Thread Nathan Froyd
On Wed, Mar 23, 2011 at 11:36:26AM -0700, Richard Henderson wrote: On 03/23/2011 05:09 AM, Nathan Froyd wrote: Did you mean loc == UNKNOWN_LOCATION? Also, it looks like that's conflating INSN_LOCATORs and location_ts; it seems like it'd be better to keep them separate. Ug. Yes and yes

Re: [PATCH 2/2] refactor emit_*_{after,before}{,_setloc} using common functions

2011-03-23 Thread Nathan Froyd
On Wed, Mar 23, 2011 at 01:55:34PM -0700, Richard Henderson wrote: I can't see how emitting a NULL_RTX should be a Good Thing, ever, and thus I don't see why we should be doing special things to handle it. Ah, I thought the same thing and gcc_assert'ed emitting a NULL_RTX. I didn't get very

[PATCH] use cfglayout mode for instatiate_virtual_regs

2011-03-24 Thread Nathan Froyd
As $SUBJECT suggests. The patch looks much bigger than it actually is due to re-indentation. Tested on x86_64-unknown-linux-gnu. OK to commit? -Nathan * function.c (instantiate_virtual_regs): Use FOR_EACH_BB and FOR_BB_INSNS_SAFE to iterate through insns. Re-indent. *

[PATCH PING] fortran-specific bits of tree-slimming patches

2011-03-24 Thread Nathan Froyd
The Fortran-specific bits of these patches: [PATCH 02/18] enforce TREE_CHAIN and TREE_TYPE accesses http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00565.html [PATCH 07/18] generalize build_case_label to the rest of the compiler http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00557.html

[PATCH] fix memory accounting for copying nodes

2011-03-24 Thread Nathan Froyd
tree.c can gather optionally statistics--counts and total bytes allocated--when tree nodes are created. Due to an oversight, however, this accounting is not performed when nodes are copied. The patch below corrects this oversight and moves things around so the accounting is done in (almost) only

Re: [patch, ARM] Make 128 bits the default vector size for NEON

2011-03-31 Thread Nathan Froyd
On Thu, Mar 31, 2011 at 01:39:05PM +0200, Ira Rosen wrote: This patch changes NEON's default vector size from 64 to 128 bits. No comments about the patch itself, but this change should be noted in changes.html. -Nathan

[PATCH] macroize some rs6000 call patterns

2011-04-01 Thread Nathan Froyd
This patch does as $SUBJECT suggests. It doesn't macroize all the call insns, as iterators don't support substituting CONST_INTs, but it does clean up quite a bit. Tested on powerpc64-unknown-linux-gnu. OK to commit? -Nathan * config/rs6000/rs6000.md (*call_local32): Rename to...

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

2011-04-03 Thread Nathan Froyd
This patch does just what $SUBJECT suggests: pushes down the DECL_RTL field into LABEL_DECL. In this way, LABEL_DECL can inherit from tree_decl_common instead of tree_decl_with_rtl. I realize this looks like pure code shuffling; the reason for doing this is that I want to split tree_decl_common

Re: [PATCH] cleanup gcse.c:canon_modify_mem_list

2011-04-04 Thread Nathan Froyd
On Mon, Apr 04, 2011 at 05:42:42PM +0200, Steven Bosscher wrote: Nice cleanup. I can't approve it but it looks alright to me. I suppose you're planning something similar for modify_mem_list? That's the plan, along with numerous other users of {INSN,EXPR}_LIST. -Nathan

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

2011-04-04 Thread Nathan Froyd
On Mon, Apr 04, 2011 at 05:52:00PM +0200, Steven Bosscher wrote: Have you looked into maybe putting the CODE_LABEL for a LABEL_DECL in an on-the-side structure (hash table, whatever)? It looks like it is only used during expansion of SWITCH statements. I haven't, though it'd be easy enough

[PATCH] allocate combine.c:LOG_LINKS in an alloc_pool

2011-04-04 Thread Nathan Froyd
This patch does just what $SUBJECT suggests. Benefits: - Smaller data structures in combine; - Freeing LOG_LINKS becomes much easier (don't have to transfer everything to the INSN_LIST free list); Potential downsides: - Less sharing of INSN_LIST nodes might mean more cache thrashing.

Re: [PATCH] allocate combine.c:LOG_LINKS in an alloc_pool

2011-04-04 Thread Nathan Froyd
On Mon, Apr 04, 2011 at 09:01:20PM +0200, Steven Bosscher wrote: On Mon, Apr 4, 2011 at 8:49 PM, Nathan Froyd froy...@codesourcery.com wrote: This patch does just what $SUBJECT suggests.  Benefits: - Smaller data structures in combine; - Freeing LOG_LINKS becomes much easier (don't have

[PATCH] don't use TYPE_ARG_TYPES in type_generic or sentinel attribute handling

2011-04-05 Thread Nathan Froyd
The type_generic and sentinel attribute handlers for c-family, LTO, and Ada grovel through TYPE_ARG_TYPES; this patch changes them to use the standard functions prototype_p and stdarg_p instead. Less TYPE_ARG_TYPES usage is a good thing. The prototype_p check in the type_generic handlers is

[PATCH] move some debug routines from final.c to dbxout.c

2011-04-05 Thread Nathan Froyd
I was looking at debug_flush_symbol_queue and thought gosh, it's inefficient if we're calling this all the time, but it only does work when we want DBX_DEBUGGING_INFO. So I looked around and saw that debug_flush_symbol_queue and friends are only called from dbxout.c. So this patch moves them

Re: [PATCH] cleanup gcse.c:canon_modify_mem_list

2011-04-05 Thread Nathan Froyd
On Mon, Apr 04, 2011 at 12:01:09PM -0600, Jeff Law wrote: + canon_modify_mem_list = GCNEWVEC (VEC(modify_pair,heap) *, + last_basic_block); nit; You're missing some whitespace here (after the VEC). This doesn't seem to be a hard-and-fast policy; all of the VEC

Re: [PATCH] cleanup gcse.c:canon_modify_mem_list

2011-04-05 Thread Nathan Froyd
On Tue, Apr 05, 2011 at 01:22:39PM +0100, Richard Earnshaw wrote: On Tue, 2011-04-05 at 04:44 -0700, Nathan Froyd wrote: nit; You're missing some whitespace here (after the VEC). This doesn't seem to be a hard-and-fast policy; all of the VEC code I remember writing or looking

[PATCH] use build_function_type_list for float128 functions

2011-04-05 Thread Nathan Froyd
When the real16/float128 bits were added to the Fortran FE, some uses of build_function_type snuck in. This patch changes them to use build_function_type_list. The patch also corrects a small bug: the types for frexp and scalbn had their argument types in the wrong order. Tested on

[PATCH] make gcse.c:modify_mem_list hold VECs instead of INSN_LISTs

2011-04-05 Thread Nathan Froyd
As promised, this patch turns modify_mem_list into an array of VECs, similar to the changes done to canon_modify_mem_list. Since I'm in the area, I took the liberty of tweaking the VEC declarations related to canon_modify_mem_list to have spaces before parens, as folks seem to think that's the

Re: [PATCH] allocate combine.c:LOG_LINKS in an obstack

2011-04-05 Thread Nathan Froyd
On Mon, Apr 04, 2011 at 02:49:54PM -0400, Nathan Froyd wrote: This patch does just what $SUBJECT suggests. v2, now with obstacks! Tested on x86_64-unknown-linux-gnu. OK to commit? -Nathan * combine.c: Include obstack.h (struct insn_link): Define. (uid_log_links

Re: [PATCH] allocate combine.c:LOG_LINKS in an obstack

2011-04-05 Thread Nathan Froyd
On Tue, Apr 05, 2011 at 04:42:27PM +0200, Steven Bosscher wrote: On Tue, Apr 5, 2011 at 3:59 PM, Nathan Froyd froy...@codesourcery.com wrote: v2, now with obstacks! @findex LOG_LINKS @item LOG_LINKS (@var{i}) A list (chain of @code{insn_list} expressions) giving information about

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

2011-04-05 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] use use_reg in several backends

2011-04-05 Thread Nathan Froyd
Several places in the compiler could be usefully modified to use use_reg instead of hand-building EXPR_LISTs. This patch makes such changes. Since this patch implements equivalent functionality with an existing function call, I believe it counts as obvious. Tested by building cc1 for

Re: [PATCH] allocate combine.c:LOG_LINKS in an obstack

2011-04-05 Thread Nathan Froyd
On Tue, Apr 05, 2011 at 09:59:43AM -0400, Nathan Froyd wrote: On Mon, Apr 04, 2011 at 02:49:54PM -0400, Nathan Froyd wrote: This patch does just what $SUBJECT suggests. v2, now with obstacks! This broke compilation on AUTO_INC_DEC targets. Currently putting together a fix and testing via

Re: [PATCH] allocate combine.c:LOG_LINKS in an obstack

2011-04-05 Thread Nathan Froyd
On Tue, Apr 05, 2011 at 11:22:56AM -0700, Nathan Froyd wrote: On Tue, Apr 05, 2011 at 09:59:43AM -0400, Nathan Froyd wrote: On Mon, Apr 04, 2011 at 02:49:54PM -0400, Nathan Froyd wrote: This patch does just what $SUBJECT suggests. v2, now with obstacks! This broke compilation

Re: [PATCH] allocate combine.c:LOG_LINKS in an obstack

2011-04-05 Thread Nathan Froyd
On Tue, Apr 05, 2011 at 12:29:45PM -0700, H.J. Lu wrote: On Tue, Apr 5, 2011 at 11:28 AM, Nathan Froyd froy...@codesourcery.com wrote: This broke compilation on AUTO_INC_DEC targets.  Currently putting together a fix and testing via cross to powerpc-eabispe. ...and here's the patch I'm

Re: [PATCH] cleanup gcse.c:canon_modify_mem_list

2011-04-05 Thread Nathan Froyd
On Tue, Apr 05, 2011 at 07:18:16PM +, Joseph S. Myers wrote: On Tue, 5 Apr 2011, Nathan Froyd wrote: Certainly vec.h never uses spaces; I thought this was simply The Way Things Were. I also had the impression that for certain special macros such as VEC, GTY, _, N_, G_ - macros

Re: [PATCH] Fix LTO bootstrap on i686-linux (problem with two Ldebug_info0 labels; PR bootstrap/48148)

2011-04-05 Thread Nathan Froyd
On Tue, Apr 05, 2011 at 04:19:39PM +0200, Jakub Jelinek wrote: + for (i = 0; i VEC_length (deferred_locations, deferred_locations_list); i++) +{ + add_location_or_const_value_attribute ( + VEC_index (deferred_locations, deferred_locations_list, i)-die, + VEC_index

[PATCH] fix PR bootstrap/48471

2011-04-05 Thread Nathan Froyd
My changes that moved bits of final.c to dbxout.c caused compilation failures on targets that *didn't* enable DBX_DEBUGGING_INFO, since some now-static symbols could be unused. To fix this, the patch below moves all the new static variables and two macros that use some of said variables below an

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

2011-04-07 Thread Nathan Froyd
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: /* In VAR_DECL and PARM_DECL nodes, nonzero means declared `register'. */ #define

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

2011-04-12 Thread Nathan Froyd
It's a shame more passes don't make use of the statistics_* infrastructure. This patch is a step towards rectifying that and adds statistics_counter_event calls to passes mentioned in $SUBJECT. postreload-gcse already tracked the stats for the dump file and so only needs the

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 froy...@codesourcery.com 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:54:43PM +0200, Richard Guenther wrote: On Tue, Apr 12, 2011 at 4:51 PM, Nathan Froyd froy...@codesourcery.com 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 It's

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 changes: http

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 froy...@codesourcery.com wrote: Granted, but that fact should still be recorded.  The situation we have today, for something like: func1: statistic for statx was 0

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 said, using input_location like

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

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

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: [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 because

[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

[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):

[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

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 marc.gli...@inria.fr PR tree-optimization/53805 * fold-const.c

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. Minor protest about the ChangeLog: I think you

[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.

[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

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

[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

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 without

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

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))) ! { ! /*

[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] 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. + /* Functions

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

[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

[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 ---

[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

[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

[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

[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

[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 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

[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

[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

[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 ---

[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 ---

[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

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 (__builtin_infq, ftype

[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

[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: decl_common

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 said, using input_location like

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_SOURCE_LOCATION (label_decl) instead

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 mikest...@comcast.net 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

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 froy...@codesourcery.com wrote: This patch does two things: - centralizes some infrastructure for defining builtin function types  for frontends by providing a common function

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_FUNCTION_TYPE_FOO macros can call

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 changed? Yeah, tree-eh.c:lower_try_finally_switch

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_function_type_{n

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

  1   2   >