Commit Graph

58 Commits

Author SHA1 Message Date
Jan Hubicka
62674ffe2b recog.c (constrain_operands): Ignore unary operators when matching operands.
* recog.c (constrain_operands): Ignore unary operators when
        matching operands.  Recognize '5'..'9' as well.

From-SVN: r26342
1999-04-10 15:16:29 -07:00
Jeff Law
bbf9d88cd7 Fix trivial formatting buglet in each file.
From-SVN: r26241
1999-04-06 22:42:42 -06:00
Richard Henderson
aeb7ff6879 * recog.c (push_operand, pop_operand): VOIDmode needn't match modes.
From-SVN: r25624
1999-03-06 18:45:29 -08:00
Nick Clifton
3c4fc1ccc4 Only call update_flow_info if instruction scheduling is enabled.
From-SVN: r25042
1999-02-05 10:57:02 +00:00
Bob Manson
ca545bb569 Bob Manson <manson@charmed.cygnus.com>
Bob Manson  <manson@charmed.cygnus.com>
        * resource.c, resource.h: New files.
        * haifa-sched.c (regno_use_in): Moved to rtlanal.c.
        (split_block_insns): Moved to recog.c.
        (update_flow_info): Make public.
        * reorg.c: Moved the functions dealing with computing resource
        usage to resource.c.
        * sched.c (regno_use_in): Moved to rtlanal.c.
        (update_flow_info): Make public.
        (schedule_insns): Use split_block_insns.
        * recog.c (split_block_insns): New function.

From-SVN: r24982
1999-02-02 13:22:52 -08:00
Richard Henderson
1afbe1c4e6 recog.c (check_asm_operands): Treat indeterminate operand ok results as success.
* recog.c (check_asm_operands): Treat indeterminate operand ok
        results as success.  Try harder to resolve a matching constraint.
        * stmt.c (expand_asm_operands): Recognize when an output operand's
        constraint does not allow memory.  Treat indeterminate operand ok
        results as failure.  Try harder to resolve a matching constraint.

