Re: [PATCH] Add XINSN macro and use it within NEXT_INSN/PREV_INSN (was Re: [PATCH] Force rtl templates to be inlined)

2014-09-04 Thread David Malcolm
On Thu, 2014-09-04 at 22:22 +0200, Jakub Jelinek wrote: > On Thu, Sep 04, 2014 at 04:04:17PM -0400, David Malcolm wrote: > > --- a/gcc/rtl.h > > +++ b/gcc/rtl.h > > @@ -195,6 +195,7 @@ union rtunion > >unsigned int rt_uint; > >const char *rt_str; > >

[PATCH, committed] Return type of get_ready_element

2014-09-04 Thread David Malcolm
@@ +2014-09-05 David Malcolm + + * haifa-sched.c (get_ready_element): Strengthen return type from + rtx to rtx_insn *. + * sched-int.h (get_ready_element): Likewise. + 2014-09-04 Segher Boessenkool PR target/63165 Index: gcc/haifa-sched.c

[PATCH, committed] fixup_args_size_notes takes a pair of rtx_insn *

2014-09-04 Thread David Malcolm
/ChangeLog (revision 214930) @@ -1,5 +1,14 @@ 2014-09-05 David Malcolm + * emit-rtl.c (try_split): Update NULL_RTX to NULL in call to + fixup_args_size_notes. + * expr.c (fixup_args_size_notes): Strengthen first two params from + rtx to rtx_insn *, eliminating a checked cast. + * rtl.h

[PATCH, committed] Params to modified_between_p

2014-09-04 Thread David Malcolm
+1,12 @@ 2014-09-05 David Malcolm + * rtl.h (modified_between_p): Strengthen params 2 and 3 from + const_rtx to const rtx_insn *. + * rtlanal.c (modified_between_p): Likewise, eliminating a checked + cast. + +2014-09-05 David Malcolm + * emit-rtl.c (try_split): Update NULL_RTX to NULL in

[PATCH, committed] Remove a cast in cse.c

2014-09-04 Thread David Malcolm
) +++ gcc/ChangeLog (revision 214932) @@ -1,5 +1,10 @@ 2014-09-05 David Malcolm + * cse.c (cse_insn): Strengthen local "new_rtx" from rtx to + rtx_insn *, eliminating a checked cast. + +2014-09-05 David Malcolm + * rtl.h (modified_between_p): Strengthen params 2 and 3 from co

[PATCH 01/10] Use rtx_jump_table_data in jump.c:delete_related_insns

2014-09-04 Thread David Malcolm
gcc/ * jump.c (delete_related_insns): Introduce a new local "table" by replacing JUMP_TABLE_DATA_P with a dyn_cast, then use the get_labels method of "table" to simplify access to the labels in the jump table. --- gcc/jump.c | 12 ++-- 1 file changed, 6 inse

[PATCH 02/10] Drop uncast_insn from param 1 of final_scan_insn

2014-09-04 Thread David Malcolm
gcc/ * output.h (final_scan_insn): Strengthen first param from rtx to rtx_insn *. * final.c (final_scan_insn): Likewise, renaming it back from "uncast_insn" to "insn", eliminating the checked cast. * config/h8300/h8300.md (define_insn "jump"): Replace loca

[PATCH 00/10] More use of rtx subclasses

2014-09-04 Thread David Malcolm
igurations. OK for trunk? David Malcolm (10): Use rtx_jump_table_data in jump.c:delete_related_insns Drop uncast_insn from param 1 of final_scan_insn for_each_eh_label callbacks take an rtx_code_label Eliminate the checked cast from get_call_reg_set_usage Convert set_block_for_insn fro

[PATCH 03/10] for_each_eh_label callbacks take an rtx_code_label

2014-09-04 Thread David Malcolm
gcc/ * except.c (for_each_eh_label): Within param "callback", strengthen param from rtx to rtx_code_label *. Strengthen local "lab" from rtx to rtx_code_label *. Remove redundant check on LABEL_P (lab), since this is known from the type rtx_code_label *. *

[PATCH 09/10] Simplification within reorg.c

2014-09-04 Thread David Malcolm
gcc/ * reorg.c (relax_delay_slots): Move declaration of "trial_seq" above the conditional, and convert the check on GET_CODE to a dyn_cast, so that "trial_seq" is available as an rtx_sequence * in the conditional. Simplify the conditional by using methods of

[PATCH 06/10] Use rtx_insn more within peep2

2014-09-04 Thread David Malcolm
gcc/ * recog.c (peep2_attempt): Strengthen return type from rtx to rtx_insn *. (peep2_update_life): Likewise for params "last", "prev", removing a checked cast made redundant by this. (peephole2_optimize): Likewise for local "last". --- gcc/recog.c | 9 +

[PATCH 10/10] Use rtx_insn for various jump-handling functions and predicates

2014-09-04 Thread David Malcolm
gcc/ * config/arc/arc.c (arc_print_operand): Use insn method of final_sequence for type-safety. * config/bfin/bfin.c (bfin_hardware_loop): Strengthen param "insn" from rtx to rtx_insn *. * config/frv/frv.c (frv_print_operand_jump_hint): Likewise. * co

[PATCH 04/10] Eliminate the checked cast from get_call_reg_set_usage

2014-09-04 Thread David Malcolm
gcc/ * caller-save.c (setup_save_areas): Strengthen local "insn" from rtx to rtx_insn *. * final.c (get_call_reg_set_usage): Likewise for first param, eliminating a checked cast. * regs.h (get_call_reg_set_usage): Likewise for first param. * resource.

