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

2014-04-21 Thread Marc Glisse
On Mon, 21 Apr 2014, Richard Henderson wrote: 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) == PARALLE

[PATCH, ARM] Trunk build fail

2014-04-21 Thread Zhenqiang Chen
Hi, ARM trunk build fail from @209484, since it requires the argument of GET_MODE_SIZE to be "enum machine_mode". gcc/gcc/config/arm/arm.c:21433:13: error: invalid conversion from 'int' to 'machine_mode' [-fpermissive] ... Build OK with the patch. OK for trunk? Thanks! -Zhenqiang 2014-04-22 Z

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

2014-04-21 Thread Bill Schmidt
On Mon, 2014-04-21 at 13:48 -0700, Richard Henderson wrote: > 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_su

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

2014-04-21 Thread Trevor Saunders
> --- a/gcc/tree-loop-distribution.c > +++ b/gcc/tree-loop-distribution.c > @@ -687,8 +687,9 @@ generate_loops_for_partition (struct loop *loop, > partition_t partition, > } > else if (gimple_code (stmt) == GIMPLE_SWITCH) > { > + gimple_switch

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

2014-04-21 Thread David Malcolm
On Mon, 2014-04-21 at 12:43 -0600, Jeff Law wrote: > 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

[Patch, Fortran] PR60881 - fix ICE with allocatable scalar coarrays

2014-04-21 Thread Tobias Burnus
Dear all, for a change, a patch for the trunk and not for the fortran-caf branch. The following is a rather obvious patch which fixes the ICE. Built and regtested on x86-64-gnu-linux. OK for the trunk? As it is of rather obvious nature, I will commit it to the trunk in the next days unless th

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) =

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 * simplify-rtx.c (simplify_binary_operation_1): Optimize case of nested VEC_SELE

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

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 wh

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 wrote: > On Thu, Apr 10, 2014 at 8:18 AM, Wei Mi wrote: >> Hi, >> >> For the testcase 1.c >> >> #include >> >> double a[1000]; >> >> __m128d foo1() { >> __m128d res; >> re

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 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 the 4.8, 4.9 branches an

[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. 2014-04-2

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

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 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 wait for

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

2014-04-21 Thread Wei Mi
Ping. Thanks, Wei. On Wed, Apr 9, 2014 at 5:18 PM, Wei Mi wrote: > Hi, > > For the testcase 1.c > > #include > > double a[1000]; > > __m128d foo1() { > __m128d res; > res = _mm_load_sd(&a[1]); > res = _mm_loadh_pd(res, &a[2]); > return res; > } > > llvm will merge movsd/movhpd to movupd

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

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

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

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

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

[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". * trans

[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 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. (gimple_statement_base::as_a_gimple_g

[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. (gimple_statement_base::as

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

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

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

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

[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. * gimple-ssa-strength-reduct

[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 +++ b/gcc/

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

[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. * gimple-prett

[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 b/g

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

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

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

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

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

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

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

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

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

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

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

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

[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

[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. --- gcc/gim

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

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

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

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

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

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

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

[PATCH 70/89] Concretize locals within expand_omp_for_init_counts

2014-04-21 Thread David Malcolm
gcc/ * omp-low.c (expand_omp_for_init_counts): Eliminate local "stmt" in favor of new locals "cond_stmt" and "assign_stmt" with more concrete types. --- gcc/omp-low.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/gcc/omp-low

[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 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. (gimple_statement_base::as_a_gimp

[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 a/gcc/tree-ssa-loop-i

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

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

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

[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. * gimple-pretty

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

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

[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. * gimple-pretty-pri

[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(-) di

[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 a/gcc/g

[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 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. (gimple_statement_base::as

[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. (compute_known_type_jump_func):

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

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

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

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

[PATCH 31/89] Use subclasses of gimple in various places

2014-04-21 Thread David Malcolm
gcc/ * asan.c (insert_if_then_before_iter): Require a gimple cond rathern than a plain gimple. (instrument_mem_region_access): Strengthen local from gimple to gimple_cond. * cfgloopmanip.c (create_empty_if_region_on_edge): Likewise. * omp-low.c (sim

[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". * omp

[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 46/89] tree-parloops.c: Use gimple_phi in various places

2014-04-21 Thread David Malcolm
gcc/ * tree-parloops.c (reduction_info::keep_res): Strengthen field from plain gimple to gimple_phi. (transform_to_exit_first_loop): Strengthen locals "phi", "nphi" to gimple_phi. Eliminate early decl of gimple_stmt_iterator gsi in favor of more tightly scop

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

[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. * tree-eh

[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 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 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 +++ b/gcc/gimple.h

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

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

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

  1   2   >