From-SVN: r24959
1999-02-01 12:03:23 -08:00
Kaveh R. Ghazi
9b3142b340 final.c (bb_str): Qualify a char* with the keyword `const'.
* 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-23 19:45:50 +00:00
Richard Henderson
ee5332b81a cse.c (fold_rtx): Revert 29 Dec change.
* cse.c (fold_rtx): Revert 29 Dec change.
        (cse_insn): Revert 12 Jan change.
        * expr.c (expand_builtin): Don't emit CONST around CONSTANT_P_RTX.
        * regclass.c (reg_scan_mark_refs): Revert 29 Dec change.
        * rtl.def: Likewise.
        * rtl.h (CONSTANT_P): Likewise.
        * expr.c (emit_move_insn): Never try to flush CONSTANT_P_RTX
        to memory.
        * recog.c (immediate_operand): Accept CONSTANT_P_RTX.
        * alpha.c (input_operand): Likewise.
        * c4x.c (const_operand): Likewise.
        * explow.c (allocate_dynamic_stack_space): Use register_operand
        instead of arith_operand, which does not exist.
        * 1750a.h: Fix comment closure.
        * a29k.c (a29k_set_memflags): Fix typo in 19 Jan change.
        * arc.md (one_cmplsi2_set_cc_insn): Fix set mode mismatch.
        * arm.h (TARGET_SWITCHES): Fix typo.
        * i370.md (anon mult and div patterns): Fix set mode mismatch.
        * i860.c (output_delayed_branch): Fix operands to constrain_operands.
        (output_delay_insn): Likewise.
        * m88k.md (anon rotate insns): Fix set mode mismatch.
        (anon BLKmode moves): Commonize and fix set mode mismatches.
        * ns32k.md (udivmoddi[shq]i4_internal): Fix mode mismatch.
        * romp.md (movdf): Fix typo.

From-SVN: r24796
1999-01-20 18:21:28 -08:00
Richard Henderson
6fbe9bd840 recog.c (pop_operand): New function.
* recog.c (pop_operand): New function.
        * recog.h (pop_operand): Declare it.
        * genrecog.c (preds): Define it.

From-SVN: r24774
1999-01-19 13:55:35 -08:00
Mark Mitchell
c6df88cbec rtl.h (rtx_def): Update documentation.
* rtl.h (rtx_def): Update documentation.
	(MEM_IN_STRUCT_P): Likewise.
	(MEM_SCALAR_P): New macro.
	(MEM_COPY_ATTRIBUTES): Likewise.
	(MEM_SET_IN_STRUCT_P): Likewise.
	* rtl.texi (MEM_SCALAR_P): Document.
	* alias.c (canon_rtx): Use MEM_COPY_ATTRIBUTES.
	(fixed_scalar_and_varying_struct_p): New function.  Use
	MEM_SCALAR_P rather than !MEM_IN_STRUCT_P.
	(aliases_everything_p): Likewise.
	(true_dependence): Use them.
	(write_dependence_p): New function, containing code common to
	anti_dependence and output_dependence.
	(anti_dependence): Use it.
	(output_dependence): Likewise.
	* calls.c (save_fixed_argument_area): Don't clear
	MEM_IN_STRUCT_P.
	(expand_call): Use MEM_SET_IN_STRUCT_P.
	(emit_library_call): Don't clear MEM_IN_STRUCT_P.
	(emit_library_call_value): Likewise.
	(store_one_arg): Use MEM_SET_IN_STRUCT_P.
	* combine.c (simplify_rtx): Use MEM_COPY_ATTRIBUTES.
	(make_extraction): Likewise.
	(simplify_shift_const): Likewise.
	(gen_lowpart_for_combine): Likewise.
	* cse.c (gen_lowpart_if_possible): Use MEM_COPY_ATTRIBUTES.
	* emit-rtl.c (operand_subword): Likewise.
	(change_address): Likewise.
	* explow.c (stabilize): Use MEM_COPY_ATTRIBUTES.
	* expr.c (protect_from_queue): Use MEM_COPY_ATTRIBUTES.
	(emit_group_store): Use MEM_SET_IN_STRUCT_P.
	(copy_blkmode_from_reg): Likewise.
	(store_field): Likewise.
	(expand_expr): Remove bogus guesswork setting MEM_IN_STRUCT_P
	heuristically.  Use MEM_SET_IN_STRUCT_P.
	(get_memory_rtx): Likewise.
	* final.c (alter_subreg): Use MEM_COPY_ATTRIBUTES.
	* function.c (assign_stack_temp): Clear MEM_SCALAR_P and
	MEM_ALIAS_SET on newly returned MEMs.
	(assign_temp): Use MEM_SET_IN_STRUCT_P.
	(put_reg_into_stack): Likewise.
	(fixup_var_refs1): Use MEM_COPY_ATTRIBUTES.
	(gen_mem_addressof): Use MEM_SET_IN_STRUCT_P.
	(assign_parms): Likewise.
	(expand_function): Likewise.
	* integrate.c (expand_inline_function): Likewise.
	(copy_rtx_and_substitute): Use MEM_COPY_ATTRIBUTES.
	* loop.c (note_addr_stored): Remove check on MEM_IN_STRUCT_P.
	* optabs.c (gen_move_insn): Use MEM_COPY_ATTRIBUTES.
	* print-rtl.c (print_rtx): Print /f for frame_related.
	* recog.c (validate_replace_rtx_1): Use MEM_COPY_ATTRIBUTES.
	* reload1.c (reload): Copy MEM_SCALAR_P as well.
	* stmt.c (expand_decl): Use MEM_SET_IN_STRUCT_P.
	(expand_anon_union_decl): Use MEM_COPY_ATTRIBUTES.
	* varasm.c (make_decl_rtl): Use MEM_SET_IN_STRUCT_P.
	(output_constant_def): Likewise.
	* a29k.c (a29k_set_memflags_1): Take scalar_p.
	Set MEM_SCALAR_P.
	(a29k_set_memflags): Use it.
	* alpha.c (get_aligned_mem): Use MEM_COPY_ATTRIBUTES.
	* c4x.c (c4x_scan_for_ld): Likewise.
	* h8300.c (fix_bit_operand): Likewise.
	* m88k.c (legitimize_address): Likewise.
	(block_move_loop): Likewise.
	(block_move_no_loop): Likewise.
	(block_move_sequence): Likewise.
	(m88k_builtin_saveregs): Use MEM_SET_IN_STRUCT_P.
	* mips/abi64.h (SETUP_INCOMING_VARARGS): Likewise.
	* rs6000.c (expand_block_move_insn): Use MEM_COPY_ATTRIBUTES.
	* sh.c (sh_builtin_saveregs): Use MEM_SET_IN_STRUCT_P.
	* arm.h (arm_gen_load_multiple): Take scalar_p.
	(arm_store_load_multiple): Likewise.
	* arm.c (arm_gen_load_multiple): Likewise.
	(arm_gen_store_multiple): Likewise.
	(arm_gen_movstrqi): Treat MEM_SCALAR_P like MEM_IN_STRUCT_P.

From-SVN: r24759
1999-01-19 10:32:33 +00:00
Kaveh R. Ghazi
47c3ed988b Warning fixes:
* loop.c (insert_bct): Hide the definition of variables
        `increment_direction', `compare_direction', `add_iteration' and
        `loop_var_mode'.
        * recog.c (mode_dependent_address_p): Mark parameter `addr' with
        ATTRIBUTE_UNUSED.  Mark label `win' with ATTRIBUTE_UNUSED_LABEL.
        (mode_independent_operand): Mark label `lose' with
        ATTRIBUTE_UNUSED_LABEL.
        * regclass.c (n_occurrences): Remove prototype and definition.
        * reload.c (find_reloads_address_1): Mark variable `tem' with
        ATTRIBUTE_UNUSED.
        * reload1.c (reload): Cast the first two arguments of `bcopy' to PTR.
        * sbitmap.c (sbitmap_copy): Likewise.
        * scan-decls.c (scan_decls): Hide label `handle_comma'.
        * toplev.c (output_lang_identify): Mark prototype with
        ATTRIBUTE_UNUSED.
        * tree.c (make_node): Cast the first argument of `bzero' to PTR.
        (make_tree_vec): Likewise.
        (build1): Likewise.
        * varasm.c (assemble_static_space): Mark variable `tem' with
        ATTRIBUTE_UNUSED.

