Re: RFA: PATCH to restore old behavior of debug_vec_tree

2013-07-09 Thread Lawrence Crowl
mation by default and fails to handle many C++ > tree nodes. > > Fixed by adding debug_raw for vec and changing > debug_vec_tree to use that. > > OK for trunk? Looks good to me. -- Lawrence Crowl

Re: [c++-concepts] code review

2013-06-10 Thread Lawrence Crowl
t in headers always felt excessively artifical to me. -- Lawrence Crowl

Re: [patch] Hash table changes from cxx-conversion branch - config part

2013-05-29 Thread Lawrence Crowl
On 5/21/13, Diego Novillo wrote: > On May 13, 2013 Lawrence Crowl wrote: > > I still have not heard from i386 or ia64 folks. Anyone? > > The i386 bits look fine to me as well. Please wait 48 hours to > give the i386 maintainers a chance to object. Committed. -- Lawrence Crowl

Re: [patch] Hash table changes from cxx-conversion branch - config part

2013-05-13 Thread Lawrence Crowl
I still have not heard from i386 or ia64 folks. Anyone? On 4/24/13, Lawrence Crowl wrote: > This patch is a consolodation of the hash_table patches to the > cxx-conversion branch for files under gcc/config. > > Recipients: > config/arm/arm.c - ni...@redhat.com, ramana.radhak

Re: [patch] Hash table changes from cxx-conversion branch

2013-04-25 Thread Lawrence Crowl
On 4/25/13, Diego Novillo wrote: > On 2013-04-24 15:58 , Lawrence Crowl wrote: >> * var-tracking.c'emit_note_data_def.vars >> * var-tracking.c'shared_hash_def.htab >> * var-tracking.c'changed_variables >> >> Fold variable_htab_hash, variable_h

Re: [patch] Hash table changes from cxx-conversion branch

2013-04-25 Thread Lawrence Crowl
On 4/25/13, Richard Biener wrote: > Thus, the patch is ok apart from the var-tracking.c bits which > I defer to respective maintainers. Okay, I split out the var-tracking.c changes. I've committed the rest to trunk. -- Lawrence Crowl

[patch] Hash table changes from cxx-conversion branch - config part

2013-04-24 Thread Lawrence Crowl
h config-list.mk. Index: gcc/ChangeLog 2013-04-24 Lawrence Crowl * config/arm/t-arm: Update for below. * config/arm/arm.c (arm_libcall_uses_aapcs_base::libcall_htab): Change type to hash_table. Update dependent calls and types. * config/i386/t-cygming: Update for b

Re: [patch] Hash table changes from cxx-conversion branch

2013-04-08 Thread Lawrence Crowl
Ping? On 3/31/13, Lawrence Crowl wrote: > On 3/28/13, Richard Biener wrote: >> On Mar 27, 2013 Lawrence Crowl wrote: >> > On 3/27/13, Richard Biener wrote: >> > > On Mar 23, 2013 Lawrence Crowl wrote: >> > > > This patch is a consolodation

Re: Comments on the suggestion to use infinite precision math for wide int.

2013-04-08 Thread Lawrence Crowl
program to control the > > precision and overflow detection of the expressions in the block. > > And if this is so, then by the time the expression is seen by > > the middle end of gcc, those attributes will have been converted > > into tree code will evaluate the code in a well defined way by > > both the optimization passes and the target machine. > > Yes, that's a correct understanding In essence, you have moved some of the optimization from the back end to the front end. Correct? -- Lawrence Crowl

Re: Comments on the suggestion to use infinite precision math for wide int.

2013-04-08 Thread Lawrence Crowl
at having more concise coding for fixed-precision would be helpful. For mixed operations, all the languages that I know of promote smaller operands to larger operands, so I think a reasonable definition is possible here. -- Lawrence Crowl

Re: Comments on the suggestion to use infinite precision math for wide int.

2013-04-08 Thread Lawrence Crowl
n extend else // zero extend See http://www.cplusplus.com/reference/type_traits/is_signed/. If you want to handle non-builtin types that are asigne dor unsigned, then you need to add a specialization for is_signed. -- Lawrence Crowl

Re: [patch] Remove unused ivtype_map symbols from sese.[hc]

2013-04-02 Thread Lawrence Crowl
On 4/2/13, Richard Biener wrote: > On Mon, Apr 1, 2013 at 12:19 AM, Lawrence Crowl wrote: >> Remove unused symbols related to ivtype_map. This map does not appear to >> exist and I see no evidence of its removal in the ChangeLog. >> >> Tested on x86_64. >> >

[patch] Remove unused ivtype_map symbols from sese.[hc]

2013-03-31 Thread Lawrence Crowl
Remove unused symbols related to ivtype_map. This map does not appear to exist and I see no evidence of its removal in the ChangeLog. Tested on x86_64. Okay for trunk? Index: gcc/ChangeLog 2013-03-31 Lawrence Crowl * sese.h (struct ivtype_map_elt_s): Remove unused

Re: [patch] Remove unused code from dse.c.

2013-03-30 Thread Lawrence Crowl
hing else without > the callback. > > Lawrence, that's the critical bit of information you failed > to provide. Sorry. > Patch approved, please install. Committed. -- Lawrence Crowl

Re: [patch] Remove unused code from dse.c.

2013-03-29 Thread Lawrence Crowl
On 3/29/13, Jeff Law wrote: > On 03/29/2013 02:24 AM, Lawrence Crowl wrote: >> This patch has been in the hash-table branch for months. >> I thought it didn't quite meet the criteria for obvious, >> but it's close. >> >> >> In dse.c, remov

[patch] Remove unused code from dse.c.

