Re: [RFC][PATCH][MIPS] Patch to enable LRA for MIPS backend

2014-04-21 Thread Richard Sandiford
Robert Suchanek robert.sucha...@imgtec.com writes: Did you see the failures even after your mips_regno_mode_ok_for_base_p change? LRA should know how to reload a W address. Yes but I realize there is more. It fails because $sp is now included in BASE_REG_CLASS and W is based on it.

[Ping for C++ frontend review] [PATCH] PR debug/57519

2014-04-21 Thread Siva Chandra
Previous post: http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00839.html It was reviewed by Cary, but he said that a C++ front end maintainer needs to approve it: http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00175.html The patch is attached. I do not have write access. ChangeLog: 2014-04-21 Siva

[PATCH] Simplify a VEC_SELECT fed by its own inverse

2014-04-21 Thread Bill Schmidt
Hi, This patch adds a small RTL simplification for the case where the first operand to a VEC_SELECT is another VEC_SELECT with an inverse selection function. E.g., (vec_select:V4SF (vec_select:V4SF (OP:V4SF) (parallel [2 3 0 1])) (parallel [2 3 0 1])) may be simplified to

Re: [PATCH 1/2] Windows libibery: Don't quote args unnecessarily

2014-04-21 Thread Joel Brobecker
Changelog libiberty/ * pex-win32.c (argv_to_cmdline): Don't quote args unnecessarily Some minor comments... diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c index eae72c5..775b53c 100644 --- a/libiberty/pex-win32.c +++ b/libiberty/pex-win32.c @@ -340,17 +340,26

[PATCH], PR target/60735, fix powerpc SPE failure

2014-04-21 Thread Michael Meissner
Rohit says this more narrow patch for PR 60735 fixes the problem and does not appear to have any other side effects. I have done bootstrap builds on powerpc Linux with no regressions. Is it ok to apply to the 4.8, 4.9 branches and trunk? [gcc] 2014-04-17 Michael Meissner

Re: [PATCH] Simplify a VEC_SELECT fed by its own inverse

2014-04-21 Thread Marc Glisse
On Mon, 21 Apr 2014, Bill Schmidt wrote: Note that it would be possible to do a more general transformation here, in which any vec_select feeding another could be replaced by a vec_select performing the composite function of the other two. I have not done this because I am unaware of this

[PATCH 01/89] Const-correctness fixes for some gimple accessors

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_assign_single_p): Accept a const_gimple rather than a gimple. (gimple_store_p): Likewise. (gimple_assign_load_p): Likewise. (gimple_assign_cast_p): Likewise. (gimple_clobber_p): Likewise. --- gcc/gimple.h | 10 +- 1

[PATCH 03/89] Introduce gimple_bind and use it for accessors.

2014-04-21 Thread David Malcolm
This updates all of the gimple_bind_* accessors in gimple.h from taking a plain gimple to taking a gimple_bind (or const_gimple_bind), with the checking happening at the point of cast. Various other types are strengthened from gimple to gimple_bind, and from plain vecgimple to vecgimple_bind.

[PATCH 11/89] tree-parloops.c: use gimple_phi in various places

2014-04-21 Thread David Malcolm
gcc/ * tree-parloops.c (struct reduction_info): Strengthen field new_phi from gimple to gimple_phi. (create_phi_for_local_result): Convert local new_phi to gimple_phi. (loop_has_vector_phi_nodes): Require a gimple_phi rather than a gimple.

[PATCH 00/89] Compile-time gimple-checking

2014-04-21 Thread David Malcolm
This is a greatly-expanded version of: http://gcc.gnu.org/ml/gcc-patches/2013-12/msg01262.html As of r205034 (de6bd75e3c9bc1efe8a6387d48eedaa4dafe622d) and r205428 (a90353203da18288cdac1b0b78fe7b22c69fe63f) the various gimple statements form a C++ inheritance hierarchy, but we're not yet making

[PATCH 05/89] Introduce gimple_assign and use it in various places

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_assign): New typedef. (const_gimple_assign): New typedef. * gimple.h (struct gimple_statement_assign): New subclass of gimple_statement_with_memory_ops, adding the invariant that stmt-code == GIMPLE_ASSIGN.

[PATCH 45/89] Introduce gimple_omp_sections

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_omp_sections): New typedef. (const_gimple_omp_sections): New typedef. * gimple-pretty-print.c (dump_gimple_omp_sections): Require a gimple_omp_sections rather than a plain gimple. (pp_gimple_stmt_1): Add checked cast to

