aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.h
AgeCommit message (Collapse)AuthorFilesLines
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-04-10re PR target/20126 (Inlined memcmp makes one argument null on entry)Alexandre Oliva1-0/+1
gcc/ChangeLog: PR target/20126 * loop.c (loop_givs_rescan): If replacement of DEST_ADDR failed, set the original address pseudo to the correct value before the original insn, if possible, and leave the insn alone, otherwise create a new pseudo, set it and replace it in the insn. * recog.c (validate_change_maybe_volatile): New. * recog.h (validate_change_maybe_volatile): Declare. gcc/testsuite/ChangeLog: * gcc.dg/pr20126.c: New. From-SVN: r97939
2005-03-07recog.c (verify_changes): Make it static.Kazu Hirata1-1/+0
* recog.c (verify_changes): Make it static. * recog.h: Remove the corresponding prototype. From-SVN: r96015
2005-03-02recog.c (verify_changes, [...]): New functions, broken out of ↵J"orn Rennecke1-0/+2
apply_change_group. * recog.c (verify_changes, confirm_change_group): New functions, broken out of apply_change_group. (apply_change_group): Use them. * recog.h (verify_change, confirm_change_group): Declare. * rtl.h (redirect_jump_2): Declare. * jump.c (redirect_exp, invert_exp): Delete. (invert_exp_1): Take second parameter. Return value. Changed caller. (redirect_jump_2): New function, broken out of redirect_jump. (redirect_jump): Use redirect_jump_1 and redirect_jump_2. (invert_jump): Use invert_jump_1 and redirect_jump_2. * ifcvt.c (dead_or_predicable): Use redirect_jump_2. From-SVN: r95813
2005-01-23re PR bootstrap/18058 (Bootstrap fails with non-GCC compilers)Joseph Myers1-1/+5
config: * warnings.m4 (ACX_PROG_CC_WARNING_ALMOST_PEDANTIC): Don't do anything for non-GCC compilers. libcpp: * configure: Regenerate. gcc: PR bootstrap/18058 * recog.c (recog_memoized): Don't define if GENERATOR_FILE. * ggc-none.c (ggc_free): Define. From-SVN: r94123
2004-11-24Minor back end speedup.Matt Austern1-3/+18
* recog.c (recog_memoized_1): Remove. * recog.h (recog_memoized_1): Remove declaration. (recog_memoized): Change from macro to inline function. From-SVN: r91185
2004-08-12genpreds.c: Add capability to generate predicate bodies as well as function ↵Zack Weinberg1-16/+0
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-07-25c-common.c: Rename all identifiers named `class' to `cl'.Bernardo Innocenti1-1/+1
* c-common.c: Rename all identifiers named `class' to `cl'. * c-decl.c: Likewise. * c-common.h: Likewise. * c-parse.in: Likewise. * c-typeck.c: Likewise. * genmodes.c: Likewise. * real.c: Likewise. * real.h: Likewise. * recog.c: Likewise. * recog.h: Likewise. * regrename.c: Likewise. * tree.h: Likewise. From-SVN: r85153
2004-02-26recog.c (validate_replace_src): Remove.Kazu Hirata1-1/+0
* recog.c (validate_replace_src): Remove. * recog.h: Remove the corresponding prototype. From-SVN: r78531
2004-01-09re PR c/11234 (-pedantic accepts function pointer <-> void*)Joseph Myers1-2/+14
PR c/11234 * c-typeck.c (build_c_cast): If pedantic, warn for conversions between function and object pointers. (digest_init): When comparing a pointer to function type to the target type, only apply TREE_TYPE once to the pointer to function type. * except.c (for_each_eh_label_1): Treat data as a pointer to a function pointer rather than casting it to a function pointer. (for_each_eh_label): Update caller. * recog.h (struct insn_data): Use a struct or union for output. * genoutput.c (output_insn_data): Update. * final.c (get_insn_template): Update. testsuite: * gcc.dg/func-ptr-conv-1.c: New test. * gcc.dg/weak/weak-6.c, gcc.dg/weak/weak-7.c: Update. From-SVN: r75595
2003-12-02rtl.h (PUT_CODE, PUT_MODE): Remove ENUM_BITFIELD cast.Richard Henderson1-1/+1
* rtl.h (PUT_CODE, PUT_MODE): Remove ENUM_BITFIELD cast. * tree.h (TREE_SET_CODE): Likewise. * recog.h (struct insn_operand_data): Move const after ENUM_BITFIELD. From-SVN: r74170
2003-07-06jump.c: Convert prototypes to ISO C90.Andreas Jaeger1-71/+69
* jump.c: Convert prototypes to ISO C90. * langhooks-def.h: Likewise. Add extern to prototypes. * langhooks.c: Likewise. * langhooks.h: Likewise. * lcm.c: Likewise. * local-alloc.c: Likewise. * loop-init.c: Likewise. * loop-unroll.c: Likewise. * loop-unswitch.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. Add extern to prototypes. * machmode.h: Likewise. * main.c: Likewise. * mbchar.c: Likewise. * mbchar.h: Likewise. * mkdeps.c: Likewise. * mkdeps.h: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * output.h: Likewise. * gccspec.c: Likwise. * postreload.c: Likewise. * prefix.c: Likewise. * prefix.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * real.h: Likewise. * recog.c: Likewise. * recog.h: Likewise. * reg-stack.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * reload.h: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * resource.h: Likewise. * rtl-error.c: Likewise. * rtl.c: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. From-SVN: r68998
2003-06-23genrecog.c (pred_table): Remove the entry for mode_independent_operand.Kazu Hirata1-1/+0
* genrecog.c (pred_table): Remove the entry for mode_independent_operand. * recog.c (next_insns_test_no_inequality): Remove. (mode_independent_operand): Likewise. * recog.h: Remove the prototype for mode_independent_operand. From-SVN: r68360
2003-06-16decl.c, [...]: Don't use the PTR macro.Kaveh R. Ghazi1-1/+1
cp: * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR macro. gcc: * bitmap.c, builtins.c, c-incpath.c, cgraph.c, config/frv/frv.c, config/mips/mips.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c, dwarf2out.c, dwarfout.c, except.c, expr.c, expr.h, fold-const.c, function.c, gcc.c, genoutput.c, gensupport.c, global.c, haifa-sched.c, hashtable.c, ifcvt.c, integrate.c, local-alloc.c, loop.c, mips-tdump.c, mips-tfile.c, mkdeps.c, protoize.c, read-rtl.c, recog.h, reload1.c, sbitmap.c, ssa-dce.c, stringpool.c, tlink.c, tree.c, varasm.c, varray.c: Don't use the PTR macro. From-SVN: r68043
2002-07-23gcse.c (try_replace_reg): Use num_changes_pending.Jan Hubicka1-0/+2
2002-07-23 Jan Hubicka <jh@suse.cz> * gcse.c (try_replace_reg): Use num_changes_pending. * recog.c (num_changes_pending): New function. (validate_replace_src): Use validate_repalce_src_group. (validate_replace_src_group): New. * recog.h (validate_repalce_src_group): New. (num_changes_pending): Likewise. From-SVN: r55677
2002-05-03recog.c (store_data_bypass_p, [...]): New.Richard Henderson1-0/+3
* recog.c (store_data_bypass_p, if_test_bypass_p): New. * recog.h: Declare them. * config/sparc/sparc.c (ultrasparc_store_bypass_p): Remove. * config/sparc/sparc.md: Use store_data_bypass_p instead. * config/sparc/sparc-protos.h: Update. From-SVN: r53132
2001-10-07builtins.c (expand_builtin_setjmp_receiver): Const-ify.Kaveh R. Ghazi1-12/+12
* builtins.c (expand_builtin_setjmp_receiver): Const-ify. * c-common.c (fname_var_t, c_tree_code_type, c_tree_code_length): Likewise. * c-dump.c (dump_option_value_info): Likewise. * c-format.c (format_length_info, format_char_info, format_flag_spec, format_flag_pair, format_kind_info): Likewise. * collect2.c (names): Likewise. * cppdefault.h (default_include): Likewise. * cppexp.c (suffix, vsuf_1, vsuf_2, vsuf_3): Likewise. * flow.c (life_analysis): Likewise. * gcc.c (dir_separator_str, modify_target, option_map, target_option_translations, spec_list_1, extra_specs_1, init_spec): Likewise. * gcov.c (gcov_version_string): Likewise. * genattr.c (write_units): Likewise. * genattrtab.c (make_length_attrs, write_function_unit_info): Likewise. * gengenrtl.c (rtx_definition, defs): Likewise. * genrecog.c (pred_table): Likewise. * global.c (global_alloc): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (find_free_reg): Likewise. * params.h (param_info): Likewise. * predict.c (predictor_info): Likewise. * protoize.c (unexpansion_struct): Likewise. * real.c (bmask): Likewise. * recog.h (insn_operand_data, insn_data): Likewise. * regclass.c (initial_fixed_regs, initial_call_used_regs): Likewise. * stmt.c (expand_nl_goto_receiver): Likewise. * toplev.c (da, debug_args, lang_opt, documented_lang_options, target_switches, target_options): Likewise. * tradcif.y (token, tokentab2, yylex): Likewise. * tree.h (attribute_spec): Likewise. * alpha.c (override_options, alpha_lookup_xfloating_lib_func): Likewise. * arc.c (arc_output_function_epilogue): Likewise. * arm.c (processors, all_cores, all_architectures, arm_override_options, isr_attribute_arg, isr_attribute_args, arm_isr_value): Likewise. * avr.c (mcu_type_s, reg_class_tab, order_regs_for_local_alloc): Likewise. * c4x.c (c4x_int_reglist): Likewise. * d30v.c (override_options): Likewise. * h8300.c (shift_insn): Likewise. * i386.c (size_cost, i386_cost, i486_cost, pentium_cost, pentiumpro_cost, k6_cost, athlon_cost, pentium4_cost, ix86_cost, ix86_expand_sse_comi, ix86_expand_sse_compare, override_options, builtin_description, bdesc_comi, bdesc_2arg, bdesc_1arg, ix86_init_mmx_sse_builtins, ix86_expand_builtin): Likewise. * i386.h (processor_costs, ix86_cost): Likewise. * m68hc11.c (m68hc11_cost, m6811_cost, m6812_cost): Likewise. * m68hc11.h (processor_costs, m68hc11_cost): Likewise. * m68k.c (codes_68881, codes_FPA): Likewise. * m88k.c (mode_from_align, max_from_align, all_from_align, best_from_align, m_options): Likewise. * m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise. * mcore.c (mode_from_align): Likewise. * mips/elf64.h (UNIQUE_SECTION): Likewise. * mips/iris6gld.h (UNIQUE_SECTION): Likewise. * mips.c (mips_sw_reg_names, mips_regno_to_class): Likewise. * mips.h (mips_regno_to_class): Likewise. * ns32k.c (scales): Likewise. * pa.c (import_string, magic_milli): Likewise. * rs6000.c (alt_reg_names, rs6000_override_options): Likewise. * sparc.c (leaf_reg_remap, sparc_override_options, reg_leaf_alloc_order, reg_nonleaf_alloc_order, reg_alloc_orders): Likewise. * sparc.h (sparc_cpu_select, leaf_reg_remap): Likewise. cp: * class.c (build_vtable_entry_ref): Const-ify. * decl.c (predefined_identifier, initialize_predefined_identifiers): Likewise. * init.c (build_new_1): Likewise. * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword): Likewise. f: * bad.c (_ffebad_message_, ffebad_messages_): Const-ify. * bld.c (ffebld_arity_op_): Likewise. * bld.h (ffebld_arity_op_): Likewise. * com.c (ffecom_init_0): Likewise. * intdoc.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, _ffeintrin_imp_, names, gens, imps, specs, cc_pair, cc_descriptions, cc_summaries): Likewise. * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, _ffeintrin_imp_, ffeintrin_names_, ffeintrin_gens_, ffeintrin_imps_, ffeintrin_specs_): Likewise. java: * jcf-io.c (format_uint): Const-ify. * lang.c (java_tree_code_type, java_tree_code_length): Likewise. * lex.c (java_get_line_col): Likewise. * parse.y (build_incdec): Likewise. From-SVN: r46062
2001-08-22Makefile.in, [...]: replace "GNU CC" with "GCC".Lars Brinkhoff1-12/+12
* 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
2001-08-13recog.h (struct insn_operand_data): Shrink 'mode' field to 16 bits.Zack Weinberg1-1/+1
* recog.h (struct insn_operand_data): Shrink 'mode' field to 16 bits. From-SVN: r44839
2001-02-18Makefile.in (gcse.o): Now includes ggc.h.Richard Kenner1-0/+1
* Makefile.in (gcse.o): Now includes ggc.h. * gcse.c: Include ggc.h. (want_to_gcse_p): Verify expression can be in SET as valid insn. (try_replace_reg): Remove warning of uninitialize variable. (process_insert_insn): Call invalid_insn_p to validate insn. * recog.c (insn_invalid_p): Now global. See if can make valid by adding CLOBBERs of SCRATCH only and do if so. * recog.h (insn_invalid_p): New declaration. From-SVN: r39857
2001-02-18rtl.h (add_clobbers): Remove duplicate declaration.Richard Kenner1-2/+3
* rtl.h (add_clobbers): Remove duplicate declaration. * recog.h (added_clobbers_hard_reg_p): New declaration. * genemit.c (struct clobber_pat): New field has_hard_reg. (gen_insn): Record if added clobbers clobber hard reg. (gen_split): Avoid unused warning if number of operands is 0. (output_added_clobbers_hard_reg_p): New function. (main): Call it. From-SVN: r39832
2000-10-27regrename.c: Rewrite to handle multi-register modes and cond_exec instructions.Bernd Schmidt1-0/+2
* regrename.c: Rewrite to handle multi-register modes and cond_exec instructions. * Makefile.in (regrename.o): Update dependancies. * recog.h (struct operand_alternative): Add is_address. * recog.c (preprocess_constraints) [case 'p']: Set it. Co-Authored-By: Richard Henderson <rth@redhat.com> From-SVN: r37089
2000-09-29final.c (final_scan_insn): Remove extra extract_insn call; Use caching for ↵Jan Hubicka1-1/+4
constrain_operands. * final.c (final_scan_insn): Remove extra extract_insn call; Use caching for constrain_operands. (cleanup_subreg_operands): Use caching for extract_insn. * recog.c (constrain_operands_cached): New. * recog.h (constrain_operands_cached): Declare. * i386.c (ix86_attr_length_immediate_default, ix86_attr_length_address_default, ix86_agi_dependant): Cache extract_insn call. * recog.c (asm_noperands): Tweak. (extract_insn): Do not call asm_noperads for non-asm instructions. From-SVN: r36665
2000-09-11i386.md (add?i_3, add?i_5): New.Jan Hubicka1-0/+5
* i386.md (add?i_3, add?i_5): New. (add?i_4): Rename from add?i_3; Fix compare pattern. (sub?i_3, xor?i_3, ior?i_3): New. * genrecog.c (write_tree): Output code to clear insn_extract cache. * genattrtab.c (write_attr_case): Gen call to extract_insn_cache instead of extract_insn and extract_constrain_insn_cache instead of extract_insn and constrain_operands. * recog.c (extract_insn_cached, extract_constrain_insn_cached): New functions. (extract_insn): Clear which_alternative. (constrain_operands): Set which_alternative to -1 when failed. * recog.h (extract_constrain_insn_cached, extract_insn_cached): Declare. From-SVN: r36342
2000-07-30gcse.c (try_replace_reg): Use validate_replace_rtx_subexp instead of ↵Jan Hubicka1-0/+1
replace_rtx. * gcse.c (try_replace_reg): Use validate_replace_rtx_subexp instead of replace_rtx. * recog.c (validate_replace_rtx_subexp): New function. * recog.h (validate_replace_rtx_subexp): Declare. From-SVN: r35349
2000-05-27Makefile.in (recog.o): Don't depend on resource.h.Richard Henderson1-2/+9
* Makefile.in (recog.o): Don't depend on resource.h. * recog.c: Don't include resource.h. (recog_last_allowed_insn): Remove. (recog_next_insn): Remove. (struct peep2_insn_data): New. (peep2_insn_data, peep2_current): New. (peep2_next_insn): New. (peep2_regno_dead_p, peep2_reg_dead_p): New. (peep2_find_free_register): New. (peephole2_optimize): Track life information by insn as we go. * recog.h: Update declarations. * resource.c (find_free_register, reg_dead_p): Remove. * resource.h: Remove their declarations. * toplev.c: Include hard-reg-set.h before recog.h. * genconfig.c (max_insns_per_peep2): New. (gen_peephole2): New. (main): Call it. * genemit.c (output_peephole2_scratches): Generate calls to peep2_find_free_register; adjust surrounding code. (main): Have insn-emit.c include hard-reg-set.h before recog.h. * genrecog.c (change_state): Don't track last_insn. (write_action): Write into *_pmatch_len before accepting. (write_tree): Adjust peephole2_insns and subroutines to match. * config/i386/i386.md (all peepholes): Use peep2_regno_dead_p. From-SVN: r34208
2000-02-26Fix copyrights.Jeff Law1-1/+2
From-SVN: r32179
2000-02-05recog.h: Remove NO_MD_PROTOTYPES ifdefs.Zack Weinberg1-4/+0
* recog.h: Remove NO_MD_PROTOTYPES ifdefs. * genflags.c: Use the max_operand_1 logic from genemit.c to calculate how many arguments gen_insn prototypes have. Remove NO_MD_PROTOTYPES ifdefs from the generated file. * genoutput.c: Don't define NO_MD_PROTOTYPES in the generated file. Cast gen_insn initializers to insn_gen_fn. * config/alpha/vms.h: Don't define NO_MD_PROTOTYPES. * gcc.texi: Remove documentation of NO_MD_PROTOTYPES. From-SVN: r31801
2000-01-19recog.h (OUT_FCN): Delete.Kaveh R. Ghazi1-4/+0
* recog.h (OUT_FCN): Delete. * vax.md: Call `get_insn_template' instead of OUT_FCN. From-SVN: r31524
2000-01-17Update copyrightsKaveh Ghazi1-1/+1
From-SVN: r31465
2000-01-17machmode.h: PROTO -> PARAMS.Kaveh R. Ghazi1-52/+52
* machmode.h: PROTO -> PARAMS. * mbchar.h: Likewise. * mips-tdump.c: Likewise. * mips-tfile.c: Likewise. * optabs.c: Likewise. * output.h: Likewise. * prefix.c: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * real.h: Likewise. * recog.c: Likewise. * recog.h: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * regs.h: Likewise. From-SVN: r31459
1999-10-22Fix register elimination problemBernd Schmidt1-0/+2
From-SVN: r30134
1999-10-14recog.c (pmode_register_operand): New.Richard Henderson1-0/+1
* recog.c (pmode_register_operand): New. * recog.h: Declare it. * genrecog.c (pred_codes): Likewise. (special_mode_pred_table): Likewise. (validate_pattern): Don't warn no mode for address_operand. * print-rtl.c (print_rtx) [LABEL_REF]: Only do full subexpression if the operand is not insn-like. From-SVN: r29995
1999-10-01Delete !REGISTER_CONSTRAINTS codeBernd Schmidt1-11/+0
From-SVN: r29753
1999-09-14recog.h (struct recog_data): Make dup_num...Richard Henderson1-9/+19
* recog.h (struct recog_data): Make dup_num, operand_address_p, n_operands, n_dups, n_alternatives `char' instead of `unsigned char'. (struct insn_data): Likewise with n_operands, n_dups, n_alternatives, output_format. * regclass.c (scan_one_insn): Cast n_operands to int before arithmetic inside comparison. From-SVN: r29413
1999-09-13recog.h (INSN_OUTPUT_FORMAT_*): New.Richard Henderson1-2/+9
* recog.h (INSN_OUTPUT_FORMAT_*): New. (struct insn_data): Merge `template' and `outfun' into `output'. Add `output_format'. * genoutput.c (INSN_OUTPUT_FORMAT_*): New. (struct data): Remove `outfun'; add `output_format'. (name_for_index): Remove declaration. (output_insn_data): Handle output formats. (process_template): Emit the bare array for @. (gen_expand, gen_split): Set output_format to NONE. * output.h (get_insn_template): Declare. * final.c (get_insn_template): New. (final_scan_insn): Use it. * toplev.c (compile_file): Likewise. * c4x/c4x.c (c4x_process_after_reload): Likewise. * i860/i860.c (output_delayed_branch): Likewise. (output_delay_insn): Likewise. From-SVN: r29389
1999-09-12Replace insn_foo with insn_data.foo.Richard Henderson1-25/+32
From-SVN: r29358
1999-09-11Replace recog_foo with recog_data.foo.Richard Henderson1-27/+36
From-SVN: r29349
1999-08-31backport: Makefile.in (STAGESTUFF): Add *.peephole2.Richard Henderson1-0/+3
Merge peephole2 from new_ia32_branch: * Makefile.in (STAGESTUFF): Add *.peephole2. (mostlyclean): Likewise. (recog.o): Depend on resource.h. * final.c (peephole): Conditionalize decl on HAVE_peephole. (final_scan_insn): Likewise for the invocation of peephole. * genconfig.c (main): Look for peephole and peephole2 patterns. Emit HAVE_peephole* accordingly. * genpeep.c (main): Conditionalize entire output on HAVE_peephole. * flags.h (flag_peephole2): Declare. * toplev.c: New pass peephole2. New flag -fpeephole2. * genattrtab.c (main): Count DEFINE_PEEPHOLE2. * gencodes.c (main): Likewise. * genextract.c (main): Likewise. * genoutput.c (main): Likewise. * genemit.c (max_operand_1): Look for the max scratch operand. (gen_rtx_scratch): New. (gen_exp): Use it, and pass on new arg subroutine_type. (gen_expand): Take max scratch into account. (gen_split): Emit peephole2 functions. (output_peephole2_scratch): New. (main): Include hard-reg-set.h and resource.h. Handle peephole2. * genrecog.c (routine_type): Add PEEPHOLE2. (IS_SPLIT): New. (make_insn_sequence): Match outer parallel for peep2. Discard top level scratches and dups. (add_to_sequence): New args insn_type and top. Update all callers. Handle toplevel peep2 matching insns. (write_subroutine): Handle peep2. (write_tree_1): Likewise. (write_tree): Likewise. (main): Likewise. (change_state): New arg afterward. Update all callers. Handle matching separate insns. * recog.c (recog_next_insn): New. (peephole2_optimize): New. * rtl.def (DEFINE_PEEPHOLE2): New. * resource.c (find_free_register): New argument last_insn. Use it to find a register available through the entire span. * resource.h (find_free_register): Update prototype. From-SVN: r29015
1999-03-28Warning fixes:Kaveh R. Ghazi1-2/+2
* recog.h (insn_outfun, insn_operand_predicate): Add prototype arguments. * rtl.h (note_stores): Likewise. * rtlanal.c (note_stores): Likewise. From-SVN: r26045
1999-01-23final.c (bb_str): Qualify a char* with the keyword `const'.Kaveh R. Ghazi1-6/+6
* final.c (bb_str): Qualify a char* with the keyword `const'. (add_bb_string, final_scan_insn, output_asm_insn): Likewise. * fix-header.c (read_scan_file): Likewise. * genoutput.c (output_epilogue, process_template): Likewise. * local-alloc.c (requires_inout, block_alloc): Likewise. * output.h (output_asm_insn, assemble_string): Likewise. * recog.c (recog_constraints, check_asm_operands, decode_asm_operands, extract_insn, preprocess_constraints, constrain_operands): Likewise. * recog.h (operand_alternative, recog_constraints, insn_template, insn_outfun, insn_operand_constraint, insn_name): Likewise. * regclass.c (record_reg_classes, scan_one_insn): Likewise. * regmove.c (find_matches): Likewise. * reload.c (alternative_allows_memconst): Likewise. * reload1.c (constraint_accepts_reg_p, reload_cse_simplify_operands): Likewise. * rtl.h (decode_asm_operands): Likewise. * scan.h (fn_decl): Likewise. * varasm.c (assemble_string): Likewise. From-SVN: r24834
1999-01-19recog.c (pop_operand): New function.Richard Henderson1-0/+1
* recog.c (pop_operand): New function. * recog.h (pop_operand): Declare it. * genrecog.c (preds): Define it. From-SVN: r24774
1999-01-15expr.c (queued_subexp_p): Make public.Richard Henderson1-0/+1
* expr.c (queued_subexp_p): Make public. * expr.h (queued_subexp_p): Declare it. * recog.c (asm_operand_ok): New function. (check_asm_operands): Use it. After reload, use constrain_operands instead. * recog.h (asm_operand_ok): Declare it. * stmt.c (expand_asm_operands): Use it to try harder to make asms initially satisfy their constraints. From-SVN: r24686
1999-01-11* recog.h (recog_op_alt): Declare extern.Richard Henderson1-1/+1
From-SVN: r24633
1999-01-11Update copyright.Andreas Schwab1-1/+1
From-SVN: r24610
1999-01-08m68k.h: Declare output_function_epilogue.Andreas Schwab1-0/+3
* config/m68k/m68k.h: Declare output_function_epilogue. * recog.h: Declare next_insn_tests_no_inequality. From-SVN: r24570
1999-01-06More copyright fixes. Oh what fun.Jeff Law1-1/+1
From-SVN: r24536
1998-12-04final.c (cleanup_subreg_operands): Delete some unused code.Bernd Schmidt1-0/+46
* final.c (cleanup_subreg_operands): Delete some unused code. * recog.h (MAX_RECOG_ALTERNATIVES): New macro. (struct insn_alternative): New structure definition. (recog_op_alt): Declare variable. (preprocess_constraints): Declare function. * recog.c (recog_op_alt): New variable. (extract_insn): Verify number of alternatives is in range. (preprocess_constraints): New function. * reg-stack.c: Include recog.h. (constrain_asm_operands): Delete. (get_asm_operand_lengths): Delete. (get_asm_operand_n_inputs): New function. (record_asm_reg_life): Delete OPERANDS, CONSTRAINTS, N_INPUTS and N_OUTPUTS args. All callers changed. Compute number of inputs and outputs here by calling get_asm_operand_n_inputs. Instead of constrain_asm_operands, call extract_insn, constrain_operands and preprocess_constaints. Use information computed by these functions throughout. (record_reg_life): Delete code that is unused due to changes in record_asm_reg_life. (subst_asm_stack_regs): Delete OPERANDS, OPERAND_LOC, CONSTRAINTS, N_INPUTS and N_OUTPUTS args. All callers changed. Similar changes as in record_asm_reg_life. (subst_stack_regs): Move n_operands declaration into the if statement where it's used. Delete code that is unused due to changes in subst_asm_stack_regs. * stmt.c (expand_asm_operands): Verify number of alternatives is in range. * Makefile.in (reg-stack.o): Depend on recog.h. From-SVN: r24090
1998-11-07configure.in (host_xm_file, [...]): Arrange to include gansidecl.h in ↵Kaveh R. Ghazi1-2/+0
{ht}config.h & tm.h just before the config/... * configure.in (host_xm_file, build_xm_file, xm_file, tm_file): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/ directory headers. (tm_file_list, host_xm_file_list, build_xm_file_list): Handle gansidecl.h in the list of dependencies. * Makefile.in (RTL_BASE_H): Don't depend on gansidecl.h. (TREE_H, DEMANGLE_H, RECOG_H, REGS_H, libgcc2.a, stmp-multilib, mbchar.o, collect2.o, pexecute.o, vfprintf.o, splay-tree.o, gcc.o, gencheck.o, choose-temp.o, mkstemp.o, mkstemp.o, prefix.o, dyn-string.o, cexp.o, cccp.o, cppmain.o, cpplib.o, cpperror.o, cppexp.o, cppfiles.o, cpphash.o, cppalloc.o, scan-decls.o): Likewise. * cccp.c: Don't include gansidecl.h. * cexp.y: Likewise. * collect2.c: Likewise. * config/c4x/c4x.c: Likewise. * config/v850/v850.h: Likewise. * cppalloc.c: Likewise. * cpperror.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * cppmain.c: Likewise. * cppulp.c: Likewise. * demangle.h: Likewise. * doprint.c: Likewise. * dyn-string.c: Likewise. * eh-common.h: Likewise. * fix-header.c: Likewise. * frame.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * gen-protos.c: Likewise. * gencheck.c: Likewise. * halfpic.h: Likewise. * hash.c: Likewise. * machmode.h: Likewise. * mbchar.c: Likewise. * prefix.c: Likewise. * protoize.c: Likewise. * recog.h: Likewise. * rtl.h: Likewise. * scan-decls.c: Likewise. * tree.h: Likewise. * varray.h: Likewise. From-SVN: r23558
1998-11-04recog.h (enum op_type): Define.Bernd Schmidt1-1/+11
* recog.h (enum op_type): Define. (constrain_operands): Adjust prototype. (recog_op_type): Declare new variable. * recog.c (recog_op_type): New variable. (insn_invalid_p): Allow modifying an asm statement after reload. (extract_insn): Set up recog_op_type. (constrain_operands): Lose INSN_CODE_NUM arg. All callers changed. Don't compute operand types, use recog_op_type. Use the information computed by extract_insn instead of the previous method of finding it by insn code number. * caller-save.c (init_caller_save): Use extract_insn, not insn_extract. * reorg.c (fill_slots_from_thread): Likewise. * reload1.c (reload_as_needed): Likewise. (gen_reload): Likewise. (inc_for_reload): Likewise. (reload_cse_simplify_operands): Likewise. Use the information computed by extract_insn instead of the previous method of finding it by insn code number. * genattrtab.c (write_attr_case): Generate call to extract_insn, not insn_extract. * final.c (final_scan_insn): Use extract_insn, not insn_extract. (cleanup_operand_subregs): Use extract_insn, not insn_extract. Use the information computed by extract_insn instead of the previous method of finding it by insn code number. * regmove.c (find_matches): Likewise. Change meaning of the return value to be nonzero if the optimization can be performed, zero if not. All callers changed. Shorten some variable names to fix formatting problems. (regmove_optimize): Shorten some variable names to fix formatting problems. Use the information computed by extract_insn instead of the previous method of finding it by insn code number. * regclass.c (scan_one_insn): Likewise. (record_reg_classes): Don't compute operand types, use recog_op_type. * reload.c (find_reloads): Lose CONSTRAINTS1 variable; use recog_constraints instead. From-SVN: r23529