2013-03-29 Thread Lawrence Crowl
ables that are then never read. Tested on x86-64. Index: gcc/ChangeLog 2013-03-29 Lawrence Crowl * dse.c (clear_alias_sets): Remove never set. (disqualified_clear_alias_sets): Remove never set. (clear_alias_mode_pool): Remove never set. (dse_step0): Remove cond

[patch] Remove unused symbols.

2013-03-29 Thread Lawrence Crowl
(extern insert_loop_close_phis): Removed unused. (extern insert_guard_phis): Removed unused. (extern ivtype_map_elt_info): Removed unused. (new_ivtype_map_elt): Removed unused. * sese.c (ivtype_map_elt_info): Removed unused. 2013-03-28 Lawrence Crowl Index: gcc/sese.c

Re: [patch] Unified debug dump function names.

2013-03-28 Thread Lawrence Crowl
On 3/28/13, Richard Biener wrote: > The patch is ok as-is. Committed. -- Lawrence Crowl

Re: [patch] Hash table changes from cxx-conversion branch

2013-03-27 Thread Lawrence Crowl
On 3/27/13, Richard Biener wrote: > On Mar 23, 2013 Lawrence Crowl wrote: > > This patch is a consolodation of the hash_table patches to the > > cxx-conversion branch. > > > > Update various hash tables from htab_t to hash_table. > > Modify types and calls to mat

Re: [patch] Unified debug dump function names.

2013-03-27 Thread Lawrence Crowl
On 3/27/13, Richard Biener wrote: > On Mar 27, 2013, Lawrence Crowl wrote: >> Patch with rename to debug attached. >> Tested on x86_64. >> >> >> Add uniform debug dump function names. >> >> >> Add some overloaded functions that provide uni

Re: [patch] Unified debug dump function names.

2013-03-26 Thread Lawrence Crowl
On 3/26/13, Lawrence Crowl wrote: > On 3/26/13, Richard Biener wrote: >> On Mar 25, 2013 Lawrence Crowl wrote: >> > On 3/25/13, Richard Biener wrote: >> > > You add a not used new interface. What for? >> > >> > So that people can use it. >

Re: [patch] Unified debug dump function names.

2013-03-26 Thread Lawrence Crowl
On 3/26/13, Richard Biener wrote: > On Mar 25, 2013 Lawrence Crowl wrote: > > On 3/25/13, Richard Biener wrote: > > > You add a not used new interface. What for? > > > > So that people can use it. > > > > > For use from gdb only? > > > &g

Re: [patch] Unified debug dump function names.

2013-03-25 Thread Lawrence Crowl
On 3/25/13, Tom Tromey wrote: >>>>>> "Lawrence" == Lawrence Crowl writes: > Lawrence> This patch is somewhat different from the original plan at > Lawrence> gcc.gnu.org/wiki/cxx-conversion/debugging-dumps. The reason > Lawrence> is that gdb has a

Re: [patch] Unified debug dump function names.

2013-03-25 Thread Lawrence Crowl
effort without having to hunt down the name. > In which case it should be debug (), not dump (). I will use whatever name you wish, but I would have preferred that we addressed naming issues when we published the plan, not after I've done the implementation. What name do you wish? -- Lawrence Crowl

Re: [cxx-conversion] RFC - Helper types for building GIMPLE

2013-03-13 Thread Lawrence Crowl
; > + > +protected: > + gimple_builder_base() : seq_(NULL), loc_(UNKNOWN_LOCATION) {} > + gimple_builder_base(location_t l) : seq_(NULL), loc_(l) {} > + tree get_expr_type (enum tree_code code, tree op); > + virtual tree create_lhs_for_assignment (tree) = 0; > + > +private: > + gimple_seq seq_; > + location_t loc_; > +}; > + > + > +/* GIMPLE builder class for statements in normal form. Statements > generated > + by instances of this class will produce non-SSA temporaries. */ > + > +class gimple_builder_normal : public gimple_builder_base > +{ > +public: > + gimple_builder_normal() : gimple_builder_base() {} > + gimple_builder_normal(location_t l) : gimple_builder_base(l) {} > + > +protected: > + virtual tree create_lhs_for_assignment (tree); > +}; > + > + > +/* GIMPLE builder class for statements in normal form. Statements > generated > + by instances of this class will produce SSA names. */ > + > +class gimple_builder_ssa : public gimple_builder_base > +{ > +public: > + gimple_builder_ssa() : gimple_builder_base() {} > + gimple_builder_ssa(location_t l) : gimple_builder_base(l) {} > + > +protected: > + virtual tree create_lhs_for_assignment (tree); > +}; > + > #endif /* GCC_GIMPLE_H */ > -- Lawrence Crowl

Re: [cxx-conversion] Add Record Builder Class

