Re: [GSoC] the separate option for all dimensions

2014-08-06 Thread Roman Gareev
I've tested the modified version of Graphite using the gcc test suite and haven't found out new failed tests. However, pr35356-2.c is still not suitable for testing. The ISL AST generated from its source code doesn't contain MIN or MAX. if (k = -1) { for (int c1 = 0; c1 n; c1 += 1)

[GSoC] Elimination of CLooG library installation dependency

2014-08-06 Thread Roman Gareev
Hi Tobias, I've attached the patch, which should eliminate CLooG library installation dependency from GCC. The CLooG AST generator is still the main code generator, but the isl ast generator will be chosen in case of nonavailability of CLooG library. However, I've found out a problem. Almost all

Re: [GSoC] the separate option for all dimensions

2014-08-06 Thread Tobias Grosser
On 06/08/2014 17:21, Roman Gareev wrote: I've tested the modified version of Graphite using the gcc test suite and haven't found out new failed tests. However, pr35356-2.c is still not suitable for testing. The ISL AST generated from its source code doesn't contain MIN or MAX. if (k = -1)

patch to fix PR 61923

2014-08-06 Thread Vladimir Makarov
The following patch fixes PR61923. The details of the problem can be found on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61923 The patch was tested and bootstrapped on x86/x86-64. The patch has been committed as rev. 213674 to gcc-4.9 branch and as rev. 213675 to the trunk. 2014-08-06

Re: [GSoC] Elimination of CLooG library installation dependency

2014-08-06 Thread Tobias Grosser
On 06/08/2014 17:21, Roman Gareev wrote: Hi Tobias, I've attached the patch, which should eliminate CLooG library installation dependency from GCC. The CLooG AST generator is still the main code generator, but the isl ast generator will be chosen in case of nonavailability of CLooG library.

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-06 Thread Jeff Law
On 08/06/14 02:27, Richard Biener wrote: which we may restrict better with checking whether the pointer uses a partial integer mode. Not sure how PSImode - SImode extends on RTL? Well, at least on the mn102, I defined both a zero and sign extension for PSI - SI. So whichever one the generic

Re: [PATCH v2] gcc/testsuite: Disable pr44194-1.c for BE Power64/Linux

2014-08-06 Thread Maciej W. Rozycki
On Wed, 6 Aug 2014, Marek Polacek wrote: Applied, thanks. I see ERROR: gcc.dg/pr44194-1.c: unknown dg option: \} for } now (x86_64-unknown-linux-gnu). I pushed a stale version of the patch, sorry. Fixed up now. 2014-08-06 Maciej W. Rozycki ma...@codesourcery.com *

[PATCH Fortran/Diagnostics] Move Fortran to common diagnostics machinery

2014-08-06 Thread Manuel López-Ibáñez
This is the first step for moving Fortran to use the common diagnostics machinery. This patch makes Fortran use the common machinery for those warnings that don't have a location or a controlling option. Before: manuel@gcc10:~/test1$ echo end | ./213518/build/gcc/f951 -fdiagnostics-color -Werror

Re: [C++ Patch/RFC] PR 43906

2014-08-06 Thread Paolo Carlini
Hi, On 08/06/2014 05:19 PM, Jason Merrill wrote: On 08/05/2014 10:48 AM, Paolo Carlini wrote: +(VOID_TYPE_P (TREE_TYPE (type1)) + || comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (type0)), + TYPE_MAIN_VARIANT (TREE_TYPE (type1)), +

[PATCH 002/236] JUMP_LABEL is not always a LABEL

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (JUMP_LABEL): Add a note that this isn't always a LABEL. --- gcc/rtl.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/rtl.h b/gcc/rtl.h index 51cfae5..b9b069a 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1194,7 +1194,11 @@ enum label_kind /* In

[PATCH 001/236] Convert lab_rtx_for_bb from pointer_map_t to pointer_maprtx

2014-08-06 Thread David Malcolm
This gives a slight improvement in typesafety in cfgexpand.c gcc/ * cfgexpand.c (lab_rtx_for_bb): Convert from pointer_map_t to pointer_maprtx. (label_rtx_for_bb): Update for conversion of lab_rtx_for_bb to a pointer_maprtx, eliminating casts from void* to rtx.

[PATCH 012/236] Convert DF_REF_INSN to a function for now

2014-08-06 Thread David Malcolm
DF_REF_INSN looks up the insn field of the referenced df_insn_info. This will eventually be an rtx_insn *, but for now is just an rtx. As further scaffolding: for now, convert DF_REF_INSN to a function, adding a checked downcast to rtx_insn *. This can eventually be converted back to macro when