[PATCH 49/89] Make add_phi_arg require a gimple_phi

2014-04-21 Thread David Malcolm
gcc/ * tree-phinodes.h (add_phi_arg): Require a gimple_phi rather than a plain gimple. * tree-phinodes.c (add_phi_arg): Likewise. * gimple-ssa-strength-reduction.c (create_phi_basis): Strengthen local phi from plain gimple to gimple_phi. *

[PATCH 58/89] Make gimple_label_set_label require a gimple_label

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_label_set_label): Require a gimple_label. --- gcc/gimple.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/gimple.h b/gcc/gimple.h index cf21083..38f4ea7 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -3490,9 +3490,8 @@ gimple_label_label

[PATCH 50/89] Make gimple_phi_arg_set_location require a gimple_phi

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_phi_arg_set_location): Require a gimple_phi rather than a plain gimple. --- gcc/gimple.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/gimple.h b/gcc/gimple.h index e4d0455..6007516 100644 --- a/gcc/gimple.h +++

[PATCH 60/89] Concretize gimple_catch_types

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_catch_types): Require a const_gimple_catch rather than a const_gimple. --- gcc/gimple.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gcc/gimple.h b/gcc/gimple.h index 7dfd512..3c54119 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h

[PATCH 63/89] Concretize gimple_eh_filter_set_types and gimple_eh_filter_set_failure

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_eh_filter_set_types): Require a gimple_eh_filter. (gimple_eh_filter_set_failure): Likewise. * gimple.c (gimple_copy): Add checked casts to gimple_eh_filter within GIMPLE_EH_FILTER case. --- gcc/gimple.c | 13 + gcc/gimple.h | 14

[PATCH 65/89] Concretize three gimple_try_set_ accessors

2014-04-21 Thread David Malcolm
gcc/ * gimple.c (gimple_copy): Add checked casts to gimple_try. * gimple.h (gimple_statement_base::dyn_cast_gimple_try): New. (gimple_try_set_kind): Require a gimple_try. (gimple_try_set_eval): Likewise. (gimple_try_set_cleanup): Likewise. *

[PATCH 73/89] Concretize gimple_cond_{true|false}_label

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_cond_true_label): Require a const_gimple_cond rather than just a const_gimple. (gimple_cond_false_label): Likewise. * omp-low.c (diagnose_sb_2): Add checked cast to gimple_cond within case GIMPLE_COND. * tree-eh.c

[PATCH 76/89] Concretize gimple_cond_{lhs|rhs}_ptr

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_cond_lhs_ptr): Require a const_gimple_cond rather than just a const_gimple_cond. (gimple_cond_rhs_ptr): Likewise. * gimplify-me.c (gimple_regimplify_operands): Add a checked cast to gimple_cond within case GIMPLE_COND. *

[PATCH 87/89] Use gimple_call in some places within tree-ssa-dom.c

2014-04-21 Thread David Malcolm
gcc/ * tree-ssa-dom.c (struct hashable_expr): Strengthen field call.fn_from from gimple to gimple_call. (initialize_hash_element): Replace check against GIMPLE_CALL with dyn_cast_gimple_call and update gimple_call_ uses to use new gimple_call local, along

[PATCH 83/89] Concretize gimple_call_set_tail and gimple_call_tail_p

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_call_set_tail): Require a gimple_call. (gimple_call_tail_p): Likewise. * cfgexpand.c (expand_gimple_tailcall): Likewise. (expand_gimple_basic_block): Convert calls to is_gimple_call to a dyn_cast, introducing a new call_stmt local.

[PATCH 89/89] Convert various gimple to gimple_phi within ssa-iterators.h

2014-04-21 Thread David Malcolm
gcc/ * ssa-iterators.h (FOR_EACH_PHI_OR_STMT_USE): Add checked cast to gimple_phi. (FOR_EACH_PHI_OR_STMT_DEF): Likewise. * ssa-iterators.h (single_phi_def): Require a gimple_phi. (op_iter_init_phiuse): Likewise. (op_iter_init_phidef): Likewise.

[PATCH 86/89] Concretize gimple_call_copy_flags and ipa_modify_call_arguments

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_call_copy_flags): Require gimple_calls. * ipa-prop.c (ipa_modify_call_arguments): Require a gimple_call. * ipa-prop.h (ipa_modify_call_arguments): Likewise. * tree-inline.c (copy_bb): Replace is_gimple_call with new local and call