From-SVN: r24740
1999-01-18 06:17:31 +00:00
Richard Henderson
1f06ee8d0d expr.c (queued_subexp_p): Make public.
* 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-15 10:43:47 -08:00
Kaveh R. Ghazi
973838fdb3 Warning fixes:
* alias.c (record_alias_subset): Remove ignored `&'.
        (init_alias_once): Likewise.
        * c-lex.c (UNGETC): Cast first argument of comma expression to void.
        * config/mips/mips.c (mips_asm_file_end): Cast the result of
        fwrite to `int' when comparing against one.
        * config/mips/mips.h (CAN_ELIMINATE): Add parens around && within ||.
        (INITIAL_ELIMINATION_OFFSET): Add braces to avoid ambiguous `else'.
        * cse.c (rehash_using_reg): Change type of variable `i' to
        unsigned int.
        * dwarf2out.c (initial_return_save): Cast -1 to unsigned before
        assigning it to one.
        * except.c (duplicate_eh_handlers): Remove unused variable `tmp'.
        * final.c (final_scan_insn): Likewise for variable `i'.
        (output_asm_insn): Cast a char to unsigned char when used as an
        array index.
        * gcse.c (compute_pre_ppinout): Cast -1 to SBITMAP_ELT_TYPE when
        assigning it to one.
        * loop.c (strength_reduce): Remove unused variables `count' and `temp'.
        * recog.c (preprocess_constraints): Cast a char to unsigned char
        when used as an array index.
        * regmove.c (find_matches): Likewise.
        * reload1.c (calculate_needs): Add default case in switch.
        (eliminate_regs_in_insn): Initialize variable `offset'.
        (set_offsets_for_label): Change type of variable `i' to unsigned.
        (reload_as_needed): Wrap variable `i' in macro check on
        AUTO_INC_DEC || INSN_CLOBBERS_REGNO_P.
        * scan-decls.c (scan_decls): Mark parameters `argc' and `argv'
        with ATTRIBUTE_UNUSED.  Cast variable `start_written' to size_t
        when comparing against one.
        * stor-layout.c (layout_decl): Cast maximum_field_alignment to
        unsigned when comparing against one.  Likewise for
        GET_MODE_ALIGNMENT().
        (layout_record): Cast record_align to int when comparing against a
        signed value.
        (layout_type): Cast TYPE_ALIGN() to int when comparing against a
        signed value.
        * tree.c (get_identifier): Cast variable `len' to unsigned when
        comparing against one.
        (maybe_get_identifier): Likewise