[PATCH 07/10] Use rtx_insn for more scheduler things, plus CONST_CAST_RTX_INSN

2014-09-04 Thread David Malcolm
gcc/ * sched-deps.c (sched_get_condition_with_rev_uncached): Strengthen param "insn" from const_rtx to const rtx_insn *. (sched_get_reverse_condition_uncached): Likewise. (sched_get_condition_with_rev): Likewise. (sched_has_condition_p): Likewise. (sc

[PATCH 05/10] Convert set_block_for_insn from a macro to an inline function

2014-09-04 Thread David Malcolm
gcc/ * basic-block.h (set_block_for_insn): Eliminate this macro in favor of... * rtl.h (set_block_for_insn): New inline function, imposing the requirement that the "insn" param is an rtx_insn *. --- gcc/basic-block.h | 2 -- gcc/rtl.h | 5 + 2 files chan

[PATCH 08/10] Use rtx_insn_list within haifa-sched.c

2014-09-04 Thread David Malcolm
gcc/ * haifa-sched.c (check_clobbered_conditions): Strengthen local "link" from rtx to rtx_insn_list *, and use its methods for clarity and type-safety. (toggle_cancelled_flags): Likewise. (restore_last_backtrack_point): Likewise. (queue_to_ready): Us

Re: [PATCH 10/10] Use rtx_insn for various jump-handling functions and predicates

2014-09-05 Thread David Malcolm
On Fri, 2014-09-05 at 14:03 +0100, Richard Sandiford wrote: > David Malcolm writes: > > diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c > > index 7cddab7..57eb83b 100644 > > --- a/gcc/config/arc/arc.c > > +++ b/gcc/config/arc/arc.c > > @@ -2849,8 +2849,8

Re: [PATCH] Add XINSN macro and use it within NEXT_INSN/PREV_INSN (was Re: [PATCH] Force rtl templates to be inlined)

2014-09-05 Thread David Malcolm
On Fri, 2014-09-05 at 12:45 -0600, Jeff Law wrote: > On 09/04/14 14:04, David Malcolm wrote: > > On Tue, 2014-09-02 at 19:50 +0200, Andi Kleen wrote: > >>> I suspect the bulk of them currently are coming from the safe_as_a > >>> calls within NEXT_INSN and

Build breakage on darwin and pa64-hpux [was Re: Use -fbuilding-libgcc for more target macros used in libgcc]

2014-09-05 Thread David Malcolm
On Fri, 2014-09-05 at 01:15 +, Joseph S. Myers wrote: > It is desirable for various reasons to stop target libraries from > using host-side tm.h: making the headers work on both host and target > (and on build as well) is fragile (especially when dealing with macros > depending on command-line

Re: [PATCH 1/2] add staticly checked label_nuses accessors

2014-09-05 Thread David Malcolm
On Fri, 2014-09-05 at 10:43 -0600, Jeff Law wrote: > On 09/05/14 09:32, tsaund...@mozilla.com wrote: > > From: Trevor Saunders > > > > Hi, > > > > Doing this means we get to remove a fair chunk of runtime checking. > > > > bootstrapped + regtested on x86_64-unknown-linux-gnu with no regressions.

[PATCH, committed] gcse.c's modify_mem_list is a list of insns

2014-09-08 Thread David Malcolm
+1,15 @@ +2014-09-08 David Malcolm + + * gcse.c (modify_mem_list): Strengthen this variable from + vec * to vec *. + (vec_rtx_heap): Strengthen this typedef from vec to + vec. + (load_killed_in_block_p): Strengthen local "list" from vec to + vec, and local "setter"

[PATCH, committed] control_flow_insn_p takes an insn

2014-09-08 Thread David Malcolm
(revision 215027) +++ gcc/ChangeLog (revision 215028) @@ -1,5 +1,11 @@ 2014-09-08 David Malcolm + * basic-block.h (control_flow_insn_p): Strengthen param from + const_rtx to const rtx_insn *. + * cfgbuild.c (control_flow_insn_p): Likewise. + +2014-09-08 David Malcolm + * gcse.c (modify_mem_list

[PATCH 0/5] Yet more use of rtx subclasses; possible rl78 bug

2014-09-08 Thread David Malcolm
n the loop. That said I've only tested that it compiles for rl78, I've not yet forced line 3605 to execute, and not simulated the resulting code. As before, I've bootstrapped each patch on x86_64-unknown-linux-gnu (Fedora 20), and rebuilt the entire series as part of a config-list.m

[PATCH 2/5] Handcode gen_rtx_INSN

2014-09-08 Thread David Malcolm
gcc/ChangeLog: * combine.c (try_combine): Eliminate checked cast on result of gen_rtx_INSN. * emit-rtl.c (gen_rtx_INSN): New function, improving over the prior autogenerated one by strengthening the return type and params 2 and 3 from rtx to rtx_insn *, and b

[PATCH 1/5] struct ira_reg_equiv_s's "init_insns" is an rtx_insn_list

2014-09-08 Thread David Malcolm
gcc/ * ira.c (ira_update_equiv_info_by_shuffle_insn): Use NULL rather than NULL_RTX. (no_equiv): Likewise. (update_equiv_regs): Likewise. (setup_reg_equiv): Likewise. Strengthen locals "elem", "prev_elem", "next_elem" from rtx to rtx_insn_list *, and

[PATCH 3/5] INSN_LOCATION takes an rtx_insn

2014-09-08 Thread David Malcolm
gcc/ * rtl.h (INSN_LOCATION): Strengthen param from const_rtx to const rtx_insn *, and from rtx to rtx_insn * for the other overloaded variant. (RTL_LOCATION): Add a checked cast to rtx_insn * when invoking INSN_LOCATION, since we know INSN_P holds. (

[PATCH 4/5] recog_memoized works on an rtx_insn *

2014-09-08 Thread David Malcolm
gcc/ChangeLog: * caller-save.c (rtx saveinsn): Strengthen this variable from rtx to rtx_insn *. (restinsn): Likewise. * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_move): Likewise for param. * config/aarch64/aarch64.c (aarch64_simd_attr_

[PATCH 5/5] single_set takes an insn

2014-09-08 Thread David Malcolm
gcc/ChangeLog: * rtl.h (single_set_2): Strengthen first param from const_rtx to const rtx_insn *, and move prototype to above... (single_set): ...this. Convert this from a macro to an inline function, enforcing the requirement that the param is a const rtx_i

[PATCH] gengtype: support empty GTY-marked structs

2013-11-05 Thread David Malcolm
t, which needed this one for gengtype to cope). Successfully bootstrapped®tested on x86_64-unknown-linux-gnu. OK for trunk? commit 030c6bd6856ee175adf7cf60cb44b2f2091360d0 Author: David Malcolm Date: Mon Nov 4 21:21:23 2013 -0500 gengtype: support empty structs gcc/ * g

[PATCH] Add gimple subclasses for every gimple code (was Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3))

2013-11-05 Thread David Malcolm
On Fri, 2013-11-01 at 17:36 -0400, Andrew MacLeod wrote: > On 10/31/2013 12:26 PM, David Malcolm wrote: > > [Shamelessly hijacking Andrew's thread about gimple.h refactoring, > > since this seems on-topic for that, and I'm keen to hear from Andrew on > > how the fo

Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)

2013-11-05 Thread David Malcolm
On Tue, 2013-11-05 at 14:18 -0700, Jeff Law wrote: > On 10/31/13 10:26, David Malcolm wrote: > > The gimple statement types are currently implemented using a hand-coded > > C inheritance scheme, with a "union gimple_statement_d" holding the > > various possible struc

Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)

2013-11-06 Thread David Malcolm
On Wed, 2013-11-06 at 14:11 +0100, Jakub Jelinek wrote: > On Wed, Nov 06, 2013 at 02:00:56PM +0100, Richard Biener wrote: > > Well, what else, besides as_a<> or keeping the current > > global accessor functions would you propose? > > I'd prefer to keep the current accessors. Whether there is a cl

Re: [PATCH] Add gimple subclasses for every gimple code (was Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3))