[PATCH 77/89] Concretize various expressions from gimple to gimple_cond

2014-04-21 Thread David Malcolm
gcc/ * ipa-split.c (check_forbidden_calls): Replace check against GIMPLE_COND with a dyn_cast_gimple_cond, introducing a gimple_cond local. * predict.c (predict_extra_loop_exits): Likewise. * tree-vrp.c (fold_predicate_in): Likewise.

[PATCH 80/89] Tweak to gimplify_modify_expr

2014-04-21 Thread David Malcolm
gcc/ * gimplify.c (gimplify_modify_expr): Introduce local call_stmt. --- gcc/gimplify.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 031834b..d43304e 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@

[PATCH 56/89] Various gimple to gimple_call conversions in IPA

2014-04-21 Thread David Malcolm
gcc/ * ipa-prop.c (detect_type_change): Require a gimple_call rather than a plain gimple. (detect_type_change_ssa): Likewise. (compute_complex_assign_jump_func): Likewise. (compute_complex_ancestor_jump_func): Likewise.

[PATCH 59/89] Make gimple_goto_set_dest require a gimple_goto

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_goto_set_dest): Require a gimple_goto. * tree-cfg.c (factor_computed_gotos): Add checked cast to gimple_goto. (cleanup_dead_labels): Likewise. --- gcc/gimple.h | 3 +-- gcc/tree-cfg.c | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-)

[PATCH 64/89] Concretize gimple_try_set_catch_is_cleanup

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_try_set_catch_is_cleanup): Require a gimple_try. * gimplify.c (gimplify_expr): Convert local try_ from a gimple to a gimple_try. --- gcc/gimple.h | 2 +- gcc/gimplify.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 29/89] Introduce gimple_resx

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_resx): New typedef. (const_gimple_resx): New typedef. * gimple.h (gimple_statement_base::as_a_gimple_resx): New. (gimple_build_resx): Return a gimple_resx rather than a plain gimple. (gimple_resx_region): Require a

[PATCH 19/89] Const-correctness of gimple_call_builtin_p

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_builtin_call_types_compatible_p): Accept a const_gimple, rather than a gimple. (gimple_call_builtin_p): Likewise, for the three variants. * gimple.c (gimple_builtin_call_types_compatible_p): Likewise. (gimple_call_builtin_p):

[PATCH 39/89] Introduce gimple_omp_parallel

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_omp_parallel): New typedef. (const_gimple_omp_parallel): New typedef. * cgraphbuild.c (build_cgraph_edges): Convert check of code against GIMPLE_OMP_PARALLEL to a dyn_cast_gimple_omp_parallel and new local. *

[PATCH 34/89] Introduce gimple_omp_atomic_load

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_omp_atomic_load): New typedef. (const_gimple_omp_atomic_load): New typedef. * gimple-pretty-print.c (dump_gimple_omp_atomic_load): Require a gimple_omp_atomic_load rather than a plain gimple. (pp_gimple_stmt_1): Add a checked cast

[PATCH 41/89] Introduce gimple_omp_task

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_omp_task): New typedef. (const_gimple_omp_task): New typedef. * gimple.h (gimple_statement_base::as_a_gimple_omp_task): New. (gimple_build_omp_task): Return a gimple_omp_task rather than a plain gimple. *

[PATCH 21/89] Introduce gimple_return

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_return): New typedef. (const_gimple_return): New typedef. * gimple.h (gimple_statement_return): New subclass of gimple_statement_with_memory_ops, adding the invariant that stmt-code == GIMPLE_RETURN.

[PATCH 06/89] Introduce gimple_label and use it in a few places

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_label): New typedef. (const_gimple_label): New typedef. * gimple.h (struct gimple_statement_label): New subclass of gimple_statement_with_ops, adding the invariant that stmt-code == GIMPLE_LABEL.

[PATCH 04/89] Introduce gimple_cond and use it in various places

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_cond): New typedef. (const_gimple_cond): Likewise. * gimple.h (struct gimple_statement_cond): New subclass of gimple_statement_with_ops, adding the invariant that stmt-code == GIMPLE_COND.

[PATCH 16/89] tree-ssa-loop-ivopts.c: use gimple_phi in a few places

2014-04-21 Thread David Malcolm
gcc/ * tree-ssa-loop-ivopts.c (determine_biv_step): Require a gimple_phi. (find_bivs): Convert local phi into a gimple_phi. (mark_bivs): Likewise. --- gcc/tree-ssa-loop-ivopts.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH 02/89] Introduce gimple_switch and use it in various places

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_statement_switch): New subclass of gimple_statement_with_ops, adding the invariant that stmt-code == GIMPLE_SWITCH. (gimple_statement_base::as_a_gimple_switch): New. (gimple_statement_base::dyn_cast_gimple_switch): New.