From-SVN: r24403
1998-12-23 07:09:01 +00:00
Bernd Schmidt
f62a15e367 final.c (cleanup_subreg_operands): Delete some unused code.
* 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-12-04 12:55:59 +00:00
Bernd Schmidt
0eadeb15bc recog.h (enum op_type): Define.
* 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-11-04 14:25:00 -07:00
Kaveh R. Ghazi
7f7f8214d8 Warning fixes:
* Makefile.in (recog.o): Depend on toplev.h.
        (insn-emit.o): Depend on recog.h.
        (insn-peep.o): Depend on recog.h and insn-config.h.
        * combine.c (simplify_set): Remove unused variable `scratches'.
        * final.c (final_scan_insn): Wrap declaration of variables `vlen'
        and `idx' in macro conditional controlling their use.
        * genemit.c (main): Make the generated output file include
        recog.h.  Don't have it declare `insn_operand_constraint', since
        we get it from recog.h.
        * genpeep.c (main): Make the generated output file include
        insn-config.h and recog.h.
        * recog.c: Include toplev.h.
        (extract_insn): Remove unused variable `p'.
        * regclass.c (fix_register): Add missing braces around initializer
        for `what_option'.
        (allocate_reg_info): Move variable `i' into the scope where it is
        used.  Change its type to `size_t'.

From-SVN: r23307
1998-10-25 12:56:39 +00:00
Bernd Schmidt
61719ba72e regclass.c (regclass): Break out some code into new function scan_one_insn, and into regclass_init.
* regclass.c (regclass): Break out some code into new function
        scan_one_insn, and into regclass_init.
        (init_cost): New static variable, moved out of regclass.
        (regclass_init): Initialize it here, not in .
        (scan_one_insn): New static function, broken out of regclass.
        * recog.c (apply_change_group): Break out some code into new
        function insn_invalid_p.
        (insn_invalid_p): New static fn, broken out of apply_change_group.