2013-02-14 Thread Lawrence Crowl
On 2/14/13, Richard Biener wrote: > On Tue, Feb 12, 2013 at 8:47 PM, Lawrence Crowl wrote: > > Add class record_builder to ease construction of records and unions. Use > > it > > in some appropriate places. > > tree > > -default_emutls_var_fields (tree

Re: [cxx-conversion] Add Record Builder Class

2013-02-13 Thread Lawrence Crowl
On 2/13/13, Diego Novillo wrote: > Thanks. The patch is OK for the branch. You can address Nathan's > review after he's back and gets a chance to look at it. > > Let me know when the patch is in. I've got another merge in process. Committed. -- Lawrence Crowl

Re: [cxx-conversion] Add Record Builder Class

2013-02-13 Thread Lawrence Crowl
On 2/13/13, Diego Novillo wrote: > On Tue, Feb 12, 2013 at 2:47 PM, Lawrence Crowl wrote: >> @@ -182,24 +163,9 @@ default_emutls_var_init (tree to, tree d >> static tree >> get_emutls_object_type (void) >> { >> - tree type, type_name, field; >> - &g

[cxx-conversion] Add Record Builder Class

2013-02-12 Thread Lawrence Crowl
{ +public: + record_builder (bool is_union = false); + void add_field (tree ident, tree type, + source_location loc = UNKNOWN_LOCATION); + void add_field (const char *ident, tree type, + source_location loc = UNKNOWN_LOCATION); + void layout (); + void layout (tree align_type); + void tag_name (tree ident); + void tag_name (const char *ident); + void decl_name (tree ident, source_location loc = UNKNOWN_LOCATION); + void decl_name (const char *ident, source_location loc = UNKNOWN_LOCATION); + tree as_tree (); +private: + tree building_; + tree last_field_; +}; // class record_builder + + #endif /* GCC_TREE_H */ -- Lawrence Crowl

Re: [PATCH 1/2] [asan] Allow creating/deleting hash table entries with new/delete

2013-01-28 Thread Lawrence Crowl
t; + > +/* Remove with delete. */ > + > +template > +inline void > +typed_delete_remove ::remove (Type *p) > +{ > + delete p; > +} > > /* Helpful type for a no-op remove. */ > > -- > 1.7.11.7 > > > > -- > Dodji > -- Lawrence Crowl

Re: [cxx-conversion] Change uses of htab_t in gcc/config to hash_table.

2013-01-06 Thread Lawrence Crowl
p;arg); >> >> which is not as friendly. > > Agreed. Agreed. The current structure was handy in the conversion process. Now that the conversion is done, we could change the order. >> David >> >> >> On Tue, Dec 18, 2012 at 8:02 PM, Lawrence Crowl

Re: [patch] std::unique_ptr improvements

2013-01-03 Thread Lawrence Crowl
o provide only correct > conversions. As Jonathan notes, Howard has objected to that part > of the PR, so it's possible the eventual resolution will differ > in that respect; I intend to pick up that discussion next week > when I'm back from vacation. BTW, I've att

[google 4_7] backport "std::unique_ptr improvements"

2013-01-03 Thread Lawrence Crowl
ub = std::move(ud); -// { dg-error "use of deleted function" "" { target *-*-* } 195 } +// { dg-error "use of deleted function" "" { target *-*-* } 203 } std::unique_ptr uba(nullptr, b); std::unique_ptr uda(nullptr, d); uba = std::move(uda); -// { dg-error "use of deleted function" "" { target *-*-* } 341 } +// { dg-error "use of deleted function" "" { target *-*-* } 393 } } Index: libstdc++-v3/testsuite/20_util/default_delete/48631_neg.cc === --- libstdc++-v3/testsuite/20_util/default_delete/48631_neg.cc (revision 194742) +++ libstdc++-v3/testsuite/20_util/default_delete/48631_neg.cc (working copy) @@ -27,4 +27,4 @@ struct D : B { }; D d; std::default_delete db; typedef decltype(db(&d)) type; // { dg-error "use of deleted function" } -// { dg-error "declared here" "" { target *-*-* } 83 } +// { dg-error "declared here" "" { target *-*-* } 100 } Index: libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc === --- libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc (revision 194742) +++ libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc (working copy) @@ -19,7 +19,7 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-error "static assertion failed" "" { target *-*-* } 1776 } +// { dg-error "static assertion failed" "" { target *-*-* } 1778 } #include -- Lawrence Crowl

Re: [patch] std::unique_ptr improvements

2013-01-01 Thread Lawrence Crowl
On 1/1/13, Jonathan Wakely wrote: > On 1 January 2013 20:40, Lawrence Crowl wrote: >> That was pilot error on my part. However, I've been having trouble >> when the argument to the constructor or reset has a conversion >> operator. The code does distinquish between a

Re: [patch] std::unique_ptr improvements

2013-01-01 Thread Lawrence Crowl
On 12/28/12, Jonathan Wakely wrote: > On 28 December 2012 01:51, Lawrence Crowl wrote: >> I'm not getting errors when converting from derived to base. >> E.g. the following compiles, when it should not. >> >> std::unique_ptr acb_ad(new derived[3]); > &

Re: [patch] std::unique_ptr improvements

2012-12-27 Thread Lawrence Crowl
dg-error text. > * testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc: Use > different instantiations so static_assert fails for each. > > Thanks to Geoffrey and Lawrence for input and test cases. > > Tested x86_64-linux, committed to trunk. I'm not getting errors when converting from derived to base. E.g. the following compiles, when it should not. std::unique_ptr acb_ad(new derived[3]); -- Lawrence Crowl

[cxx-conversion] Change uses of htab_t in gcc/config to hash_table.

2012-12-18 Thread Lawrence Crowl
split_all_insns_noflow (); @@ -15808,14 +15822,13 @@ mips_reorg_process_insns (void) if (TARGET_FIX_VR4130 && !ISA_HAS_MACCHI) cfun->machine->all_noreorder_p = false; - htab = htab_create (37, mips_lo_sum_offset_hash, - mips_lo_sum_offset_eq, free); + htab.create (37); /* Make a first pass over the instructions, recording all the LO_SUMs. */ for (insn = get_insns (); insn != 0; insn = NEXT_INSN (insn)) FOR_EACH_SUBINSN (subinsn, insn) if (USEFUL_INSN_P (subinsn)) - for_each_rtx (&PATTERN (subinsn), mips_record_lo_sum, htab); + for_each_rtx (&PATTERN (subinsn), mips_record_lo_sum, &htab); last_insn = 0; hilo_delay = 2; @@ -15872,7 +15885,7 @@ mips_reorg_process_insns (void) } } - htab_delete (htab); + htab.dispose (); } /* Return true if the function has a long branch instruction. */ -- Lawrence Crowl