[PATCH 17/89] Update various expressions within tree-scalar-evolution.c to be gimple_phi

2014-04-21 Thread David Malcolm
gcc/ * tree-scalar-evolution.c (follow_ssa_edge): Require a gimple_phi, rather than a gimple. (follow_ssa_edge_binary): Likewise. (follow_ssa_edge_expr): Likewise. (follow_ssa_edge_in_rhs): Likewise. (backedge_phi_arg_p): Likewise.

[PATCH 78/89] Concretize gimple_call_set_nothrow

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_call_set_nothrow): Require a gimple_call. * trans-mem.c (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_transform_calls_redirect): Add checked cast to gimple call; this is only called for gsi on a GIMPLE_CALL statement. --- gcc/gimple.h

[PATCH 67/89] Make gimple_phi_arg_location require a gimple_phi.

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_phi_arg_location): Require a gimple_phi. * tree-into-ssa.c (rewrite_update_phi_arguments): Replace a check for code GIMPLE_PHI with a dyn_cast and a new local. * tree-ssa-ter.c (ter_is_replaceable_p): Likewise. * tree-ssa-live.c

[PATCH 84/89] Concretize gimple_call_arg_flags

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_call_arg_flags): Require a const_gimple_call rather than a const_gimple. * gimple.c (gimple_call_fnspec): Likewise. (gimple_call_arg_flags): Likewise. --- gcc/gimple.c | 4 ++-- gcc/gimple.h | 2 +- 2 files changed, 3 insertions(+), 3

[PATCH 82/89] Concretize gimple_call_set_fntype

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_call_set_fntype): Require a gimple_call. * omp-low.c (lower_omp_1): Add a new local gimple_call call_stmt, from a checked cast to gimple_call within the case GIMPLE_CALL, for the regions where stmt is not subsequently overwritten. ---

[PATCH 48/89] Make gimple_phi_arg_def_ptr and gimple_phi_arg_has_location require a gimple_phi

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_phi_arg_def_ptr): Require a gimple_phi rather than a plain gimple. (gimple_phi_arg_has_location): Likewise. * gimple-streamer-in.c (input_phi): Return a gimple_phi rather than a plain gimple. * gimple-streamer-out.c

[PATCH 53/89] More gimple_phi

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_phi_set_result): Require a gimple_phi rather than a plain gimple. (gimple_phi_set_arg): Likewise. * tree-outof-ssa.c (remove_gimple_phi_args): Likewise; add a checked cast to gimple_phi. * tree-sra.c

[PATCH 69/89] Make gimple_cond_set_{true|false}_label require gimple_cond.

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_cond_set_true_label): Require a gimple_cond. (gimple_cond_set_false_label): Likewise. * tree-cfg.c (make_cond_expr_edges): Convert entry from gimple to a gimple_cond. (cleanup_dead_labels): Introduce a checked cast to a gimple_cond

[PATCH 66/89] Make gimple_phi_arg_location_from_edge require a gimple_phi

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_phi_arg_location_from_edge): Require a gimple_phi. * tree-parloops.c (create_parallel_loop): Split up local variable stmt, introducing other locals for the various statements created by this function. Reuse stmt within the

[PATCH 85/89] Concretize gimple_assign_nontemporal_move_p

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_assign_nontemporal_move_p): Require a const_gimple_assign rather than a const_gimple. * cfgexpand.c (expand_gimple_stmt_1): Add local assign_stmt and checked cast within case GIMPLE_ASSIGN. * gimple-streamer-out.c

[PATCH 43/89] Introduce gimple_omp_target

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_omp_target): New typedef. (const_gimple_omp_target): New typedef. * gimple.h (gimple_statement_base::as_a_gimple_omp_target): New. (gimple_build_omp_target): Return a gimple_omp_target rather than a plain gimple.

[PATCH 79/89] Concretize gimple_call_nothrow_p

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_call_nothrow_p): Require a gimple_call. * tree-eh.c (stmt_could_throw_p): Add checked cast to gimple_call. * tree-vect-slp.c (vect_build_slp_tree_1): Replace call to is_gimple_call with dyn_cast_gimple_call, introducing a local. ---

[PATCH 47/89] omp-low.c: Use more concrete types of gimple statement for various locals