2013-11-06 Thread David Malcolm
On Wed, 2013-11-06 at 16:32 +0100, Michael Matz wrote: > Hi, > > On Tue, 5 Nov 2013, David Malcolm wrote: > > > Here's a followup patch which ensures that every gimple code has its own > > subclass, by adding empty subclasses derived from the GSS_-based > >

Re: [PATCH] Add gimple subclasses for every gimple code (was Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3))

2013-11-08 Thread David Malcolm
On Wed, 2013-11-06 at 22:32 -0700, Jeff Law wrote: > [ Just a note, of this reply is meant for Michael and other parts for > David, hopefully the audience is clear from the context. ] > > On 11/06/13 21:56, David Malcolm wrote: > > On Wed, 2013-11-06 at 16:32 +0100, Michael M

Re: [PATCH] Avoid some unnecessary set_cfun calls

2013-11-13 Thread David Malcolm
On Wed, 2013-11-13 at 13:53 +0100, Richard Biener wrote: > On Wed, 13 Nov 2013, Martin Jambor wrote: > > > Hi, > > > > On Wed, Nov 13, 2013 at 10:49:09AM +0100, Jakub Jelinek wrote: > > > Hi! > > > > > > void f1 (void) {} > > > __attribute__((target ("avx"))) void f2 (void) {} > > > __attribute_

Re: [PATCH] Add gimple subclasses for every gimple code (was Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3))

2013-11-14 Thread David Malcolm
On Thu, 2013-11-14 at 00:13 -0700, Jeff Law wrote: > On 11/08/13 12:02, David Malcolm wrote: > >> I wouldn't mind seeing a small example proof of concept posted to help > >> those who don't see where this is going understand the goal. I would > >> recommend

Re: [PATCH 4/6] Implement is_a_helper <>::test specializations for various gimple types

2013-11-18 Thread David Malcolm
On Thu, 2013-11-14 at 00:37 -0700, Jeff Law wrote: > On 10/31/13 10:26, David Malcolm wrote: > > * gimple.h (is_a_helper ::test): New. > > (is_a_helper ::test): New. > > (is_a_helper ::test): New. > > (is_a_helper ::test): New. > OK with the usual con

Re: [PATCH 1/6] Convert gimple types from a union to C++ inheritance

2013-11-18 Thread David Malcolm
On Thu, 2013-11-14 at 14:51 -0700, Jeff Law wrote: > On 10/31/13 10:26, David Malcolm wrote: > > * Makefile.in (GIMPLE_H): Add dep on is-a.h. > Not asking you, but I'd like to hope many of the *_H things in > Makefile.in should be going away... > > > > >