Re: [PATCH] Fix up sbitmap bitmap_{and,ior,xor} (PR target/55562)

2012-12-18 Thread Lawrence Crowl
> + SBITMAP_ELT_TYPE wordchanged = *dstp ^ tmp; >if (has_popcount) > { > - bool wordchanged = (*dstp ^ tmp) != 0; > if (wordchanged) > - { > - *popcountp = do_popcount (tmp); > - anychange = true; > - } > + *popcountp = do_popcount (tmp); > popcountp++; > } >*dstp++ = tmp; > + changed |= wordchanged; > } > #ifdef BITMAP_DEBUGGING >if (has_popcount) > sbitmap_verify_popcount (dst); > #endif > - return anychange; > + return changed != 0; > } > > /* Return nonzero if A is a subset of B. */ -- Lawrence Crowl

Re: [cxx-conversion] Change tree-ssa-coalesce.c'coalesce_list_d.list to hash_table

2012-12-17 Thread Lawrence Crowl
On 12/17/12, Richard Biener wrote: > On Mon, Dec 17, 2012 at 8:36 PM, Lawrence Crowl wrote: >> Change tree-ssa-coalesce.c'coalesce_list_d.list from htab_t to >> hash_table. >> >> Fold coalesce_pair_map_hash and coalesce_pair_map_eq into new >> struct coal

[cxx-conversion] Change tree-ssa-coalesce.c'coalesce_list_d.list to hash_table

2012-12-17 Thread Lawrence Crowl
st:\n"); - FOR_EACH_PARTITION_PAIR (node, ppi, cl) + FOR_EACH_HASH_TABLE_ELEMENT (cl->list, node, coalesce_pair_p, ppi) { tree var1 = ssa_name (node->first_element); tree var2 = ssa_name (node->second_element); -- Lawrence Crowl

[cxx-conversion] Convert remaining tree-parloops.c htab_t to hash_table.

2012-12-17 Thread Lawrence Crowl
as candidate\n",loop->num); @@ -2208,7 +2225,7 @@ parallelize_loops (void) } free_stmt_vec_info_vec (); - htab_delete (reduction_list); + reduction_list.dispose (); obstack_free (&parloop_obstack, NULL); /* Parallelization will cause new function calls to be inserted through -- Lawrence Crowl

[cxx-conversion] Convert statistics.c'statistics_hashes to hash_table.

2012-12-17 Thread Lawrence Crowl
hash, const char *id, int val, +lookup_or_add_counter (stats_counter_table_type hash, const char *id, int val, bool histogram_p) { statistics_counter_t **counter; statistics_counter_t c; c.id = id; c.val = val; - counter = (statistics_counter_t **) htab_find_slot (hash, &c, INSERT); + counter = hash.find_slot (&c, INSERT); if (!*counter) { *counter = XNEW (struct statistics_counter_s); -- Lawrence Crowl

Re: [cxx-conversion] Convert tree-sra.c'candidates to hash_table

2012-12-16 Thread Lawrence Crowl
On 12/13/12, Martin Jambor wrote: > On Thu, Dec 13, 2012 at 11:05:49AM -0800, Lawrence Crowl wrote: > > On 12/12/12, Jakub Jelinek wrote: > > > On Tue, Dec 11, 2012 at 02:44:41PM -0800, Lawrence Crowl wrote: > > > > +/* Hash a tree in a uid_decl_map. */ >

Re: [cxx-conversion] Convert tree-sra.c'candidates to hash_table

2012-12-13 Thread Lawrence Crowl
On 12/12/12, Jakub Jelinek wrote: > On Tue, Dec 11, 2012 at 02:44:41PM -0800, Lawrence Crowl wrote: > > +/* Hash a tree in a uid_decl_map. */ > > + > > +inline hashval_t > > +uid_decl_hasher::hash (const value_type *item) > > +{ > > + return item->decl_

Re: [cxx-conversion] Convert tree-sra.c'candidates to hash_table

2012-12-12 Thread Lawrence Crowl
On 12/12/12, Diego Novillo wrote: > On Dec 11, 2012 Lawrence Crowl wrote: > > Convert tree-sra.c'candidates from htab_t to hash_table. > > > > Fold uid_decl_map_hash and uid_decl_map_eq into new struct > > uid_decl_hasher. This change moves the definitions fro

[cxx-conversion] Convert tree-vectorizer.h'_loop_vec_info::peeling_htab to hash_table

2012-12-11 Thread Lawrence Crowl
vect_peeling_hash_eq, free); + if (!LOOP_VINFO_PEELING_HTAB (loop_vinfo).is_created ()) +LOOP_VINFO_PEELING_HTAB (loop_vinfo).create (1); vectype = STMT_VINFO_VECTYPE (stmt_info); nelements = TYPE_VECTOR_SUBPARTS (vectype); -- Lawrence Crowl

[cxx-conversion] Convert various htab_t tables to hash_table

2012-12-11 Thread Lawrence Crowl
= - (const struct iv_inv_expr_ent *)ent; - return expr->hash; -} - /* Initializes data structures used by the iv optimization pass, stored in DATA. */ @@ -853,8 +856,7 @@ tree_ssa_iv_optimize_init (struct ivopts data->niters = NULL; data->iv_uses.create (20); data->iv_candidates.create (20); - data->inv_expr_tab = htab_create (10, htab_inv_expr_hash, -htab_inv_expr_eq, free); + data->inv_expr_tab.create (10); data->inv_expr_id = 0; decl_rtl_to_reset.create (20); } @@ -3806,8 +3808,7 @@ get_expr_id (struct ivopts_data *data, t ent.expr = expr; ent.hash = iterative_hash_expr (expr, 0); - slot = (struct iv_inv_expr_ent **) htab_find_slot (data->inv_expr_tab, - &ent, INSERT); + slot = data->inv_expr_tab.find_slot (&ent, INSERT); if (*slot) return (*slot)->id; @@ -6631,7 +6632,7 @@ free_loop_data (struct ivopts_data *data decl_rtl_to_reset.truncate (0); - htab_empty (data->inv_expr_tab); + data->inv_expr_tab.empty (); data->inv_expr_id = 0; } @@ -6649,7 +6650,7 @@ tree_ssa_iv_optimize_finalize (struct iv decl_rtl_to_reset.release (); data->iv_uses.release (); data->iv_candidates.release (); - htab_delete (data->inv_expr_tab); + data->inv_expr_tab.dispose (); } /* Returns true if the loop body BODY includes any function calls. */ -- Lawrence Crowl

[cxx-conversion] Convert tree-sra.c'candidates to hash_table

2012-12-11 Thread Lawrence Crowl
tree-sra.c $(CONFIG_H) $(SYSTEM_H) coretypes.h alloc-pool.h \ - $(TM_H) $(TREE_H) $(GIMPLE_H) $(CGRAPH_H) $(TREE_FLOW_H) \ + $(HASH_TABLE_H) $(TM_H) $(TREE_H) $(GIMPLE_H) $(CGRAPH_H) $(TREE_FLOW_H) \ $(IPA_PROP_H) $(DIAGNOSTIC_H) statistics.h \ $(PARAMS_H) $(TARGET_H) $(FLAGS_H) \ $(DBGCNT_H) $(TREE_INLINE_H) $(GIMPLE_PRETTY_PRINT_H) -- Lawrence Crowl

[cxx-conversion] Fix hash_table build problems with checking enabled.

2012-12-10 Thread Lawrence Crowl
) == hash (p2)); #endif - return 1; + return true; } struct gimplify_ctx -- Lawrence Crowl