[PATCH 003/236] config/mn10300: Fix missing PATTERN in PARALLEL handling

2014-08-06 Thread David Malcolm
gcc/ * config/mn10300/mn10300.c (mn10300_adjust_sched_cost): Fix the handling of PARALLEL to work on PATTERN (insn) and PATTERN (dep), rather than just on insn, dep themselves. The latter are insns, and thus can't be PARALLEL. --- gcc/config/mn10300/mn10300.c | 8

[PATCH 000/236] Introduce rtx subclasses

2014-08-06 Thread David Malcolm
This is the patch series I spoke about at Cauldron in the talk A proposal for typesafe RTL; slides here: http://dmalcolm.fedorapeople.org/presentations/cauldron-2014/rtl They can also be seen at: https://dmalcolm.fedorapeople.org/gcc/patch-backups/rtx-classes/v20/ The aim of the patch series is

[PATCH 008/236] Split BB_HEAD et al into BB_HEAD/SET_BB_HEAD variants

2014-08-06 Thread David Malcolm
This is an enabling patch, splitting existing macros in two, covering the rvalue and lvalue uses separately. Followup patches will replace these with functions, and gradually convert the types from rtx to rtx_insn *, but we need to do this separately for the lvalue vs rvalue use-cases, hence this

[PATCH 013/236] DEP_PRO/DEP_CON scaffolding

2014-08-06 Thread David Malcolm
For now, convert DEP_PRO and DEP_CON into functions. We will eventually change them back to macros once the relevant fields are of type rtx_insn *. gcc/ * sched-int.h (DEP_PRO): struct _dep's pro and con fields will eventually be rtx_insn *, but to help with transition, for now,

[PATCH 021/236] entry_of_function returns an insn

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (entry_of_function): Strengthen return type from rtx to rtx_insn *. * cfgrtl.c (entry_of_function): Likewise. --- gcc/cfgrtl.c | 2 +- gcc/rtl.h| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index

[PATCH 018/236] Strengthen return types of various {next|prev}_*insn from rtx to rtx_insn *

2014-08-06 Thread David Malcolm
These should all eventually require an rtx_insn * as an argument, but we'll save that for a later patch. gcc/ * rtl.h (previous_insn): Strengthen return type from rtx to rtx_insn *. (next_insn): Likewise. (prev_nonnote_insn): Likewise.

[PATCH 019/236] Strengthen return type of gen_label_rtx

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (gen_label_rtx): Strengthen return type from rtx to rtx_code_label *. * emit-rtl.c (gen_label_rtx): Likewise. --- gcc/emit-rtl.c | 7 --- gcc/rtl.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c

[PATCH 004/236] PHASE 1: Initial scaffolding commits

2014-08-06 Thread David Malcolm
This commit is a placeholder for me when rebasing, to help organize the patch kit. / * rtx-classes-status.txt: New file --- rtx-classes-status.txt | 9 + 1 file changed, 9 insertions(+) create mode 100644 rtx-classes-status.txt diff --git a/rtx-classes-status.txt

[PATCH 020/236] Return rtx_insn from get_insns/get_last_insn

2014-08-06 Thread David Malcolm
Ultimately, the underlying fields should become rtx_insn *, but for now we can do this with a checked cast. Note to self: config/m32c/m32c.c: m32c_leaf_function_p directly manipulates x_first_insn and x_last_insn, using sequence_stack. gcc/ * emit-rtl.h (get_insns): Strengthen return

[PATCH 027/236] asan_emit_stack_protection returns an insn

2014-08-06 Thread David Malcolm
gcc/ * asan.h (asan_emit_stack_protection): Strengthen return type from rtx to rtx_insn *. * asan.c (asan_emit_stack_protection): Likewise. Add local insns to hold the return value. --- gcc/asan.c | 7 --- gcc/asan.h | 4 ++-- 2 files changed, 6 insertions(+),

[PATCH 006/236] Introduce rtx_insn subclass of rtx_def

2014-08-06 Thread David Malcolm
gcc/ * coretypes.h (class rtx_insn): Add forward declaration. * rtl.h: Include is-a.h (struct rtx_def): Add dummy desc and tag GTY options as a workaround to ensure gengtype knows inheritance is occurring, whilst continuing to use the pre-existing

[PATCH 009/236] Replace BB_HEAD et al macros with functions