From-SVN: r23236
1998-10-22 17:08:26 -06:00
Bernd Schmidt
0a578fee77 Makefile.in (insn-extract.o): Fix dependencies.
* 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-10-16 19:28:57 -06:00
Kaveh R. Ghazi
e51712db0d Warning fixes:
* Makefile.in (sched.o): Depend on recog.h.
        * alias.c (REG_BASE_VALUE): Cast the result of REGNO() macro to
        (unsigned) when comparing against one.
        (find_base_value): Likewise.
        (record_base_value): Cast variable `regno' to (unsigned) when
        comparing against one.  Cast the result of REGNO() macro to
        (unsigned) when comparing against one.
        (memrefs_conflict_p): Change type of variables `r_x' and `r_y'  to
        unsigned.
        (init_alias_analysis): Add unsigned variable `ui'.  Use it as loop
        variable where an unsigned index is needed.
        * caller-save.c (init_caller_save): Cast `-1' to (enum insn_code)
        before comparing against one.
        * collect2.c: Add prototypes for functions `error', `fatal' and
        `fatal_perror'.  Make these functions take variable arguments
        instead of faking it with a fixed number of args.
        (write_c_file_stat): Cast the argument of ctype macro to (unsigned
        char).
        * combine.c (can_combine_p): Mark parameter `pred' with
        ATTRIBUTE_UNUSED.
        (find_split_point): Cast variable `src' to (unsigned
        HOST_WIDE_INT) when comparing against one.
        HOST_WIDE_INT) when comparing against one.
        (simplify_rtx): Cast 1 to (unsigned HOST_WIDE_INT) in shift.
        (simplify_logical): Likewise.
        (force_to_mode): Cast result of INTVAL() macro to (unsigned
        HOST_WIDE_INT) when comparing against one.  Cast 1 to (unsigned
        HOST_WIDE_INT) in shift.
        (simplify_and_const_int): Cast result of INTVAL() macro to
        `unsigned HOST_WIDE_INT' when comparing against one.
        (merge_outer_ops): Cast variable const0 to `unsigned
        HOST_WIDE_INT' when comparing against the result of
        GET_MODE_MASK() macro.
        (simplify_comparison): Likewise for variable `c0'.  Cast variable
        `const_op' to `unsigned HOST_WIDE_INT' when comparing against
        one.  Cast `1' to `unsigned HOST_WIDE_INT' in shift.  Cast the
        result of `GET_MODE_MASK()/2' to `HOST_WIDE_INT' when comparing
        against one.  Cast `1' to `unsigned HOST_WIDE_INT' in shift.  Cast
        result of INTVAL() macro to `unsigned HOST_WIDE_INT' when
        comparing against one.
        (distribute_notes): Wrap variable `cc0_setter' in macro `HAVE_cc0'.
        config/mips/mips.c (gen_int_relational): Cast result of INTVAL()
        macro to `unsigned HOST_WIDE_INT' when comparing against one.
        (output_block_move): Cast `sizeof' expression to (int) when
        comparing against one.
        (function_arg): Cast BITS_PER_WORD to `unsigned' when comparing
        against one.
        (save_restore_insns): Cast `base_offset' to `long' to match format
        specifier in fprintf.
        * config/mips/mips.h (Pmode): Cast the result of `Pmode' macro
        to `enum machine_mode'.
        * flow.c (life_analysis_1): Remove unused variable `insn'.
        * gcc.c (translate_options): Move variables `j' and `k' into the
        scope in which they are used.  Change their types to `size_t'.
        (set_spec): Cast the argument of ctype macro to `unsigned char'.
        (read_specs): Likewise.
        (process_command): Cast `sizeof' to (int) when comparing against one.
        (do_spec_1): Cast the argument of ctype macro to `unsigned char'.
        (handle_braces): Cast both sides of `==' expression to `long' to
        ensure sign matching.
        (main): Cast variable `i' to `int' when comparing against one.
        * gcov-io.h (__fetch_long): Change type of parameter `bytes' from
        int to size_t.  Cast variable `i' to size_t when comparing against
        one.
        * genattrtab.c (convert_set_attr_alternative): Remove unused
        parameter `insn_code'.  All callers changed.
        (convert_set_attr): Likewise.
        * genrecog.c (add_to_sequence): Cast result of XVECLEN() macro to
        size_t when comparing against one.  Likewise for variable `len'.
        * global.c (global_alloc): Cast variable `max_regno' to size_t
        when comparing against one.  Likewise for variable `max_allocno'.
        * jump.c (sets_cc0_p): Mark parameter `x' with ATTRIBUTE_UNUSED.
        * local-alloc.c (validate_equiv_mem_from_store): Mark parameter
        `set' with ATTRIBUTE_UNUSED.
        (find_free_reg): Cast `sizeof' expression to (int) when comparing
        against one.
        * loop.c (count_loop_regs_set): Remove unused variable `dest'.
        (strength_reduce): Mark parameter `bct_p' with ATTRIBUTE_UNUSED.
        (get_condition): Cast variable `const_val' to `unsigned
        HOST_WIDE_INT' when comparing against one.  Cast unsigned
        expression to HOST_WIDE_INT when comparing against one.
        (insert_loop_mem): Mark parameter `data' with ATTRIBUTE_UNUSED.
        (load_mems_and_recount_loop_regs_set): Cast variable `nregs' to
        `unsigned' when comparing against one.
        * protoize.c (is_id_char): Change type of parameter `ch' to
        unsigned char.
        (munge_compile_params): Cast argument of ctype macro to (const
        unsigned char).
        (process_aux_info_file): Cast variable `aux_info_size' to int when
        comparing against one.
        (forward_to_next_token_char): Cast argument of ctype macro to
        `const unsigned char'.
        (edit_formals_lists): Likewise.
        (find_rightmost_formals_list): Likewise.
        (add_local_decl): Likewise.
        (add_global_decls): Likewise.
        (edit_fn_definition): Likewise.
        (do_cleaning): Likewise.
        (scan_for_missed_items): Likewise.
        (edit_file): Cast variable `orig_size' to (int) when comparing
        against one.
        (main): Cast argument of ctype macro to `const unsigned char'.
        * recog.c (const_int_operand): Mark parameter `mode' with
        ATTRIBUTE_UNUSED.
        * regclass.c (record_reg_classes): Change type of variable `c' to
        `unsigned char'.  Cast `char' array index to `unsigned char'.
        * reload.c (push_secondary_reload): Cast argument to
        REG_CLASS_FROM_LETTER() macro to `unsigned char'.
        * reload1.c (calculate_needs): Cast `char' array index to
        `unsigned char'.
        (set_label_offsets): Change type of variable `i' to unsigned int.
        Cast result of XVECLEN() macro to unsigned when comparing against
        one.
        (mark_not_eliminable): Change type of variable `i' to unsigned.
        (order_regs_for_reload): Likewise.  Cast `max_regno' to unsigned
        when comparing against one.
        (reload_as_needed): Cast macro NUM_ELIMINABLE_REGS to (int) when
        comparing against one.
        (choose_reload_regs): Hide unused label `fail'.
        (reload_cse_simplify_operands): Cast `char' array index to
        `unsigned char'.
        (reload_combine_note_store): Mark parameter `set' with
        ATTRIBUTE_UNUSED.  Cast UNITS_PER_WORD to unsigned when comparing
        against one.
        (reload_cse_move2add): Remove unused variable `src2'.
        * sched.c: Include recog.h.
        (sched_note_set): Remove unused parameter `b'.  All callers
        changed.
        (split_hard_reg_notes): Likewise for parameter `orig_insn'.
        (blockage_range): Cast result of UNIT_BLOCKED() macro to (int)
        when comparing against one.
        * stupid.c (stupid_find_reg): Mark parameter `changes_size' with
        ATTRIBUTE_UNUSED.  Cast `sizeof' expression to (int) when
        comparing against one.
        * unroll.c (precondition_loop_p): Remove unused parameter
        `loop_end'.  All callers changed.