Re: [cxx-conversion] gimplify_ctx::temp_htab hash table

2012-12-04 Thread Lawrence Crowl
On 12/4/12, Diego Novillo wrote: > On Tue, Dec 4, 2012 at 4:23 AM, Richard Biener > wrote: >> On Mon, Dec 3, 2012 at 9:14 PM, Lawrence Crowl >> wrote: >>> On 12/3/12, Diego Novillo wrote: >>>> On 2012-12-01 20:44 , Lawrence Crow

Re: [cxx-conversion] LTO-related hash tables

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo wrote: > On 2012-12-01 20:40 , Lawrence Crowl wrote: > > Change LTO-related hash tables from htab_t to hash_table: > > > > lto-streamer.h output_block::string_hash_table > > lto-streamer-in.c file_name_hash_table > > lto-stream

Re: [cxx-conversion] gimplify_ctx::temp_htab hash table

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo wrote: > On 2012-12-01 20:44 , Lawrence Crowl wrote: >> Index: gcc/gimple-fold.c >> === >> --- gcc/gimple-fold.c(revision 193902) >> +++ gcc/gimple-fold.c(work

Re: [cxx-conversion] tree-related hash tables

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo wrote: > On 2012-12-01 20:45 , Lawrence Crowl wrote: >> Index: gcc/tree-hasher.h >> === >> --- gcc/tree-hasher.h(revision 0) >> +++ gcc/tree-hasher.h(r

Re: [cxx-conversion] ggc-common hash tables

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo wrote: > On 2012-12-01 20:46 , Lawrence Crowl wrote: >> Index: gcc/ChangeLog >> >> 2012-11-30 Lawrence Crowl >> >> * hash-table.h (class hash_table): >> Correct many methods with parameter types compare_type to the cor

Re: [cxx-conversion] various hash tables, part 2/2

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo wrote: > On 2012-12-01 20:48 , Lawrence Crowl wrote: >> +inline bool >> +cselib_hasher::equal (const value_type *v, const compare_type *x_arg) >> +{ >> + struct elt_loc_list *l; >> + rtx x = CONST_CAST_RTX (x_arg); >>

Re: [cxx-conversion] various hash tables, part 1/2

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo wrote: > On 2012-12-03 14:24 , Lawrence Crowl wrote: >>>> -static int >>>> -htab_cu_eq (const void *of1, const void *of2) >>>> +inline bool >>>> +cu_hash_table_entry_hasher::equal (const value_type *entry1, >>

Re: [cxx-conversion] various hash tables, part 1/2

2012-12-03 Thread Lawrence Crowl
On 12/3/12, Diego Novillo wrote: > On Sat, Dec 1, 2012 at 8:47 PM, Lawrence Crowl wrote: > >> +inline bool >> +attribute_hasher::equal (const value_type *spec, const compare_type >> *str) >> +{ >> + return (!strncmp (spec->name, str->str, str->lengt

[cxx-conversion] ggc-common hash tables

2012-12-01 Thread Lawrence Crowl
to notice the change, but incorrect code will.) Tested on x86-64. Okay for branch? Index: gcc/ChangeLog 2012-11-30 Lawrence Crowl * hash-table.h (class hash_table): Correct many methods with parameter types compare_type to the correct value_type. (Correct code was

[cxx-conversion] tree-related hash tables

2012-12-01 Thread Lawrence Crowl
dependences and because they are used in few places. Tested on x86-64. Okay for branch? Index: gcc/ChangeLog 2012-11-30 Lawrence Crowl * tree-hasher.h: New. (struct int_tree_hasher): New. (typedef int_tree_htab_type): New. * tree-flow.h (extern

[cxx-conversion] gimplify_ctx::temp_htab hash table

2012-12-01 Thread Lawrence Crowl
Change gimplify.c gimplify_ctx::temp_htab hash table from htab_t to hash_table. Move struct gimple_temp_hash_elt and struct gimplify_ctx to a new gimplify-ctx.h, because they are used few places. Tested on x86-64. Okay for branch? Index: gcc/ChangeLog 2012-11-30 Lawrence Crowl

[cxx-conversion] graphite-related hash tables

2012-12-01 Thread Lawrence Crowl
unused: insert_loop_close_phis insert_guard_phis debug_ivtype_map ivtype_map_elt_info new_ivtype_map_elt Tested on x86-64. Okay for branch? Index: gcc/ChangeLog 2012-11-30 Lawrence Crowl * graphite-htab.h: New. (typedef hash_table bb_pbb_htab_type): New. (extern

[cxx-conversion] LTO-related hash tables

2012-12-01 Thread Lawrence Crowl
. Okay for branch? Index: gcc/ChangeLog 2012-11-30 Lawrence Crowl * data-streamer.h (struct string_slot): Move to lto-streamer.h. (hash_string_slot_node): Move implementation into lto-streamer.h struct string_slot_hasher. (eq_string_slot_node): Likewise

Re: [patch] Contribute performance comparison script.

2012-11-06 Thread Lawrence Crowl
On 11/6/12, Diego Novillo wrote: > On Nov 5, 2012 Lawrence Crowl wrote: > > > > 2012-11-05 Lawrence Crowl > > > > * compare_two_ftime_report_sets: New. > > OK. Thanks. Committed. -- Lawrence Crowl

[patch] Contribute performance comparison script.

2012-11-05 Thread Lawrence Crowl
trials, assuming the standard deviation is stable, which is iffy. Tested on x86_64 builds. Okay for trunk? Index: contrib/ChangeLog 2012-11-05 Lawrence Crowl * compare_two_ftime_report_sets: New. Index: contrib/compare_two_ftime_report_sets ===

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-11-02 Thread Lawrence Crowl
On 11/2/12, Eric Botcazou wrote: >> Index: gcc/ChangeLog >> >> 2012-10-31 Lawrence Crowl >> >> * is-a.h: New. >> (is_a (U*)): New. Test for is-a relationship. >> (as_a (U*)): New. Treat as a derived type. >> (dyn_cas

Re: [patch] Remove unused ebitmap and unused sbitmap functions.

2012-11-01 Thread Lawrence Crowl
On 11/1/12, Diego Novillo wrote: > On 2012-10-31 18:47 , Lawrence Crowl wrote: >> 2012-10-31 Lawrence Crowl >> >> * ebitmap.h: Remove unused. >> * ebitmap.c: Remove unused. >> * Makefile.in: Remove ebitmap.h and ebitmap.c. >> * sbitmap

Re: [patch] Normalize bitmap iteration.

2012-11-01 Thread Lawrence Crowl
On 11/1/12, Diego Novillo wrote: > On 2012-10-31 13:43 , Lawrence Crowl wrote: > > Rename the EXECUTE_IF_SET_IN_SBITMAP macro to > > EXECUTE_IF_SET_IN_BITMAP. Its implementation is now identical to > > that in bitmap.h. To prevent redefinition errors, both definitions &

Re: [patch] Normalize more bitmap function names.

2012-11-01 Thread Lawrence Crowl
On 11/1/12, Diego Novillo wrote: > On 2012-10-31 13:41 , Lawrence Crowl wrote: >> This patch normalizes more bitmap function names. >> >>sbitmap.h >> >> TEST_BIT -> bitmap_bit_p >> SET_BIT -> bitmap_set_bit > > I wonder if i

[patch] Remove unused ebitmap and unused sbitmap functions.

2012-10-31 Thread Lawrence Crowl
implementation file: SBITMAP_SIZE_BYTES sbitmap_verify_popcount Tested on x86-64. Okay for trunk? Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl * ebitmap.h: Remove unused. * ebitmap.c: Remove unused. * Makefile.in: Remove ebitmap.h and ebitmap.c. * sbitmap.h

[patch] Normalize bitmap iteration.

2012-10-31 Thread Lawrence Crowl
often declared in contexts where the bitmap type is not obvious. There are less than 40 uses of this type, so the burden to modify it when changing bitmap types is not large. Tested on x86-64, config-list.mk testing in progress. Okay for trunk? Index: gcc/ChangeLog 2012-10-31 Lawrence

Re: GCC 4.8.0 Status Report (2012-10-29), Stage 1 to end soon

2012-10-30 Thread Lawrence Crowl
overhaul soon. With any luck this week, > but PCH and gengtype are giving me a lot of grief. I have three remaining bitmap patches and the recently approved is_a/symtab/cgraph patch. However, Alexandre Oliva has a patch for bootstrap failure that is biting me. I can either incorporate it into my patches or wait for his patch and then submit. Comments? -- Lawrence Crowl

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-10-30 Thread Lawrence Crowl
On 10/30/12, Diego Novillo wrote: > On Tue, Oct 30, 2012 at 4:53 PM, Lawrence Crowl wrote: >> On 10/30/12, Diego Novillo wrote: >>> >>> So, to use these three functions, the user must define this single >>> 'is_a_helper' routine? Nothing else?

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-10-30 Thread Lawrence Crowl
On 10/30/12, Diego Novillo wrote: > On 2012-10-29 15:01 , Lawrence Crowl wrote: >> On 10/27/12, Marc Glisse wrote: >>> On Fri, 26 Oct 2012, Lawrence Crowl wrote: >>>> 2012-10-26 Lawrence Crowl >> >>> missing '>' >> >> Fixe

Re: [patch] Unify bitmap interface.

2012-10-30 Thread Lawrence Crowl
. I've gone ahead and changed them as well. > The only two sets of functions that will remain separate for > now are the iterators and the bitmap creation routines, I think. > Lawrence? The iterator functions have been unified, but not the iterator type names. -- Lawrence Crowl

Re: [patch] Unify bitmap interface.

2012-10-29 Thread Lawrence Crowl
On 10/29/12, Diego Novillo wrote: > On Oct 29, 2012 Lawrence Crowl wrote: > > The sbitmap popcount function is only used in ebitmap, which is > > itself not used. If we do anything, removing them might be the > > thing to do. > > Yes, please. Separate patch, please.

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-10-29 Thread Lawrence Crowl
On 10/27/12, Marc Glisse wrote: > On Fri, 26 Oct 2012, Lawrence Crowl wrote: > > 2012-10-26 Lawrence Crowl > missing '>' Fixed. > > * is-a.h: New. > > (is_a (U*)): New. Test for is-a relationship. > > (as_a (U*)): New. Treat as a

Re: [patch] Unify bitmap interface.

2012-10-29 Thread Lawrence Crowl
On 10/29/12, Richard Biener wrote: > On Oct 29, 2012 Diego Novillo wrote: > > On Oct 25, 2012 Lawrence Crowl wrote: > > > The sbitmap non-bool returning bitwise operations have been > > > merged with the bool versions. Sometimes this merge involved > > &g

Re: [patch] Unify bitmap interface.

2012-10-26 Thread Lawrence Crowl
On 10/25/12, Lawrence Crowl wrote: > This patch implements the unification of the *bitmap interfaces as > discussed. > Essentially, we rename ebitmap and sbitmap functions to use the same names > as the bitmap functions. This rename works because we can now overload > on the bit

[patch] Apply conditional down cast to cgraph.h et.al.

2012-10-26 Thread Lawrence Crowl
ested on x86_64. Okay for trunk? Index: gcc/ChangeLog 2012-10-26 Lawrence Crowl (U*)): New. Test for is-a relationship. (as_a (U*)): New. Treat as a derived type. (dyn_cast (U*)): New. Conditionally cast based on is_a. * cgraph.h (varpool_node): Rename to varpo

Re: Change hash_table for separate comparator, documentation, cleanups...

2012-10-26 Thread Lawrence Crowl
On 10/26/12, Richard Biener wrote: > On Oct 25, 2012 Lawrence Crowl wrote: > > Change hash_table to support a comparator type different from the > > value type stored in the hash table. The 'find' functions now > > may take a different type from the value type.

Change hash_table for separate comparator, documentation, cleanups...

2012-10-25 Thread Lawrence Crowl
ept to use typedefs value_type and compare_type instead of T. Change all users to match. Add usage documentation to hash-table.h. Tested on x86-64. Okay for trunk? Index: gcc/ChangeLog 2012-10-25 Lawrence Crowl * hash-table.h: Add usage documentation. (template struct typed_f

Re: patch to fix constant math - 4th patch - the wide-int class.

2012-10-23 Thread Lawrence Crowl
On 10/23/12, Kenneth Zadeck wrote: > On 10/23/2012 02:38 PM, Lawrence Crowl wrote: >> On 10/23/12, Kenneth Zadeck wrote: >>> On 10/23/2012 10:12 AM, Richard Biener wrote: >>>> + inline bool minus_one_p () const; >>>> + inline bool zero_p ()

Re: patch to fix constant math - 4th patch - the wide-int class.

2012-10-23 Thread Lawrence Crowl
y with other double ints. Otherwise, it has the same value query functions that you do above. In the case of double int, the goal was to simplify use of the existing semantics. If you are changing the semantics, consider incorporating sign explicitly. -- Lawrence Crowl

Re: patch to fix constant math - 4th patch - the wide-int class.

2012-10-23 Thread Lawrence Crowl
ws custom ways of specifying required bits to > not pollute wide-int itself too much. Lawrence? Yes, in C++11, wide_int::zero ({32, 32}) is possible using an implicit conversion to WIntSpec from an initializer_list. However, at present we are limited to C++03 to enable older compilers as boot compilers. -- Lawrence Crowl

Re: wide int patch #6: Replacement of hwi extraction from int-csts.

2012-10-22 Thread Lawrence Crowl
a conversion of (INTEGER_CST) tree to HOST_WIDE_INT > vs. unsigned HOST_WIDE_INT) We could add conversion operators to achieve the effect. However, we probably don't want to do so until we can make them explicit. Unfortunately, explicit conversion operators are not available until C++11. > No, I don't want you to do the above transform with this patch ;) -- Lawrence Crowl

Re: [PATCH][RFC] Re-organize how we stream trees in LTO

2012-10-22 Thread Lawrence Crowl
e trees can be fully materialized from the SCC groups, > it should be fine. -- Lawrence Crowl

Re: Add usage documentation for hash_table

2012-10-13 Thread Lawrence Crowl
hable (); > >Descr::remove (*slot); > > @@ -660,11 +756,10 @@ hash_table > from hash table starting with the given HASH. If there is no > matching element in the hash table, this function does nothing. */ > > -template - template class Allocator> > +template class Allocator> > void > -hash_table > -::remove_elt_with_hash (const T *comparable, hashval_t hash) > +hash_table ::remove_elt_with_hash (const T *comparable, > + hashval_t hash) > { >T **slot; > > @@ -683,13 +778,11 @@ hash_table > each live entry. If CALLBACK returns false, the iteration stops. > ARGUMENT is passed as CALLBACK's second argument. */ > > -template - template class Allocator> > +template class Allocator> > template int (*Callback) (typename Descr::T **slot, Argument argument)> > void > -hash_table > -::traverse_noresize (Argument argument) > +hash_table ::traverse_noresize (Argument argument) > { >T **slot; >T **limit; > @@ -712,13 +805,11 @@ hash_table > /* Like traverse_noresize, but does resize the table when it is too empty > to improve effectivity of subsequent calls. */ > > -template - template class Allocator> > +template class Allocator> > template int (*Callback) (typename Descr::T **slot, Argument argument)> > void > -hash_table > -::traverse (Argument argument) > +hash_table ::traverse (Argument argument) > { >size_t size = htab->size; >if (elements () * 8 < size && size > 32) > -- Lawrence Crowl

Re: Use conditional casting with symtab_node

2012-10-13 Thread Lawrence Crowl
On 10/12/12, Richard Biener wrote: > On Oct 11, 2012 Xinliang David Li wrote: >> On Oct 11, 2012 Lawrence Crowl wrote: >>> On 10/10/12, Xinliang David Li wrote: >>>> In a different thread, I proposed the following alternative to >>>> 'try_xxx&#x

Re: Use conditional casting with symtab_node

2012-10-11 Thread Lawrence Crowl
graph_node *q = p->try_function ()) versus if (cgraph_node *q = p->cast_to ()) I thought the latter would generate objections. Does anyone object to the extra typing? If not, I can make that change. -- Lawrence Crowl

Re: Use conditional casting with symtab_node

2012-10-09 Thread Lawrence Crowl
On 10/5/12, Jan Hubicka wrote: >> On Thu, Oct 4, 2012 at 8:16 PM, Diego Novillo wrote: >> > On Thu, Oct 4, 2012 at 2:14 PM, Lawrence Crowl wrote: >> > >> >> So, Jan Hubicka requested and approved the current spelling. >> >> What now? >> &

Re: Convert more non-GTY htab_t to hash_table.

2012-10-09 Thread Lawrence Crowl
On 10/5/12, Diego Novillo wrote: > On Oct 3, 2012 Lawrence Crowl wrote: > > Change more non-GTY hash tables to use the new type-safe > > template hash table. Constify member function parameters that > > can be const. Correct a couple of expressions in formerly > &g

Re: Convert more non-GTY htab_t to hash_table.

2012-10-05 Thread Lawrence Crowl
On 10/5/12, Jakub Jelinek wrote: > On Fri, Oct 05, 2012 at 01:59:18PM -0700, Lawrence Crowl wrote: > > With the constructor, you don't have to remember and you don't > > have to type more. If you have a variable, you know that it is > > properly initialized. > &

Re: Use conditional casting with symtab_node

2012-10-05 Thread Lawrence Crowl
gt; > > have on performance. Bonus points that they are making the > > > compiler faster. Speed of the compiler *is* a scalability > > > issue, and it's one that GCC doesn't appear to have paid all > > > that much attention to over the years. > > > > I just don't believe the 0.5% numbers. > > Then ask. Don't mock, please. -- Lawrence Crowl

Re: Convert more non-GTY htab_t to hash_table.

2012-10-05 Thread Lawrence Crowl
Could you please review the patch at http://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg40961.html? On 10/3/12, Lawrence Crowl wrote: > Sorry, one more time with the right file contents. > > On 10/2/12, Richard Guenther wrote: >> You are changing a hashtable used by fold ch

Re: Convert more non-GTY htab_t to hash_table.

2012-10-05 Thread Lawrence Crowl
On 10/5/12, Richard Guenther wrote: > On Thu, 4 Oct 2012, Lawrence Crowl wrote: >> On 10/4/12, Richard Guenther wrote: >> > On Tue, 2 Oct 2012, Lawrence Crowl wrote: >> >> On 10/2/12, Richard Guenther wrote: >> >> > On Mon, 1 Oct 2012, Lawrence Cr

Re: Convert more non-GTY htab_t to hash_table.

2012-10-04 Thread Lawrence Crowl
On 10/4/12, Richard Guenther wrote: > On Tue, 2 Oct 2012, Lawrence Crowl wrote: >> On 10/2/12, Richard Guenther wrote: >> > On Mon, 1 Oct 2012, Lawrence Crowl wrote: >> > > Change more non-GTY hash tables to use the new type-safe >> > > template hash t

Re: Convert more non-GTY htab_t to hash_table.

2012-10-03 Thread Lawrence Crowl
tion parameters that can be const. Correct a couple of expressions in formerly uninstantiated templates. The new code is 0.362% faster in bootstrap, with a 99.5% confidence of being faster. Tested on x86-64. Okay for trunk? Index: gcc/java/ChangeLog 2012-10-01 Lawrence Crowl * Mak

Re: Convert more non-GTY htab_t to hash_table.

2012-10-03 Thread Lawrence Crowl
On 10/2/12, Richard Guenther wrote: > On Mon, 1 Oct 2012, Lawrence Crowl wrote: > >> Change more non-GTY hash tables to use the new type-safe template hash >> table. >> Constify member function parameters that can be const. >> Correct a couple of expressions in for

Add myself to MAINTAINERS

2012-10-03 Thread Lawrence Crowl
...@cs.tu-berlin.de François-Xavier Coudertfxcoud...@gcc.gnu.org Cary Coutant ccout...@google.com +Lawrence Crowl cr...@google.com Ian Dall i

Re: Convert more non-GTY htab_t to hash_table.

2012-10-03 Thread Lawrence Crowl
On 10/2/12, Ian Lance Taylor wrote: > On Oct 2, 2012 Lawrence Crowl wrote: > > On 10/2/12, Richard Guenther wrote: > > > You are changing a hashtable used by fold checking, did you > > > test with fold checking enabled? > > > > I didn't know I had

  1   2   3   4   >