2014-08-06 Thread David Malcolm
This is further scaffolding; convert the BB_* and SET_BB_* macros into functions. Convert the BB_* rvalue-style functions into returning rtx_insn * rather than plain rtx. For now, this is done by adding a checked cast, but this will eventually become a field lookup. The lvalue form for now

[PATCH 007/236] New function: for_each_rtx_in_insn

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (for_each_rtx_in_insn): New function. * rtlanal.c (for_each_rtx_in_insn): Likewise. --- gcc/rtl.h | 1 + gcc/rtlanal.c | 16 2 files changed, 17 insertions(+) diff --git a/gcc/rtl.h b/gcc/rtl.h index 0858230..3e37ed0 100644 --- a/gcc/rtl.h +++

[PATCH 030/236] Convert various rtx to rtx_note *

2014-08-06 Thread David Malcolm
gcc/ * basic-block.h (create_basic_block_structure): Strengthen third param bb_note from rtx to rtx_note *. * rtl.h (emit_note_before): Strengthen return type from rtx to rtx_note *. (emit_note_after): Likewise. (emit_note): Likewise.

[PATCH 040/236] Use rtx_insn internally within generated functions

2014-08-06 Thread David Malcolm
With this patch, insn and curr_insn as used from C++ fragments in .md files are strengthened from rtx to rtx_insn *, allowing numerous target-specific functions to have their params be similiar strengthened. The top-level interfaces (recog, split, peephole2) continue to take a plain rtx for insn,

[PATCH 032/236] emit_* functions return rtx_insn

2014-08-06 Thread David Malcolm
More scaffolding: strengthen the return types from the various emit_ functions from rtx to rtx_insn * (or to the rtx_barrier * subclass in a few cases). These will ultimately have their params strengthened also, but we postpone that until much later in the patch series. So for now there are also

[PATCH 034/236] next_cc0_user and prev_cc0_setter scaffolding

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (next_cc0_user): Strengthen return type from rtx to rtx_insn *. (prev_cc0_setter): Likewise. * emit-rtl.c (next_cc0_user): Strengthen return type from rtx to rtx_insn *, adding checked casts for now as necessary. (prev_cc0_setter):

[PATCH 042/236] try_split returns an rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (try_split): Strengthen return type from rtx to rtx_insn *. * emit-rtl.c (try_split): Likewise, also for locals before and after. For now, don't strengthen param trial, which requires adding checked casts when returning it. --- gcc/emit-rtl.c | 12

[PATCH 048/236] alias.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * alias.c (init_alias_analysis): Strengthen local insn from rtx to rtx_insn *. --- gcc/alias.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/alias.c b/gcc/alias.c index 0246dd7..903840c 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -2840,7 +2840,8

[PATCH 047/236] PHASE 2: Per-file commits in main source directory

2014-08-06 Thread David Malcolm
This commit is a placeholder for me when rebasing, to help organize the patch kit. / * rtx-classes-status.txt: Update --- rtx-classes-status.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtx-classes-status.txt b/rtx-classes-status.txt index 52567e7..e350eaf

[PATCH 054/236] calls.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * calls.c (emit_call_1): Strengthen local call_insn from rtx to rtx_insn *. (internal_arg_pointer_exp_state): Likewise for field scan_start. (internal_arg_pointer_based_exp_scan): Likewise for locals insn, scan_start. (load_register_parameters):

[PATCH 058/236] cfgloop.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * cfgloop.c (loop_exits_from_bb_p): Strengthen local insn from rtx to rtx_insn *. --- gcc/cfgloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index 73f79ef..6d1fe8d 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@

[PATCH 056/236] cfgbuild.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * cfgbuild.c (make_edges): Strengthen local insn from rtx to rtx_insn *. (purge_dead_tablejump_edges): Likewise. (find_bb_boundaries): Likewise for locals insn, end, flow_transfer_insn. --- gcc/cfgbuild.c | 14 -- 1 file changed, 8

[PATCH 066/236] dce.c: Use rtx subclasses

2014-08-06 Thread David Malcolm
gcc/ * dce.c (worklist): Strengthen from vecrtx to vecrtx_insn *. (deletable_insn_p): Strengthen param insn from rtx to rtx_insn *. Add checked cast to rtx_call_insn when invoking find_call_stack_args, since this is guarded by CALL_P (insn).

[PATCH 063/236] compare-elim.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * compare-elim.c (struct comparison_use): Strengthen field insn from rtx to rtx_insn *. (struct comparison): Likewise, also for field prev_clobber. (conforming_compare): Likewise for param insn. (arithmetic_flags_clobber_p): Likewise.

