1. 13 May, 2015 33 commits
  2. 12 May, 2015 7 commits
    • mips.c (mips_print_operand): Remove 'y' operand code. · 70a6fed8
      	* config/mips/mips.c (mips_print_operand): Remove 'y' operand code.
      	* config/mips/mips.md (<GPR:d>lsa): Rewrite with shift operator.
      	* config/mips/predicates.md (const_immlsa_operand): Remove log call.
      
      From-SVN: r223101
      Steve Ellcey committed
    • compiler: If unary & does not escape, the var does not escape. · 38109dbe
      If we have a unary & that takes the address of a variable, do
      not force the variable to escape if the unary & does not
      escape.
      
      From-SVN: r223100
      Ian Lance Taylor committed
    • re PR fortran/66111 (ICE with matmul and vector subscripts) · 7e269fe8
      2015-05-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/66111
      	* frontend-passes.c (has_dimen_vector_ref):  New function.
      	(inline_matmul_assign):  Use it to return early in case
      	of unhandled vector subscripts.
      
      2015-05-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/66111
      	* gfortran.dg/inline_matmul_10.f90:  New test.
      
      From-SVN: r223099
      Thomas Koenig committed
    • Implement -Wmisleading-indentation · c3388e62
      gcc/ChangeLog:
      	* doc/invoke.texi (Warning Options): Add -Wmisleading-indentation.
      	(-Wmisleading-indentation): New option.
      	* Makefile.in (C_COMMON_OBJS): Add c-family/c-indentation.o.
      
      gcc/c-family/ChangeLog:
      	* c-common.h (warn_for_misleading_indentation): New prototype.
      	* c-indentation.c: New file.
      	* c.opt (Wmisleading-indentation): New option.
      
      gcc/c/ChangeLog:
      	* c-parser.c (c_parser_if_body): Add param "if_loc", use it
      	to add a call to warn_for_misleading_indentation.
      	(c_parser_else_body): Likewise, adding param "else_loc".
      	(c_parser_if_statement): Check for misleading indentation.
      	(c_parser_while_statement): Likewise.
      	(c_parser_for_statement): Likewise.
      
      gcc/cp/ChangeLog:
      	* parser.c (cp_parser_selection_statement): Add location and
      	guard_kind arguments to calls to
      	cp_parser_implicitly_scoped_statement.
      	(cp_parser_iteration_statement): Likewise for calls to
      	cp_parser_already_scoped_statement.
      	(cp_parser_implicitly_scoped_statement): Add "guard_loc" and
      	"guard_kind" params; use them to warn for misleading
      	indentation.
      	(cp_parser_already_scoped_statement): Likewise.
      
      gcc/testsuite/ChangeLog:
      	* c-c++-common/Wmisleading-indentation.c: New testcase.
      	* c-c++-common/Wmisleading-indentation-2.c: New testcase.
      	* c-c++-common/Wmisleading-indentation-2.md: New file.
      
      libcpp/ChangeLog:
      	* directives.c (do_line): Set seen_line_directive on line_table.
      	(do_linemarker): Likewise.
      	* include/line-map.h (struct line_maps): Add new field
      	"seen_line_directive".
      
      From-SVN: r223098
      David Malcolm committed
    • alpha.h (TARGET_SUPPORTS_WIDE_INT): New define. · f06ed650
      	* config/alpha/alpha.h (TARGET_SUPPORTS_WIDE_INT): New define.
      	* config/alpha/alpha.c (alpha_rtx_costs): Handle CONST_WIDE_INT.
      	(alpha_extract_integer): Ditto.
      	(alpha_legitimate_constant_p): Ditto.
      	(alpha_split_tmode_pair): Ditto.
      	(alpha_preferred_reload_class): Add CONST_WIDE_INT.
      	(alpha_expand_mov): Ditto.
      	(print_operand): Remove handling of 'H' modifier.
      	<case 'm'>: Remove CONST_DOUBLE handling.
      	(summarize_insn): Handle CONST_WIDE_INT.
      	* config/alpha/alpha.md (*andsi_internal): Remove H constraint.
      	(anddi3): Ditto.
      	(movti): Handle CONST_WIDE_INT.
      	* config/alpha/constraints.md ('H'): Remove constraint definition.
      	('G'): Do not match MODE_FLOAT class.
      	* config/alpha/predicates.md (const0_operand): Also match
      	const_wide_int.
      	(non_add_const_operand): Ditto.
      	(non_zero_const_operand): Ditto.
      	(some_operand): Ditto.
      	(input_operand): Ditto.  Handle CONST_WIDE_INT.
      	(and_operand): Do not match const_double.
      	* config/alpha/sync.md (fetchop_constr): Remove H constraint.
      
      From-SVN: r223097
      Uros Bizjak committed
    • re PR target/65697 (__atomic memory barriers not strong enough for __sync builtins) · 46b35980
      2015-05-12  Andrew MacLeod  <amacleod@redhat.com>
      
      	PR target/65697
      	* coretypes.h (MEMMODEL_SYNC, MEMMODEL_BASE_MASK): New macros.
      	(enum memmodel): Add SYNC_{ACQUIRE,RELEASE,SEQ_CST}.
      	* tree.h (memmodel_from_int, memmodel_base, is_mm_relaxed,
      	is_mm_consume,is_mm_acquire, is_mm_release, is_mm_acq_rel,
      	is_mm_seq_cst, is_mm_sync): New accessor functions.
      	* builtins.c (expand_builtin_sync_operation,
      	expand_builtin_compare_and_swap): Use MEMMODEL_SYNC_SEQ_CST.
      	(expand_builtin_sync_lock_release): Use MEMMODEL_SYNC_RELEASE.
      	(get_memmodel,  expand_builtin_atomic_compare_exchange,
      	expand_builtin_atomic_load, expand_builtin_atomic_store,
      	expand_builtin_atomic_clear): Use new accessor routines.
      	(expand_builtin_sync_synchronize): Use MEMMODEL_SYNC_SEQ_CST.
      	* optabs.c (expand_compare_and_swap_loop): Use MEMMODEL_SYNC_SEQ_CST.
      	(maybe_emit_sync_lock_test_and_set): Use new accessors and
      	MEMMODEL_SYNC_ACQUIRE.
      	(expand_sync_lock_test_and_set): Use MEMMODEL_SYNC_ACQUIRE.
      	(expand_mem_thread_fence, expand_mem_signal_fence, expand_atomic_load,
      	expand_atomic_store): Use new accessors.
      	* emit-rtl.c (need_atomic_barrier_p): Add additional enum cases.
      	* tsan.c (instrument_builtin_call): Update check for memory model beyond
      	final enum to use MEMMODEL_LAST.
      	* c-family/c-common.c: Use new accessor for memmodel_base.
      	* config/aarch64/aarch64.c (aarch64_expand_compare_and_swap): Use new
      	accessors.
      	* config/aarch64/atomics.md (atomic_load<mode>,atomic_store<mode>,
      	arch64_load_exclusive<mode>, aarch64_store_exclusive<mode>,
      	mem_thread_fence, *dmb): Likewise.
      	* config/alpha/alpha.c (alpha_split_compare_and_swap,
      	alpha_split_compare_and_swap_12): Likewise.
      	* config/arm/arm.c (arm_expand_compare_and_swap,
      	arm_split_compare_and_swap, arm_split_atomic_op): Likewise.
      	* config/arm/sync.md (atomic_load<mode>, atomic_store<mode>,
      	atomic_loaddi): Likewise.
      	* config/i386/i386.c (ix86_destroy_cost_data, ix86_memmodel_check):
      	Likewise.
      	* config/i386/sync.md (mem_thread_fence, atomic_store<mode>): Likewise.
      	* config/ia64/ia64.c (ia64_expand_atomic_op): Add new memmodel cases and
      	use new accessors.
      	* config/ia64/sync.md (mem_thread_fence, atomic_load<mode>,
      	atomic_store<mode>, atomic_compare_and_swap<mode>,
      	atomic_exchange<mode>): Use new accessors.
      	* config/mips/mips.c (mips_process_sync_loop): Likewise.
      	* config/pa/pa.md (atomic_loaddi, atomic_storedi): Likewise.
      	* config/rs6000/rs6000.c (rs6000_pre_atomic_barrier,
      	rs6000_post_atomic_barrier): Add new cases.
      	(rs6000_expand_atomic_compare_and_swap): Use new accessors.
      	* config/rs6000/sync.md (mem_thread_fence): Add new cases.
      	(atomic_load<mode>): Add new cases and use new accessors.
      	(store_quadpti): Add new cases.
      	* config/s390/s390.md (mem_thread_fence, atomic_store<mode>): Use new
      	accessors.
      	* config/sparc/sparc.c (sparc_emit_membar_for_model): Use new accessors.
      	* doc/extend.texi: Update docs to indicate 16 bits are used for memory
      	model, not 8.
      
      From-SVN: r223096
      Andrew MacLeod committed
    • ipa-devirt.c (type_with_linkage_p): New function. · e7a677ca
      
      	* ipa-devirt.c (type_with_linkage_p): New function.
      	(type_in_anonymous_namespace_p): Move here from tree.c; assert that
      	type has linkage.
      	(odr_type_p): Move here from ipa-utils.h; use type_with_linkage_p.
      	(can_be_name_hashed_p): Simplify.
      	(hash_odr_name): Check that type has linkage before checking if it is
      	anonymous.
      	(types_same_for_odr): Likewise.
      	(odr_name_hasher::equal): Likewise.
      	(odr_subtypes_equivalent_p): Likewise.
      	(warn_types_mismatch): Likewise.
      	(get_odr_type): Likewise.
      	(odr_types_equivalent_p): Fix checking of TYPE_MAIN_VARIANT.
      	* ipa-utils.h (odr_type_p): Move offline.
      	* tree.c (need_assembler_name_p): Fix handling of types
      	without linkages.
      	(type_in_anonymous_namespace_p): Move to ipa-devirt.c
      
      From-SVN: r223094
      Jan Hubicka committed