2014-04-21 Thread David Malcolm
gcc/ * omp-low.c (finalize_task_copyfn): Strengthen local bind from plain gimple to gimple_bind. (lower_rec_input_clauses): Strengthen local g from plain gimple to gimple_assign. (lower_lastprivate_clauses): Likewise for stmt to gimple_cond and g to

[PATCH 42/89] Introduce gimple_omp_single

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_omp_single): New typedef. (const_gimple_omp_single): New typedef. * gimple.h (gimple_statement_base::as_a_gimple_omp_single): New. (gimple_build_omp_single): Return a gimple_omp_single rather than a plain gimple.

[PATCH 36/89] Introduce gimple_omp_continue

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_omp_continue): New typedef. (const_gimple_omp_continue): New typedef. * gimple.h (gimple_statement_base::as_a_gimple_omp_continue): New. (gimple_build_omp_continue): Return a gimple_omp_continue rather than a plain gimple.

[PATCH 71/89] Concretize gimple_cond_make_{false|true}

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_cond_make_false): Require a gimple_cond. (gimple_cond_make_true): Likewise. * tree-cfg.c (fold_cond_expr_cond): Add a checked cast to gimple_cond within region guarded by check for GIMPLE_COND. * tree-ssa-ccp.c (ccp_fold_stmt):

[PATCH 24/89] Introduce gimple_transaction

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_transaction): New typedef. (const_gimple_transaction): New typedef. * gimple.h (gimple_statement_base::as_a_gimple_transaction): New. (gimple_statement_base::dyn_cast_gimple_transaction): New. (gimple_build_transaction): Return a

[PATCH 72/89] Concretize gimple_switch_index and gimple_switch_index_ptr

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_switch_index): Require a const_gimple_switch rather than a plain const_gimple. (gimple_switch_index_ptr): Likewise. * gimplify-me.c (gimple_regimplify_operands): Add checked cast to gimple_switch within case GIMPLE_SWITCH. *

[PATCH 74/89] Concretize gimple_cond_set_code

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_cond_set_code): Require a gimple_cond. * tree-complex.c (expand_complex_comparison): Add a checked cast to gimple_cond within case GIMPLE_COND. * tree-ssa-loop-ivcanon.c (create_canonical_iv): Convert local cond to a gimple_cond,

[PATCH 62/89] Concretize gimple_label_label

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_label_label): Require a const_gimple_label rather than just a const_gimple. * cfgexpand.c (label_rtx_for_bb): Convert local from gimple to gimple_label, replacing a check against GIMPLE_LABEL with a dyn_cast_gimple_label. *

[PATCH 25/89] Introduce gimple_catch

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_catch): New typedef. (const_gimple_catch): New typedef. * gimple-low.c (lower_try_catch): Add checked cast to gimple_catch. (gimple_try_catch_may_fallthru): Likewise. * gimple-pretty-print.c (dump_gimple_catch): Require a

[PATCH 28/89] Introduce gimple_eh_else

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_eh_else): New typedef. (const_gimple_eh_else): New typedef. * gimple.h (gimple_statement_base::as_a_gimple_eh_else): New. (gimple_build_eh_else): Return a gimple_eh_else rather than a plain gimple.

[PATCH 37/89] Introduce gimple_omp_critical

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_omp_critical): New typedef. (const_gimple_omp_critical): New typedef. * gimple-pretty-print.c (dump_gimple_omp_critical): Require a gimple_omp_critical rather than a plain gimple. (pp_gimple_stmt_1): Add a checked cast to

[PATCH 57/89] Concretize parameter to gimple_call_copy_skip_args

2014-04-21 Thread David Malcolm
gcc/ * gimple.c (gimple_call_copy_skip_args): Require a gimple_call. * gimple.h (gimple_call_copy_skip_args): Likewise. --- gcc/gimple.c | 2 +- gcc/gimple.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/gimple.c b/gcc/gimple.c index 6de651d..75a9f5f

[PATCH 32/89] Introduce gimple_try

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_try): New typedef. (const_gimple_try): New typedef. * gimple.h (gimple_statement_base::as_a_gimple_try): New. * gimple-low.c (gimple_try_catch_may_fallthru): Require a gimple_try rather than a plain gimple.

[PATCH 08/89] Introduce gimple_phi and use it in various places

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_phi): New typedef. (const_gimple_phi): New typedef. * gimple.h (gimple_statement_base::as_a_gimple_phi): New. (gimple_statement_base::dyn_cast_gimple_phi): New. * gdbhooks.py (build_pretty_printer): Add gimple_phi and its