[PATCH 068/236] df-*.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * df-core.c (df_bb_regno_first_def_find): Strengthen local insn from rtx to rtx_insn *. (df_bb_regno_last_def_find): Likewise. * df-problems.c (df_rd_bb_local_compute): Likewise. (df_lr_bb_local_compute): Likewise. (df_live_bb_local_compute):

[PATCH 049/236] asan.c: strengthen some rtx locals

2014-08-06 Thread David Malcolm
This is an example of strengthening rtx. For example, we now have strong enough types provided by the existing scaffolding to turn insn and insns in this: for (insn = insns; insn; insn = NEXT_INSN (insn)) from plain rtx into rtx_insn *. gcc/ * asan.c (asan_clear_shadow): Strengthen

[PATCH 077/236] fwprop.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * fwprop.c (single_def_use_dom_walker::before_dom_children): Strengthen local insn from rtx to rtx_insn *. (use_killed_between): Likewise for param target_insn. (all_uses_available_at): Likewise for param target_insn and local next.

[PATCH 080/236] haifa-sched.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * haifa-sched.c (bb_header): Strengthen from rtx * to rtx_insn **. (add_delay_dependencies): Strengthen local pro from rtx to rtx_insn *. (recompute_todo_spec): Likewise. (dep_cost_1): Likewise for locals insn, used. (schedule_insn): Likewise

[PATCH 084/236] internal-fn.c: Use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * internal-fn.c (ubsan_expand_si_overflow_addsub_check): Strengthen locals done_label, do_error from rtx to rtx_code_label *. (ubsan_expand_si_overflow_addsub_check): Strengthen local last from rtx to rtx_insn *. Strengthen local sub_check from rtx to

[PATCH 087/236] loop-doloop.c: Use rtx_insn in a few places

2014-08-06 Thread David Malcolm
gcc/ * loop-doloop.c (doloop_valid_p): Strengthen local insn from rtx to rtx_insn *. (add_test): Likewise for locals seq, jump. (doloop_modify): Likewise for locals sequence, jump_insn. --- gcc/loop-doloop.c | 9 + 1 file changed, 5 insertions(+), 4

[PATCH 099/236] predict.*: Use rtx_insn (also touches function.c and config/cris/cris.c)

2014-08-06 Thread David Malcolm
gcc/ * predict.h (predict_insn_def): Strengthen param insn from rtx to rtx_insn *. * function.c (stack_protect_epilogue): Add checked cast to rtx_insn for now when invoking predict_insn_def. * predict.c (predict_insn): Strengthen param insn from rtx to

[PATCH 092/236] lra: use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * lra-int.h (struct lra_insn_recog_data): Strengthen field insn from rtx to rtx_insn *. (lra_push_insn): Likewise for 1st param. (lra_push_insn_and_update_insn_regno_info): Likewise. (lra_pop_insn): Likewise for return type.

[PATCH 090/236] loop-unroll.c: Use rtx_insn (also touches basic-block.h)

2014-08-06 Thread David Malcolm
gcc/ * basic-block.h (basic_block split_edge_and_insert): Strengthen param insns from rtx to rtx_insn *. * loop-unroll.c (struct iv_to_split): Strengthen field insn from rtx to rtx_insn *. (struct iv_to_split): Likewise. (loop_exit_at_end_p):

[PATCH 109/236] resource.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * resource.c (next_insn_no_annul): Strengthen local next from rtx to rtx_insn *. (mark_referenced_resources): Likewise for local insn. --- gcc/resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/resource.c b/gcc/resource.c index

[PATCH 107/236] regstat.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * regstat.c (regstat_bb_compute_ri): Strengthen local insn from rtx to rtx_insn *. (regstat_bb_compute_calls_crossed): Likewise. --- gcc/regstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/regstat.c b/gcc/regstat.c index

[PATCH 102/236] ree.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * ree.c (struct ext_cand): Strengthen field insn from rtx to rtx_insn *. (combine_set_extension): Likewise for param curr_insn. (transform_ifelse): Likewise for param def_insn. (get_defs): Likewise for param def_insn. Strengthen param dest from

[PATCH 104/236] regcprop.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * regcprop.c (struct queued_debug_insn_change): Strengthen field insn from rtx to rtx_insn *. (replace_oldest_value_reg): Likewise for param insn. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Likewise.

[PATCH 116/236] shrink-wrap.*: Use rtx_insn (touches config/i386/i386.c)

