aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.h
AgeCommit message (Collapse)AuthorFilesLines
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
1998-10-17Warning fixes:Kaveh R. Ghazi1-1/+1
* Makefile.in (flow.o): Depend on recog.h. * cpplib.h (directive_table): Add missing initializiers. (finclude): Change type of variable `bsize' to size_t. * cse.c (rtx_cost): Mark parameter `outer_code' with ATTRIBUTE_UNUSED. * dwarfout.h (dwarfout_label): Wrap prototype in macro RTX_CODE. * fix-header.c (lookup_std_proto): Cast the result of `strlen' to `int' when comparing against one. (cpp_file_line_for_message): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (cpp_fatal): Mark parameter `pfile' with ATTRIBUTE_UNUSED. * flow.c: Include recog.h. (sbitmap_copy): Cast arguments 1 & 2 of `bcopy' to (PTR). * function.c (thread_prologue_and_epilogue_insns): Mark parameter `f' with ATTRIBUTE_UNUSED. (reposition_prologue_and_epilogue_notes): Likewise. * genopinit.c (gen_insn): Cast argument of ctype functions to `unsigned char'. * haifa-sched.c: Include recog.h. (blockage_range): Cast result of UNIT_BLOCKED macro to (int) when comparing against one. * libgcc2.a (__throw): Revert ATTRIBUTE_UNUSED change for now. * mips-tfile.c (parse_end): Cast the argument of ctype function to `unsigned char'. (parse_ent): Likewise. (parse_input): Likewise. * optabs.c (init_libfuncs): Likewise. * protoize.c (find_rightmost_formals_list): Likewise. * recog.h (const_double_operand): Fix typo in prototype. * tlink.c (scan_linker_output): Cast the argument of ctype function to `unsigned char'. * toplev.c (check_lang_option): Cast the result of `strlen' to `int' when comparing against one. From-SVN: r23155
1998-10-16Makefile.in (insn-extract.o): Fix dependencies.Bernd Schmidt1-0/+27
* Makefile.in (insn-extract.o): Fix dependencies. * genextract.c (main): Generate includes for insn-config.h and recog.h. Delete generation of declarations which are now in recog.h. * genrecog.c (main): Delete generation of definitions which are now in recog.c. * local-alloc.c (block_alloc): Use extract_insn and the variables it sets up instead of looking up values by insn_code. * recog.c (recog_operand, recog_operand_loc, recog_dup_loc, recog_dup_num): Define here instead of generating the definition in genrecog.c. (recog_n_operands, recog_n_dups, recog_n_alternatives, recog_operand_mode, recog_constraints, recog_operand_address_p): New variables. (extract_insn): New function. * recog.h (extract_insn): Declare function. (which_alternative, recog_n_operands, recog_n_dups, recog_n_alternatives, recog_operand_mode, recog_constraints, recog_operand_address_p): Declare variables. * regclass.c (n_occurrences): New static function. * reload.c (n_occurrences): Delete function. (find_reloads): Use extract_insn. * reload.h (n_occurrences): Delete declaration. From-SVN: r23147
1998-08-22recog.c (validate_replace_rtx_group): New function.Jeff Law1-0/+1
� * recog.c (validate_replace_rtx_group): New function. * recog.h (validate_replace_rtx_group): Declare it. * regmove.c (optimize_reg_copy_3): If any substitution fails, then undo the entire group of substitutions. From-SVN: r21910
1998-06-08Warning fixes:Kaveh R. Ghazi1-0/+1
* Makefile.in (varasm.o): Depend on dbxout.h. (cse.o): Depend on toplev.h and output.h. (gcse.o): Depend on output.h. * mips.c: Include system.h and toplev.h and remove redundant code. Include output.h after tree.h so all its prototypes get activated. * mips.md (table_jump): Remove unused variable `dest'. * sparc.h: Add prototype for `v8plus_regcmp_op'. * crtstuff.c (fini_dummy, init_dummy): Mark function definitions with __attribute__ ((__unused__)). (__frame_dummy): Provide prototype before use, wrap it with EH_FRAME_SECTION_ASM_OP. * cse.c: Move inclusion of <setjmp.h> above local headers. Include toplev.h and output.h. * dbxout.h: Add prototype for `dbxout_begin_function'. * final.c (final_scan_insn): Wrap variable `max_skip' in macro ASM_OUTPUT_MAX_SKIP_ALIGN. * gcse.c: Include system.h and output.h. (dump_cuid_table, dump_rd_table, dump_cprop_data, dump_pre_data): Make extern instead of static. (compute_can_copy): Only declare variables `reg' and `insn' when AVOID_CCMODE_COPIES is not defined. (record_set_info): Mark parameter `setter' with ATTRIBUTE_UNUSED. (hash_scan_clobber): Likewise for `x' and `insn'. (hash_scan_call): Likewise. (record_last_set_info): Likewise for `setter'. (mark_call): Likewise for `pat'. (pre_insert_insn): Wrap variable `note' in macro HAVE_cc0. * libgcc2.c (__bb_init_prg): Replace bzero with memset and fix the length parameter so that it multiplies the number of elements by the sizeof(element). * output.h: Add prototype for `weak_finish'. * recog.h: Likewise for `validate_replace_src'. * rtl.h: Likewise for `optimize_save_area_alloca', `fix_sched_param', `purge_addressof', `gcse_main', `regmove_optimize', `dbr_schedule', `branch_prob' and `end_branch_prob'. * toplev.h: Likewise for `set_float_handler' and `output_quoted_string'. * varasm.c: Include dbxout.h. From-SVN: r20351
1998-04-03dummy commit before mergeJeff Law1-28/+40
From-SVN: r18980
1996-04-15recog.h: #include "gansidecl.h".Doug Evans1-15/+2
* recog.h: #include "gansidecl.h". (PROTO,const): Delete. From-SVN: r11797
1995-06-15Update FSF address.Richard Kenner1-1/+2
From-SVN: r9964
1993-03-19Add prototypes.hJim Wilson1-6/+15
From-SVN: r3793
1991-12-24entered into RCSCharles Hannum1-0/+111
From-SVN: r136