[PATCH 51/89] Update GRAPHITE to use more concrete gimple statement classes

2014-04-21 Thread David Malcolm
gcc/ * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Strengthen local psi to be a gimple_phi_iterator and phi to a gimple_phi. * graphite-sese-to-poly.c (phi_arg_in_outermost_loop): Require a gimple_phi rathen than a plain gimple.

[PATCH 27/89] Introduce gimple_eh_must_not_throw

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_eh_must_not_throw): New typedef. (const_gimple_eh_must_not_throw): New typedef. * gimple-pretty-print.c (dump_gimple_eh_must_not_throw): Require a gimple_eh_must_not_throw rather than a plain gimple. (pp_gimple_stmt_1): Add a

[PATCH 10/89] Update ssa_prop_visit_phi_fn callbacks to take a gimple_phi

2014-04-21 Thread David Malcolm
gcc/ * tree-ssa-propagate.h (typedef ssa_prop_visit_phi_fn): Strengthen type of parameter from gimple to gimple_phi. * tree-complex.c (complex_visit_phi): Update signature of callback implementation accordingly. * tree-ssa-ccp.c (ccp_visit_phi_node):

[PATCH 18/89] Concretize get_loop_exit_condition et al to working on gimple_cond

2014-04-21 Thread David Malcolm
gcc/ * tree-scalar-evolution.h (get_loop_exit_condition): Return a gimple_cond. * tree-scalar-evolution.c (get_loop_exit_condition): Likewise, also concretizing local res from gimple to gimple_cond. * tree-vect-loop-manip.c (slpeel_make_loop_iterate_ntimes):

[PATCH 15/89] tree-ssa-loop-manip.c: use gimple_phi in three places

2014-04-21 Thread David Malcolm
gcc/ * tree-ssa-loop-manip.c (add_exit_phi): Convert local phi to be a gimple_phi. (split_loop_exit_edge): Likewise for phi and new_phi. --- gcc/tree-ssa-loop-manip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/tree-ssa-loop-manip.c

[PATCH 26/89] Introduce gimple_eh_filter

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_eh_filter): New typedef. (const_gimple_eh_filter): New typedef. * gimple.h (gimple_statement_base::as_a_gimple_eh_filter): New. (gimple_build_eh_filter): Return a gimple_eh_filter rather than a plain gimple. *

[PATCH 55/89] Use gimple_call for callgraph edges

2014-04-21 Thread David Malcolm
gcc/ * cgraph.h (cgraph_edge::call_stmt): Strengthen field from plain gimple to a gimple_call. (cgraph_create_edge): Require a gimple_call rather than a plain gimple. (cgraph_create_indirect_edge): Likewise. (cgraph_set_call_stmt): Likewise.

[PATCH 75/89] Concretize gimple_cond_set_{lhs|rhs}

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_cond_set_lhs): Require a gimple_cond. (gimple_cond_set_rhs): Likewise. * tree-parloops.c (transform_to_exit_first_loop): Convert locals cond_stmt and cond_nit to gimple_cond, adding checked casts, since the existing code assumes that

[PATCH 61/89] Concretize gimple_call_use_set and gimple_call_clobber_set

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_call_use_set): Require a gimple_call. (gimple_call_clobber_set): Likewise. --- gcc/gimple.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gcc/gimple.h b/gcc/gimple.h index 3c54119..e4aeec6 100644 --- a/gcc/gimple.h +++

[PATCH 33/89] Use more concrete types for various gimple statements

2014-04-21 Thread David Malcolm
gcc/ * cgraphunit.c (thunk_adjust): Strengthen local stmt from gimple to gimple_assign. * gimple-ssa-isolate-paths.c (insert_trap_and_remove_trailing_statements): Strengthen local new_stmt from gimple to gimple_call. *

[PATCH 81/89] Concretize gimple_call_set_fn

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_call_set_fn): Require a gimple_call. * trans-mem.c (dump_tm_memopt_transform): Likewise. (tm_memopt_transform_blocks): Add checked casts to gimple_call in suites guarded by is_tm_simple_{load|store}, which enforce that the statement

[PATCH 38/89] Introduce gimple_omp_for

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_omp_for): New. (const_gimple_omp_for): New. * gimple.h (gimple_statement_base::as_a_gimple_omp_for): New. (gimple_statement_base::dyn_cast_gimple_omp_for): New. (gimple_build_omp_for): Return a gimple_omp_for rather than a