2014-08-06 Thread David Malcolm
gcc/ * shrink-wrap.h (requires_stack_frame_p): Strengthen param 1 insn from rtx to rtx_insn *. (dup_block_and_redirect): Likewise for param 3 before. * shrink-wrap.c (requires_stack_frame_p): Strengthen param insn from rtx to rtx_insn *.

[PATCH 120/236] valtrack.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * valtrack.c (dead_debug_reset_uses): Strengthen local insn from rtx to rtx_insn *. (dead_debug_promote_uses): Likewise. (dead_debug_insert_temp): Likewise. --- gcc/valtrack.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 123/236] web.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * web.c (union_match_dups): Strengthen param insn from rtx to rtx_insn *. (pass_web::execute): Likewise for local insn. --- gcc/web.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/web.c b/gcc/web.c index 2c038f2..3fdb777 100644 ---

[PATCH 130/236] config/bfin: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/bfin/bfin-protos.h (asm_conditional_branch): Strengthen param 1 from rtx to rtx_insn *. * config/bfin/bfin.c (expand_prologue_reg_save): Likewise for the various locals named insn. (expand_epilogue_reg_restore): Likewise.

[PATCH 125/236] config/aarch64/aarch64.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/aarch64/aarch64.c (aarch64_load_symref_appropriately): Strengthen local insns from rtx to rtx_insn *. (aarch64_set_frame_expr): Likewise for local insn. (aarch64_save_or_restore_fprs): Likewise. (aarch64_save_or_restore_callee_save_registers):

[PATCH 132/236] config/epiphany: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/epiphany/epiphany-protos.h (epiphany_final_prescan_insn): Strengthen first param insn from rtx to rtx_insn *. * config/epiphany/epiphany.c (epiphany_final_prescan_insn): Likewise. (frame_insn): Likewise for return type. Introduce local insn

[PATCH 137/236] config/iq2000: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/iq2000/iq2000-protos.h (final_prescan_insn): Strengthen first param from rtx to rtx_insn *. (iq2000_adjust_insn_length): Likewise. (iq2000_output_conditional_branch): Likewise. * config/iq2000/iq2000.c (final_prescan_insn): Likewise for param

[PATCH 145/236] config/rs6000: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/rs6000/rs6000-protos.h (output_cbranch): Strengthen param 4 from rtx to rtx_insn *. (rs6000_final_prescan_insn): Likewise for first param. * config/rs6000/rs6000.c (rs6000_emit_set_const): Likewise for local insn.

[PATCH 140/236] config/microblaze/microblaze.c: Use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * config/microblaze/microblaze.c (microblaze_call_tls_get_addr): Strengthen return type and local insns from rtx to rtx_insn *. (microblaze_legitimize_tls_address): Likewise for local insns. (microblaze_block_move_loop): Strengthen local label from rtx

[PATCH 142/236] config/nds32: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/nds32/nds32-protos.h (nds32_adjust_insn_length): Strengthen first param from rtx to rtx_insn *. * config/nds32/nds32.c (nds32_adjust_insn_length): Likewise for param insn. --- gcc/config/nds32/nds32-protos.h | 2 +- gcc/config/nds32/nds32.c| 2

[PATCH 144/236] config/picochip: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/picochip/picochip-protos.h (picochip_final_prescan_insn): Strengthen param insn from rtx to rtx_insn *. * config/picochip/picochip.c (picochip_current_prescan_insn): Likewise for this variable. (picochip_final_prescan_insn): Likewise for param

[PATCH 151/236] config/spu/spu.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/spu/spu.c (frame_emit_store): Strengthen return type from rtx to rtx_insn *. (frame_emit_load): Likewise. (frame_emit_add_imm): Likewise, also for local insn. (spu_expand_prologue): Likewise for local insn. (struct spu_bb_info):

[PATCH 159/236] Convert edge_def.insns.r to rtx_insn *

2014-08-06 Thread David Malcolm
gcc/ * basic-block.h (struct edge_def). Strengthen r within union edge_def_insns from rtx to rtx_insn *. * cfgexpand.c (pass_expand::execute): Remove now-redundant cast from rtx to rtx_insn *. Strengthen local insns from rtx to rtx_insn *. *

[PATCH 156/236] PHASE 4: Removal of scaffolding

2014-08-06 Thread David Malcolm
/ * rtx-classes-status.txt: Update. --- rtx-classes-status.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtx-classes-status.txt b/rtx-classes-status.txt index b22cb1e..90d6efd 100644 --- a/rtx-classes-status.txt +++ b/rtx-classes-status.txt @@ -3,8 +3,8 @@

