summaryrefslogtreecommitdiff
path: root/gcc/gensupport.h
AgeCommit message (Collapse)Author
2020-01-01Update copyright years.Jakub Jelinek
From-SVN: r279813
2019-07-09PR c++/61339 - add mismatch between struct and class [-Wmismatched-tags] to ↵Martin Sebor
non-bugs gcc/c/ChangeLog: PR c++/61339 * c-decl.c: Change class-key from class to struct and vice versa to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod. * gimple-parser.c: Same. gcc/c-family/ChangeLog: PR c++/61339 * c-format.c (check_argument_type): Change class-key from class to struct and vice versa to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod. * c-pretty-print.h: Same. gcc/cp/ChangeLog: PR c++/61339 * constexpr.c (cxx_eval_call_expression): Change class-key from class to struct and vice versa to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod. * constraint.cc (get_concept_definition): Same. * cp-tree.h: Same. * cxx-pretty-print.h: Same. * error.c: Same. * logic.cc (term_list::replace): Same. * name-lookup.c (find_local_binding): Same. * pt.c (tsubst_binary_right_fold): Same. * search.c (field_accessor_p): Same. * semantics.c (expand_or_defer_fn): Same. gcc/lto/ChangeLog: PR c++/61339 * lto-dump.c: Change class-key from classi to struct and vice versa to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod. gcc/ChangeLog: PR c++/61339 * align.h: Change class-key from class to struct and vice versa to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod. * alloc-pool.h: Same. * asan.c (shadow_mem_size): Same. * auto-profile.c: Same. * basic-block.h: Same. * bitmap.h: Same. * cfgexpand.c (set_rtl): Same. (expand_one_stack_var_at): Same. * cfghooks.h: Same. * cfgloop.h: Same. * cgraph.h: Same. * config/i386/i386.h: Same. * df-problems.c (df_print_bb_index): Same. * df-scan.c: Same. * df.h (df_single_use): Same. * diagnostic-show-locus.c (layout::print_annotation_line): Same. (layout::annotation_line_showed_range_p): Same. (get_printed_columns): Same. (correction::ensure_terminated): Same. (line_corrections::~line_corrections): Same. * dojump.h: Same. * dse.c: Same. * dump-context.h: Same. * dumpfile.h: Same. * dwarf2out.c: Same. * edit-context.c: Same. * fibonacci_heap.c (test_union_of_equal_heaps): Same. * flags.h: Same. * function.c (assign_stack_local): Same. * function.h: Same. * gcc.c: Same. * gcov.c (block_info::block_info): Same. * genattrtab.c: Same. * genextract.c: Same. * genmatch.c (comparison_code_p): Same. (id_base::id_base): Same. (decision_tree::print): Same. * genoutput.c: Same. * genpreds.c (write_one_predicate_function): Same. * genrecog.c (validate_pattern): Same. (find_operand_positions): Same. (optimize_subroutine_group): Same. (merge_pattern_transition::merge_pattern_transition): Same. (merge_pattern_info::merge_pattern_info): Same. (merge_state_result::merge_state_result): Same. (merge_into_state): Same. * gensupport.c: Same. * gensupport.h: Same. * ggc-common.c (init_ggc_heuristics): Same. * ggc-tests.c (test_union): Same. * gimple-loop-interchange.cc (dump_induction): Same. * gimple-loop-versioning.cc: Same. * gimple-match.h (gimple_match_cond::any_else): Same. * gimple-ssa-backprop.c: Same. * gimple-ssa-sprintf.c: Same. * gimple-ssa-store-merging.c (store_operand_info::store_operand_info): Same. (store_immediate_info::store_immediate_info): Same. (merged_store_group::apply_stores): Same. (get_location_for_stmts): Same. * gimple-ssa-strength-reduction.c: Same. * gimple-ssa-warn-alloca.c: Same. * gimple-ssa-warn-restrict.c (pass_wrestrict::execute): Same. * godump.c (go_type_decl): Same. * hash-map-tests.c (test_map_of_strings_to_int): Same. * hash-map.h: Same. * hash-set-tests.c (test_set_of_strings): Same. * hsa-brig.c: Same. * hsa-common.h: Same. * hsa-gen.c (transformable_switch_to_sbr_p): Same. * input.c (assert_loceq): Same. * input.h: Same. * ipa-cp.c: Same. * ipa-devirt.c (possible_polymorphic_call_targets_1): Same. * ipa-fnsummary.h: Same. * ipa-inline.h: Same. * ipa-prop.h: Same. * ipa-split.c (visit_bb): Same. * ira-int.h (minmax_set_iter_next): Same. * loop-invariant.c: Same. * loop-iv.c: Same. * lra-eliminations.c: Same. * lra-int.h: Same. * lra-lives.c (mark_regno_dead): Same. * lra-remat.c: Same. * lra-spills.c: Same. * lto-streamer.h: Same. * mem-stats.h: Same. * omp-grid.c (omp_grid_lastprivate_predicate): Same. * omp-low.c (omp_clause_aligned_alignment): Same. * optabs-query.h (get_vcond_eq_icode): Same. * optabs.h: Same. * opts.c (wrap_help): Same. * poly-int.h: Same. * predict.c (predict_paths_leading_to_edge): Same. * pretty-print.h: Same. * profile-count.h: Same. * read-md.h: Same. * read-rtl-function.c: Same. * ree.c: Same. * reginfo.c: Same. * regrename.c: Same. * regrename.h: Same. * reload.h: Same. * rtl-iter.h: Same. * rtl.h (costs_add_n_insns): Same. * sanopt.c: Same. * sched-int.h: Same. * sel-sched-ir.h: Same. * selftest.h: Same. * sese.h (vec_find): Same. * stmt.c: Same. * target-globals.h: Same. * tree-affine.c (aff_combination_find_elt): Same. * tree-affine.h: Same. * tree-data-ref.h: Same. * tree-outof-ssa.c (ssa_is_replaceable_p): Same. * tree-predcom.c: Same. * tree-scalar-evolution.c (find_var_scev_info): Same. * tree-ssa-alias.h: Same. * tree-ssa-ccp.c: Same. * tree-ssa-coalesce.c (ssa_conflicts_dump): Same. * tree-ssa-loop-im.c (for_all_locs_in_loop): Same. (rewrite_mem_refs): Same. (execute_sm_if_changed): Same. (hoist_memory_references): Same. * tree-ssa-loop-ivopts.c (operator<=): Same. * tree-ssa-loop.h: Same. * tree-ssa-pre.c (get_or_alloc_expr_for_name): Same. * tree-ssa-structalias.c: Same. * tree-switch-conversion.h (cluster::cluster): Same. (simple_cluster::simple_cluster): Same. * tree-vect-patterns.c (type_conversion_p): Same. * tree-vectorizer.c (dump_stmt_cost): Same. * tree-vectorizer.h (loop_vec_info_for_loop): Same. * tree.c (protected_set_expr_location): Same. * tree.h (desired_pro_or_demotion_p): Same. (fndecl_built_in_p): Same. * unique-ptr-tests.cc: Same. * var-tracking.c (delete_variable_part): Same. * varasm.c (assemble_real): Same. (tree_output_constant_def): Same. * vec.c: Same. * wide-int-bitmask.h: Same. * wide-int.h (decompose): Same. From-SVN: r273308
2019-01-01Update copyright years.Jakub Jelinek
From-SVN: r267494
2018-01-03Update copyright years.Jakub Jelinek
From-SVN: r256169
2017-03-02re PR tree-optimization/79345 (passing yet-uninitialized member as argument ↵Jakub Jelinek
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-01-01Update copyright years.Jakub Jelinek
From-SVN: r243994
2016-09-21Introduce class rtx_readerDavid Malcolm
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-05-06Make argv const char ** in read_md_files etcDavid Malcolm
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-01-04Update copyright years.Jakub Jelinek
From-SVN: r232055
2015-12-02Check for invalid FAILsRichard Sandiford
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-08-24genflags.c (gen_macro): Delete.Richard Sandiford
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-05gensupport.h (get_c_test): Declare.Richard Sandiford
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-05gensupport.h (get_num_insn_codes): Declare.Richard Sandiford
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-07-16read-md.h (message_with_line, [...]): Delete.Richard Sandiford
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-16gensupport.h (compute_test_codes): Take a file_location rather than a line ↵Richard Sandiford
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-06-14rtl.h (classify_insn): Declare.Richard Sandiford
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-13gensupport.h (add_implicit_parallel): Declare.Richard Sandiford
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-05-26gensupport.h (compute_test_codes): Declare.Richard Sandiford
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-01-05Update copyright years.Jakub Jelinek
From-SVN: r219188
2014-01-02Update copyright years in gcc/Richard Sandiford
From-SVN: r206289
2013-01-10Update copyright years in gcc/Richard Sandiford
From-SVN: r195098
2011-04-01gensupport.h (pattern_stats): New structure.Richard Sandiford
gcc/ * gensupport.h (pattern_stats): New structure. * gensupport.c (get_pattern_stats_1, get_pattern_stats): New functions. * genemit.c (max_opno, max_dupno, max_scratch_opno): Delete. (max_operand_1, max_operand_vec): Delete. (gen_insn, gen_expand, gen_split): Use get_pattern_stats. From-SVN: r171821
2011-01-03Update Copyright years for files modified in 2010.Jakub Jelinek
From-SVN: r168438
2010-06-10Makefile.in (build/genmddeps.o): Depend on $(READ_MD_H).Richard Sandiford
gcc/ * Makefile.in (build/genmddeps.o): Depend on $(READ_MD_H). * genmddeps.c: Include read-md.h. (main): Call init_rtx_reader_args instead of init_md_reader_args. * genattr.c (main): Likewise. * genattrtab.c (main): Likewise. * genautomata.c (main): Likewise. * gencodes.c (main): Likewise. * genconditions.c (main): Likewise. * genconfig.c (main): Likewise. * genconstants.c (main): Likewise. * genemit.c (main): Likewise. * genextract.c (main): Likewise. * genflags.c (main): Likewise. * genopinit.c (main): Likewise. * genoutput.c (main): Likewise. * genpeep.c (main): Likewise. * genrecog.c (main): Likewise. * genpreds.c (main): Likewise. * gensupport.h (in_fname): Move to read-md.h. (init_md_reader_args_cb): Rename to... (init_rtx_reader_args_cb): ...this and return a bool. (init_md_reader_args): Rename to... (init_rtx_reader_args): ...this and return a bool. (include_callback): Move to read-md.h. * gensupport.c (in_fname, include_callback, base_dir, max_include_len) (file_name_list, first_dir_md_include): Move to read-md.c (first_bracket_include): Delete unused variable. (last_dir_md_include): Move to read-md.c. (process_include): Delete, moving code to read-md.c:handle_include. (process_rtx): Don't handle INCLUDE. (save_string): Delete. (rtx_handle_directive): New function. (init_md_reader_args_cb): Rename to... (init_rtx_reader_args_cb): ...this and return a boolean success value. Use read_md_args. (init_md_reader_args): Rename to... (init_rtx_reader_args): ...this and return a boolean success value. * rtl.def (INCLUDE): Delete. * rtl.h (read_rtx): Remove "int *" argument. Add "const char *" argument. * read-rtl.c (read_conditions): Don't gobble ')' here. (read_mapping): Likewise. (read_rtx): Remove LINENO argument. Add RTX_NAME argument. Handle top-level non-rtx constructs here rather than in read_rtx_1. Store the whole queue in *X. Remove call to init_md_reader. (read_rtx_1): Rename to... (read_rtx_code): ...this. Call read_nested_rtx to read subrtxes. Don't handle top-level non-rtx constructs here. Don't handle (nil) here. (read_nested_rtx): New function. Handle (nil) here rather than in read_rtx_code. (read_rtx_variadic): Call read_nested_rtx to read subrtxes. Don't gobble ')' here. * read-md.h (directive_handler_t): New type. (in_fname, include_callback): Moved from read-md.h. (read_constants, init_md_reader): Delete. (read_md_files): Declare. * read-md.c (file_name_list, in_fname, base_dir, first_dir_md_include) (last_dir_md_include_ptr, include_callback, max_include_len): Moved from gensupport.c. (read_constants): Rename to... (handle_constants): ...this. Don't gobble ')' here. (handle_include, handle_file, handle_toplevel_file) (parse_include): New functions, mostly taken from gensupport.c. (init_md_reader): Subsume into... (read_md_files): ...this new function. From-SVN: r160577
2010-06-10Makefile.in (READ_MD_H): New variable.Richard Sandiford
gcc/ * Makefile.in (READ_MD_H): New variable. (BUILD_RTL): Add build/read-md.o. (lto-wrapper.o): Depend on coretypes.h instead of defaults.h. (build/gensupport.o, build/read-rtl.o, build/genattr.o) (build/genattrtab.o, build/genconditions.o build/genemit.o) (build/genextract.o, build/genflags.o, build/genoutput.o) (build/genpreds.o, build/genrecog.o): Depend on $(READ_MD_H). (build/read-md.o): New rule. * defaults.h (obstack_chunk_alloc, obstack_chunk_free) (OBSTACK_CHUNK_SIZE, gcc_obstack_init): Move to... * coretypes.h: ...here. * lto-wrapper.c: Include coretypes.h instead of defaults.h. * pretty-print.c (obstack_chunk_alloc, obstack_chunk_free): Delete. * genattr.c: Include read-md.h. * genattrtab.c: Likewise. * genconditions.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * genflags.c: Likewise. * genoutput.c: Likewise. * genpreds.c: Likewise. * genrecog.c: Likewise. * rtl.h (read_skip_spaces, copy_rtx_ptr_loc, print_rtx_ptr_loc) (join_c_conditions, print_c_condition, read_rtx_filename) (read_rtx_lineno): Move to read-md.h. * read-rtl.c: Include read-md.h. (ptr_loc, string_obstack, ptr_locs, ptr_loc_obstack) (joined_conditions, joined_conditions_obstack, read_rtx_lineno) (read_rtx_filename, fatal_with_file_and_line, fatal_expected_char) (leading_ptr_hash, leading_ptr_eq_p, set_rtx_ptr_loc, get_rtx_ptr_loc) (copy_rtx_ptr_loc, print_rtx_ptr_loc, join_c_conditions) (print_c_condition, read_skip_spaces, read_escape, read_quoted_string) (read_braced_string, read_string): Move to read-md.c. (read_rtx): Move some initialization to init_md_reader and call init_md_reader here. * gensupport.h (message_with_line, n_comma_elts, scan_comma_elt): Move to read-md.h. * gensupport.c: Include read-md.h. (message_with_line, n_comma_elts, scan_comma_elt): Move to read-md.c. * read-md.h, read-md.c: New files. From-SVN: r160570
2009-02-20Update Copyright years for files modified in 2008 and/or 2009.Jakub Jelinek
From-SVN: r144324
2008-05-08gensupport.h (pred_data): Add a "num_codes" field.Richard Sandiford
gcc/ * gensupport.h (pred_data): Add a "num_codes" field. (add_predicate_code): Declare. * gensupport.c (add_predicate_code): New function. (std_pred_table): Add an "allows_const_p" field. (std_preds): Set this field for predicates that allow RTX_CONST_OBJs. Remove the (incomplete) list of such codes from the codes field. (init_predicate_table): Use add_predicate_code. Add all RTX_CONST_OBJs if allows_const_p is true. * genrecog.c (process_define_predicate): Use add_predicate_code. From-SVN: r135090
2007-07-26Change copyright header to refer to version 3 of the GNU General Public ↵Nick Clifton
License and to point readers at the COPYING3 file and the FSF's license web page. From-SVN: r126948
2006-01-23r110123@banpei: zack | 2006-01-22 14:44:34 -0800Zack Weinberg
r110123@banpei: zack | 2006-01-22 14:44:34 -0800 * genconditions.c (condition_table, add_condition): Delete. (write_conditions): Don't emit n_insn_conditions nor insn_elision_unavailable. Issue the gcc version #ifdef here, inside the table, with no #else clause ... (write_header): ...not here. (write_writer): New function. (main): Don't initialize condition_table. Use add_c_test. Call write_writer. * gensupport.c (init_md_reader_args_cb): Handle multiple input files on the command line. (maybe_eval_c_test): Don't check insn_elision_unavailable. Return -1 if there is no entry in the table, don't abort. (add_c_test, traverse_c_tests): New functions. * gensupport.h (insn_elision_unavailable, insn_conditions) (n_insn_conditions): Delete declarations. (add_c_test, traverse_c_tests): Declare. * read-rtl.c: Include gensupport.h. (read_conditions): New function. (read_rtx): If read_rtx_1 returns 0, treat as EOF. (read_rtx_1): If we get EOF when we were looking for an initial open paren, return 0. Call read_conditions when appropriate. * Makefile.in: Kill BUILD_EARLY_SUPPORT and all references to dummy-conditions.o. Eliminate references to insn-conditions.o, or change them to build/gencondmd.o, as appropriate. Remove insn-constants.h from $(simple_generated_h) and insn-conditions.c from $(simple_generated_c). For all files remaining in those two lists, add insn-conditions.md to the generator command line. Give insn-constants.h/s-constants their own rules. Add rules for build/gencondmd.c, s-conditions, insn-conditions.md, s-condmd. (build/read-rtl.o): Depend on gensupport.h. (genprognormal): Include preds. (genprogearly): Rename genprognoprint; only difference is now that they don't link with $(BUILD_PRINT). * dummy-conditions.c: Delete. From-SVN: r110119
2005-06-25Update FSF address.Kelley Cook
From-SVN: r101317
2004-12-16Makefile.in (MD_DEPS, s-mddeps): New.Richard Henderson
* Makefile.in (MD_DEPS, s-mddeps): New. (s-config, s-conditions, s-flags, s-codes, s-constants, s-emit, s-recog, s-opinit, s-extract, s-peep, s-attr, s-attrtab, s-output, s-preds): Depend on MD_DEPS instead of md_file. (genobjnames): Add genmddeps.o (build/genmddeps, build/genmddeps.o): New. (mostlyclean): Remove mddeps.mk. * genmddeps.c: New file. * gensupport.c (include_callback): New. (process_include): Call it. * gensupport.h (include_callback): Declare. From-SVN: r92269
2004-10-15bitmap.c, [...]: Update copyright.Kazu Hirata
* bitmap.c, bitmap.h, builtin-attrs.def, cfglayout.h, collect2.h, conflict.c, coretypes.h, coverage.h, errors.h, gcc.h, gcov-dump.c, gen-protos.c, gencheck.c, gencodes.c, genconstants.c, gengenrtl.c, genmodes.c, genpeep.c, gensupport.h, graph.h, gthr-gnat.c, gthr-gnat.h, gthr-posix.c, gthr-posix.h, hard-reg-set.h, hwint.h, integrate.h, libgcc2.c, lists.c, machmode.def, mips-tdump.c, opts.h, params.c, predict.def, predict.h, protoize.c, reload.h, resource.h, rtl-error.c, sbitmap.c, sbitmap.h, sreal.c, tlink.c, tree-dump.h, tree-inline.h, unwind-dw2-fde.c, unwind-dw2.c, unwind-sjlj.c, value-prof.h: Update copyright. From-SVN: r89097
2004-08-12genpreds.c: Add capability to generate predicate bodies as well as function ↵Zack Weinberg
prototypes. * genpreds.c: Add capability to generate predicate bodies as well as function prototypes. Write function prototypes for the generic predicates too. (process_define_predicate, write_tm_preds_h, write_insn_preds_c) (write_predicate_subfunction, mark_mode_tests, add_mode_tests) (write_match_code, write_predicate_expr, write_one_predicate_function) (parse_option): New functions. (output_predicate_decls): Delete. (main): Read the machine description, process DEFINE_PREDICATE or DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c as appropriate. * genrecog.c (struct decision_test): Replace index with struct pred_data pointer. (next_index): Remove, unused. (pred_table, preds, special_mode_pred_table): Delete. (compute_predicate_codes, process_define_predicate): New functions. (validate_pattern, add_to_sequence, write_switch): Update for new data structures. (main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. Check both error_count and have_error. * gensupport.c (in_fname, first_predicate): New globals. (define_pred_queue, define_pred_tail): New RTL-pattern queue. (predicate_table, last_predicate, old_pred_table) (old_special_pred_table): New statics. (hash_struct_pred_data, eq_struct_pred_data, lookup_predicate) (add_predicate, init_predicate_table): New functions. (process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE. (init_md_reader_args_cb): Use the global in_fname. No need to zero it or max_include_len. Call init_predicate_table. (read_rtx): Run the predicate queue after the attribute queue but before all the others. * gensupport.h (in_fname, struct pred_data, first_predicate) (lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare. * rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE) (DEFINE_SPECIAL_PREDICATE): New RTL codes. * dummy-conditions.c: Don't include bconfig.h, system.h, coretypes.h, tm.h, or system.h. Do include stddef.h. Duplicate declaration of struct c_test from gensupport.h. * Makefile.in (OBJS-common): Add insn-preds.o. (STAGESTUFF, .PRECIOUS): Add insn-preds.c. (insn-preds.c, insn-preds.o): New rules. (s-preds): Also generate insn-preds.c. (dummy-conditions.o, genpreds$(build_exeext), genpreds.o): Update dependencies. (print-rtl.o, print-rtl1.o): Correct dependencies. * recog.h: Delete prototypes of predicate functions. * doc/md.texi (Predicates): New section with complete documentation of operand/operator predicates. Remove some incomplete documentation of predicates from other places. * doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to PREDICATE_CODES; indicate that both are deprecated in favor of define_predicate/define_special_predicate. * config/ia64/ia64.c: All predicate function definitions moved to ia64.md, except (small_addr_symbolic_operand, tls_symbolic_operand): Delete. (ia64_expand_load_address, ia64_expand_move): Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand. * config/ia64/ia64.md: All predicates now defined here. (symbolic_operand): Is now a special predicate. * config/ia64/ia64.h: Declare ia64_section_threshold. (PREDICATE_CODES): Delete. From-SVN: r85855
2004-08-03gensupport.c (init_md_reader_args_cb): Renamed from init_md_reader_args.Zack Weinberg
* gensupport.c (init_md_reader_args_cb): Renamed from init_md_reader_args. Add third option, callback function for parsing program-specific options. Add diagnosis of incorrect number of input files. (init_md_reader): Fold into init_md_reader_args_cb. (init_md_reader_args): Now a thin wrapper around init_md_reader_args_cb. * gensupport.h: Update prototypes. * genattr.c, genattrtab.c, gencodes.c, genconfig.c, genemit.c * genextract.c, genflags.c, genopinit.c, genoutput.c, genpeep.c * genrecog.c: No need to diagnose lack of an input file; init_md_reader_args will handle it. * genconditions.c: Likewise, and use init_md_reader_args. * genconstants.c: Likewise, and no need to call read_md_rtx. From-SVN: r85511
2003-06-01genrecog.c: Use ISO C90 prototypes.Andreas Jaeger
* genrecog.c: Use ISO C90 prototypes. (nodes_identical): Correct declaration to match prototype. (maybe_both_true): Likewise. (merge_trees): Likewise. * genpeep.c (gen_peephole): Remove #if 0 code. Use ISO C90 prototypes. * genattrtab.c (copy_rtx_unchanging): Remove #if 0'ed code. Remove #if 0'ed function simplify_by_alternatives. (optimize_attrs): Remove #if 0'ed code. Remove ^L. Use ISO C90 prototypes. (make_canonical): Remove #if 0'ed code. (convert_const_symbol_ref): Remove #if 0'ed function. * gen-protos.c (main): Check for argument. * rtl.h: Use ISO C90 prototypes for functions from lists.c. * params.h: Use ISO C90 prototypes. * params.c: Likewise. * intl.c: Likewise. * intl.h: Likewise. * lists.c: Likewise. * errors.c: Likewise. * errors.h: Likewise. * gencodes.c: Likewise. * genpreds.c: Likewise. * genattr.c: Likewise. * gen-protos.c: Likewise. * genflags.c: Likewise * genconditions.c: Likewise. * genautomata.c: Likewise. * gencheck.c: Likewise. * genconfig.c: Likewise. * genconstants.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * gengenrtl.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genopinit.c: Likewise. * genoutput.c: Likewise. * gensupport.c: Likewise. * gensupport.h: Likewise. From-SVN: r67296
2002-07-29gensupport.c: Include hashtab.h.Zack Weinberg
* gensupport.c: Include hashtab.h. (insn_elision, condition_table, hash_c_test, cmp_c_test, maybe_eval_c_test): New routines and data structures to support insn elision. (init_md_reader): Read and initialize the condition_table. (read_md_rtx): Discard insn patterns whose C test is provably always false. * gensupport.h: Declare new functions and data structures. * genconditions.c, dummy-conditions.c: New files. * Makefile.in: Build genconditions; run it to construct insn-conditions.c; build that and link it into most gen* programs. (HOST_SUPPORT, HOST_EARLY_SUPPORT): New variables. (GEN): Delete, unused. (STAGESTUFF): Update. * gencodes.c: (gen_insn): #define CODE_FOR_xxx equal to CODE_FOR_nothing for all elided patterns. (main): Tweaked to support this. * genflags.c (gen_proto): Emit a static inline generator function here for all elided patterns, which simply returns NULL_RTX. (gen_insn): Do not define HAVE_xxx for elided patterns. (main): Tweaked to support this. No need to forward-declare struct rtx_def. * genrecog.c: Do not bother emitting the C test if it's known to be true at compile time. From-SVN: r55839
2002-05-12gensupport.c (n_comma_elts): Moved here from genattrtab.c.Zack Weinberg
* gensupport.c (n_comma_elts): Moved here from genattrtab.c. (scan_comma_elt): New function. Accepts whitespace in comma lists. * gensupport.h: Prototype new routines. * genattr.c (gen_attr): Use scan_comma_elt. Avoid unnecessary use of printf. * genattrtab.c (n_comma_elts): Moved to gensupport.c. (next_comma_elt): Use scan_comma_elt. * config/i386/i386.md: Use new attribute notation to break up long lines in define_attr forms. From-SVN: r53403
2001-11-14rtl.def (INCLUDE): Define.Alan Matsuoka
2001-11-05 Alan Matsuoka <alanm@redhat.com> * rtl.def (INCLUDE) : Define. * gensupport.c (init_include_reader, process_include, save_string) : New functions to implement an include facility in .md files. * gensupport.h : Add prototype for init_md_reader_args. * genattr.c genattrtab.c gencodes.c genconfig.c genemit.c genextract.c genflags.c genopinit.c genoutput.c genpeep.c genrecog.c: Change call to init_md_reader to init_md_reader_args. * md.texi: Document (include "path") and -I directives for RTL generation tools. From-SVN: r47020
2001-08-22Makefile.in, [...]: replace "GNU CC" with "GCC".Lars Brinkhoff
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2000-05-06Makefile.in (gensupport.o): Compile for the host.Richard Henderson
* Makefile.in (gensupport.o): Compile for the host. (host-prefix gensuuprt.o): Remove. (genflags.o): Depend on gensupport.h and OBSTACK_H. (genattrtab.o): Likewise. (gencodes.o): Depend on gensupport.h. (genemit.o, genopinit.o, genrecog.o, genextract.o): Likewise. (genpeep.o, genattr.o, genoutput.o): Likewise. * gensupport.c (obstack, rtl_obstack): New. (init_md_reader): Initialize rtl_obstack. * gensupport.h (rtl_obstack): Declare. (message_with_line): Declare. * genattr.c: Remove all traces of obstack manipulation. * gencodes.c, genconfig.c, genemit.c, genextract.c: Likewise. * genopinit.c, genoutput.c, genpeep.c, genrecog.c: Likewise. * genattrtab.c (obstack, rtl_obstack): Remove. (main): Don't init rtl_obstack. * genflags.c: Likewise. * genrecog.c (message_with_line): Move ... * gensupport.c: ... here. From-SVN: r33742
2000-05-03gensupport.c: New file.Clinton Popetz
* gensupport.c: New file. * gensupport.h: New file. * Makefile.in (HOST_RTL): Depend on gensupport. (gensupport.o) New rule. * genattr.c: Use gensupport for reading .md files. * genattrtab.c: Ditto. * gencodes.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * genopinit.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * rtl.def (define_insn_and_split): New DEF_RTL_EXPR. * md.texi (Insn Splitting): Document define_insn_and_split. From-SVN: r33633