[PATCH 35/89] Introduce gimple_omp_atomic_store

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_omp_atomic_store): New typedef. (const_gimple_omp_atomic_store): New typedef. * gimple-pretty-print.c (dump_gimple_omp_atomic_store): Require a gimple_omp_atomic_store rather than a plain gimple. (pp_gimple_stmt_1): Add checked

[PATCH 52/89] Make gimple_phi_arg_edge require a gimple_phi

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_phi_arg_edge): Require a gimple_phi rather than a plain gimple. * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Require a gimple_phi_iterator; strengthen local phi from gimple to a gimple_phi.

[PATCH 12/89] tree-predcom.c: use gimple_phi in various places

2014-04-21 Thread David Malcolm
gcc/ * tree-predcom.c (find_looparound_phi): Return a gimple_phi rather than just a gimple. (insert_looparound_copy): Require a gimple_phi rather than just a gimple. (add_looparound_copies): Convert local phi to be a gimple_phi.

[PATCH 07/89] Introduce gimple_debug and use it in a few places

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_debug): New typedef. (const_gimple_debug): New typedef. * gimple.h (struct gimple_statement_debug): New subclass of gimple_statement_with_ops, adding the invariant that stmt-code == GIMPLE_DEBUG.

[PATCH 22/89] Introduce gimple_goto

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_goto): New typedef. (const_gimple_goto): New typedef. * gimple.h (gimple_statement_goto): New subclass of gimple_statement_with_ops, adding the invariant that stmt-code == GIMPLE_GOTO.

[PATCH 14/89] tree-ssa-loop-niter.c: use gimple_phi in a few places

2014-04-21 Thread David Malcolm
gcc/ * tree-ssa-loop-niter.c (chain_of_csts_start): Return a gimple_phi rather than a gimple. (get_base_for): Likewise; convert local phi to be a gimple_phi. (loop_niter_by_eval): Convert local phi to be a gimple_phi. --- gcc/tree-ssa-loop-niter.c | 11 ++-

[PATCH 44/89] Introduce gimple_omp_teams

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_omp_teams): New typedef. (const_gimple_omp_teams): New typedef. * gimple.h (gimple_statement_base::as_a_gimple_omp_teams): New. (gimple_build_omp_teams): Return a gimple_omp_teams rather than a plain gimple.

[PATCH 54/89] Make gimple_call_return_slot_opt_p require a gimple_call.

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_call_return_slot_opt_p): Require a gimple_call rather than a plain gimple. * gimple-walk.c (walk_stmt_load_store_addr_ops): Convert usage of is_gimple_call to dyn_cast_gimple_call, introducing a new local call_stmt. *

[PATCH 40/89] tree-cfg.c: Make verify_gimple_call require a gimple_call

2014-04-21 Thread David Malcolm
gcc/ * tree-cfg.c (verify_gimple_call): Require a gimple_call rather than a plain gimple. (verify_gimple_stmt): Add checked cast to gimple_call within GIMPLE_CALL case of switch statement. --- gcc/tree-cfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 68/89] Concretize three gimple_return_ accessors

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_return_retval_ptr): Require a const_gimple_return rather than a const_gimple. (gimple_return_retval): Likewise. (gimple_return_set_retval): Require a gimple_return. * cfgexpand.c (expand_gimple_stmt_1): Add a checked cast to

[PATCH 23/89] Introduce gimple_asm

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_asm): New typedef. (const_gimple_asm): New typedef. * gimple.h (gimple_statement_base::as_a_gimple_asm): New. gimple_statement_base::dyn_cast_gimple_asm): New. (gimple_build_asm_vec): Return a gimple_asm rather than just a

[PATCH 13/89] tree-ssa-phiprop.c: use gimple_phi

2014-04-21 Thread David Malcolm
gcc/ * tree-ssa-phiprop.c (phiprop_insert_phi): Strengthen types of parameter phi and local new_phi from gimple to gimple_phi. --- gcc/tree-ssa-phiprop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c index

[PATCH 30/89] Introduce gimple_eh_dispatch

2014-04-21 Thread David Malcolm
gcc/ * coretypes.h (gimple_eh_dispatch): New typedef. (const_gimple_eh_dispatch): New typedef. * gimple-pretty-print.c (dump_gimple_eh_dispatch): Require a gimple_eh_dispatch rather than a plain gimple. (pp_gimple_stmt_1): Add a checked cast to