[PATCH 111/236] sched-deps.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * sched-deps.c (maybe_add_or_update_dep_1): Strengthen locals elem, insn from rtx to rtx_insn *. (change_spec_dep_to_hard): Likewise. (get_back_and_forw_lists): Likewise for local con. (sd_add_dep): Likewise for locals elem, insn.

[PATCH 162/236] delete_insn_and_edges takes an rtx_insn *

2014-08-06 Thread David Malcolm
All in-tree users of delete_insn_and_edges now pass in an rtx_insn *. gcc/ * rtl.h (delete_insn_and_edges): Strengthen param insn from rtx to rtx_insn *. * cfgrtl.c (delete_insn_and_edges): Likewise. Fix for delete_insn_and_edges gcc/ * hw-doloop.c

[PATCH 170/236] Eliminate BB_NOTE_LIST scaffolding

2014-08-06 Thread David Malcolm
gcc/ * sel-sched-ir.h (struct sel_region_bb_info_def): Strengthen field note_list from rtx to rtx_insn *. (BB_NOTE_LIST): Replace this function and... (SET_BB_NOTE_LIST): ...this function with... (BB_NOTE_LIST): ...the former macro implementation. *

[PATCH 177/236] Tighten up params of create_basic_block_structure

2014-08-06 Thread David Malcolm
gcc/ * basic-block.h (create_basic_block_structure): Strengthen params 1 head and 2 end from rtx to rtx_insn *. * cfgrtl.c (create_basic_block_structure): Likewise. (rtl_create_basic_block): Update casts from void * to rtx to rtx_insn *, so that we can pass

[PATCH 175/236] Remove DEP_PRO/CON scaffolding

2014-08-06 Thread David Malcolm
gcc/ * sched-int.h (struct _dep): Strengthen fields pro and con from rtx to rtx_insn *. (DEP_PRO): Delete this function and... (SET_DEP_PRO): ...this function in favor of... (DEP_PRO): ...reinstate this macro. (DEP_CON): Delete this function and...

[PATCH 182/236] get_last_insn_anywhere returns an rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (get_last_insn_anywhere): Strengthen return type from rtx to rtx_insn*. * emit-rtl.c (get_last_insn_anywhere): Likewise. --- gcc/emit-rtl.c | 2 +- gcc/rtl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/emit-rtl.c

[PATCH 185/236] Use rtx_insn in more places in fwprop.c

2014-08-06 Thread David Malcolm
gcc/ * fwprop.c (local_ref_killed_between_p): Strengthen params from, to and local insn from rtx to rtx_insn *. --- gcc/fwprop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/fwprop.c b/gcc/fwprop.c index 9a1f085..c3258d9 100644 --- a/gcc/fwprop.c +++

[PATCH 171/236] du_chain.insn is an rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * regrename.h (struct du_chain): Strengthen field insn from rtx to rtx_insn *. --- gcc/regrename.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/regrename.h b/gcc/regrename.h index 9a611f0..03b7164 100644 --- a/gcc/regrename.h +++ b/gcc/regrename.h

[PATCH 191/236] Remove DF_REF_INSN scaffolding

2014-08-06 Thread David Malcolm
gcc/ * df.h (df_dump_insn_problem_function): Strengthen first param of this callback from const_rtx to const rtx_insn *. (struct df_insn_info): Strengthen field insn from rtx to rtx_insn *. (DF_REF_INSN): Eliminate this function, reinstating the older

[PATCH 203/236] except.c: Use rtx_sequence

2014-08-06 Thread David Malcolm
gcc/ * except.c (can_throw_external): Strengthen local seq from rtx to rtx_sequence *. Use methods of rtx_sequence. (insn_nothrow_p): Likewise. --- gcc/except.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/except.c b/gcc/except.c

[PATCH 201/236] Introduce rtx_sequence subclass of rtx_def

2014-08-06 Thread David Malcolm
gcc/ * coretypes.h (class rtx_sequence): Add forward declaration. * rtl.h (class rtx_sequence): New subclass of rtx_def, adding invariant: GET_CODE (X) == SEQUENCE. (is_a_helper rtx_sequence *::test): New. (is_a_helper const rtx_sequence *::test): New.

[PATCH 200/236] Use rtx_insn_list in various places

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (free_INSN_LIST_list): Strengthen param from rtx * to rtx_insn_list **. (alloc_INSN_LIST): Strengthen return type from rtx to rtx_insn_list *. (copy_INSN_LIST): Likewise for return type and param. (concat_INSN_LIST): Likewise for both