From-SVN: r23079
1998-10-14 09:02:55 +00:00
Bernd Schmidt
a330a79ef5 * recog.c (alter_subreg): Delete declaration.
From-SVN: r22749
1998-10-02 03:53:03 -06:00
Jeffrey A Law
0d8e55d8cd combine.c (make_extraction): If no mode is specified for an operand of insv...
* combine.c (make_extraction): If no mode is specified for
        an operand of insv, extv, or extzv, default it to word_mode.
        (simplify_comparison): Similarly.
        * expmed.c (store_bit_field): Similarly.
        (extract_bit_field): Similarly.
        * function.c (fixup_var_regs_1): Similarly.
        * recog.c (validate_replace_rtx_1): Similarly.
        * mips.md (extv, extzv, insv expanders): Default modes for most
        operands.  Handle TARGET_64BIT.
        (movdi_uld, movdi_usd): New patterns.

From-SVN: r22439
1998-09-15 16:47:10 -06:00
Jeff Law
edfac33e82 recog.c (validate_replace_rtx_group): New function.
�
        * 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: r21909
1998-08-22 17:21:23 -06:00
Mark Mitchell
41a972a956 rtl.h (rtx_function): New type.
* rtl.h (rtx_function): New type.
	(for_each_rtx): New function.
	* rtlanal.c (for_each_rtx): Define it.
	* recog.c (change_t): New type.
	(change_objects, change_old_codes, change_locs, change_olds):
	Replace with ...
	(changes): New variable.
	(validate_change): Dynamically allocate room for more changes, if
	necessary.  Uses changes array instead of change_objects, etc.
	(apply_change_group):  Use changes array instead of
	change_objects, etc.
	* loop.c (loop_mem_info): New type.
	(loop_mems): New variable.
	(loop_mems_idx): Likewise.
	(looop_mems_allocated): Likewise.
	(scan_loop): Remove nregs parameter.
	(next_insn_in_loop): New function.
	(load_mems_and_recount_loop_regs_set): Likewise.
	(load_mems): Likewise.
	(insert_loop_mem): Likewise.
	(replace_loop_mem): Likewise.
	(replace_label): Likewise.
	(INSN_IN_RANGE_P): New macro.
	(loop_optimize): Don't pass max_reg_num() to scan_loop.
	(scan_loop): Remove nregs parameter, compute it after any new
	registers are created by load_mems.  Use INSN_IN_RANGE_P and
	next_insn_in_loop rather than expanding them inline.  Call
	load_mems to load memory into pseudos, if appropriate.
	(prescan_loop): Figure out whether or not there are jumps from the
	loop to targets other than the label immediately following the
	loop.  Call insert_loop_mem to notice all the MEMs used in the
	loop, if it could be safe to pull MEMs into REGs for the duration
	of the loop.
	(strength_reduce): Use next_insn_in_loop.  Tweak comments.