Re: [PATCH] Simplify a VEC_SELECT fed by its own inverse

2014-04-21 Thread Bill Schmidt
Hi Marc, Good points! I will rework the patch with your suggestions in mind. Thanks! Bill On Mon, 2014-04-21 at 18:51 +0200, Marc Glisse wrote: On Mon, 21 Apr 2014, Bill Schmidt wrote: Note that it would be possible to do a more general transformation here, in which any vec_select

Re: [PATCH, x86] merge movsd/movhpd pair in peephole

2014-04-21 Thread Uros Bizjak
On Mon, Apr 21, 2014 at 8:00 PM, Wei Mi w...@google.com wrote: llvm will merge movsd/movhpd to movupd while gcc will not. The merge is beneficial on x86 machines starting from Nehalem. The patch is to add the merging in peephole. bootstrap and regression pass. Is it ok for stage1? Let's

Re: [PATCH 01/89] Const-correctness fixes for some gimple accessors

2014-04-21 Thread Jeff Law
On 04/21/14 10:56, David Malcolm wrote: gcc/ * gimple.h (gimple_assign_single_p): Accept a const_gimple rather than a gimple. (gimple_store_p): Likewise. (gimple_assign_load_p): Likewise. (gimple_assign_cast_p): Likewise. (gimple_clobber_p):

[PATCH, i386]: Fix PR/60909, ICE with -mrdrnd and __builtin_ia32_rdrand32_step

2014-04-21 Thread Uros Bizjak
Hello! Attached patch fixes PR 60909, where memory operand was used as a target RTX of a CMOVE insn, leading to unrecognized insn. Similar problem was found with rdseed insn, where memory operand was used as an invalid target of a ZERO_EXTEND insn. Attached patch fixes both occurences.

Re: [PATCH], PR target/60735, fix powerpc SPE failure

2014-04-21 Thread David Edelsohn
On Mon, Apr 21, 2014 at 12:02 PM, Michael Meissner meiss...@linux.vnet.ibm.com wrote: Rohit says this more narrow patch for PR 60735 fixes the problem and does not appear to have any other side effects. I have done bootstrap builds on powerpc Linux with no regressions. Is it ok to apply to

Re: [PATCH, x86] merge movsd/movhpd pair in peephole

2014-04-21 Thread Xinliang David Li
Bin, when will the patch for the generic pass be available for review? David On Wed, Apr 9, 2014 at 7:27 PM, Bin.Cheng amker.ch...@gmail.com wrote: On Thu, Apr 10, 2014 at 8:18 AM, Wei Mi w...@google.com wrote: Hi, For the testcase 1.c #include emmintrin.h double a[1000]; __m128d

RE: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage

2014-04-21 Thread Zamyatin, Igor
From: Jason Merrill [mailto:ja...@redhat.com] Sent: Monday, April 14, 2014 9:49 PM To: Zamyatin, Igor; Jakub Jelinek Cc: GCC Patches (gcc-patches@gcc.gnu.org); Iyer, Balaji V Subject: Re: [PATCH, PR60189, Cilk+] Fix for ICE with incorrect Cilk_sync usage Oh, I see where the problem

Re: [PATCH 33/89] Use more concrete types for various gimple statements

2014-04-21 Thread Bill Schmidt
Hi David, Just a quick review of the gimple-ssa-strength-reduction.c changes. I have one stylistic comment: On Mon, 2014-04-21 at 12:57 -0400, David Malcolm wrote: diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index 9320b51..35e15e0 100644 ---

Re: [PATCH] Simplify a VEC_SELECT fed by its own inverse

2014-04-21 Thread Bill Schmidt
Hi, Here's a revised patch in response to Marc's comments. Again, bootstrapped and tested on powerpc64[,le]-unknown-linux-gnu. Is this ok for trunk? Thanks, Bill [gcc] 2014-04-21 Bill Schmidt wschm...@linux.vnet.ibm.com * simplify-rtx.c (simplify_binary_operation_1): Optimize

Re: [PATCH] Simplify a VEC_SELECT fed by its own inverse

2014-04-21 Thread Richard Henderson
On 04/21/2014 01:19 PM, Bill Schmidt wrote: + if (GET_CODE (trueop0) == VEC_SELECT +GET_MODE (XEXP (trueop0, 0)) == mode) + { + rtx op0_subop1 = XEXP (trueop0, 1); + gcc_assert (GET_CODE (op0_subop1) == PARALLEL); + gcc_assert (XVECLEN (trueop1, 0) ==

  1   2   >