[PATCH 206/236] jump.c: Use rtx_sequence

2014-08-06 Thread David Malcolm
gcc/ * jump.c (mark_jump_label_1): Within the SEQUENCE case, introduce local seq with a checked cast, and use methods of rtx_sequence to clarify the code. --- gcc/jump.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/jump.c b/gcc/jump.c

[PATCH 194/236] Use rtx_insn for various target.def hooks

2014-08-06 Thread David Malcolm
This patch updates params of 22 of the target hooks to pass an rtx_insn * rather than an rtx, as appropriate. Known to compile on: alpha arc arm bfin c6x epiphany ia64 m32c m32r m68k mep microblaze mips pa pdp11 picochip rs6000 s390 sh sparc spu tilegx tilepro x86_64 gcc/ * target.def

[PATCH 217/236] Add JUMP_LABEL_AS_INSN

2014-08-06 Thread David Malcolm
JUMP_LABEL(X) is not always an insn, but often is. Add a variant that adds a checked cast. gcc/ * rtl.h (JUMP_LABEL_AS_INSN): New. --- gcc/rtl.h | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/rtl.h b/gcc/rtl.h index 1f1caaf..7a8e592 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h

[PATCH 212/236] Use rtx_expr_list for expr_status.x_forced_labels

2014-08-06 Thread David Malcolm
gcc/ * function.h (struct expr_status): Strengthen field x_forced_labels from rtx to rtx_expr_list *. * cfgbuild.c (make_edges): Split local x into two locals, strengthening one from rtx to rtx_expr_list *, and using methods of said class. *

[PATCH 219/236] Make SET_NEXT_INSN/SET_PREV_INSN require an rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (SET_PREV_INSN): Strengthen param from rtx to rtx_insn *. (SET_NEXT_INSN): Likewise. (gen_rtvec_v): Add an overload for param types (int, rtx_insn **). * emit-rtl.h (copy_delay_slot_insn): Strengthen return type and param from rtx to rtx_insn

[PATCH 223/236] inside_basic_block_p requires a const rtx_insn *

2014-08-06 Thread David Malcolm
gcc/ * basic-block.h (inside_basic_block_p): Strengthen param from const_rtx to const rtx_insn *. * cfgbuild.c (inside_basic_block_p): Likewise. --- gcc/basic-block.h | 2 +- gcc/cfgbuild.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 227/236] find_first_parameter_load params and return type

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (find_first_parameter_load): Strengthen return type and both params from rtx to rtx_insn *. * rtlanal.c (find_first_parameter_load): Strengthen return type, both params and locals before, first_set from rtx to rtx_insn *. Remove now-redundant

[PATCH 230/236] Make INSN_HAS_LOCATION require an rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (INSN_HAS_LOCATION): Strengthen param from const_rtx to const rtx_insn *. --- gcc/rtl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rtl.h b/gcc/rtl.h index f6167d8..49ad08b 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1402,7 +1402,7 @@ inline

[PATCH 222/236] Use rtx_insn in more places in dwarf2cfi.c

2014-08-06 Thread David Malcolm
gcc/ * dwarf2cfi.c (dw_trace_info): Strengthen field head from rtx to rtx_insn *. (get_trace_info): Likewise for param insn. (save_point_p): Likewise. (maybe_record_trace_start): Likewise for both params. (maybe_record_trace_start_abnormal):

[PATCH 186/236] Various condition-handling calls

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (canonicalize_condition): Strengthen param 1 from rtx to rtx_insn * and param 4 from rtx * to rtx_insn **. (get_condition): Strengthen param 1 from rtx to rtx_insn * and param 2 from rtx * to rtx_insn **. * df.h (can_move_insns_across):

[PATCH 189/236] Various scheduling strengthenings

2014-08-06 Thread David Malcolm
gcc/ * insn-addr.h (insn_addresses_new): Strengthen param insn from rtx to rtx_insn *. * sched-int.h (sched_init_insn_luid): Likewise for param 1. (struct reg_use_data): Likewise for field insn. (insn_cost): Likewise for param.

[PATCH 205/236] function.c: Use rtx_sequence

2014-08-06 Thread David Malcolm
gcc/ * function.c (contains): Introduce local seq for PATTERN (insn), with a checked cast, in the region for where we know it's a SEQUENCE. Use methods of rtx_sequence. --- gcc/function.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 202/236] dwarf2cfi.c: Use rtx_sequence