Re: [PATCH 5/6] Port various places from union access to subclass access.

2013-11-18 Thread David Malcolm
On Thu, 2013-11-14 at 00:34 -0700, Jeff Law wrote: > On 10/31/13 10:26, David Malcolm wrote: [...] > > diff --git a/gcc/gimple.c b/gcc/gimple.c > > index 9b1337a..e9ef8e0 100644 > > --- a/gcc/gimple.c > > +++ b/gcc/gimple.c > > @@ -641,21 +641,22 @@ static inlin

Re: [PATCH] Eliminate n_basic_blocks macro (was Re: [PATCH] Avoid some unnecessary set_cfun calls)

2013-11-18 Thread David Malcolm
On Fri, 2013-11-15 at 20:38 -0500, David Malcolm wrote: > On Wed, 2013-11-13 at 14:44 +0100, Richard Biener wrote: > > On Wed, 13 Nov 2013, David Malcolm wrote: > > > > > On Wed, 2013-11-13 at 13:53 +0100, Richard Biener wrote: > > > > On W

Re: [PATCH] Updated automated patch (was Re: [PATCH 3/6] Automated part of conversion of gimple types to use C++ inheritance)

2013-11-19 Thread David Malcolm
On Mon, 2013-11-18 at 22:13 -0700, Jeff Law wrote: > On 11/18/13 13:25, David Malcolm wrote: > > > > I regenerated it and am bootstrapping now. I glanced over it and > > nothing major seems to have changed; just changes due to the movement of > > code between files.

Committed: removal of n_edges macro

2013-11-19 Thread David Malcolm
On Tue, 2013-11-19 at 09:49 +0100, Richard Biener wrote: > On Mon, 18 Nov 2013, David Malcolm wrote: > > > On Fri, 2013-11-15 at 20:38 -0500, David Malcolm wrote: > > > On Wed, 2013-11-13 at 14:44 +0100, Richard Biener wrote: > > > > On Wed, 13 Nov 2013, David Mal

Re: [PATCH] Enable multiple duplicated blocks on threading path

2013-11-19 Thread David Malcolm
On Tue, 2013-11-19 at 18:55 -0700, Jeff Law wrote: > So when we first started looking at the FSA/FSM optimization for > coremark, I speculated that it could be done in the jump threader and > that by doing so we'd see benefits in more general codes. > > This patch enables the code to allow multi

Committed: gdbhooks.py: reorganization to support regex-matching and typedefs

2013-11-19 Thread David Malcolm
s). commit 0ac97497793e6cb742fd553744ff214379501ff8 Author: David Malcolm Date: Tue Nov 19 22:10:27 2013 -0500 gdbhooks.py: Support aliases of the types being printed gcc/ * gdbhooks.py (GdbSubprinter.__init__): Drop str_type_ field. (GdbSubprinter.handles

Committed: gdbhooks.py: Implement a prettyprinter for vec<>*

2013-11-19 Thread David Malcolm
I've committed the attached to trunk as r205086, implementing support in gdb for prettyprinting gcc's vec<>* types. commit 0c55e3277d41a47e23178d05c6779a683145febd Author: David Malcolm Date: Tue Nov 19 22:18:54 2013 -0500 gdbhooks.py: Implement a prettyprinter for vec

[PATCH] Fix comments that refer to ENTRY_{BLOCK|EXIT}_PTR

2013-11-20 Thread David Malcolm
haps we could actually gain a speedup from the macro removal work; if so, this feels like a followup patch. Comment-fixing patch follows. commit f9ac8591f2ef893f489a0cec812c3198d8eaea5c Author: David Malcolm Date: Mon Nov 18 21:16:04 2013 -0500 Reword comments that mention ENTRY_BLOCK_PTR and

Committed: gdbhooks.py: fix prettyprinting of NULL vec<>*

2013-11-20 Thread David Malcolm
tput: (gdb) p cfun->cfg->x_entry_block_ptr->preds $6 = 0x0 Committed to trunk as r205139. Index: gcc/ChangeLog === --- gcc/ChangeLog (revision 205138) +++ gcc/ChangeLog (revision 205139) @@ -1,3 +1,8 @@ +2013-11-20

Re: [patch] Privatize gimplify_ctx structure.

2013-11-20 Thread David Malcolm
On Wed, 2013-11-20 at 12:58 -0700, Jeff Law wrote: > On 11/20/13 12:18, Andrew MacLeod wrote: > > On 11/20/2013 01:40 PM, Jeff Law wrote: > >> On 11/20/13 09:47, Andrew MacLeod wrote: > >>> * gimplify.h (gimplify_hasher : typed_free_remove, struct > >>> gimplify_ctx): > >>> Move to gimplify

Re: [PATCH] Fix comments that refer to ENTRY_{BLOCK|EXIT}_PTR

2013-11-20 Thread David Malcolm
On Wed, 2013-11-20 at 11:28 -0700, Jeff Law wrote: > On 11/20/13 10:03, David Malcolm wrote: [...] > > There are three places the patch doesn't touch: > > > > (A) cfgbuild.c (make_edges) has this comment: > >/* By nature of the way these get numbered, ENT

Plugin headers (was Re: [patch 1/3] Flatten gimple.h)

2013-11-21 Thread David Malcolm
On Thu, 2013-11-21 at 13:07 -0700, Jeff Law wrote: > On 11/21/13 13:04, Andrew MacLeod wrote: > > On 11/21/2013 02:26 PM, Jeff Law wrote: > >> On 11/21/13 11:15, Andrew MacLeod wrote: > >>> > >>> Is there anything in particular one needs to do for plugins? I thought I > >>> saw a patch somewhere th

Re: [PATCH] Updated automated patch (was Re: [PATCH 3/6] Automated part of conversion of gimple types to use C++ inheritance)

2013-11-21 Thread David Malcolm
On Thu, 2013-11-21 at 18:03 -0500, Andrew MacLeod wrote: > On 11/21/2013 05:42 PM, Jakub Jelinek wrote: > > On Thu, Nov 21, 2013 at 03:24:55PM -0700, Jeff Law wrote: > >> On 11/21/13 15:19, Jakub Jelinek wrote: > >>> On Mon, Nov 18, 2013 at 03:25:52PM -0500, Davi

[PATCH 1/9] java: Convert implicit uses of input_location into explicit uses

2013-11-21 Thread David Malcolm
gcc/java * class.c (maybe_layout_super_class): Update comment. * decl.c (java_add_stmt): Remove use of input_filename macro. * jcf-parse.c (set_source_filename): Remove use of input_filename macro. (parse_class_file): Remove use of input_line and input_filena

[PATCH 0/9] Remove macros that implicitly use input_location

2013-11-21 Thread David Malcolm
ely makes them explicit). Successfully bootstrapped®tested on x86_64-unknown-linux-gnu; my bootstrap covered c, c++, ada, fortran, but managed to miss java (though Tom already approved that part in a previous version). OK for trunk, assuming I can get it to build with Java, and targetting bfin? David Malco

