Commit Graph

141 Commits

Author SHA1 Message Date
Jonathan Wakely 5764ee3c84 Fix numerous typos in comments
gcc:

	* alias.c (base_alias_check): Fix typo in comment.
	* cgraph.h (class ipa_polymorphic_call_context): Likewise.
	* cgraphunit.c (symbol_table::compile): Likewise.
	* collect2.c (maybe_run_lto_and_relink): Likewise.
	* config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.
	* config/avr/avr-arch.h (avr_arch_info_t): Likewise.
	* config/avr/avr.c (avr_map_op_t): Likewise.
	* config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
	* config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
	* config/epiphany/epiphany.md (movcc): Likewise.
	* config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
	* config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
	Likewise.
	* config/mips/mips.c (mips_save_restore_reg): Likewise.
	* config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
	* config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
	* config/sh/sh.c (sh_rtx_costs): Likewise.
	* fold-const.c (fold_truth_andor): Likewise.
	* genautomata.c (collapse_flag): Likewise.
	* gengtype.h (struct type::u::s): Likewise.
	* gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
	* input.c (FORMAT_AMOUNT): Likewise.
	* ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
	(known_aggs_to_agg_replacement_list): Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
	* ipa-polymorphic-call.c
	(ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
	* loop-unroll.c (analyze_insn_to_expand_var): Likewise.
	* lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
	Likewise.
	* modulo-sched.c (apply_reg_moves): Likewise.
	* omp-expand.c (build_omp_regions_1): Likewise.
	* trans-mem.c (struct tm_wrapper_hasher): Likewise.
	* tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
	* tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
	* value-prof.c: Likewise.
	* var-tracking.c (val_reset): Likewise.

gcc/ada:

	* doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
	* g-socket.adb (To_Host_Entry): Fix typo in comment.
	* gnat_ugn.texi: Fix typo.
	* raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
	* s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
	* sem_ch3.adb (Build_Derived_Record_Type): Likewise.
	* sem_util.adb (Mark_Coextensions): Likewise.
	* sem_util.ads (Available_Full_View_Of_Component): Likewise.

gcc/c:

	* c-array-notation.c: Fix typo in comment.

gcc/c-family:

	* c-warn.c (do_warn_double_promotion): Fix typo in comment.

gcc/cp:

        * class.c (update_vtable_entry_for_fn): Fix typo in comment.
	* decl2.c (one_static_initialization_or_destruction): Likewise.
	* name-lookup.c (store_bindings): Likewise.
	* parser.c (make_call_declarator): Likewise.
	* pt.c (check_explicit_specialization): Likewise.

gcc/testsuite:

	* g++.old-deja/g++.benjamin/scope02.C: Fix typo in comment.
	* gcc.dg/20031012-1.c: Likewise.
	* gcc.dg/ipa/ipcp-1.c: Likewise.
	* gcc.dg/torture/matrix-3.c: Likewise.
	* gcc.target/powerpc/ppc-spe.c: Likewise.
	* gcc.target/rx/zero-width-bitfield.c: Likewise.

libcpp:

	* include/line-map.h (LINEMAPS_MACRO_MAPS): Fix typo in comment.
	* lex.c (search_line_fast): Likewise.
	* pch.h (cpp_valid_state): Likewise.

libdecnumber:

	* decCommon.c (decFloatFromPackedChecked): Fix typo in comment.
	* decNumber.c (decNumberPower, decMultiplyOp): Likewise.

libgcc:

	* config/c6x/pr-support.c (__gnu_unwind_execute): Fix typo in comment.

libitm:

	* libitm_i.h (sutrct gtm_thread): Fix typo in comment.

From-SVN: r246664
2017-04-03 23:30:56 +01:00
Jakub Jelinek d5a216fa21 re PR tree-optimization/79345 (passing yet-uninitialized member as argument to base class constructor should warn (-Wunitialized))
PR tree-optimization/79345
	* gensupport.h (struct pattern_stats): Add min_scratch_opno field.
	* gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
	(get_pattern_stats): Initialize it.
	* genemit.c (gen_expand): Verify match_scratch numbers come after
	match_operand/match_dup numbers.
	* config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
	match_scratch numbers.
	* config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
	Likewise.
	* config/s390/s390.md (trunctdsd2): Likewise.

From-SVN: r245833
2017-03-02 10:19:28 +01:00
David Malcolm 51b861137e Introduce RTL function reader
This is the combination of these patches:
- [8a/9] Introduce class function_reader (v8)
- Add ASSERT_RTX_PTR_EQ
- [8b/9] Add target-independent selftests of RTL function reader (v2)
- [8c/9] Add aarch64-specific selftests for RTL function reader (v2)
- [8d/9] Add x86_64-specific selftests for RTL function reader (v2)

gcc/ChangeLog:
	* Makefile.in (OBJS): Add read-md.o, read-rtl.o,
	read-rtl-function.o, and selftest-rtl.o.
	* config/aarch64/aarch64.c: Include selftest.h and
	selftest-rtl.h.
	(selftest::aarch64_test_loading_full_dump): New function.
	(selftest::aarch64_run_selftests): New function.
	(TARGET_RUN_TARGET_SELFTESTS): Wire it up to
	selftest::aarch64_run_selftests.
	* config/i386/i386.c
	(selftest::ix86_test_loading_dump_fragment_1): New function.
	(selftest::ix86_test_loading_call_insn): New function.
	(selftest::ix86_test_loading_full_dump): New function.
	(selftest::ix86_test_loading_unspec): New function.
	(selftest::ix86_run_selftests): Call the new functions.
	* emit-rtl.c (maybe_set_max_label_num): New function.
	* emit-rtl.h (maybe_set_max_label_num): New decl.
	* function.c (instantiate_decls): Guard call to
	instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
	* function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
	"static".
	* gensupport.c (gen_reader::gen_reader): Pass "false"
	for new "compact" param of rtx_reader.
	* print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
	rather than an empty string for NULL strings.
	* read-md.c: Potentially include config.h rather than bconfig.h.
	Wrap include of errors.h with #ifdef GENERATOR_FILE.
	(have_error): New global, copied from errors.c.
	(md_reader::read_name): Rename to...
	(md_reader::read_name_1): ...this, adding "out_loc" param,
	and converting "missing name or number" to returning false, rather
	than failing.
	(md_reader::read_name): Reimplement in terms of read_name_1.
	(md_reader::read_name_or_nil): New function.
	(md_reader::read_string): Handle "(nil)" by returning NULL.
	(md_reader::md_reader): Add new param "compact".
	(md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
	(md_reader::read_file): New method.
	* read-md.h (md_reader::md_reader): Add new param "compact".
	(md_reader::read_file): New method.
	(md_reader::is_compact): New accessor.
	(md_reader::read_name): Convert return type from void to
	file_location.
	(md_reader::read_name_or_nil): New decl.
	(md_reader::read_name_1): New decl.
	(md_reader::m_compact): New field.
	(noop_reader::noop_reader): Pass "false" for new "compact" param
	of rtx_reader.
	(rtx_reader::rtx_reader): Add new "compact" param.
	(rtx_reader::read_rtx_operand): Make virtual and convert return
	type from void to rtx.
	(rtx_reader::read_until): New decl.
	(rtx_reader::handle_any_trailing_information): New virtual
	function.
	(rtx_reader::postprocess): New virtual function.
	(rtx_reader::finalize_string): New virtual function.
	(rtx_reader::m_in_call_function_usage): New field.
	(rtx_reader::m_reuse_rtx_by_id): New field.
	* read-rtl-function.c: New file.
	* selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
	* selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
	(selftest::verify_three_block_rtl_cfg): New decl.
	* read-rtl-function.h: New file.
	* read-rtl.c: Potentially include config.h rather than bconfig.h.
	For host, include function.h, memmodel.h, and emit-rtl.h.
	(one_time_initialization): New function.
	(struct compact_insn_name): New struct.
	(compact_insn_names): New array.
	(find_code): Handle insn codes in compact dumps.
	(apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
	(bind_subst_iter_and_attr): Likewise.
	(add_condition_to_string): Likewise.
	(add_condition_to_rtx): Likewise.
	(apply_attribute_uses): Likewise.
	(add_current_iterators): Likewise.
	(apply_iterators): Likewise.
	(initialize_iterators): Guard usage of apply_subst_iterator with
	#ifdef GENERATOR_FILE.
	(read_conditions): Wrap with #ifdef GENERATOR_FILE.
	(md_reader::read_mapping): Likewise.
	(add_define_attr_for_define_subst): Likewise.
	(add_define_subst_attr): Likewise.
	(read_subst_mapping): Likewise.
	(check_code_iterator): Likewise.
	(rtx_reader::read_rtx): Likewise.  Move one-time initialization
	logic to...
	(one_time_initialization): New function.
	(rtx_reader::read_until): New method.
	(read_flags): New function.
	(parse_reg_note_name): New function.
	(rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
	Handle reuse_rtx ids.
	Wrap iterator lookup within #ifdef GENERATOR_FILE.
	Add parsing support for RTL dumps, mirroring the special-cases in
	print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
	values, and calling handle_any_trailing_information.
	(rtx_reader::read_rtx_operand): Convert return type from void
	to rtx, returning return_rtx.  Handle case 'e'.  Call
	finalize_string on XSTR and XTMPL fields.
	(rtx_reader::read_nested_rtx):  Handle dumps in which trailing
	 "(nil)" values were omitted.  Call the postprocess vfunc on the
	return_rtx.
	(rtx_reader::rtx_reader): Add new "compact" param and pass to base
	class ctor.  Initialize m_in_call_function_usage.  Call
	one_time_initialization.
	* rtl-tests.c (selftest::test_uncond_jump): Call
	set_new_first_and_last_insn.
	* rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
	* selftest-rtl.c: New file.
	* selftest-rtl.h (class selftest::rtl_dump_test): New class.
	(selftest::get_insn_by_uid): New decl.
	* selftest-run-tests.c (selftest::run_tests): Call
	read_rtl_function_c_tests.
	* selftest.h  (selftest::read_rtl_function_c_tests): New decl.
	* tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
	dumps.

gcc/testsuite/ChangeLog:
	* selftests/asr_div1.rtl: New file.
	* selftests/aarch64: New subdirectory.
	* selftests/aarch64/times-two.rtl: New file.
	* selftests/bb-index.rtl: New file.
	* selftests/cfg-test.rtl: New file.
	* selftests/const-int.rtl: New file.
	* selftests/example-labels.rtl: New file.
	* selftests/insn-with-mode.rtl: New file.
	* selftests/jump-to-label-ref.rtl: New file.
	* selftests/jump-to-return.rtl: New file.
	* selftests/jump-to-simple-return.rtl: New file.
	* selftests/mem.rtl: New file.
	* selftests/note-insn-deleted.rtl: New file.
	* selftests/note_insn_basic_block.rtl: New file.
	* selftests/simple-cse.rtl: New file.
	* selftests/symbol-ref.rtl: New file.
	* selftests/x86_64: New subdirectory.
	* selftests/x86_64/call-insn.rtl: New file.
	* selftests/x86_64/copy-hard-reg-into-frame.rtl: New file.
	* selftests/x86_64/times-two.rtl: New file.
	* selftests/x86_64/unspec.rtl: New file.

From-SVN: r244110
2017-01-05 19:32:09 +00:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
David Malcolm b78027d1a3 read-md.c: Move various state to within class rtx_reader
gcc/ChangeLog:
	* genattrtab.c (attr_string): Use rtx_reader_ptr for call to
	copy_md_ptr_loc.
	(gen_attr): Use rtx_reader_ptr for lookup_enum_type call.
	(write_test_expr): Use rtx_reader_ptr for calls to
	fprint_c_condition.
	(write_attr_value): Likewise.
	* genconditions.c (write_one_condition): Use rtx_reader_ptr for
	call to print_md_ptr_loc.
	(write_one_condition): Likewise for calls to print_c_condition.
	* genconstants.c: Include "statistics.h" and "vec.h".
	(main): Update for conversion to member functions.
	* genemit.c (emit_c_code): Use rtx_reader_ptr for
	call to print_md_ptr_loc.
	* genenums.c: Include "statistics.h" and "vec.h".
	(main): Update for conversion of traverse_enum_types to a method.
	* genmddeps.c: Include "statistics.h" and "vec.h".
	* genoutput.c (process_template): Use rtx_reader_ptr for call to
	print_md_ptr_loc.
	* genpreds.c (write_predicate_subfunction): Likewise.
	(write_predicate_expr): Likewise for calls to print_c_condition.
	* genrecog.c (print_test): Likewise.
	* gensupport.c (process_rtx): Likewise for calls to
	copy_md_ptr_loc and join_c_conditions.
	(alter_test_for_insn): Likewise for call to join_c_conditions.
	(process_substs_on_one_elem): Likewise.
	(gen_mnemonic_setattr): Update for move of string_obstack to a
	field of rtx_reader.
	(mnemonic_htab_callback): Likewise.  Fix formatting.
	(gen_mnemonic_attr): Likewise.
	* gentarget-def.c (def_target_insn): Use rtx_reader_ptr for calls
	to print_c_condition.
	* read-md.c: Include "statistics.h" and "vec.h".
	(string_obstack): Convert this global to field "m_string_obstack"
	of class rtx_reader.
	(ptr_locs): Likewise, as "m_ptr_locs".
	(ptr_loc_obstack): Likewise, as "m_ptr_loc_obstack".
	(joined_conditions): Likewise, as "m_joined_conditions".
	(joined_conditions_obstack): Likewise, as "m_joined_conditions_obstack".
	(md_constants): Likewise, as "m_md_constants".
	(enum_types): Likewise, as "m_enum_types".
	(set_md_ptr_loc): Convert to...
	(rtx_reader::set_md_ptr_loc): ...member function.
	(get_md_ptr_loc): Convert to...
	(rtx_reader::get_md_ptr_loc): ...member function.
	(copy_md_ptr_loc): Convert to...
	(rtx_reader::copy_md_ptr_loc): ...member function.
	(fprint_md_ptr_loc): Convert to...
	(rtx_reader::fprint_md_ptr_loc): ...member function.
	(print_md_ptr_loc): Convert to...
	(rtx_reader::print_md_ptr_loc): ...member function.
	(join_c_conditions): Convert to...
	(rtx_reader::join_c_conditions): ...member function.
	(fprint_c_condition): Convert to...
	(rtx_reader::fprint_c_condition): ...member function.
	(print_c_condition): Convert to...
	(rtx_reader::print_c_condition): ...member function.
	(read_name): Convert to...
	(rtx_reader::read_name): ...member function.
	(read_escape): Convert to...
	(rtx_reader::read_escape): ...member function.
	(read_quoted_string): Convert to...
	(rtx_reader::read_quoted_string): ...member function.
	(read_braced_string): Convert to...
	(rtx_reader::read_braced_string): ...member function.
	(read_string): Convert to...
	(rtx_reader::read_string): ...member function.
	(read_skip_construct): Convert to...
	(rtx_reader::read_skip_construct): ...member function.
	(handle_constants): Convert to...
	(rtx_reader::handle_constants): ...member function.
	(traverse_md_constants): Convert to...
	(rtx_reader::traverse_md_constants): ...member function.
	(handle_enum): Convert to...
	(rtx_reader::handle_enum): ...member function.
	(lookup_enum_type): Convert to...
	(rtx_reader::lookup_enum_type): ...member function.
	(traverse_enum_types): Convert to...
	(rtx_reader::traverse_enum_types): ...member function.
	(rtx_reader::rtx_reader): Move initializations
	of various former global data from rtx_reader::read_md_files to
	here, as fields, along with the call to unlock_std_streams.
	(rtx_reader::~rtx_reader): Clean up m_base_dir, and clean up
	the new fields.
	(rtx_reader::read_md_files): Move initializations of various
	global data from here to the ctor.
	* read-md.h (read_name): Convert to...
	(rtx_reader::read_name): ...member function.
	(rtx_reader::read_escape): New method decl.
	(read_quoted_string): Convert to...
	(rtx_reader::read_quoted_string): ...member function.
	(rtx_reader::read_braced_string): New method decl.
	(read_string): Convert to...
	(rtx_reader::read_string): ...member function.
	(rtx_reader::read_skip_construct): New method decl.
	(rtx_reader::set_md_ptr_loc): New method decl.
	(rtx_reader::get_md_ptr_loc): New method decl.
	(copy_md_ptr_loc): Convert to...
	(rtx_reader::copy_md_ptr_loc): ...member function.
	(fprint_md_ptr_loc): Convert to...
	(rtx_reader::fprint_md_ptr_loc): ...member function.
	(print_md_ptr_loc): Convert to...
	(rtx_reader::print_md_ptr_loc): ...member function.
	(rtx_reader::lookup_enum_type): New method decl.
	(rtx_reader::traverse_enum_types): New method decl.
	(rtx_reader::handle_constants): New method decl.
	(traverse_md_constants): Convert to...
	(rtx_reader::traverse_md_constants): ...member function.
	(rtx_reader::handle_enum): New method decl.
	(rtx_reader::join_c_conditions): New method decl.
	(fprint_c_condition): Convert to...
	(rtx_reader::fprint_c_condition): ...member function.
	(print_c_condition): Convert to...
	(rtx_reader::print_c_condition): ...member function.
	(rtx_reader::apply_iterator_to_string): New method decl.
	(rtx_reader::copy_rtx_for_iterators): New method decl.
	(rtx_reader::read_conditions): New method decl.
	(rtx_reader::record_potential_iterator_use): New method decl.
	(rtx_reader::read_mapping): New method decl.
	(rtx_reader::read_rtx): New method decl.
	(rtx_reader::read_rtx_code): New method decl.
	(rtx_reader::read_rtx_operand): New method decl.
	(rtx_reader::read_nested_rtx): New method decl.
	(rtx_reader::read_rtx_variadic): New method decl.
	(rtx_reader::get_string_obstack): New method.
	(rtx_reader::get_md_constants): New method.
	(string_obstack): Convert global variable decl to...
	(rtx_reader::m_string_obstack): ...this new field.
	(rtx_reader::m_ptr_locs): New field.
	(rtx_reader::m_ptr_loc_obstack): New field.
	(rtx_reader::m_joined_conditions): New field.
	(rtx_reader::m_joined_conditions_obstack): New field.
	(rtx_reader::m_md_constants): New field.
	(rtx_reader::m_enum_types): New field.
	* read-rtl.c (apply_iterator_to_string): Convert to...
	(rtx_reader::apply_iterator_to_string): ...member function.
	(copy_rtx_for_iterators): Convert to...
	(rtx_reader::copy_rtx_for_iterators): ...member function.
	(add_condition_to_string): Use rtx_reader_ptr for
	calls join_c_conditions.
	(apply_iterators): Use rtx_reader_ptr for calls to
	join_c_conditions and copy_rtx_for_iterators.
	(read_conditions): Convert to...
	(rtx_reader::read_conditions): ...member function.
	(record_potential_iterator_use): Convert to...
	(rtx_reader::record_potential_iterator_use): ...member function.
	(read_mapping): Convert to...
	(rtx_reader::read_mapping): ...member function.
	(read_subst_mapping): Use rtx_reader_ptr for read_string call.
	(read_rtx): Convert to...
	(rtx_reader::read_rtx): ...member function.
	(read_rtx_code): Convert to...
	(rtx_reader::read_rtx_code): ...member function.
	(read_rtx_operand): Convert to...
	(rtx_reader::read_rtx_operand): ...member function.  Update for move
	of string_obstack to a field.
	(read_nested_rtx): Convert to..
	(rtx_reader::read_nested_rtx): ...member function.
	(read_rtx_variadic): Convert to..
	(rtx_reader::read_rtx_variadic): ...member function.

From-SVN: r241293
2016-10-18 00:19:17 +00:00
David Malcolm 3814e88007 read-md.c: track column numbers
gcc/ChangeLog:
	* genattrtab.c (make_internal_attr): Supply dummy column number to
	file_location ctor.
	(main): Likewise.
	* genoutput.c (init_insn_for_nothing): Likewise.
	* gensupport.c (add_define_attr): Likewise.
	* read-md.c (message_at_1): Print column number.
	(fatal_with_file_and_line): Likewise.
	(rtx_reader::read_char): Track column numbers.
	(rtx_reader::unread_char): Likewise.
	(rtx_reader::rtx_reader): Initialize m_read_md_colno.
	(rtx_reader::handle_include): Stash and restore m_read_md_colno.
	(rtx_reader::handle_file): Initialize m_read_md_colno.
	(rtx_reader::get_current_location): Supply column number to
	file_location ctor.
	* read-md.h (struct file_location): Add field "colno".
	(file_location::file_location): Likewise.
	(rtx_reader::get_colno): New accessor.
	(rtx_reader::m_read_md_colno): New field.
	(rtx_reader::m_last_line_colno): New field.

From-SVN: r240752
2016-10-04 17:10:41 +00:00
David Malcolm 812b1403a8 Introduce class rtx_reader
Bundle up various global variables within gensupport.c into a
class rtx_reader, with a view towards making it easier to run the
code more than once in-process.

gcc/ChangeLog:
	* genconstants.c (main): Introduce noop_reader and convert call
	to read_md_files to a method call.
	* genenums.c (main): Likewise.
	* genmddeps.c (main): Likewise.
	* genpreds.c (write_tm_constrs_h): Replace use of "in_fname" with
	rtx_reader_ptr->get_top_level_filename ().
	(write_tm_preds_h): Likewise.
	(write_insn_preds_c): Likewise.
	* gensupport.c (class gen_reader): New subclass of rtx_reader.
	(rtx_handle_directive): Convert to...
	(gen_reader::handle_unknown_directive): ...this.
	(init_rtx_reader_args_cb): Convert return type from bool to
	rtx_reader *.  Create a gen_reader instance, using it for the
	call to read_md_files.  Return it if no errors occur.
	(init_rtx_reader_args): Convert return type from bool to
	rtx_reader *.
	* gensupport.h (init_rtx_reader_args_cb): Likewise.
	(init_rtx_reader_args_cb): Likewise.
	* read-md.c (struct file_name_list): Move to class rtx_reader.
	(read_md_file): Delete in favor of rtx_reader::m_read_md_file.
	(read_md_filename): Delete in favor of
	rtx_reader::m_read_md_filename.
	(read_md_lineno): Delete in favor of rtx_reader::m_read_md_lineno.
	(in_fname): Delete in favor of rtx_reader::m_toplevel_fname.
	(base_dir): Delete in favor of rtx_reader::m_base_dir.
	(first_dir_md_include): Delete in favor of
	rtx_reader::m_first_dir_md_include.
	(last_dir_md_include_ptr): Delete in favor of
	rtx_reader::m_last_dir_md_include_ptr.
	(max_include_len): Delete.
	(rtx_reader_ptr): New.
	(fatal_with_file_and_line): Use get_filename and get_lineno
	accessors of rtx_reader_ptr.
	(require_char_ws): Likewise.
	(rtx_reader::read_char): New method, based on ::read_char.
	(rtx_reader::unread_char): New method, based on ::unread_char.
	(read_escape): Use get_filename and get_lineno accessors of
	rtx_reader_ptr.
	(read_braced_string): Use get_lineno accessor of rtx_reader_ptr.
	(read_string): Use get_filename and get_lineno accessors of
	rtx_reader_ptr.
	(rtx_reader::rtx_reader): New ctor.
	(rtx_reader::~rtx_reader): New dtor.
	(handle_include): Convert from a function to...
	(rtx_reader::handle_include): ...this method, converting
	handle_directive from a callback to a virtual function.
	(handle_file): Likewise, converting to...
	(rtx_reader::handle_file): ...this method.
	(handle_toplevel_file): Likewise, converting to...
	(rtx_reader::handle_toplevel_file): ...this method.
	(rtx_reader::get_current_location): New method.
	(parse_include): Convert from a function to...
	(rtx_reader::add_include_path): ...this method, dropping redundant
	update to unused max_include_len.
	(read_md_files): Convert from a function to...
	(rtx_reader::read_md_files): ...this method, converting
	handle_directive from a callback to a virtual function.
	(noop_reader::handle_unknown_directive): New method.
	* read-md.h (directive_handler_t): Delete this typedef.
	(in_fname): Delete.
	(read_md_file): Delete.
	(read_md_lineno): Delete.
	(read_md_filename): Delete.
	(class rtx_reader): New class.
	(rtx_reader_ptr): New decl.
	(class noop_reader): New subclass of rtx_reader.
	(read_char): Reimplement in terms of rtx_reader::read_char.
	(unread_char): Reimplement in terms of rtx_reader::unread_char.
	(read_md_files): Delete.
	* read-rtl.c (read_rtx_code): Update for deletion of globals
	read_md_filename and read_md_lineno.

From-SVN: r240333
2016-09-21 20:55:06 +00:00
Jakub Jelinek c5cb79681d re PR other/77421 (Bugs found in GCC with the help of PVS-Studio)
PR other/77421
	* gensupport.c (alter_output_for_subst_insn): Remove redundant
	*insn_out == '*' test.  Don't copy unnecessary to yet another
	memory buffer, and don't leak it.

From-SVN: r239987
2016-09-05 10:50:29 +02:00
Marek Polacek 191816a36b re PR c/7652 (-Wswitch-break : Warn if a switch case falls through)
PR c/7652
gcc/
	* alias.c (find_base_value): Adjust fall through comment.
	* cfgexpand.c (expand_debug_expr): Likewise.
	* combine.c (find_split_point): Likewise.
	(expand_compound_operation): Likewise.  Add FALLTHRU.
	(make_compound_operation): Adjust fall through comment.
	(canon_reg_for_combine): Add FALLTHRU.
	(force_to_mode): Adjust fall through comment.
	(simplify_shift_const_1): Likewise.
	(simplify_comparison): Likewise.
	* config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Add
	FALLTHRU.
	* config/aarch64/predicates.md: Likewise.
	* config/i386/i386.c (function_arg_advance_32): Likewise.
	(ix86_gimplify_va_arg): Likewise.
	(print_reg): Likewise.
	(ix86_print_operand): Likewise.
	(ix86_build_const_vector): Likewise.
	(ix86_expand_branch): Likewise.
	(ix86_sched_init_global): Adjust fall through comment.
	(ix86_expand_args_builtin): Add FALLTHRU.
	(ix86_expand_builtin): Likewise.
	(ix86_expand_vector_init_one_var): Likewise.
	* config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise.
	(rs6000_adjust_cost): Likewise.
	(insn_must_be_first_in_group): Likewise.
	* config/rs6000/rs6000.md: Likewise.  Adjust fall through comment.
	* dbxout.c (dbxout_symbol): Adjust fall through comment.
	* df-scan.c (df_uses_record): Likewise.
	* dojump.c (do_jump): Add FALLTHRU.
	* dwarf2out.c (mem_loc_descriptor): Likewise.  Adjust fall through
	comment.
	(resolve_args_picking_1): Adjust fall through comment.
	(loc_list_from_tree_1): Likewise.
	* expmed.c (make_tree): Likewise.
	* expr.c (expand_expr_real_2): Add FALLTHRU.
	(expand_expr_real_1): Likewise.  Adjust fall through comment.
	* fold-const.c (const_binop): Adjust fall through comment.
	(fold_truth_not_expr): Likewise.
	(fold_cond_expr_with_comparison): Add FALLTHRU.
	(fold_binary_loc): Likewise.
	(contains_label_1): Adjust fall through comment.
	(multiple_of_p): Likewise.
	* gcov-tool.c (process_args): Add FALLTHRU.
	* genattrtab.c (check_attr_test): Likewise.
	(write_test_expr): Likewise.
	* genconfig.c (walk_insn_part): Likewise.
	* genpreds.c (validate_exp): Adjust fall through comment.
	(needs_variable): Likewise.
	* gensupport.c (get_alternatives_number): Add FALLTHRU.
	(subst_dup): Likewise.
	* gimple-pretty-print.c (dump_gimple_assign): Likewise.
	* gimplify.c (gimplify_addr_expr): Adjust fall through comment.
	(gimplify_scan_omp_clauses): Add FALLTHRU.
	(goa_stabilize_expr): Likewise.
	* graphite-isl-ast-to-gimple.c (substitute_ssa_name): Adjust fall
	through comment.
	* hsa-gen.c (get_address_from_value): Likewise.
	* ipa-icf.c (sem_function::hash_stmt): Likewise.
	* ira.c (ira_setup_alts): Add FALLTHRU.
	* lra-eliminations.c (lra_eliminate_regs_1): Adjust fall through
	comment.
	* lto-streamer-out.c (lto_output_tree_ref): Add FALLTHRU.
	* opts.c (common_handle_option): Likewise.
	* read-rtl.c (read_rtx_code): Likewise.
	* real.c (round_for_format): Likewise.
	* recog.c (asm_operand_ok): Likewise.
	* reginfo.c (reg_scan_mark_refs): Adjust fall through comment.
	* reload1.c (set_label_offsets): Likewise.
	(eliminate_regs_1): Likewise.
	(reload_reg_reaches_end_p): Likewise.
	* rtlanal.c (commutative_operand_precedence): Add FALLTHRU.
	(rtx_cost): Likewise.
	* sched-rgn.c (is_exception_free): Likewise.
	* simplify-rtx.c (simplify_rtx): Adjust fall through comment.
	* stor-layout.c (int_mode_for_mode): Likewise.
	* toplev.c (print_to_asm_out_file): Likewise.
	(print_to_stderr): Likewise.
	* tree-cfg.c (gimple_verify_flow_info): Likewise.
	* tree-chrec.c (chrec_fold_plus_1): Add FALLTHRU.
	(chrec_fold_multiply): Likewise.
	(evolution_function_is_invariant_rec_p): Likewise.
	(for_each_scev_op): Likewise.
	* tree-data-ref.c (siv_subscript_p): Likewise.
	(get_references_in_stmt): Likewise.
	* tree.c (find_placeholder_in_expr): Adjust fall through comment.
	(substitute_in_expr): Likewise.
	(type_cache_hasher::equal): Likewise.
	(walk_type_fields): Likewise.
	* var-tracking.c (adjust_mems): Add FALLTHRU.
	(set_dv_changed): Adjust fall through comment.
	* varasm.c (default_function_section): Add FALLTHRU.
gcc/c-family/
	* c-common.c (scalar_to_vector): Adjust fall through comment.
	* c-opts.c (c_common_handle_option): Likewise.
	* c-pragma.c (handle_pragma_pack): Add FALLTHRU.
	* c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
	fall through comment.
	* cilk.c (extract_free_variables): Add FALLTHRU.
gcc/c/
	* c-parser.c (c_parser_external_declaration): Add FALLTHRU.
	(c_parser_postfix_expression): Likewise.
	* c-typeck.c (build_unary_op): Adjust fall through comment.
	(c_mark_addressable): Likewise.
gcc/cp/
	* call.c (add_builtin_candidate): Add FALLTHRU.
	(build_integral_nontype_arg_conv): Adjust fall through comment.
	(build_new_op_1): Add FALLTHRU.
	(convert_like_real): Adjust fall through comment.
	* class.c (fixed_type_or_null): Likewise.
	* constexpr.c (cxx_eval_constant_expression): Likewise.
	(potential_constant_expression_1): Likewise.  Add FALLTHRU.
	* cp-gimplify.c (cp_gimplify_expr): Adjust fall through comment.
	(cp_fold): Add FALLTHRU.
	* cvt.c (build_expr_type_conversion): Adjust fall through comment.
	* cxx-pretty-print.c (pp_cxx_unqualified_id): Add FALLTHRU.
	(pp_cxx_qualified_id): Likewise.
	(cxx_pretty_printer::constant): Adjust fall through comment.
	(cxx_pretty_printer::primary_expression): Add FALLTHRU.
	(pp_cxx_pm_expression): Adjust fall through comment.
	(cxx_pretty_printer::expression): Add FALLTHRU.
	(cxx_pretty_printer::declaration_specifiers): Reformat code.
	(pp_cxx_type_specifier_seq): Adjust fall through comment.
	(pp_cxx_ptr_operator): Likewise.  Add FALLTHRU.
	* error.c (dump_type): Adjust fall through comment.
	(dump_decl): Likewise.
	* mangle.c (write_type): Likewise.
	* method.c (synthesized_method_walk): Add FALLTHRU.
	* name-lookup.c (arg_assoc_type): Likewise.
	* parser.c (cp_lexer_print_token): Adjust fall through comment.
	(cp_parser_primary_expression): Add FALLTHRU.
	(cp_parser_operator): Likewise.
	* pt.c (find_parameter_packs_r): Likewise.
	(tsubst_aggr_type): Adjust fall through comment.
	* semantics.c (finish_omp_clauses): Add FALLTHRU.
	* tree.c (lvalue_kind): Likewise.
gcc/fortran/
	* decl.c (match_attr_spec): Add FALLTHRU.
	* primary.c (match_arg_list_function): Likewise.
	* resolve.c (resolve_operator): Adjust fall through comment.
	(fixup_charlen): Add FALLTHRU.
	(resolve_allocate_expr): Adjust fall through comment.
	* trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU.
	* trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through
	comment.
gcc/java/
	* expr.c (java_truthvalue_conversion): Adjust fall through comment.
	* jcf-io.c (verify_constant_pool): Likewise.
	* typeck.c (promote_type): Likewise.
gcc/objc/
	* objc-encoding.c (encode_type): Add FALLTHRU.
libcpp/
	* lex.c (search_line_fast): Add FALLTHRU.
	(_cpp_lex_direct): Likewise.
	(cpp_token_val_index): Adjust fall through comment.
	* macro.c (parse_params): Add FALLTHRU.
	* pch.c (count_defs): Adjust fall through comment.
	(write_defs): Likewise.
libiberty/
	* cp-demangle.c (d_print_mod): Add FALLTHRU.

From-SVN: r239410
2016-08-12 10:30:47 +00:00
David Malcolm 66b0fe8f4e Make argv const char ** in read_md_files etc
gcc/ChangeLog:
	* genattr-common.c (main): Convert argv from
	char ** to const char **.
	* genattr.c (main): Likewise.
	* genattrtab.c (main): Likewise.
	* genautomata.c (initiate_automaton_gen): Likewise.
	(main): Likewise.
	* gencodes.c (main): Likewise.
	* genconditions.c (main): Likewise.
	* genconfig.c (main): Likewise.
	* genconstants.c (main): Likewise.
	* genemit.c (main): Likewise.
	* genenums.c (main): Likewise.
	* genextract.c (main): Likewise.
	* genflags.c (main): Likewise.
	* genmddeps.c (main): Likewise.
	* genopinit.c (main): Likewise.
	* genoutput.c (main): Likewise.
	* genpeep.c (main): Likewise.
	* genpreds.c (main): Likewise.
	* genrecog.c (main): Likewise.
	* gensupport.c (init_rtx_reader_args_cb): Likewise.
	(init_rtx_reader_args): Likewise.
	* gensupport.h (init_rtx_reader_args_cb): Likewise.
	(init_rtx_reader_args): Likewise.
	* gentarget-def.c (main): Likewise.
	* read-md.c (read_md_files): Likewise.
	* read-md.h (read_md_files): Likewise.

From-SVN: r235976
2016-05-06 15:14:05 +00:00
Andreas Krebbel a7ba15ca58 Revert recent gensupport change.
2016-03-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	Revert
	2016-03-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* gensupport.c (process_substs_on_one_elem): Split loop to
	complete mark_operands_used_in_match_dup on all expressions in the
	vector first.
	(adjust_operands_numbers): Inline into process_substs_on_one_elem
	and remove function.

From-SVN: r233853
2016-03-01 14:51:17 +00:00
Andreas Krebbel 772040f796 gensupport: Fix define_subst operand renumbering.
When processing substitutions the operands are renumbered.  To find a
free operand number the array used_operands_numbers is used.
Currently this array is used to assign new numbers before all the
RTXes in the vector have been processed.  I did run into problems with
this for insns where a match_dup occurred in a later (use ...) operand
referring to an earlier operand (e.g. s390.md "setmem_long").

The patch splits the loop doing the processing into two in order to
have all the operand numbers collected already when assigning new
numbers.

gcc/ChangeLog:

2016-03-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* gensupport.c (process_substs_on_one_elem): Split loop to
	complete mark_operands_used_in_match_dup on all expressions in the
	vector first.
	(adjust_operands_numbers): Inline into process_substs_on_one_elem
	and remove function.

From-SVN: r233841
2016-03-01 09:19:14 +00:00
Vladimir Makarov 9eb1ca69e1 re PR target/69299 (-mavx performance degradation with r232088)
2016-01-29  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/69299
	* config/i386/constraints.md (Bm): Describe as special memory
	constraint.
	* doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it.
	* genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT.
	* genpreds.c (struct constraint_data): Add is_special_memory.
	(have_special_memory_constraints, special_memory_start): New
	static vars.
	(special_memory_end): Ditto.
	(add_constraint): Add new arg is_special_memory.  Add code to
	process its true value.  Update have_special_memory_constraints.
	(process_define_constraint): Pass the new arg.
	(process_define_register_constraint): Ditto.
	(choose_enum_order): Process special memory.
	(write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and
	function insn_extra_special_memory_constraint.
	(main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT.
	* gensupport.c (process_rtx): Process
	DEFINE_SPECIAL_MEMORY_CONSTRAINT.
	* ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY.
	* ira-lives.c (single_reg_class): Use
	insn_extra_special_memory_constraint.
	* ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY.
	* lra-constraints.c (process_alt_operands): Ditto.
	(curr_insn_transform): Use insn_extra_special_memory_constraint.
	* recog.c (asm_operand_ok, preprocess_constraints): Process
	CT_SPECIAL_MEMORY.
	* reload.c (find_reloads): Ditto.
	* rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New.
	* stmt.c (parse_input_constraint): Use
	insn_extra_special_memory_constraint.

From-SVN: r232993
2016-01-29 18:47:17 +00:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Bernd Schmidt b7e2dd6fb4 re PR middle-end/21273 (gensupport.c:collect_insn_data doesn't consider the constraints of match_scratch)
Fix PR21273

	PR middle-end/21273
	* gensupport.c (collect_insn_data): Look for number of alternatives
	in MATCH_SCRATCH.

From-SVN: r231654
2015-12-15 14:34:01 +00:00
Richard Sandiford 886456e210 Check for invalid FAILs
This patch makes it a compile-time error for an internal-fn optab
to FAIL.  There are certainly other optabs and patterns besides these
that aren't allowed to fail, but this at least deals with the immediate
point of controversy.

Tested normally on x86_64-linux-gnu.  Also tested by building one
configuration per cpu directory.  arc-elf and pdp11 didn't build
for unrelated reasons, but I checked that insn-emit.o built for
both without error.

gcc/
	* Makefile.in (GENSUPPORT_H): New macro.
	(build/gensupport.o, build/read-rtl.o, build/genattr.o)
	(build/genattr-common.o, build/genattrtab.o, build/genautomata.o)
	(build/gencodes.o, build/genconditions.o, build/genconfig.o)
	(build/genconstants.o, build/genextract.o, build/genflags.o)
	(build/gentarget-def.o): Use it.
	(build/genemit.o): Likewise.  Depend on internal-fn.def.
	* genopinit.c: Move block comment to optabs.def.
	(optab_tag, optab_def): Move to gensupport.h
	(pattern): Likewise, renaming to optab_pattern.
	(match_pattern): Move to gensupport.c
	(gen_insn): Use find_optab.
	(patterns, pattern_cmp): Replace pattern with optab_pattern.
	(main): Likewise.  Use num_optabs.
	* optabs.def: Add comment that was previously in genopinit.c.
	* gensupport.h (optab_tag): Moved from genopinit.c
	(optab_def): Likewise, expanding commentary.
	(optab_pattern): Likewise, after renaming from pattern.
	(optabs, num_optabs, find_optab): Declare.
	* gensupport.c (optabs): Moved from genopinit.c.
	(num_optabs): New variable.
	(match_pattern): Moved from genopinit.c.
	(find_optab): New function, extracted from genopinit.c:gen_insn.
	* genemit.c (nofail_optabs): New variable.
	(emit_c_code): New function.
	(gen_expand): Check whether the instruction is an optab that isn't
	allowed to fail.  Call emit_c_code.
	(gen_split): Call emit_c_code here too.
	(main): Initialize nofail_optabs.  Don't emit FAIL and DONE here.

From-SVN: r231160
2015-12-02 09:06:28 +00:00
Alan Modra c240b3e0de New obstack_next_free is not an lvalue
New obstack.h casts obstack_next_free to (void *), resulting in it
being a non-lvalue, and warnings on pointer arithmetic.

gcc/
	* gensupport.c (add_mnemonic_string): Make len param a size_t.
	(gen_mnemonic_setattr): Make "size" var a size_t.  Use
	obstack_blank_fast to shrink obstack.  Cast obstack_next_free
	return value.
gcc/objc/
	* objc-encoding.c (encode_aggregate_within): Cast obstack_next_free
	return value.

From-SVN: r229984
2015-11-09 14:47:53 +10:30
Richard Sandiford 58d745ec90 genflags.c (gen_macro): Delete.
gcc/
	* genflags.c (gen_macro): Delete.
	(gen_proto): Don't create GEN.*CALL.* macros.
	* gensupport.h (get_file_location): Declare.
	* gensupport.c (rtx_locs): New variable.
	(read_md_rtx): Record rtx locations.
	(get_file_location): New function.
	* target-insns.def (call, call_pop, call_value, call_value_pop)
	(sibcall, sibcall_value): New patterns.
	* gentarget-def.c (parse_argument): New function.
	(def_target_insn): Use it.  Handle optional operands.  Raise an
	error if an .md pattern has the wrong number of operands for the
	pattern name.  Remove the names of unused operands from the prototype.
	* builtins.c (expand_builtin_apply): Use targetm functions
	instead of HAVE_call_value and GEN_CALL_VALUE.
	* calls.c (emit_call_1): Likewise.  Remove support for sibcall_pop
	and sibcall_value_pop.
	* config/aarch64/aarch64.md (untyped_call): Use gen_call instead
	of GEN_CALL.
	* config/alpha/alpha.md (untyped_call): Likewise.
	* config/iq2000/iq2000.md (untyped_call): Likewise.
	* config/m68k/m68k.md (untyped_call): Likewise.
	* config/mips/mips.md (untyped_call): Likewise.
	* config/pa/pa.md (untyped_call): Likewise.
	* config/rs6000/rs6000.md (untyped_call): Likewise.
	* config/sparc/sparc.md (untyped_call): Likewise.
	* config/tilegx/tilegx.md (untyped_call): Likewise.
	* config/tilepro/tilepro.md (untyped_call): Likewise.
	* config/visium/visium.md (untyped_call): Likewise.
	* config/alpha/alpha.c (alpha_emit_xfloating_libcall): Use
	gen_call_value instead of GEN_CALL_VALUE.
	* config/arm/arm.md (untyped_call): Likewise.
	* config/cr16/cr16.c (cr16_function_arg): Remove reference to
	GEN_CALL.

From-SVN: r227143
2015-08-24 17:59:51 +00:00
Richard Sandiford 72a35f9354 gensupport.c (sequence_num): Replace with...
gcc/
	* gensupport.c (sequence_num): Replace with...
	(insn_sequence_num, split_sequence_num, peephole2_sequence_num):
	...these new variables.
	(init_rtx_reader_args_cb): Update accordingly.
	(get_num_code_insns): Likewise.
	(read_md_rtx): Rework to use a while loop and get_c_test.
	Use the new counters.  Remove redundant DEFINE_SUBST case.
	* genoutput.c (gen_split): Delete.
	(main): Don't call it.

From-SVN: r226635
2015-08-05 15:47:31 +00:00
Richard Sandiford d1427a17a7 gensupport.h (get_c_test): Declare.
gcc/
	* gensupport.h (get_c_test): Declare.
	* gensupport.c (get_c_test): New function.
	* genconditions.c (main): Use it.
	* genrecog.c (validate_pattern): Likewise.
	(match_pattern_1): Likewise.  Remove c_test argument.
	(match_pattern): Update accordingly and remove c_test argument.
	(main): Update accordingly.

From-SVN: r226634
2015-08-05 15:46:02 +00:00
Richard Sandiford ba0ee63dfe gensupport.h (get_num_insn_codes): Declare.
gcc/
	* gensupport.h (get_num_insn_codes): Declare.
	* gensupport.c (get_num_insn_codes): New function.
	* genattrtab.c (optimize_attrs): Rename max_insn_code to
	num_insn_codes.
	(main): Likewise.  Use get_num_insn_codes.
	* gencodes.c (main): Remove "last" and use get_num_insn_codes.

From-SVN: r226633
2015-08-05 15:44:23 +00:00
Richard Sandiford 5d2d3e43b9 read-md.h (message_with_line, [...]): Delete.
gcc/
	* read-md.h (message_with_line, error_with_line): Delete.
	* read-md.c (message_with_line, error_with_line): Delete.
	* gensupport.h: Include read-md.h.
	(md_rtx_info): New structure.
	(read_md_rtx): Use it.  Return a bool success value.
	* gensupport.c (read_md_rtx): Likewise.
	* genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx.
	(main): Update after interface changes.
	* genattr.c (gen_attr): Take an md_rtx_info rather than an rtx.
	(main): Update after interface changes.
	* genattrtab.c (insn_code_number): Delete.
	(optimize_attrs): Add a max_insn_code parameter and use it instead
	of insn_code_number.
	(gen_attr): Take an md_rtx_info rather than an rtx and lineno.
	Use *_at rather than *_with_line functions.
	(gen_insn): Likewise.
	(gen_delay): Likewise.
	(gen_insn_reserv): Likewise.
	(gen_bypass): Take an md_rtx_info rather than an rtx.
	(main): Update after interface changes.  Use a local max_insn_code
	variable instead of insn_code_number.
	* genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than
	an rtx.  Use fatal_at rather than fatal.
	(gen_query_cpu_unit, gen_bypass, gen_excl_set)
	(gen_presence_absence_set, gen_presence_set, gen_final_presence_set)
	(gen_absence_set, gen_final_absence_set, gen_automaton)
	(gen_automata_option, gen_reserv, gen_insn_reserv): Likewise.
	(main): Update after interface changes.
	* gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx
	and code number.
	(main): Update after interface changes.
	* genconditions.c (main): Use new read_md_rtx interface.
	* genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx.
	(gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise.
	(main): Update after interface changes.
	* genemit.c (insn_code_number, insn_index_number): Delete.
	(gen_insn): Take an md_rtx_info rather than an rtx and lineno.
	Use fatal_at rather than fatal.
	(gen_expand): Take an md_rtx_info rather than an rtx.  Use fatal_at
	rather than fatal.
	(gen_split): Likewise.
	(main): Update after interface changes.
	* genextract.c (line_no): Delete.
	(gen_insn): Take an md_rtx_info rather than an rtx and lineno.
	Update call to walk_rtx.
	(VEC_safe_set_locstr): Add an md_rtx_info argument.  Use message_at
	rather than message_with_line.
	(walk_rtx): Add an md_rtx_info argument.  Update call to
	VEC_safe_set_locstr.
	(main): Update after interface changes.
	* genflags.c (gen_insn): Take an md_rtx_info rather than an rtx
	and lineno.  Use error_at rather than separate message_with_line
	calls and have_error assignments.
	(main): Update after interface changes.
	* genmddump.c (main): Use new read_md_rtx interface.
	* genopinit.c (insn): Take an md_rtx_info rather than an rtx.
	(main): Update after interface changes.
	* genoutput.c (next_code_number): Delete.
	(gen_insn): Take an md_rtx_info rather than an rtx and lineno.
	(gen_peephole, gen_expand, gen_split): Likewise.
	(note_constraint): Likewise.  Use *_at rather than *_with_line
	functions.
	(main): Update after interface changes.
	* genpeep.c (gen_peephole): Take an md_rtx_info rather than an
	rtx and lineno.
	(main): Update after interface changes.
	* genpreds.c (process_define_predicate): Take an md_rtx_info rather
	than an rtx and lineno.
	(process_define_constraint): Likewise.
	(process_define_register_constraint): Likewise.
	(main): Update after interface changes.
	* genrecog.c (next_insn_code, pattern_lineno): Delete.
	(validate_pattern): Replace top-level rtx with an md_rtx_info.
	Use *_at rather than *_with_line functions.
	(match_pattern_2): Likewise.
	(match_pattern_1, match_pattern): Add an md_rtx_info parameter.
	(get_peephole2_pattern): Take an md_rtx_info rather than an rtvec.
	Use *_at rather than *_with_line functions.
	* gentarget-def.c (add_insn): New function.
	(main): Use it.  Use new read_md_rtx interface.

From-SVN: r225883
2015-07-16 13:52:22 +00:00
Richard Sandiford c9f84f2e1d gensupport.h (compute_test_codes): Take a file_location rather than a line number.
gcc/
	* gensupport.h (compute_test_codes): Take a file_location rather
	than a line number.
	* gensupport.c (compute_test_codes): Likewise.  Use *_at functions
	rather than *_with_line functions.
	(process_define_predicate): Update call to compute_test_codes.
	* genpreds.c (validate_exp): Take a file_location rather than a
	line number.  Use *_at functions rather than *_with_line functions.
	(process_define_predicate): Update call to validate_exp.
	(constraint_data): Replace lineno field with a file_location.
	(add_constraint): Take a file_location rather than a line number.
	Use *_at functions rather than *_with_line functions.  Fix error
	message for address constraints.  Update after changes to
	validate_exp, constraint_data and compute_test_codes.
	(process_define_constraint): Update accordingly.
	(process_define_register_constraint): Likewise.

From-SVN: r225882
2015-07-16 13:50:08 +00:00
Richard Sandiford cc4726077d read-md.h (file_location): New structure.
gcc/
	* read-md.h (file_location): New structure.
	(directive_handler_t): Take a file_location rather than a line number.
	(message_at, error_at): Declare.
	(read_skip_construct): Delete.
	* read-md.c (message_with_line_1): Replace with...
	(message_at_1): ...this new function.
	(message_at, error_at): New functions.
	(message_with_line, error_with_line): Update to use message_at_1.
	(handle_enum): Take a file_location rather than a line number
	and use error_at for error reporting.
	(handle_include): Likewise.
	(read_skip_construct): Likewise.  Make static.
	(handle_file): Update after above changes.  Pass a file_location
	rather than a line number to handle_directive.
	* gensupport.c (queue_elem): Replace separate filename and lineno
	with a file_location.
	(queue_pattern): Replace filename and lineno arguments with a
	file_location.  Update after change to queue_elem.
	(process_define_predicate): Replace lineno argument with a
	file_location and use error_at for error reporting.  Update
	after above changes.
	(process_rtx): Likewise.
	(subst_pattern_match): Likewise.
	(get_alternatives_number): Likewise.
	(alter_predicate_for_insn): Likewise.
	(rtx_handle_directive): Likewise.
	(is_predicable): Update after above changes, using error_at rather
	than error_with_line.
	(has_subst_attribute): Likewise.
	(identify_predicable_attribute): Likewise.
	(alter_attrs_for_subst_insn): Likewise.
	(process_one_cond_exec): Likewise.
	(process_substs_on_one_elem): Likewise.
	(process_define_subst): Likewise.
	(check_define_attr_duplicates): Likewise.
	(read_md_rtx): Update after change to queue_elem.

From-SVN: r225879
2015-07-16 13:41:41 +00:00
Trevor Saunders 6b8068d653 remove some usage of expr_list from read_rtx
gcc/ChangeLog:

2015-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* gensupport.c (rtx_handle_directive): Adjust.
	* read-rtl.c (apply_iterators): Take vector to add rtxs to
	instead of expr list rtx.
	(add_define_attr_for_define_subst): Likewise.
	(add_define_subst_attr): Likewise.
	(read_subst_mapping): Likewise.
	(read_rtx): Likewise.
	* rtl.h (read_rtx): Adjust.

From-SVN: r225833
2015-07-15 14:38:13 +00:00
Richard Sandiford 9d8895c934 rtl.h (emit): Add an optional boolean parameter to control whether barriers are emitted.
gcc/
	* rtl.h (emit): Add an optional boolean parameter to control
	whether barriers are emitted.
	* emit-rtl.c (emit): Likewise.
	* gensupport.c (get_emit_function): Return null rather than "emit".
	* genemit.c (gen_emit_seq): Handle the null return value.
	Don't emit barriers after the final instruction in the sequence.
	* gentarget-def.c (main): Don't emit barriers after the instruction.

From-SVN: r225000
2015-06-26 10:06:56 +00:00
Richard Sandiford 3beaff21f3 rtl.h (classify_insn): Declare.
gcc/
	* rtl.h (classify_insn): Declare.
	* emit-rtl.c (classify_insn): Move to...
	* rtl.c: ...here and add generator support.
	* gensupport.h (get_emit_function, needs_barrier_p): Declare.
	* gensupport.c (get_emit_function, needs_barrier_p): New functions.
	* genemit.c (gen_emit_seq): New function.
	(gen_expand, gen_split): Use it.

From-SVN: r224470
2015-06-14 20:25:40 +00:00
Richard Sandiford 313d38e359 gensupport.h (add_implicit_parallel): Declare.
gcc/
	* gensupport.h (add_implicit_parallel): Declare.
	* genrecog.c (add_implicit_parallel): Move to...
	* gensupport.c (add_implicit_parallel): ...here.
	(process_one_cond_exec): Use it.
	* genemit.c (gen_insn): Likewise.

From-SVN: r224454
2015-06-13 09:48:35 +00:00
Andrew MacLeod 13fdf2e2d5 coretypes.h: Include hash-table.h and hash-set.h for host files.
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* coretypes.h: Include hash-table.h and hash-set.h for host files.
	* ggc.h: Don't include statistics.h>
	* hash-map.h: Remove all includes.
	* hash-set.h: Likewise.
	* hash-table.h: Add statistics.h, inchash.h and hash-map-traits.h to
	the include list. Remove <new>.
	* inchash.h: Remove all includes.
	* mem-stats.h: Likewise.
	* vec.h: No special processing for generators or ggc.  
	* alias.c : Adjust include files.
	* alloc-pool.c : Likewise.
	* alloc-pool.h : Likewise.
	* asan.c : Likewise.
	* attribs.c : Likewise.
	* auto-inc-dec.c : Likewise.
	* auto-profile.c : Likewise.
	* bb-reorder.c : Likewise.
	* bitmap.c : Likewise.
	* bitmap.h : Likewise.
	* bt-load.c : Likewise.
	* builtins.c : Likewise.
	* caller-save.c : Likewise.
	* calls.c : Likewise.
	* ccmp.c : Likewise.
	* cfg.c : Likewise.
	* cfganal.c : Likewise.
	* cfgbuild.c : Likewise.
	* cfgcleanup.c : Likewise.
	* cfgexpand.c : Likewise.
	* cfghooks.c : Likewise.
	* cfgloop.c : Likewise.
	* cfgloop.h : Likewise.
	* cfgloopanal.c : Likewise.
	* cfgloopmanip.c : Likewise.
	* cfgrtl.c : Likewise.
	* cgraph.c : Likewise.
	* cgraphbuild.c : Likewise.
	* cgraphclones.c : Likewise.
	* cgraphunit.c : Likewise.
	* cilk-common.c : Likewise.
	* combine-stack-adj.c : Likewise.
	* combine.c : Likewise.
	* compare-elim.c : Likewise.
	* context.c : Likewise.
	* convert.c : Likewise.
	* coverage.c : Likewise.
	* cppbuiltin.c : Likewise.
	* cprop.c : Likewise.
	* cse.c : Likewise.
	* cselib.c : Likewise.
	* data-streamer-in.c : Likewise.
	* data-streamer-out.c : Likewise.
	* data-streamer.c : Likewise.
	* data-streamer.h : Likewise.
	* dbxout.c : Likewise.
	* dce.c : Likewise.
	* ddg.c : Likewise.
	* debug.c : Likewise.
	* df-core.c : Likewise.
	* df-problems.c : Likewise.
	* df-scan.c : Likewise.
	* df.h : Likewise.
	* dfp.c : Likewise.
	* dojump.c : Likewise.
	* dominance.c : Likewise.
	* domwalk.c : Likewise.
	* double-int.c : Likewise.
	* dse.c : Likewise.
	* dumpfile.c : Likewise.
	* dwarf2asm.c : Likewise.
	* dwarf2cfi.c : Likewise.
	* dwarf2out.c : Likewise.
	* emit-rtl.c : Likewise.
	* et-forest.c : Likewise.
	* except.c : Likewise.
	* except.h : Likewise.
	* explow.c : Likewise.
	* expmed.c : Likewise.
	* expr.c : Likewise.
	* final.c : Likewise.
	* fixed-value.c : Likewise.
	* fold-const.c : Likewise.
	* function.c : Likewise.
	* fwprop.c : Likewise.
	* gcc-plugin.h : Likewise.
	* gcc.c : Likewise.
	* gcse-common.c : Likewise.
	* gcse.c : Likewise.
	* genattrtab.c : Likewise.
	* genautomata.c : Likewise.
	* genconditions.c : Likewise.
	* genemit.c : Likewise.
	* generic-match-head.c : Likewise.
	* genextract.c : Likewise.
	* gengtype-state.c : Likewise.
	* gengtype.c : Likewise.
	* genhooks.c : Likewise.
	* genmatch.c : Likewise.
	* genmodes.c : Likewise.
	* genrecog.c : Likewise.
	* gensupport.c : Likewise.
	* ggc-common.c : Likewise.
	* ggc-internal.h : Likewise.
	* ggc-none.c : Likewise.
	* ggc-page.c : Likewise.
	* gimple-builder.c : Likewise.
	* gimple-expr.c : Likewise.
	* gimple-fold.c : Likewise.
	* gimple-iterator.c : Likewise.
	* gimple-low.c : Likewise.
	* gimple-match-head.c : Likewise.
	* gimple-pretty-print.c : Likewise.
	* gimple-ssa-isolate-paths.c : Likewise.
	* gimple-ssa-strength-reduction.c : Likewise.
	* gimple-ssa.h : Likewise.
	* gimple-streamer-in.c : Likewise.
	* gimple-streamer-out.c : Likewise.
	* gimple-streamer.h : Likewise.
	* gimple-walk.c : Likewise.
	* gimple.c : Likewise.
	* gimplify-me.c : Likewise.
	* gimplify.c : Likewise.
	* godump.c : Likewise.
	* graph.c : Likewise.
	* graphds.c : Likewise.
	* graphite-blocking.c : Likewise.
	* graphite-dependences.c : Likewise.
	* graphite-interchange.c : Likewise.
	* graphite-isl-ast-to-gimple.c : Likewise.
	* graphite-optimize-isl.c : Likewise.
	* graphite-poly.c : Likewise.
	* graphite-scop-detection.c : Likewise.
	* graphite-sese-to-poly.c : Likewise.
	* graphite.c : Likewise.
	* haifa-sched.c : Likewise.
	* hard-reg-set.h : Likewise.
	* hw-doloop.c : Likewise.
	* ifcvt.c : Likewise.
	* inchash.c : Likewise.
	* incpath.c : Likewise.
	* init-regs.c : Likewise.
	* input.c : Likewise.
	* internal-fn.c : Likewise.
	* ipa-chkp.c : Likewise.
	* ipa-comdats.c : Likewise.
	* ipa-cp.c : Likewise.
	* ipa-devirt.c : Likewise.
	* ipa-icf-gimple.c : Likewise.
	* ipa-icf.c : Likewise.
	* ipa-inline-analysis.c : Likewise.
	* ipa-inline-transform.c : Likewise.
	* ipa-inline.c : Likewise.
	* ipa-polymorphic-call.c : Likewise.
	* ipa-profile.c : Likewise.
	* ipa-prop.c : Likewise.
	* ipa-pure-const.c : Likewise.
	* ipa-ref.c : Likewise.
	* ipa-reference.c : Likewise.
	* ipa-split.c : Likewise.
	* ipa-utils.c : Likewise.
	* ipa-visibility.c : Likewise.
	* ipa.c : Likewise.
	* ira-build.c : Likewise.
	* ira-color.c : Likewise.
	* ira-conflicts.c : Likewise.
	* ira-costs.c : Likewise.
	* ira-emit.c : Likewise.
	* ira-lives.c : Likewise.
	* ira.c : Likewise.
	* jump.c : Likewise.
	* langhooks.c : Likewise.
	* lcm.c : Likewise.
	* libfuncs.h : Likewise.
	* lists.c : Likewise.
	* loop-doloop.c : Likewise.
	* loop-init.c : Likewise.
	* loop-invariant.c : Likewise.
	* loop-iv.c : Likewise.
	* loop-unroll.c : Likewise.
	* lower-subreg.c : Likewise.
	* lra-assigns.c : Likewise.
	* lra-coalesce.c : Likewise.
	* lra-constraints.c : Likewise.
	* lra-eliminations.c : Likewise.
	* lra-lives.c : Likewise.
	* lra-remat.c : Likewise.
	* lra-spills.c : Likewise.
	* lra.c : Likewise.
	* lto-cgraph.c : Likewise.
	* lto-compress.c : Likewise.
	* lto-opts.c : Likewise.
	* lto-section-in.c : Likewise.
	* lto-section-out.c : Likewise.
	* lto-streamer-in.c : Likewise.
	* lto-streamer-out.c : Likewise.
	* lto-streamer.c : Likewise.
	* lto-streamer.h : Likewise.
	* mcf.c : Likewise.
	* mode-switching.c : Likewise.
	* modulo-sched.c : Likewise.
	* omega.c : Likewise.
	* omp-low.c : Likewise.
	* optabs.c : Likewise.
	* opts-global.c : Likewise.
	* opts.h : Likewise.
	* passes.c : Likewise.
	* plugin.c : Likewise.
	* postreload-gcse.c : Likewise.
	* postreload.c : Likewise.
	* predict.c : Likewise.
	* print-rtl.c : Likewise.
	* print-tree.c : Likewise.
	* profile.c : Likewise.
	* read-md.c : Likewise.
	* read-md.h : Likewise.
	* read-rtl.c : Likewise.
	* real.c : Likewise.
	* realmpfr.c : Likewise.
	* recog.c : Likewise.
	* ree.c : Likewise.
	* reg-stack.c : Likewise.
	* regcprop.c : Likewise.
	* reginfo.c : Likewise.
	* regrename.c : Likewise.
	* regstat.c : Likewise.
	* reload.c : Likewise.
	* reload1.c : Likewise.
	* reorg.c : Likewise.
	* resource.c : Likewise.
	* rtl-chkp.c : Likewise.
	* rtl.c : Likewise.
	* rtl.h : Likewise.
	* rtlanal.c : Likewise.
	* rtlhash.c : Likewise.
	* rtlhash.h : Likewise.
	* rtlhooks.c : Likewise.
	* sanopt.c : Likewise.
	* sched-deps.c : Likewise.
	* sched-ebb.c : Likewise.
	* sched-rgn.c : Likewise.
	* sched-vis.c : Likewise.
	* sdbout.c : Likewise.
	* sel-sched-dump.c : Likewise.
	* sel-sched-ir.c : Likewise.
	* sel-sched-ir.h : Likewise.
	* sel-sched.c : Likewise.
	* sese.c : Likewise.
	* shrink-wrap.c : Likewise.
	* shrink-wrap.h : Likewise.
	* simplify-rtx.c : Likewise.
	* stack-ptr-mod.c : Likewise.
	* statistics.c : Likewise.
	* stmt.c : Likewise.
	* stor-layout.c : Likewise.
	* store-motion.c : Likewise.
	* stringpool.c : Likewise.
	* symtab.c : Likewise.
	* target-globals.c : Likewise.
	* targhooks.c : Likewise.
	* tlink.c : Likewise.
	* toplev.c : Likewise.
	* tracer.c : Likewise.
	* trans-mem.c : Likewise.
	* tree-affine.c : Likewise.
	* tree-affine.h : Likewise.
	* tree-browser.c : Likewise.
	* tree-call-cdce.c : Likewise.
	* tree-cfg.c : Likewise.
	* tree-cfgcleanup.c : Likewise.
	* tree-chkp-opt.c : Likewise.
	* tree-chkp.c : Likewise.
	* tree-chrec.c : Likewise.
	* tree-complex.c : Likewise.
	* tree-data-ref.c : Likewise.
	* tree-dfa.c : Likewise.
	* tree-diagnostic.c : Likewise.
	* tree-dump.c : Likewise.
	* tree-eh.c : Likewise.
	* tree-eh.h : Likewise.
	* tree-emutls.c : Likewise.
	* tree-hasher.h : Likewise.
	* tree-if-conv.c : Likewise.
	* tree-inline.c : Likewise.
	* tree-inline.h : Likewise.
	* tree-into-ssa.c : Likewise.
	* tree-iterator.c : Likewise.
	* tree-loop-distribution.c : Likewise.
	* tree-nested.c : Likewise.
	* tree-nrv.c : Likewise.
	* tree-object-size.c : Likewise.
	* tree-outof-ssa.c : Likewise.
	* tree-parloops.c : Likewise.
	* tree-phinodes.c : Likewise.
	* tree-predcom.c : Likewise.
	* tree-pretty-print.c : Likewise.
	* tree-profile.c : Likewise.
	* tree-scalar-evolution.c : Likewise.
	* tree-sra.c : Likewise.
	* tree-ssa-address.c : Likewise.
	* tree-ssa-alias.c : Likewise.
	* tree-ssa-ccp.c : Likewise.
	* tree-ssa-coalesce.c : Likewise.
	* tree-ssa-copy.c : Likewise.
	* tree-ssa-copyrename.c : Likewise.
	* tree-ssa-dce.c : Likewise.
	* tree-ssa-dom.c : Likewise.
	* tree-ssa-dse.c : Likewise.
	* tree-ssa-forwprop.c : Likewise.
	* tree-ssa-ifcombine.c : Likewise.
	* tree-ssa-live.c : Likewise.
	* tree-ssa-loop-ch.c : Likewise.
	* tree-ssa-loop-im.c : Likewise.
	* tree-ssa-loop-ivcanon.c : Likewise.
	* tree-ssa-loop-ivopts.c : Likewise.
	* tree-ssa-loop-manip.c : Likewise.
	* tree-ssa-loop-niter.c : Likewise.
	* tree-ssa-loop-prefetch.c : Likewise.
	* tree-ssa-loop-unswitch.c : Likewise.
	* tree-ssa-loop.c : Likewise.
	* tree-ssa-math-opts.c : Likewise.
	* tree-ssa-operands.c : Likewise.
	* tree-ssa-phiopt.c : Likewise.
	* tree-ssa-phiprop.c : Likewise.
	* tree-ssa-pre.c : Likewise.
	* tree-ssa-propagate.c : Likewise.
	* tree-ssa-reassoc.c : Likewise.
	* tree-ssa-sccvn.c : Likewise.
	* tree-ssa-scopedtables.c : Likewise.
	* tree-ssa-sink.c : Likewise.
	* tree-ssa-strlen.c : Likewise.
	* tree-ssa-structalias.c : Likewise.
	* tree-ssa-tail-merge.c : Likewise.
	* tree-ssa-ter.c : Likewise.
	* tree-ssa-threadedge.c : Likewise.
	* tree-ssa-threadupdate.c : Likewise.
	* tree-ssa-uncprop.c : Likewise.
	* tree-ssa-uninit.c : Likewise.
	* tree-ssa.c : Likewise.
	* tree-ssanames.c : Likewise.
	* tree-stdarg.c : Likewise.
	* tree-streamer-in.c : Likewise.
	* tree-streamer-out.c : Likewise.
	* tree-streamer.c : Likewise.
	* tree-streamer.h : Likewise.
	* tree-switch-conversion.c : Likewise.
	* tree-tailcall.c : Likewise.
	* tree-vect-data-refs.c : Likewise.
	* tree-vect-generic.c : Likewise.
	* tree-vect-loop-manip.c : Likewise.
	* tree-vect-loop.c : Likewise.
	* tree-vect-patterns.c : Likewise.
	* tree-vect-slp.c : Likewise.
	* tree-vect-stmts.c : Likewise.
	* tree-vectorizer.c : Likewise.
	* tree-vectorizer.h : Likewise.
	* tree-vrp.c : Likewise.
	* tree.c : Likewise.
	* tsan.c : Likewise.
	* ubsan.c : Likewise.
	* valtrack.c : Likewise.
	* valtrack.h : Likewise.
	* value-prof.c : Likewise.
	* var-tracking.c : Likewise.
	* varasm.c : Likewise.
	* varpool.c : Likewise.
	* vec.c: Likewise.
	* vmsdbgout.c : Likewise.
	* vtable-verify.c : Likewise.
	* vtable-verify.h : Likewise.
	* web.c : Likewise.
	* wide-int.cc : Likewise.
	* xcoffout.c : Likewise.
	* config/aarch64/aarch64-builtins.c : Likewise.
	* config/aarch64/aarch64.c : Likewise.
	* config/aarch64/cortex-a57-fma-steering.c : Likewise.
	* config/alpha/alpha.c : Likewise.
	* config/arc/arc.c : Likewise.
	* config/arm/aarch-common.c : Likewise.
	* config/arm/arm-builtins.c : Likewise.
	* config/arm/arm-c.c : Likewise.
	* config/arm/arm.c : Likewise.
	* config/avr/avr-c.c : Likewise.
	* config/avr/avr-log.c : Likewise.
	* config/avr/avr.c : Likewise.
	* config/bfin/bfin.c : Likewise.
	* config/c6x/c6x.c : Likewise.
	* config/cr16/cr16.c : Likewise.
	* config/cris/cris.c : Likewise.
	* config/darwin-c.c : Likewise.
	* config/darwin.c : Likewise.
	* config/default-c.c : Likewise.
	* config/epiphany/epiphany.c : Likewise.
	* config/epiphany/mode-switch-use.c : Likewise.
	* config/epiphany/resolve-sw-modes.c : Likewise.
	* config/fr30/fr30.c : Likewise.
	* config/frv/frv.c : Likewise.
	* config/ft32/ft32.c : Likewise.
	* config/glibc-c.c : Likewise.
	* config/h8300/h8300.c : Likewise.
	* config/i386/i386-c.c : Likewise.
	* config/i386/i386.c : Likewise.
	* config/i386/msformat-c.c : Likewise.
	* config/i386/winnt-cxx.c : Likewise.
	* config/i386/winnt-stubs.c : Likewise.
	* config/i386/winnt.c : Likewise.
	* config/ia64/ia64-c.c : Likewise.
	* config/ia64/ia64.c : Likewise.
	* config/iq2000/iq2000.c : Likewise.
	* config/lm32/lm32.c : Likewise.
	* config/m32c/m32c-pragma.c : Likewise.
	* config/m32c/m32c.c : Likewise.
	* config/m32r/m32r.c : Likewise.
	* config/m68k/m68k.c : Likewise.
	* config/mcore/mcore.c : Likewise.
	* config/mep/mep-pragma.c : Likewise.
	* config/mep/mep.c : Likewise.
	* config/microblaze/microblaze-c.c : Likewise.
	* config/microblaze/microblaze.c : Likewise.
	* config/mips/mips.c : Likewise.
	* config/mmix/mmix.c : Likewise.
	* config/mn10300/mn10300.c : Likewise.
	* config/moxie/moxie.c : Likewise.
	* config/msp430/msp430-c.c : Likewise.
	* config/msp430/msp430.c : Likewise.
	* config/nds32/nds32-cost.c : Likewise.
	* config/nds32/nds32-fp-as-gp.c : Likewise.
	* config/nds32/nds32-intrinsic.c : Likewise.
	* config/nds32/nds32-isr.c : Likewise.
	* config/nds32/nds32-md-auxiliary.c : Likewise.
	* config/nds32/nds32-memory-manipulation.c : Likewise.
	* config/nds32/nds32-pipelines-auxiliary.c : Likewise.
	* config/nds32/nds32-predicates.c : Likewise.
	* config/nds32/nds32.c : Likewise.
	* config/nios2/nios2.c : Likewise.
	* config/nvptx/nvptx.c : Likewise.
	* config/pa/pa.c : Likewise.
	* config/pdp11/pdp11.c : Likewise.
	* config/rl78/rl78-c.c : Likewise.
	* config/rl78/rl78.c : Likewise.
	* config/rs6000/rs6000-c.c : Likewise.
	* config/rs6000/rs6000.c : Likewise.
	* config/rx/rx.c : Likewise.
	* config/s390/s390-c.c : Likewise.
	* config/s390/s390.c : Likewise.
	* config/sh/sh-c.c : Likewise.
	* config/sh/sh-mem.cc : Likewise.
	* config/sh/sh.c : Likewise.
	* config/sh/sh_optimize_sett_clrt.cc : Likewise.
	* config/sh/sh_treg_combine.cc : Likewise.
	* config/sol2-c.c : Likewise.
	* config/sol2-cxx.c : Likewise.
	* config/sol2-stubs.c : Likewise.
	* config/sol2.c : Likewise.
	* config/sparc/sparc-c.c : Likewise.
	* config/sparc/sparc.c : Likewise.
	* config/spu/spu-c.c : Likewise.
	* config/spu/spu.c : Likewise.
	* config/stormy16/stormy16.c : Likewise.
	* config/tilegx/mul-tables.c : Likewise.
	* config/tilegx/tilegx-c.c : Likewise.
	* config/tilegx/tilegx.c : Likewise.
	* config/tilepro/mul-tables.c : Likewise.
	* config/tilepro/tilepro-c.c : Likewise.
	* config/tilepro/tilepro.c : Likewise.
	* config/v850/v850-c.c : Likewise.
	* config/v850/v850.c : Likewise.
	* config/vax/vax.c : Likewise.
	* config/visium/visium.c : Likewise.
	* config/vms/vms-c.c : Likewise.
	* config/vms/vms.c : Likewise.
	* config/vxworks.c : Likewise.
	* config/winnt-c.c : Likewise.
	* config/xtensa/xtensa.c : Likewise.

ada
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* gcc-interface/cuintp.c : Adjust include files.
	* gcc-interface/decl.c : Likewise.
	* gcc-interface/misc.c : Likewise.
	* gcc-interface/targtyps.c : Likewise.
	* gcc-interface/trans.c : Likewise.
	* gcc-interface/utils.c : Likewise.
	* gcc-interface/utils2.c : Likewise.
	
c
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* c-array-notation.c : Adjust include files.
	* c-aux-info.c : Likewise.
	* c-convert.c : Likewise.
	* c-decl.c : Likewise.
	* c-errors.c : Likewise.
	* c-lang.c : Likewise.
	* c-lang.h : Likewise.
	* c-objc-common.c : Likewise.
	* c-parser.c : Likewise.
	* c-typeck.c : Likewise.

cfamily
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* array-notation-common.c : Adjust include files.
	* c-ada-spec.c : Likewise.
	* c-cilkplus.c : Likewise.
	* c-common.c : Likewise.
	* c-common.h : Likewise.
	* c-cppbuiltin.c : Likewise.
	* c-dump.c : Likewise.
	* c-format.c : Likewise.
	* c-gimplify.c : Likewise.
	* c-indentation.c : Likewise.
	* c-lex.c : Likewise.
	* c-omp.c : Likewise.
	* c-opts.c : Likewise.
	* c-pch.c : Likewise.
	* c-ppoutput.c : Likewise.
	* c-pragma.c : Likewise.
	* c-pretty-print.c : Likewise.
	* c-semantics.c : Likewise.
	* c-ubsan.c : Likewise.
	* cilk.c : Likewise.
	* stub-objc.c : Likewise.

cp
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* call.c : Adjust include files.
	* class.c : Likewise.
	* constexpr.c : Likewise.
	* cp-array-notation.c : Likewise.
	* cp-cilkplus.c : Likewise.
	* cp-gimplify.c : Likewise.
	* cp-lang.c : Likewise.
	* cp-objcp-common.c : Likewise.
	* cp-tree.h : Likewise.
	* cp-ubsan.c : Likewise.
	* cvt.c : Likewise.
	* decl.c : Likewise.
	* decl2.c : Likewise.
	* dump.c : Likewise.
	* error.c : Likewise.
	* except.c : Likewise.
	* expr.c : Likewise.
	* friend.c : Likewise.
	* init.c : Likewise.
	* lambda.c : Likewise.
	* lex.c : Likewise.
	* mangle.c : Likewise.
	* method.c : Likewise.
	* name-lookup.c : Likewise.
	* optimize.c : Likewise.
	* parser.c : Likewise.
	* pt.c : Likewise.
	* ptree.c : Likewise.
	* repo.c : Likewise.
	* rtti.c : Likewise.
	* search.c : Likewise.
	* semantics.c : Likewise.
	* tree.c : Likewise.
	* typeck.c : Likewise.
	* typeck2.c : Likewise.
	* vtable-class-hierarchy.c : Likewise.

fortran
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* convert.c : Adjust include files.
	* cpp.c : Likewise.
	* decl.c : Likewise.
	* f95-lang.c : Likewise.
	* gfortran.h : Likewise.
	* iresolve.c : Likewise.
	* match.c : Likewise.
	* module.c : Likewise.
	* openmp.c : Likewise.
	* options.c : Likewise.
	* target-memory.c : Likewise.
	* trans-array.c : Likewise.
	* trans-common.c : Likewise.
	* trans-const.c : Likewise.
	* trans-decl.c : Likewise.
	* trans-expr.c : Likewise.
	* trans-intrinsic.c : Likewise.
	* trans-io.c : Likewise.
	* trans-openmp.c : Likewise.
	* trans-stmt.c : Likewise.
	* trans-types.c : Likewise.
	* trans.c : Likewise.


go
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* go-backend.c : Adjust include files.
	* go-gcc.cc : Likewise.
	* go-lang.c : Likewise.

java
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* boehm.c : Adjust include files.
	* builtins.c : Likewise.
	* class.c : Likewise.
	* constants.c : Likewise.
	* decl.c : Likewise.
	* except.c : Likewise.
	* expr.c : Likewise.
	* java-gimplify.c : Likewise.
	* java-tree.h : Likewise.
	* jcf-dump.c : Likewise.
	* jcf-io.c : Likewise.
	* jcf-parse.c : Likewise.
	* jcf-reader.c : Likewise.
	* jvgenmain.c : Likewise.
	* lang.c : Likewise.
	* mangle.c : Likewise.
	* mangle_name.c : Likewise.
	* resource.c : Likewise.
	* typeck.c : Likewise.
	* verify-glue.c : Likewise.
	* verify-impl.c : Likewise.

jit
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* dummy-frontend.c : Adjust include files.
	* jit-common.h : Likewise.
	* jit-playback.c : Likewise.

lto
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* lto-lang.c : Adjust include files.
	* lto-object.c : Likewise.
	* lto-partition.c : Likewise.
	* lto-partition.h : Likewise.
	* lto-symtab.c : Likewise.
	* lto.c : Likewise.
	* lto.h : Likewise.

objc
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* objc-act.c : Adjust include files.
	* objc-encoding.c : Likewise.
	* objc-gnu-runtime-abi-01.c : Likewise.
	* objc-lang.c : Likewise.
	* objc-map.c : Likewise.
	* objc-next-runtime-abi-01.c : Likewise.
	* objc-next-runtime-abi-02.c : Likewise.
	* objc-runtime-shared-support.c : Likewise.

objcp
2015-06-08  Andrew MacLeod  <amacleod@redhat.com>

	* objcp-decl.c : Adjust include files.
	* objcp-lang.c : Likewise.

From-SVN: r224250
2015-06-08 21:06:50 +00:00
Richard Sandiford 851ee5f43c gensupport.h (compute_test_codes): Declare.
gcc/
	* gensupport.h (compute_test_codes): Declare.
	* gensupport.c (compute_predicate_codes): Rename to...
	(compute_test_codes): ...this.  Generalize error message.
	(process_define_predicate): Update accordingly.
	* genpreds.c (compute_maybe_allows): Delete.
	(add_constraint): Use compute_test_codes to determine whether
	something can accept a SUBREG, REG or MEM.

From-SVN: r223687
2015-05-26 11:01:42 +00:00
Richard Sandiford 9fccb33594 rtl.def (REG): Change format to "r".
gcc/
	* rtl.def (REG): Change format to "r".
	* rtl.h (rtunion): Remove rt_reg.
	(reg_info): New structure.
	(rtx_def): Add reg field to main union.
	(X0REGATTR): Delete.
	(REG_CHECK): New macro.
	(SET_REGNO_RAW, rhs_regno, REG_ATTRS): Use it.
	* rtl.c (rtx_format): Document "r".
	(rtx_code_size): Handle REG specially.
	* gengenrtl.c (special_format): Return true for formats
	that include 'r'.
	* gengtype.c (adjust_field_rtx_def): Handle 'r' fields.
	Deal with REG_ATTRS after the field loop.
	* emit-rtl.c (gen_raw_REG): Call rtx_alloc_stat directly.
	* expmed.c (init_expmed): Call gen_raw_REG instead of
	gen_rtx_raw_REG.
	* expr.c (init_expr_target): Likewise.
	* regcprop.c (maybe_mode_change): Likewise.
	* varasm.c (make_decl_rtl): Likewise.
	* final.c (leaf_renumber_regs_insn): Return early after
	handling REGs.
	* genemit.c (gen_exp): Handle 'r' fields.
	* genpeep.c (match_rtx): Likewise.
	* gensupport.c (subst_pattern_match): Likewise.
	(get_alternatives_number, collect_insn_data, alter_predicate_for_insn)
	(alter_constraints, subst_dup): Likewise.
	* read-rtl.c (read_rtx_code): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* genrecog.c (find_operand, find_matching_operand): Likewise.
	(validate_pattern, match_pattern_2): Likewise.
	(parameter::UINT, rtx_test::REGNO_FIELD): New enum values.
	(rtx_test::regno_field): New function.
	(operator ==, safe_to_hoist_p, transition_parameter_type)
	(parameter_type_string, print_parameter_value)
	(print_nonbool_test, print_test): Handle new enum values.
	* cselib.c (rtx_equal_for_cselib_1): Handle REG specially.
	* lra-constraints.c (operands_match_p): Likewise.

From-SVN: r223339
2015-05-19 07:09:42 +00:00
David Malcolm 21c0a521e4 Fix indentation issues seen by -Wmisleading-indentation
gcc/ChangeLog:
	* auto-profile.c (afdo_find_equiv_class): Fix indentation so
	that it reflects the block structure.
	(afdo_propagate_edge): Likewise.
	(afdo_calculate_branch_prob): Likewise.
	(afdo_annotate_cfg): Likewise.
	* cfgcleanup.c (equal_different_set_p): Likewise.
	(try_crossjump_to_edge): Likewise.
	* cgraph.c (cgraph_node::verify_node): Likewise.
	* cgraphunit.c (expand_all_functions): Likewise.
	* config/i386/i386.c (ix86_expand_copysign): Likewise.
	(exact_dependency_1): Likewise.
	* dwarf2asm.c (dw2_output_indirect_constants): Likewise.
	* dwarf2out.c (tree_add_const_value_attribute_for_decl): Likewise.
	* gensupport.c (process_define_subst): Likewise.
	* lto-wrapper.c (merge_and_complain): Likewise.
	* tree-if-conv.c (if_convertible_bb_p): Likewise.
	* tree-ssa-loop-prefetch.c (find_or_create_group): Likewise.
	* tree-ssa-tail-merge.c (gsi_advance_fw_nondebug_nonlocal): Likewise.
	* tree-vect-data-refs.c (vect_grouped_load_supported): Likewise.
	* tree-vect-loop.c (vectorizable_reduction): Likewise.
	* tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
	* tree-vect-stmts.c (vectorizable_shift): Likewise.
	* tree-vrp.c (vrp_finalize): Likewise.
	* tree.c (variably_modified_type_p): Likewise.

gcc/cp/ChangeLog:
	* parser.c (cp_parser_asm_definition): Only test for
        error_mark_node if "outputs" was just set.
	(cp_parser_asm_definition): Likewise for "inputs".

gcc/fortran/ChangeLog:
	* expr.c (check_inquiry): Fix indentation so that it reflects the
	block structure.
	* interface.c (compare_parameter): Likewise.
	* parse.c (parse_oacc_structured_block): Likewise.
	* target-memory.c (expr_to_char): Likewise.
	* trans-types.c (gfc_init_kinds): Likewise.

libcpp/ChangeLog:
	* pch.c (cpp_valid_state): Fix indentation so that it reflects the
	block structure.

From-SVN: r222823
2015-05-05 19:41:11 +00:00
Richard Sandiford 0060d7d71e gensupport.c (std_preds): Add missing codes to address_operand entry.
gcc/
	* gensupport.c (std_preds): Add missing codes to address_operand entry.

From-SVN: r222511
2015-04-28 07:46:40 +00:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Richard Sandiford ef4bddc299 decl.c, [...]: Remove redundant enum from machine_mode.
gcc/ada/
	* gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
	gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
	Remove redundant enum from machine_mode.

gcc/c-family/
	* c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
	enum from machine_mode.

gcc/c/
	* c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
	machine_mode.

gcc/cp/
	* constexpr.c: Remove redundant enum from machine_mode.

gcc/fortran/
	* trans-types.c, trans-types.h: Remove redundant enum from
	machine_mode.

gcc/go/
	* go-lang.c: Remove redundant enum from machine_mode.

gcc/java/
	* builtins.c, java-tree.h, typeck.c: Remove redundant enum from
	machine_mode.

gcc/lto/
	* lto-lang.c: Remove redundant enum from machine_mode.

gcc/
	* addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c,
	builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h,
	cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c,
	config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md,
	config/aarch64/aarch64.c, config/aarch64/aarch64.h,
	config/aarch64/aarch64.md, config/alpha/alpha-protos.h,
	config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c,
	config/arc/arc.h, config/arc/predicates.md,
	config/arm/aarch-common-protos.h, config/arm/aarch-common.c,
	config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h,
	config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md,
	config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c,
	config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c,
	config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md,
	config/cr16/cr16-protos.h, config/cr16/cr16.c,
	config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md,
	config/darwin-protos.h, config/darwin.c,
	config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c,
	config/epiphany/epiphany.md, config/fr30/fr30.c,
	config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md,
	config/h8300/h8300-protos.h, config/h8300/h8300.c,
	config/i386/i386-builtin-types.awk, config/i386/i386-protos.h,
	config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md,
	config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h,
	config/ia64/ia64.c, config/iq2000/iq2000-protos.h,
	config/iq2000/iq2000.c, config/iq2000/iq2000.md,
	config/lm32/lm32-protos.h, config/lm32/lm32.c,
	config/m32c/m32c-protos.h, config/m32c/m32c.c,
	config/m32r/m32r-protos.h, config/m32r/m32r.c,
	config/m68k/m68k-protos.h, config/m68k/m68k.c,
	config/mcore/mcore-protos.h, config/mcore/mcore.c,
	config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c,
	config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c,
	config/mips/mips-protos.h, config/mips/mips.c,
	config/mmix/mmix-protos.h, config/mmix/mmix.c,
	config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c,
	config/moxie/moxie.c, config/msp430/msp430-protos.h,
	config/msp430/msp430.c, config/nds32/nds32-cost.c,
	config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c,
	config/nds32/nds32-protos.h, config/nds32/nds32.c,
	config/nios2/nios2-protos.h, config/nios2/nios2.c,
	config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h,
	config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c,
	config/rs6000/altivec.md, config/rs6000/rs6000-c.c,
	config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
	config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c,
	config/s390/predicates.md, config/s390/s390-protos.h,
	config/s390/s390.c, config/s390/s390.h, config/s390/s390.md,
	config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c,
	config/sh/sh.md, config/sparc/predicates.md,
	config/sparc/sparc-protos.h, config/sparc/sparc.c,
	config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c,
	config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
	config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c,
	config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h,
	config/tilepro/tilepro.c, config/v850/v850-protos.h,
	config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h,
	config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h,
	config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h,
	dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi,
	doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c,
	dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h,
	except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c,
	fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h,
	fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c,
	genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c,
	graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c,
	internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c,
	ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h,
	libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c,
	loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c,
	lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c,
	lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h,
	output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h,
	recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c,
	regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h,
	rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c,
	sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c,
	simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def,
	targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c,
	tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c,
	tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c,
	tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c,
	tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c,
	tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c,
	tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c,
	tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c,
	tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c,
	tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c,
	var-tracking.c, varasm.c: Remove redundant enum from
	machine_mode.
gcc/
	* gengtype.c (main): Treat machine_mode as a scalar typedef.
	* genmodes.c (emit_insn_modes_h): Hide inline functions if
	USED_FOR_TARGET.

From-SVN: r216834
2014-10-29 12:02:45 +00:00
Kenneth Zadeck 807e902eea Merge in wide-int.
From-SVN: r210113
2014-05-06 16:25:05 +00:00
Richard Sandiford 23a5b65a92 Update copyright years in gcc/
From-SVN: r206289
2014-01-02 22:23:26 +00:00
Andreas Krebbel 5db40447b8 re PR target/57377 (compiler cannot be built with RTL checking)
2013-10-10  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	PR target/57377
	* gensupport.c (gen_mnemonic_attr): Handle (set (attr x) y) and
	(set_attr_alternative x ...) when searching for user defined
	mnemonic attribute.

From-SVN: r203353
2013-10-10 12:01:23 +00:00
Richard Sandiford c328471880 alloc-pool.c, [...]: Add missing whitespace before "(".
gcc/
	* alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c,
	bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c,
	cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c,
	cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c,
	combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h,
	cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c,
	df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c,
	dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c,
	errors.c, except.c, expmed.c, expr.c, file-find.c, final.c,
	fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c,
	gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c,
	genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c,
	genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c,
	genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c,
	gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c,
	gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c,
	gimple.h, godump.c, graphite-clast-to-gimple.c,
	graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c,
	graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c,
	hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h,
	ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c,
	ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c,
	ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c,
	loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c,
	lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c,
	mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c,
	pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c,
	predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c,
	profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c,
	regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c,
	reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c,
	sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c,
	statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h,
	system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c,
	tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c,
	tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h,
	tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c,
	tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c,
	tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c,
	tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c,
	tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c,
	tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c,
	tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c,
	tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c,
	tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c,
	tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
	tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c,
	tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c,
	tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
	tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c,
	tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c,
	tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c,
	tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c,
	tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c,
	varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing
	whitespace before "(".

From-SVN: r203004
2013-09-28 08:42:34 +00:00
Po-Chun Chang c7b3b99f31 reload.c (find_reloads): Exit loop once we find this operand cannot be reloaded somehow for this alternative.
2013-07-22  Po-Chun Chang  <pchang9@cs.wisc.edu>

	* reload.c (find_reloads): Exit loop once we find this operand
	cannot be reloaded somehow for this alternative.

	* reload.c (find_reloads): Exit loop once we find a hard register.

	* rtlanal.c (computed_jump_p): Exit loop once we find label
	reference is used.

	* i386.c (ix86_pad_returns): Exit loop after setting replace.

	* cfgloopmanip.c (remove_path): Exit loop after setting
	irred_invalidated.

	* gensupport.c (subst_dup): Avoid loop if code is not
	MATCH_DUP nor MATCH_OP_DUP.

From-SVN: r201174
2013-07-23 09:56:37 -06:00
Kyrylo Tkachov aadaf24ef0 rtl.def: Add extra fourth optional field to define_cond_exec.
2013-06-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* rtl.def: Add extra fourth optional field to define_cond_exec.
	* gensupport.c (process_one_cond_exec): Process attributes from
	define_cond_exec.
	* doc/md.texi: Document fourth field in define_cond_exec.

From-SVN: r199640
2013-06-04 08:56:32 +00:00
Graham Stott a8fd422562 013-05-06 Graham Stott <grahams@btinternet.com>
* gensupport.c (add_predicate_code): Also exclude SCRATCH from rtx
        codes which allow non-lvalues.

From-SVN: r198653
2013-05-06 22:08:56 +00:00
Richard Sandiford d1e082c2c2 Update copyright years in gcc/
From-SVN: r195098
2013-01-10 20:38:27 +00:00
Michael Zolotukhin 52831d13a7 gensupport.c (maybe_eval_c_test): Remove not-null check for expr.
* gensupport.c (maybe_eval_c_test): Remove not-null check for expr.
        * read-rtl.c (apply_iterators): Initialize condition with "" instead
        of NULL.

From-SVN: r193988
2012-11-30 08:43:07 +00:00
Maxim Kuznetsov 477c104eaf md.texi: Document define_subst.
* doc/md.texi: Document define_subst.
        * gensupport.c (MAX_OPERANDS): New define.
        (operand_data): New.
        (match_operand_entries_in_pattern): New.
        (used_operands_numbers): New.
        (subst_true): New.
        (subst_false): New.
        (define_subst_queue): New.
        (define_subst_tail): New.
        (define_subst_attr_queue): New.
        (define_subst_attr_tail): New.
        (has_subst_attribute): New.
        (subst_pattern_match): New.
        (get_alternatives_number): New.
        (alter_output_for_subst_insn): New.
        (alter_attrs_for_subst_insn): New.
        (process_substs_on_one_elem): New.
        (subst_dup): New.
        (process_define_subst): New.
        (duplicate_alternatives): New.
        (duplicate_each_alternative): New.
        (constraints_handler_t): New typedef.
        (alter_constraints): New.
        (adjust_operands_numbers): New.
        (replace_duplicating_operands_in_pattern): New.
        (remove_from_queue): New.
        (process_rtx): Handle define_subst and define_subst_attr.
        (change_subst_attribute): New.
        (alter_predicate_for_insn): Fix formatting.
        (alter_attrs_for_insn): Likewise.
        (alter_output_for_insn): Likewise.
        (mark_operands_from_match_dup): New.
        (mark_operands_used_in_match_dup): New.
        (find_first_unused_number_of_operand): New.
        (renumerate_operands_in_pattern): New.
        (generate_match_dup): New.
        (check_define_attr_duplicates): New.
        (init_rtx_reader_args_cb): Add checking for duplicated attrs and
        processing of define_subst.
        (read_md_rtx): Handle define_subst.
        * read-rtl.c (struct subst_attr_to_iter_mapping): New.
        (substs): New global.
        (apply_subst_iterator): New.
        (bind_subst_iter_and_attr): New.
        (find_subst_iter_by_attr): New.
        (map_attr_string): Handle subst-iterators.
        (add_condition_to_rtx): Handle define_subst.
        (apply_iterators): Likewise.
        (initialize_iterators): Likewise.
        (add_define_attr_for_define_subst): New.
        (add_define_subst_attr): New.
        (read_subst_mapping): New.
        (read_rtx): Handle define_subst_attr.
        (read_rtx_code): Add subst-attributes recognition during reading of
        strings.
        * rtl.def (DEFINE_EXPAND): Add vector of attributes.
        (DEFINE_SUBST): New.
        (DEFINE_SUBST_ATTR): New.


Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r193618
2012-11-19 10:19:20 +00:00
Steven Bosscher e714561a2f gensupport.c (init_rtx_reader_args_cb): Start counting code generating patterns from 1 to free up 0 for CODE_FOR_nothing.
* gensupport.c (init_rtx_reader_args_cb): Start counting code
	generating patterns from 1 to free up 0 for CODE_FOR_nothing.
	* gencodes.c (main): Give CODE_FOR_nothing the value 0.  Add
	the LAST_INSN_CODE marker at the end.
	* genoutput.c (nothing): New static struct data.
	(idata): Initialize to &nothing.
	(idata_end): Initialize to &nothing.next.
	(init_insn_for_nothing): New function to create dummy 'nothing' insn.
	(main): Use it.
	* genpeep.c (insn_code_number): Remove global variable.
	(gen_peephole): Take it as an argument instead.
	(main): Take insn_code_number from read_md_rtx.
	* optabs.h: Revert r161809:
	(optab_handlers): Change type of insn_code back to insn_code.
	(optab_handler, widening_optab_handler, set_optab_handler,
	set_widening_optab_handler, convert_optab_handler,
	set_convert_optab_handler, direct_optab_handler,
	set_direct_optab_handler): Remove int casts.
	Revert to treating the insn_code field as "insn_code".

From-SVN: r189366
2012-07-09 08:45:12 +00:00
Bernd Schmidt 0bddee8e54 gensupport.c (add_define_attr): New static function.
* gensupport.c (add_define_attr): New static function.
	(is_predicable): Allow multi-alternative lists for the "predicable"
	attribute.
	(modify_attr_enabled_ce, alter_attrs_for_insn): New static functions.
	(process_one_cond_exec): Call alter_attrs_for_insn.
	* doc/md.texi (Defining Attributes): Mention some standard names.
	(Conditional Execution): Update documentation for "predicable".

From-SVN: r175263
2011-06-21 14:38:38 +00:00
Mike Stump 1a84c18319 * gensupport.c (read_md_rtx): Fix typo in comment.
From-SVN: r172890
2011-04-23 00:33:15 +00:00
Jim Meyering 046957830e remove useless if-before-free tests
Change "if (E) free (E);" to "free (E);" everywhere except in the
libgo/, intl/, zlib/ and classpath/ directories.
Also transform equivalent variants like
"if (E != NULL) free (E);" and allow an extra cast on the
argument to free.  Otherwise, the tested and freed "E"
expressions must be identical, modulo white space.

From-SVN: r172785
2011-04-20 18:19:03 +00:00
Richard Sandiford 77059241d8 genpreds.c (process_define_predicate): Move most processing to gensupport.c.
gcc/
	* genpreds.c (process_define_predicate): Move most processing
	to gensupport.c.  Continue to validate the expression.
	* genrecog.c (did_you_mean_codes, compute_predicate_codes)
	(process_define_predicate): Move processing to gensupport.c.
	(main): Remove DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE cases.
	* gensupport.c (did_you_mean_codes): Moved from genrecog.c.
	(compute_predicate_codes): Moved from genrecog.c.  Add lineno
	argument.
	(valid_predicate_name_p): New function, split out from old
	genpreds.c:process_define_predicate.
	(process_define_predicate): New function, combining code from
	old genpreds.c and genrecog.c functions.
	(process_rtx): Call it for DEFINE_PREDICATE and
	DEFINE_SPECIAL_PREDICATE.

From-SVN: r172315
2011-04-12 12:51:10 +00:00