2014-08-06 Thread David Malcolm
gcc/ * dwarf2cfi.c (create_trace_edges): Convert GET_CODE check into a dyn_cast, strengthening local seq from rtx to rtx_sequence *. Use methods of rtx_sequence. (scan_trace): Likewise for local pat. --- gcc/dwarf2cfi.c | 19 +-- 1 file changed, 9

[PATCH 209/236] sched-vis.c: Use rtx_sequence

2014-08-06 Thread David Malcolm
gcc/ * sched-vis.c (print_pattern): Within SEQUENCE case, introduce a local seq via a checked cast, and use methods of rtx_sequence to simplify the code. --- gcc/sched-vis.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gcc/sched-vis.c

[PATCH 225/236] Work towards NEXT_INSN/PREV_INSN requiring insns as their params

2014-08-06 Thread David Malcolm
gcc/ * cfgexpand.c (pass_expand::execute): Strengthen local after from rtx to rtx_insn *. * cfgrtl.c (force_nonfallthru_and_redirect): Add local note of type rtx_insn * in scope where it's needed. * combine.c (combine_split_insns): Strengthen return type and

[PATCH 213/236] rtl_data.x_nonlocal_goto_handler_labels becomes an rtx_expr_list

2014-08-06 Thread David Malcolm
gcc/ * function.h (struct rtl_data): Strengthen field x_nonlocal_goto_handler_labels from rtx to rtx_expr_list *. * rtl.h (remove_node_from_expr_list): Strengthen second param from rtx * to rtx_expr_list **. * cfgbuild.c (make_edges): In loop over

[PATCH 215/236] Use rtx_expr_list in various places

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (free_EXPR_LIST_list): Strengthen param from rtx * to rtx_expr_list **. (alloc_EXPR_LIST): Strengthen return type from rtx to rtx_expr_list *. (remove_free_EXPR_LIST_node): Likewise for param. * reload.h (struct reg_equivs_t): Strengthen

[PATCH 224/236] insn_current_reference_address takes an rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * output.h (insn_current_reference_address): Strengthen param from rtx to rtx_insn *. * final.c (insn_current_reference_address): Likewise. --- gcc/final.c | 2 +- gcc/output.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/final.c

[PATCH 220/236] Strengthen return_label and naked_return_label to rtx_code_label *

2014-08-06 Thread David Malcolm
gcc/ * function.h (struct rtl_data): Strengthen fields x_return_label and x_naked_return_label from rtx to rtx_code_label *. --- gcc/function.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/function.h b/gcc/function.h index 1f8da7a..c2e0366 100644 ---

[PATCH 233/236] dfa_clear_single_insn_cache takes an rtx_insn

2014-08-06 Thread David Malcolm
The callsite using dfa_clear_single_insn_cache in haifa-sched.c is now passing in an rtx_insn *. gcc/ * genattr.c (main): When writing out insn-attr.h, strengthen param of dfa_clear_single_insn_cache from rtx to rtx_insn *. * genautomata.c

[PATCH 229/236] NEXT_INSN and PREV_INSN take a const rtx_insn

2014-08-06 Thread David Malcolm
This patch updates NEXT_INSN and PREV_INSN to work on rtx_insn *, rather than plain rtx - plus miscellaneous fixes needed to get there. gcc/ * rtl.h (RTX_PREV): Added checked casts to uses of PREV_INSN and NEXT_INSN. (PREV_INSN): Strengthen param from const_rtx to const

[PATCH 226/236] Delete find_last_value

2014-08-06 Thread David Malcolm
Nothing in the tree appears to use this. gcc/ * rtl.h (find_last_value): Delete. * rtlanal.c (find_last_value): Delete. --- gcc/rtl.h | 1 - gcc/rtlanal.c | 46 -- 2 files changed, 47 deletions(-) diff --git a/gcc/rtl.h

[PATCH 166/236] shorten_branches takes an rtx_insn

2014-08-06 Thread David Malcolm
All in-tree users of shorten_branches now pass in an rtx_insn *, so we can eliminate the cast from rtx. gcc/ * output.h (shorten_branches): Strengthen param from rtx to rtx_insn *. * final.c (shorten_branches): Likewise, renaming param back from uncast_first to

[PATCH 192/236] Tweak to dse.c

2014-08-06 Thread David Malcolm
gcc/ * dse.c (dse_step6): Strengthen local rinsn from rtx to rtx_insn *. --- gcc/dse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/dse.c b/gcc/dse.c index 0dc6b22..a122eff 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -3624,7 +3624,7 @@ dse_step6 (void)

<    1   2   3   4   5   >