From-SVN: r21845
1998-08-19 06:30:47 -06:00
Doug Evans
7506f49132 * Global CSE and constant/copy propagation.
* Makefile.in (OBJS): Add gcse.o
        (STAGESTUFF): Add *.gcse.
        (gcse.o): Add dependencies.
        (mostlyclean): Remove *.gcse and */*.gcse.
        * gcse.c: New file.
        * loop.c (loop_optimize): Move call to init_alias_analysis.
        * recog.c (validate_replace_src): New function.
        * toplev.c (gcse_dump): New global variable.
        (flag_gcse, gcse_time): Likewise.
        (compile_file): Initialize gcse_time and clean out the gcse dump
        file if necessary.
        (rest_of_compilation): Call gcse_main as requested.  Dump RTL
        after gcse if requested.
        (main): Enable gcse for -O2 and above.  Handle -dG.  Enable gcse
        dumps for -da.
        * gcc.texi: Add gcse related internal documentation.
        * invoke.texi: Note new command line options for gcse.
        * tm.texi: Document AVOID_CCMODE_COPIES.
        * mips.h (AVOID_CCMODE_COPIES): Define.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r19901
1998-05-19 18:24:32 -06:00
Jeff Law
38e012594e typo typo fixes fixes
From-SVN: r19601
1998-05-06 15:09:07 -06:00
Jeffrey A Law
ac54632323 Forgot to check in last night.
From-SVN: r19257
1998-04-17 01:39:23 -06:00
Kaveh R. Ghazi
670ee92097 Major cutover to using system.h:
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o,
        c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o,
        caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o,
        dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o,
        expr.o, final.o, flow.o, function.o, getpwd.o, global.o,
        integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o,
        prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o,
        reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o,
        rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o,
        tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend
        on system.h.
        * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c,
        c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c,
        caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c,
        dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c,
        expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c,
        integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c,
        prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c,
        reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c,
        rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c,
        stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c,
        xcoffout.c: Include system.h.  Organize include ordering so
        that stdarg/varargs comes before other system headers.  Remove
        spurious casts of functions assured of a prototype in system.h.

From-SVN: r18726
1998-03-20 14:58:42 +00:00
Jeffrey A Law
29a820586a varasm.c (output_constant_pool): Bring back 'done' label inside an appropriate #ifdef.
* varasm.c (output_constant_pool): Bring back 'done' label inside
        an appropriate #ifdef.
        * bitmap.c (bitmap_element_allocate): Wrap variable 'i' in an
        appropriate #ifdef.
        (bitmap_copy, bitmap_operation): Likewise.
        * combine.c (combinable_i3pat): Similarly for 'src'.
        * function.c (fixup_var_refs_1): Similarly for 'outerdest'.
        (locate_and_pad_parm): Similarly for 'reg_parm_stack_space'.
        * regclass.c (copy_cost): Similarly for 'secondary_class'.
        * reload.c (make_memloc): Simliarly for 'i'.
        (find_reloads_address_1): Similarly for 'link'.
        * reload1.c (reload): Similarly for 'previous_frame_pointer_needed'.
        (emit_reload_insns): Similarly for 'second_reloadreg'.
        * unroll.c (iteration_info): Similarly for 'v'.
        * caller-save.c (insert_save_restore): Remove unused variable 'i'.
        * calls.c (expand_call): Similarly for 'i'.
        (emit_library_call, emit_library_call_value): Similarly for 'mode'.
        * fold-const.c (strip_compund_expr): Similarly for 'type'.
        * function.c (fixup_var_refs_1): Similarly  for 'width'.
        (fixup_memory_subreg): Similarly for 'saved'.
        (locate_and_pad_parm): Similarly for 'boundary_in_bytes.'
        (setjmp_protect): Similarly for 'sub'.
        (thread_prologue_and_epilogue_insns): Similarly for 'insn'.
        * loop.c (record_giv): Similarly for 'p'.
        (combine_givs): Similarly for 'temp_iv'.
        (indirect_jump_in_function_p): Similarly for 'is_indirect_jump'.
        * recog.c (validate_replace_rtx_1): Similarly for 'width'.
        * tree.c (get_set_constructor_bytes): Similarly for 'vals'.
        * unroll.c (unroll_loop): Similarly for 'copy'.
        (iteration_info): Similarly for 'b'.
        * varasm.c (assemble_string): Similarly for 'i'.
        * i386.h (LEGITIMIZE_ADDRESS): Similarly for 'orig_x'.

From-SVN: r17973
1998-02-13 18:13:58 -07:00
Alasdair Baird
f745c7a273 recog.c (validate_replace_rtx_1): Only perform substitutions of arguments to commutative and comparison operators...
* recog.c (validate_replace_rtx_1): Only perform substitutions
        of arguments to commutative and comparison operators once.

From-SVN: r17482
1998-01-25 14:00:42 -07:00
Richard Henderson
38a448ca5d alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO...
* alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO;
change gen_rtx(expr...) to gen_rtx_fmt_foo(expr...).
* caller-save.c, calls.c, combine.c, cse.c: Likewise.
* dwarf2out.c, except.c, explow.c, expmed.c, expr.c: Likewise.
* final.c, flow.c, function.c, genpeep.c, haifa-sched.c: Likewise.
* halfpic.c, integrate.c, jump.c, local-alloc.c, loop.c: Likewise.
* profile.c, recog.c, reg-stack.c, regclass.c, regmove.c: Likewise.
* reload.c, reload1.c, reorg.c, sched.c, stmt.c, stupid.c: Likewise.
* unroll.c, varasm.c: Likewise.
* config/alpha/alpha.c, config/alpha/alpha.md: Likewise.

From-SVN: r17357
1998-01-14 15:10:50 -08:00
Jim Wilson
011063bd06 (constrain_operands): When checking earlyclobbers, use
operands_match_p instead of rtx_equal_p.

From-SVN: r14300
1997-06-24 19:18:56 -07:00
Richard Kenner
06140bdfa1 (validate_replace_rtx_1, case MINUS): New case.
From-SVN: r13869
1997-04-13 09:48:25 -04:00
Ian Lance Taylor
b85f21c09b Accept a unary operator in constrain_operands
From-SVN: r13017
1996-10-23 22:02:32 +00:00
Richard Kenner
50dc6373e5 (register_operand): Don't reject subreg of complex mode.
From-SVN: r12868
1996-09-29 19:05:22 -04:00
Richard Kenner
0b97ea96f6 (constrain_operands): Don't test clobbered constraints.
From-SVN: r12793
1996-09-23 22:33:29 -04:00
Mike Stump
0f41302f47 formatting tweaks
From-SVN: r12390
1996-07-03 22:07:53 +00:00
Jeff Law
69f724c026 recog.c (constrain_operands, case 'V'): Don't call offsettable_memref_p before reload has completed.
* recog.c (constrain_operands, case 'V'): Don't call
        offsettable_memref_p before reload has completed.

From-SVN: r11515
1996-03-11 17:08:58 -07:00
Richard Kenner
cba057ed8c (register_operand): Disallow subreg of reg not allowed to change size.
From-SVN: r10094
1995-07-01 06:55:03 -04:00
Richard Kenner
e99215a3b5 Update FSF address.
From-SVN: r9964
1995-06-15 08:04:37 -04:00
Richard Kenner
9faa82d8c0 Fix typos in comments.
From-SVN: r9712
1995-05-16 08:39:54 -04:00
Torbjorn Granlund
b990f6356d (constrain_operands, case 'E'): Make this work like
constraint character `F' when REAL_ARITHMETIC is defined.

From-SVN: r9357
1995-04-10 21:39:56 +00:00
Ian Lance Taylor
f76b9db287 Check target endianness at run time, not compile time
From-SVN: r8470
1994-11-16 21:10:09 +00:00
Richard Kenner
a864776614 Update comment.
From-SVN: r8283
1994-10-17 11:30:22 -04:00
Richard Kenner
4d3067db2c (constrain_operands): Properly handle '#' in constraint.
From-SVN: r6704
1994-03-06 15:17:55 -05:00
Richard Kenner
b0e0a0f9a8 (indirect_operand): Verify mode of OP is correct.
From-SVN: r6222
1993-12-12 08:01:09 -05:00
Richard Kenner
63b6b8450c (constrain_operands): Correctly ignore MATCH_OPERATOR operands.
From-SVN: r4664
1993-06-11 21:43:05 -04:00
Richard Kenner
5a19ad3f22 (constrain_operands, case 'r'): If STRICT, a REG isn't valid if it is
a pseudo even if GENERAL_REGS == ALL_REGS.

From-SVN: r3542
1993-02-26 15:12:16 -05:00
Richard Kenner
4bb4c82e20 (general_operand, immediate_operand, const_double_operand): Allow CONST_INT with MODE_PARTIAL_INT.
(general_operand, immediate_operand, const_double_operand): Allow CONST_INT
with MODE_PARTIAL_INT.
(nonmemory_operand): Likewise.

From-SVN: r2399
1992-10-11 16:27:23 -04:00
Charles Hannum
9e4223f212 entered into RCS
From-SVN: r1483
1992-07-06 22:16:17 +00:00
Richard Stallman
f72aed244a *** empty log message ***
From-SVN: r1263
1992-06-24 03:59:40 +00:00