This patch re-orgnaizes the implementation of aarch64_classify_symbol
in preparation for tiny absolute memory model support.
Co-Authored-By: Marcus Shawcroft <marcus.shawcroft@arm.com>
From-SVN: r199407
2013-05-29 Martin Jambor <mjambor@suse.cz>
* tree-cfg.c (verify_expr): Verify that BIT_FIELD_REF, REALPART_EXPR
and IMAGPART_EXPR do not occur within other handled_components.
From-SVN: r199405
2013-05-29 Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_bb_slp_scalar_cost): Guard vinfo
access on whether the use is in the BB we currently try to
vectorize.
(vect_bb_vectorization_profitable_p): Pass the BB we currently
vectorize to vect_bb_slp_scalar_cost.
From-SVN: r199403
2013-05-29 Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_bb_slp_scalar_cost): New function
computing scalar cost offsetted by stmts that are kept live
by scalar uses.
(vect_bb_vectorization_profitable_p): Use vect_bb_slp_scalar_cost
for computation of scalar cost.
* gcc.dg/vect/bb-slp-32.c: New testcase.
From-SVN: r199402
gcc/ChangeLog
2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
* doc/extend.texi (C Extensions): Added documentation about Cilk
Plus
array notation built-in reduction functions.
* doc/passes.texi (Passes): Added documentation about changes done
for Cilk Plus.
* doc/invoke.texi (C Dialect Options): Added documentation about
the -fcilkplus flag.
* Makefile.in (C_COMMON_OBJS): Added
c-family/array-notation-common.o.
(BUILTINS_DEF): Depend on cilkplus.def.
* builtins.def: Include cilkplus.def. Define
DEF_CILKPLUS_BUILTIN.
* builtin-types.def: Define BT_FN_INT_PTR_PTR_PTR.
* cilkplus.def: New file.
gcc/c-family/ChangeLog
2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-common.c (c_define_builtins): When cilkplus is enabled, the
function array_notation_init_builtins is called.
(c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
* c-common.def (ARRAY_NOTATION_REF): New tree.
* c-common.h (build_array_notation_expr): New function declaration.
(build_array_notation_ref): Likewise.
(extract_sec_implicit_index_arg): New extern declaration.
(is_sec_implicit_index_fn): Likewise.
(ARRAY_NOTATION_CHECK): New define.
(ARRAY_NOTATION_ARRAY): Likewise.
(ARRAY_NOTATION_START): Likewise.
(ARRAY_NOTATION_LENGTH): Likewise.
(ARRAY_NOTATION_STRIDE): Likewise.
* c-pretty-print.c (pp_c_postifix_expression): Added a new case for
ARRAY_NOTATION_REF.
(pp_c_expression): Likewise.
* c.opt (flag_enable_cilkplus): New flag.
* array-notation-common.c: New file.
gcc/c/ChangeLog
2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-typeck.c (build_array_ref): Added a check to see if array's
index is greater than one. If true, then emit an error.
(build_function_call_vec): Exclude error reporting and checking
for builtin array-notation functions.
(convert_arguments): Likewise.
(c_finish_return): Added a check for array notations as a return
expression. If true, then emit an error.
(c_finish_loop): Added a check for array notations in a loop
condition. If true then emit an error.
(lvalue_p): Added a ARRAY_NOTATION_REF case.
(build_binary_op): Added a check for array notation expr inside
op1 and op0. If present, we call another function to find correct
type.
* Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
* c-parser.c (c_parser_compound_statement): Check if array
notation code is used in tree, if so, then transform them into
appropriate C code.
(c_parser_expr_no_commas): Check if array notation is used in LHS
or RHS, if so, then build array notation expression instead of
regular modify.
(c_parser_postfix_expression_after_primary): Added a check for
colon(s) after square braces, if so then handle it like an array
notation. Also, break up array notations in unary op if found.
(c_parser_direct_declarator_inner): Added a check for array
notation.
(c_parser_compound_statement): Added a check for array notation in
a stmt. If one is present, then expand array notation expr.
(c_parser_if_statement): Likewise.
(c_parser_switch_statement): Added a check for array notations in
a switch statement's condition. If true, then output an error.
(c_parser_while_statement): Similarly, but for a while.
(c_parser_do_statement): Similarly, but for a do-while.
(c_parser_for_statement): Similarly, but for a for-loop.
(c_parser_unary_expression): Check if array notation is used in a
pre-increment or pre-decrement expression. If true, then expand
them.
(c_parser_array_notation): New function.
* c-array-notation.c: New file.
* c-tree.h (is_cilkplus_reduce_builtin): Protoize.
gcc/testsuite/ChangeLog
2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-c++-common/cilk-plus/AN/array_test1.c: New test.
* c-c++-common/cilk-plus/AN/array_test2.c: Likewise.
* c-c++-common/cilk-plus/AN/array_test_ND.c: Likewise.
* c-c++-common/cilk-plus/AN/builtin_func_double.c: Likewise.
* c-c++-common/cilk-plus/AN/builtin_func_double2.c: Likewise.
* c-c++-common/cilk-plus/AN/gather-scatter-errors.c: Likewise.
* c-c++-common/cilk-plus/AN/if_test.c: Likewise.
* c-c++-common/cilk-plus/AN/sec_implicit_ex.c: Likewise.
* c-c++-common/cilk-plus/AN/decl-ptr-colon.c: Likewise.
* c-c++-common/cilk-plus/AN/dimensionless-arrays.c: Likewise.
* c-c++-common/cilk-plus/AN/fn_ptr.c: Likewise.
* c-c++-common/cilk-plus/AN/fp_triplet_values.c: Likewise.
* c-c++-common/cilk-plus/AN/gather-scatter.c: Likewise.
* c-c++-common/cilk-plus/AN/misc.c: Likewise.
* c-c++-common/cilk-plus/AN/parser_errors.c: Likewise.
* c-c++-common/cilk-plus/AN/parser_errors2.c: Likewise.
* c-c++-common/cilk-plus/AN/parser_errors3.c: Likewise.
* c-c++-common/cilk-plus/AN/parser_errors4.c: Likewise.
* c-c++-common/cilk-plus/AN/rank_mismatch.c: Likewise.
* c-c++-common/cilk-plus/AN/rank_mismatch2.c: Likewise.
* c-c++-common/cilk-plus/AN/rank_mismatch3.c: Likewise.
* c-c++-common/cilk-plus/AN/sec_implicit.c: Likewise.
* c-c++-common/cilk-plus/AN/sec_implicit2.c: Likewise.
* c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c: Likewise.
* c-c++-common/cilk-plus/AN/tst_lngth.c: Likewise.
* c-c++-common/cilk-plus/AN/vla.c: Likewise.
* c-c++-common/cilk-plus/AN/an-if.c: Likewise.
* c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Likewise.
* c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Likewise.
* c-c++-common/cilk-plus/AN/comma_exp.c: Likewise.
* c-c++-common/cilk-plus/AN/conditional.c: Likewise.
* c-c++-common/cilk-plus/AN/exec-once.c: Likewise.
* c-c++-common/cilk-plus/AN/exec-once2.c: Likewise.
* c-c++-common/cilk-plus/AN/gather_scatter.c: Likewise.
* c-c++-common/cilk-plus/AN/n-ptr-test.c: Likewise.
* c-c++-common/cilk-plus/AN/side-effects-1.c: Likewise.
* c-c++-common/cilk-plus/AN/test_builtin_return.c: Likewise.
* c-c++-common/cilk-plus/AN/test_sec_limits.c: Likewise.
* gcc.dg/cilk-plus/cilk-plus.exp: New script.
From-SVN: r199389
2013-05-28 Easwaran Raman <eraman@google.com>
PR tree-optimization/57337
* tree-ssa-reassoc.c (appears_later_in_bb): New function.
(find_insert_point): Correctly identify the insertion point
when two statements with the same UID is compared.
From-SVN: r199385
* config/sparc/sol2-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Do not set
fs->signal_frame for SIGFPE raised for IEEE-754 exceptions.
* config/i386/sol2-unwind.h (x86_fallback_frame_state): Likewise.
From-SVN: r199381
2013-05-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/56787
* tree-vect-data-refs.c (vect_analyze_data_refs): Drop clobbers
from the list of data references.
* tree-vect-loop.c (vect_determine_vectorization_factor): Skip
clobbers.
(vect_analyze_loop_operations): Likewise.
(vect_transform_loop): Remove clobbers.
* gcc.dg/vect/pr56787.c: New testcase.
From-SVN: r199380
2013-05-28 Martin Jambor <mjambor@suse.cz>
* tree-cfg.c (verify_expr): Verify that BIT_FIELD_REFs, IMAGPART_EXPRs
and REALPART_EXPRs have scalar type.
From-SVN: r199379
* doc/invoke.texi (SPARC Options): Document -mfix-ut699.
* builtins.c (expand_builtin_mathfn) <BUILT_IN_SQRT>: Try to widen the
mode if the instruction isn't available in the original mode.
* config/sparc/sparc.opt (mfix-ut699): New option.
* config/sparc/sparc.md (muldf3_extend): Disable if -mfix-ut699.
(divdf3): Turn into expander.
(divdf3_nofix): New insn.
(divdf3_fix): Likewise.
(divsf3): Disable if -mfix-ut699.
(sqrtdf2): Turn into expander.
(sqrtdf2_nofix): New insn.
(sqrtdf2_fix): Likewise.
(sqrtsf2): Disable if -mfix-ut699.
From-SVN: r199366
2013-05-27 Richard Biener <rguenther@suse.de>
PR middle-end/57412
* omp-low.c (expand_omp_atomic_pipeline): Use the correct latch
block for the new loop.
* gcc.dg/gomp/pr57412.c: New testcase.
From-SVN: r199359
2013-05-27 Bud Davis <jmdavis@link.com>
PR fortran/50405
* resolve.c (resolve_formal_arglist): Detect error when an
* argument
has the same name as the function.
2013-05-27 Bud Davis <jmdavis@link.com>
PR fortran/50405
* gfortran.dg/stfunc_8.f90: New.
From-SVN: r199358
2013-05-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/57343
* tree-ssa-loop-niter.c (number_of_iterations_ne_max): Do not
use multiple_of_p if not TYPE_OVERFLOW_UNDEFINED.
(number_of_iterations_cond): Do not build the folded tree.
* gcc.dg/torture/pr57343.c: New testcase.
From-SVN: r199357
PR rtl-optimization/56833
* postreload.c (move2add_record_mode): New function.
(move2add_record_sym_value, move2add_valid_value_p): Likewise.
(move2add_use_add2_insn): Use move2add_record_sym_value.
(move2add_use_add3_insn): Likewise.
(reload_cse_move2add): Use move2add_valid_value_p and
move2add_record_mode. Invalidate call-clobbered and REG_INC
affected regs by setting reg_mode to VOIDmode.
(move2add_note_store): Don't pretend the inside of a SUBREG is
the actual destination. Invalidate single/leading registers by
setting reg_mode to VOIDmode.
Use move2add_record_sym_value, move2add_valid_value_p and
move2add_record_mode.
From-SVN: r199353
2013-05-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/57396
* tree-affine.c (double_int_constant_multiple_p): Properly
return false for val == 0 and div != 0.
* gfortran.fortran-torture/execute/pr57396.f90: New testcase.
From-SVN: r199350
* gcc-interface/decl.c (vinfo_t): New type and associated vector.
(components_to_record): Change return type to bool.
Lay out the variants in two passes. Do not force a specific layout for
the variant part if the variants do not have a representation clause.
Take the alignment of the variant part into account when laying out
variants without rep clause in a record type with a partial rep clause.
(create_rep_part): Do not set the position of the field.
From-SVN: r199342
* gcc-interface/gigi.h (create_type_decl): Adjust prototype.
(create_label_decl): Complete prototype.
(process_attributes): Declare.
* gcc-interface/decl.c (gnat_to_gnu_entity): Adjust multiple calls to
create_type_decl throughout.
<E_Enumeration_Type>: Do the layout of the type manually and call
process_attributes on it. Reindent.
<E_Enumeration_Subtype>: Minor tweak.
<E_Floating_Point_Subtype>: Reindent.
<E_Array_Subtype>: Call process_attributes on the array type built
for a packed array type.
<E_Record_Type>: Call process_attributes on the type.
<E_Record_Subtype>: Likewise.
<E_Access_Type>: Likewise.
<E_Subprogram_Type>: Likewise.
Likewise for all types at the end of the processing.
* gcc-interface/utils.c (make_aligning_type): Adjust call to
create_type_decl.
(maybe_pad_type): Likewise.
(create_index_type): Likewise.
(create_type_decl): Remove attr_list parameter and associated code.
(create_var_decl_1): Call process_attributes on the variable.
(process_attributes): Take a pointer to the object and add in_place
and gnat_node parameters and adjust throughout.
<ATTR_MACHINE_ATTRIBUTE>: Pass ATTR_FLAG_TYPE_IN_PLACE only on demand
and set the input location.
Zap the attribute list at the end.
(create_subprog_decl): Call process_attributes on the subprogram.
(build_unc_object_type): Adjust call to create_type_decl.
(handle_vector_type_attribute): Remove dead code.
From-SVN: r199338
* gcc-interface/gigi.h (make_aligning_type): Adjust prototype.
* gcc-interface/utils.c (make_aligning_type): Take GNAT_NODE parameter
for the position of the associated TYPE_DECL.
* gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to above.
* gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
From-SVN: r199337
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not prematurely
elaborate the full view of a type with a freeze node.
* gcc-interface/trans.c (process_type): Add explicit predicate.
From-SVN: r199336
gcc/
PR target/53916
* config/mips/constraints.md (kl): New constraint.
* config/mips/mips.md (divmod<mode>4, udivmod<mode>4): Delete.
(divmod<mode>4_internal): Rename to divmod<mode>4. Use "kl" as the
constraint for operand 0. Split after CSE for MIPS16. Emit a move
from LO for MIPS16.
(udivmod<mode>4_internal): Likewise udivmod<mode>4.
gcc/testsuite/
PR target/53916
* gcc.target/mips/div-13.c: New test.
From-SVN: r199329
* sched-int.h (ds_t, dw_t): Make unsigned int.
Fix documentation that describes how all the ds_t bits are used.
Reserve the last bit for delayed-branch scheduling.
(BITS_PER_DEP_STATUS): Move to ds_t typedef.
(BITS_PER_DEP_WEAK): Fix definition and documentation.
(gen_dep_weak_1): Remove prototype.
* sched-deps.c (get_dep_weak_1): Make static.
* target.def (speculate_insn, needs_block_p, gen_spec_check,
get_insn_spec_ds, get_insn_checked_ds): Adjust hook prototypes.
* doc/tm.texi: Regenerate.
* config/ia64/ia64.c (ia64_needs_block_p): Update prototype.
From-SVN: r199325