[PATCH 2/9] ada: Eliminate uses of input_line macro.

2013-11-21 Thread David Malcolm
gcc/ada * gcc-interface/utils2.c (build_call_raise): Remove use of input_line macro. (build_call_raise_range): Likewise. (build_call_raise_column): Likewise. --- gcc/ada/gcc-interface/utils2.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH 5/9] gcc/c: Convert implicit uses of input_location into explicit uses

2013-11-21 Thread David Malcolm
gcc/c * c-decl.c (define_label, shadow_tag_warned) (check_bitfield_type_and_width, grokdeclarator, grokparms, store_parm_decls_newstyle, store_parm_decls_oldstyle) (declspecs_add_type): Remove use of in_system_header macro. * c-parser.c (c_parser_unary_expre

[PATCH 3/9] c-family: Convert implicit uses of input_location into explicit uses

2013-11-21 Thread David Malcolm
gcc/c-family * c-common.c (unsafe_conversion_p): Remove use of EXPR_LOC_OR_HERE macro. (conversion_warning): Likewise. (warnings_for_convert_and_check): Likewise. (warn_for_collisions_1): Likewise. (shorten_compare): Likewise, and remove use of in_sy

[PATCH 7/9] bfin: Remove use of input_filename macro.

2013-11-21 Thread David Malcolm
gcc/ * config/bfin/bfin.c (output_file_start): Remove use of input_filename macro. --- gcc/config/bfin/bfin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index d7af939..6fdf153 100644 --- a/gcc/config/bfin/bfin

[PATCH 8/9] gcc: Convert implicit uses of input_location into explicit uses

2013-11-21 Thread David Malcolm
gcc/ * builtins.c (c_strlen): Remove use of EXPR_LOC_OR_HERE macro. * gimplify.c (internal_get_tmp_var): Likewise. EXPR_LOC_OR_HERE macro. (shortcut_cond_expr): Likewise. * tree-diagnostic.c (diagnostic_report_current_function): Remove use of input_fi

[PATCH 6/9] fortran: Remove use of input_line macro

2013-11-21 Thread David Malcolm
gcc/fortran * trans.c (trans_runtime_error_vararg): Remove use of input_line macro. --- gcc/fortran/trans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index 204cbff..7805b57 100644 --- a/gcc/fortran/trans.c +++ b/gc

[PATCH 9/9] gcc: Remove macros that implicitly use input_location

2013-11-21 Thread David Malcolm
gcc/ * input.h (input_line): Remove. (input_filename): Likewise. (in_system_header): Likewise. * tree.h (EXPR_LOC_OR_HERE): Remove. --- gcc/input.h | 3 --- gcc/tree.h | 2 -- 2 files changed, 5 deletions(-) diff --git a/gcc/input.h b/gcc/input.h index 8fdc7b2..55

[PATCH 4/9] cp: Convert implicit uses of input_location into explicit uses

2013-11-21 Thread David Malcolm
gcc/cp * call.c (build_integral_nontype_arg_conv): Remove use of EXPR_LOC_OR_HERE macro. (convert_like_real): Likewise. (convert_arg_to_ellipsis): Likewise. (build_cxx_call): Likewise. (perform_implicit_conversion_flags): Likewise. (initialize

Re: [PATCH 0/9] Remove macros that implicitly use input_location

2013-11-22 Thread David Malcolm
On Fri, 2013-11-22 at 12:57 +0100, Richard Biener wrote: > On Fri, Nov 22, 2013 at 4:31 AM, David Malcolm wrote: > > The following patch series eliminates the following macros that > > implicitly use input_location: > > input.h: > > #define input_line LO

[PATCH] Fix checking of gimple types

2013-11-25 Thread David Malcolm
On Thu, 2013-11-21 at 18:03 -0500, Andrew MacLeod wrote: > On 11/21/2013 05:42 PM, Jakub Jelinek wrote: > > On Thu, Nov 21, 2013 at 03:24:55PM -0700, Jeff Law wrote: > >> On 11/21/13 15:19, Jakub Jelinek wrote: > >>> On Mon, Nov 18, 2013 at 03:25:52PM -0500, Davi

[jit] Fix "make check-jit"

2014-10-06 Thread David Malcolm
Committed to branch dmalcolm/jit: gcc/jit/ChangeLog.jit: * Make-lang.in (lang_checks): Append "check-jit". * docs/internals/index.rst (Running the test suite): Use "check-jit" rather than "check-parallel-jit". --- gcc/jit/Make-lang.in | 2 ++ gcc/jit/docs/inte

[jit] Merger of trunk r215958 into jit branch

2014-10-06 Thread David Malcolm
I've merged today's svn trunk into the git branch dmalcolm/jit, pushing it as 81d39bf76e3ffd4e62c307cc8d22df18572eec19 Specifically, this is from trunk r215958 aka e012cdc775868e9922f5fef9068a764546876d93 bringing in all changes since 215803 aka 68874c5d021dd6b8b740ffd23960e46e333270b5 (2014-10-02

[jit] Use the full name of the installed driver binary

2014-10-07 Thread David Malcolm
On Fri, 2014-09-26 at 21:55 +, Joseph S. Myers wrote: On Thu, 25 Sep 2014, David Malcolm wrote: > > > Should this have the $(exeext) suffix seen in Makefile.in? > > $(target_noncanonical)-gcc-$(version)$(exeext) > > Depends on whether that's needed for the pex c

[jit] Eliminate internal-api.c/h in favor of jit-common.h, jit-playback.c/h, jit-recording.c/h

2014-10-07 Thread David Malcolm
jit/internal-api.c and .h were getting large, so I broke them out into: * jit-common.h (forward decls of types) * jit-recording.h/c (the gcc::jit::recording classes) * jit-playback.h/c (the gcc::jit::playback classes) Committed to branch dmalcolm/jit as 3071567787aef4a8ada8b38c890d01c19b4b9

[jit] Documentation tweaks

2014-10-07 Thread David Malcolm
+1,15 @@ 2014-10-07 David Malcolm + * docs/internals/index.rst (Overview of code structure): Directly + include the comment from jit-common.h as rst, rather than as a + quoted C++ comment. + * jit-common.h: Convert the summary format to valid reStructured + text for

[jit] Avoid overwhelming expect's buffer

2014-10-13 Thread David Malcolm
-loops.c (verify_code): Likewise. + * jit.dg/test-sum-of-squares.c (verify_code): Likewise. + * jit.dg/test-threads.c (note): New function, adding thread-safety + on top of "dejagnu_note", the latter being the implementation + found in dejagnu.h. + (run_threaded_t

[jit] Work around a bug in dejagnu.exp's host_execute

2014-10-13 Thread David Malcolm
deletions(-) diff --git a/gcc/testsuite/ChangeLog.jit b/gcc/testsuite/ChangeLog.jit index 7703212..97d0f8b 100644 --- a/gcc/testsuite/ChangeLog.jit +++ b/gcc/testsuite/ChangeLog.jit @@ -1,5 +1,11 @@ 2014-10-13 David Malcolm + * jit.dg/jit.exp (fixed_host_execute): New function, taken

[jit] Fix a comment in configure.ac

2014-10-13 Thread David Malcolm
David Malcolm + + * configure.ac: Update a reference to jit/internal-api.c to + jit/jit-playback.c. + * configure: Regenerate. + 2014-10-07 David Malcolm * Makefile.in (site.exp): When constructing site.exp, add a line diff --git a/gcc/configure b/gcc/configure index

[PATCH 0/5] Merger of jit branch (v2)

2014-10-13 Thread David Malcolm
I'd like to merge the JIT branch into trunk: https://gcc.gnu.org/wiki/JIT This is "v2" since it incorporates fixes for the various issues identified by Joseph in an earlier submission: https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02056.html I've split up the current diff between trunk and th

[PATCH 2/5] gcc: configure and Makefile changes needed by jit

2014-10-13 Thread David Malcolm
gcc/ChangeLog: * configure.ac (gcc_version): Expose this value for use via AC_SUBST, since the jit code needs it within the new file libgccjit.pc.in. (doc_build_sys): New variable, set to "sphinx" if sphinx is installed, falling back to "texinfo" otherwise.

[PATCH 1/5] libiberty: Expose choose_tmpdir, and fix constness of return type

2014-10-13 Thread David Malcolm
The jit needs to create a temporary directory, so I need to expose libiberty's choose_tmpdir as a public entrypoint. include/ChangeLog: * libiberty.h (choose_tmpdir): New prototype. libiberty/ChangeLog: * choose-temp.c (choose_tmpdir): Remove now-redundant local copy of pr

[PATCH 4/5] State cleanups

2014-10-13 Thread David Malcolm
This patch contains various cleanups needed by the jit, so that we can rerun the compiler code repeatedly within the same process: * Introduce per-file finalization routines to clean up file-static variables. * Make various initializations idempotent (init_ggc), or cleanup their previous stat

[PATCH 3/5] timevar.h: Add an auto_timevar class

2014-10-13 Thread David Malcolm
This is used in a couple of places in jit/jit-playback.c to ensure that we pop the timevar on every exit path from a function. I could rewrite them if need be, but it does simplify things. Written by Tom Tromey. gcc/ChangeLog: * timevar.h (class auto_timevar): New class. --- gcc/timevar

Patches 5-10 of jit merger (was: Re: [PATCH 0/5] Merger of jit branch (v2))

2014-10-14 Thread David Malcolm
On Mon, 2014-10-13 at 13:45 -0400, David Malcolm wrote: > I'd like to merge the JIT branch into trunk: > https://gcc.gnu.org/wiki/JIT > > This is "v2" since it incorporates fixes for the various issues > identified by Joseph in an earlier submission: > https:

[PATCH 05/10] JIT-related changes outside of jit subdir

2014-10-14 Thread David Malcolm
@@ -260,6 +260,7 @@ testsuite Janis Johnson register allocationVladimir Makarov gdbhooks.pyDavid Malcolm SLSR Bill Schmidt +jitDavid Malcolm Note that individuals who maintain parts

[PATCH 06/10] Heart of the JIT implementation (was: Re: [PATCH 0/5] Merger of jit branch (v2))

2014-10-14 Thread David Malcolm
On Tue, 2014-10-14 at 11:09 -0400, David Malcolm wrote: > On Mon, 2014-10-13 at 13:45 -0400, David Malcolm wrote: > > I'd like to merge the JIT branch into trunk: > > https://gcc.gnu.org/wiki/JIT > > > > This is "v2" since it incorporates fixes for the

[PATCH 07/10] Testsuite for the JIT (Re: Patches 5-10 of jit merger (was: Re: [PATCH 0/5] Merger of jit branch (v2)))

2014-10-14 Thread David Malcolm
On Tue, 2014-10-14 at 11:09 -0400, David Malcolm wrote: > On Mon, 2014-10-13 at 13:45 -0400, David Malcolm wrote: > > I'd like to merge the JIT branch into trunk: > > https://gcc.gnu.org/wiki/JIT > > > > This is "v2" since it incorporates fixes for the

[PATCH 10/10] ChangeLog files (Re: Patches 5-10 of jit merger (was: Re: [PATCH 0/5] Merger of jit branch (v2)))

2014-10-14 Thread David Malcolm
On Tue, 2014-10-14 at 11:09 -0400, David Malcolm wrote: > On Mon, 2014-10-13 at 13:45 -0400, David Malcolm wrote: > > I'd like to merge the JIT branch into trunk: > > https://gcc.gnu.org/wiki/JIT > > > > This is "v2" since it incorporates fixes for the

Re: [PATCH 3/5] timevar.h: Add an auto_timevar class

2014-10-14 Thread David Malcolm
On Tue, 2014-10-14 at 11:03 +0200, Richard Biener wrote: > On Mon, Oct 13, 2014 at 7:45 PM, David Malcolm wrote: > > This is used in a couple of places in jit/jit-playback.c to ensure > > that we pop the timevar on every exit path from a function. > > > > I could rewr

[RFC] Compile-time gimple-checking (again)

2014-10-15 Thread David Malcolm
Back in March I posted an 89-patch kit to expand and make use of the gimple statement class hierarchy to move much of the type-checking of statement accessors to be at compile-time rather than run-time: https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01148.html I'd like to get these patches into

[PATCH 08/10] Documentation for the JIT library (Re: Patches 5-10 of jit merger)

2014-10-15 Thread David Malcolm
On Tue, 2014-10-14 at 11:09 -0400, David Malcolm wrote: > On Mon, 2014-10-13 at 13:45 -0400, David Malcolm wrote: > > I'd like to merge the JIT branch into trunk: > > https://gcc.gnu.org/wiki/JIT > > > > This is "v2" since it incorporates fixes for the

[PATCH 09/10] Prebuilt texinfo documentation for the JIT library (Re: Patches 5-10 of jit merger)

2014-10-15 Thread David Malcolm
On Tue, 2014-10-14 at 11:09 -0400, David Malcolm wrote: > On Mon, 2014-10-13 at 13:45 -0400, David Malcolm wrote: > > I'd like to merge the JIT branch into trunk: > > https://gcc.gnu.org/wiki/JIT > > > > This is "v2" since it incorporates fixes for the

Re: [PATCH 2/5] gcc: configure and Makefile changes needed by jit

2014-10-15 Thread David Malcolm
On Wed, 2014-10-15 at 11:36 -0600, Jeff Law wrote: > On 10/13/14 11:45, David Malcolm wrote: > > gcc/ChangeLog: > > * configure.ac (gcc_version): Expose this value for use via > > AC_SUBST, since the jit code needs it within the new file > > libgccjit.pc

Re: [PATCH 1/5] libiberty: Expose choose_tmpdir, and fix constness of return type

2014-10-15 Thread David Malcolm
On Wed, 2014-10-15 at 11:33 -0600, Jeff Law wrote: > On 10/13/14 11:45, David Malcolm wrote: > > The jit needs to create a temporary directory, so I need to expose > > libiberty's choose_tmpdir as a public entrypoint. > > > > include/ChangeLog: > > * libi

Re: [PATCH 2/5] gcc: configure and Makefile changes needed by jit

2014-10-15 Thread David Malcolm
On Wed, 2014-10-15 at 14:51 -0600, Jeff Law wrote: > On 10/15/14 12:25, David Malcolm wrote: > > On Wed, 2014-10-15 at 11:36 -0600, Jeff Law wrote: > >> On 10/13/14 11:45, David Malcolm wrote: > >>> gcc/ChangeLog: > >>> * configure.ac (gcc_version): Expo

Re: [PATCH 4/5] State cleanups -- also note for MPX work

2014-10-16 Thread David Malcolm
On Thu, 2014-10-16 at 16:06 -0600, Jeff Law wrote: > On 10/13/14 11:45, David Malcolm wrote: > > This patch contains various cleanups needed by the jit, so that we can > > rerun the compiler code repeatedly within the same process: > > > > * Introduce per-file finali

[PATCH] Avoid the need to install when running the jit testsuite

2014-10-17 Thread David Malcolm
On Wed, 2014-10-15 at 17:29 -0400, David Malcolm wrote: > On Wed, 2014-10-15 at 14:51 -0600, Jeff Law wrote: > > On 10/15/14 12:25, David Malcolm wrote: > > > On Wed, 2014-10-15 at 11:36 -0600, Jeff Law wrote: > > >> On 10/13/14 11:45, David Malcol

[jit] Drop libgccjit.pc

2014-10-20 Thread David Malcolm
c.in diff --git a/gcc/ChangeLog.jit b/gcc/ChangeLog.jit index bf2d6d2..8dec312 100644 --- a/gcc/ChangeLog.jit +++ b/gcc/ChangeLog.jit @@ -1,3 +1,10 @@ +2014-10-20 David Malcolm + + * Makefile.in (pkgconfigdir): Drop this. + (installdirs): Likewise. + * configure.ac (gcc_versi

[jit] Error-handling within gcc::jit::dump

2014-10-20 Thread David Malcolm
2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/gcc/jit/ChangeLog.jit b/gcc/jit/ChangeLog.jit index 9a36dfd..02664f0 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,14 @@ 2014-10-20 David Malcolm + * jit-recording.c (gcc::jit::dump::dump): Handle fopen

[jit] Add Sphinx to install.texi

2014-10-20 Thread David Malcolm
ec312..bcd72a4 100644 --- a/gcc/ChangeLog.jit +++ b/gcc/ChangeLog.jit @@ -1,5 +1,10 @@ 2014-10-20 David Malcolm + * doc/install.texi (Tools/packages necessary for modifying GCC): + Add Sphinx. + +2014-10-20 David Malcolm + * Makefile.in (pkgconfigdir): Drop this.

Re: [jit] Drop libgccjit.pc

2014-10-20 Thread David Malcolm
On Mon, 2014-10-20 at 22:11 +0200, Basile Starynkevitch wrote: > On Mon, 2014-10-20 at 13:54 -0400, David Malcolm wrote: > > Committed to branch dmalcolm/jit: > > > > pkg-config appears to be controversial, so don't provide a .pc file. > > > I would put it

[jit] Update the docs

2014-10-21 Thread David Malcolm
On Wed, 2014-10-15 at 14:44 -0600, Jeff Law wrote: > On 10/15/14 10:56, David Malcolm wrote: > > On Tue, 2014-10-14 at 11:09 -0400, David Malcolm wrote: > >> On Mon, 2014-10-13 at 13:45 -0400, David Malcolm wrote: > >>> I'd like to merge the JIT branch into trunk

Re: [jit] Add Sphinx to install.texi

2014-10-21 Thread David Malcolm
On Tue, 2014-10-21 at 18:15 +0200, Gerald Pfeifer wrote: > On Monday 2014-10-20 15:19, David Malcolm wrote: > > +@item Sphinx (any working version) > > As opposed to "any non-working version"? ;-) I'd just omit > "working" from this. FWIW, all my de

[jit] Merger of trunk r216524 into jit branch

2014-10-22 Thread David Malcolm
I've merged svn trunk into the git dmalcolm/jit branch, specifically from trunk r216524 aka d14cac46135326115f0dc589b0b3d2d249d74cf7 (2014-10-21) bringing in all changes since r215958 aka e012cdc775868e9922f5fef9068a764546876d93 (2014-10-06). This required a cleanup of global state "optimizer" in

[PATCH, committed] Reset ipa-icf.c:optimizer to NULL when done

2014-10-22 Thread David Malcolm
(revision 216561) @@ -1,3 +1,7 @@ +2014-10-22 David Malcolm + + * ipa-icf.c (ipa_icf_driver): Set optimizer to NULL when done. + 2014-10-22 Andrew MacLeod * cfgbuild.h: New. Add prototypes for cfgbuild.c. Index: gcc/ipa-icf.c =

[jit] Merger of trunk r216524 into jit branch

2014-10-27 Thread David Malcolm
I've merged svn trunk into the git dmalcolm/jit branch, specifically from trunk r216746 aka fddbd0194b01f44c5b5f16379fd5405dcf6d71c0 (2014-10-27) bringing in all changes since r216524 aka d14cac46135326115f0dc589b0b3d2d249d74cf7 (2014-10-21). Some #include fixups were needed within gcc/jit to trac

[gimple-classes] New branch (was Re: [RFC] Compile-time gimple-checking (again))

2014-10-27 Thread David Malcolm
On Thu, 2014-10-16 at 12:36 -0600, Jeff Law wrote: > On 10/16/14 05:27, Richard Biener wrote: > >> > >> This required numerous essentially mechanical changes to the patches > >> e.g. for the big reworking of cgraph functions to be methods. I've been > >> working on the assumption that these variou

<    14   15   16   17   18   19   20   21   22   23   >