Commit Graph

312 Commits

Author SHA1 Message Date
Jeffrey A Law
47a0b68fb6 * cse.c (rtx_cost): Only call CONST_COSTS if it is defined.
From-SVN: r18787
1998-03-23 15:55:04 -07: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
Kaveh R. Ghazi
8625fab57c Warning fixes, resulting in the addition of a new target macro:
* tm.texi (DEFAULT_RTX_COSTS): Document new macro.
        * arm.h (DEFAULT_RTX_COSTS): Define instead of RTX_COSTS.
        * cse.c (rtx_cost): Provide a default case in an enumeration
        switch, and call DEFAULT_RTX_COSTS if it's defined.

Co-Authored-By: Nick Clifton <nickc@cygnus.com>
Co-Authored-By: Richard Earnshaw <rearnsha@arm.com>

From-SVN: r18513
1998-03-12 12:32:24 +00:00
Kaveh R. Ghazi
5172371191 Fix warious warnings:
* c-aux-info.c: Include string.h/strings.h.
	* pa.c: Include stdlib.h.
	(pa_combine_instructions): Prototype the function.
	(pa_can_combine_p, forward_branch_p, shadd_constant_p): Likewise.
	(reloc_needed): Add default case for enumeration switch.
	(remove_useless_addtr_insns): Remove unused variable `all'.
	(hppa_expand_prologue): Add explicit braces to avoid
	ambiguous `else'.
	(output_function_epilogue): Remove unused variable `i'.
	(output_millicode_call): Remove unused variable `link'.
	(shadd_constant_p, forward_branch_p): Make the function static.
	(following_call): Explicitly declare to return int.
	(pa_reorg): Declare as void.
	(pa_combine_instructions): Declare as static void.  Add
	parentheses around && within ||.
	* pa.h: Add prototypes for pa_reorg, symbolic_operand,
	following_call, function_label_operand, lhs_lshift_cint_operand
	and zdepi_cint_p.
	* pa.md: Add parentheses around && within ||.
	* cppalloc.c: Include stdlib.h.
	* cpperror.c (cpp_print_containing_files): Remove unused variable
	`i'.  Fix format specifier in fprintf.
	* cse.c (cse_around_loop): Add explicit braces to avoid
	ambiguous `else'.
	(delete_dead_from_cse): Wrap variable `tem' in macro HAVE_cc0.
	* expr.c (expand_expr): Add parentheses around && within ||.
	* final.c (app_enable): Replace fprintf with fputs where there are
	no format specifiers and no trailing argument after the string.
	Eg, when printing ASM_APP_ON/ASM_APP_OFF.
	(app_disable): Likewise.
	(final_end_function): Likewise.
	(final_scan_insn): Likewise.  Remove unused variable `set'.
	(profile_function): Wrap empty if-statement body in {} brackets.
	* function.c: Include stdlib.h.
	(pad_below): Wrap prototype and definition in ARGS_GROW_DOWNWARD.
	(reposition_prologue_and_epilogue_notes): Add parentheses
	around assignment used as truth value.
	* integrate.c (expand_inline_function): Wrap variable
	`cc0_insn' in macro HAVE_cc0.
	* jump.c (jump_optimize): Wrap variable `q' in macro
	HAVE_cc0.  Remove unused variable `prev1'.
	* libgcc2.c (__bb_exit_trace_func): Add parentheses around &&
	within ||.  Fix format specifier in fprintf.
	(__bb_init_prg): Add parentheses around assignment used as
	truth value.
	* local-alloc.c: Include stdlib.h.
	(requires_inout): Add parentheses around assignment used
	as truth value.
	* loop.c (analyze_loop_iterations): Wrap prototype and definition
	in macro HAVE_decrement_and_branch_on_count.
	(insert_bct, instrument_loop_bct): Likewise.
	(move_movables): Add parentheses around assignment used as
	truth value.
	(consec_sets_invariant_p): Likewise.
	(maybe_eliminate_biv_1): Wrap variable `new' in macro HAVE_cc0.
	* objc/objc-act.c: Include stdlib.h.
	(lookup_method_in_protocol_list): Wrap empty else-statement body
	in braces.
	(lookup_protocol_in_reflist): Likewise.
	(objc_add_static_instance): Remove unused variables `decl_expr'
	and `decl_spec'.
	(get_objc_string_decl): Remove unused variable `decl'.
	(generate_static_references): Remove unused variables `idecl' and
	`instance'.
	(check_protocols): Wrap empty else-statement body in braces.
	* protoize.c: Include stdlib.h.
	(substr): Add parentheses around assignment used as truth value.
	(abspath): Likewise.
	(shortpath): Likewise.
	* regmove.c (fixup_match_1): Add parentheses around assignment
	used as truth value.
	* reload.c (push_secondary_reload): Remove unused variable `i'.
	(find_reloads): Add parentheses around assignment used as truth
	value.
	* reload1.c: Include stdlib.h.
	* rtl.h: Correct typo in prototype of offsettable_memref_p.
	* stmt.c (add_case_node): Add parentheses around assignment used
	as truth value.
	(case_tree2list): Likewise.
	* tree.c (valid_machine_attribute): Wrap variable `decl_attr_list'
	in macro VALID_MACHINE_DECL_ATTRIBUTE.  Wrap variable
	`type_attr_list' in macro VALID_MACHINE_TYPE_ATTRIBUTE.
	(merge_attributes): Add explicit braces to avoid ambiguous
	`else'.
	* unroll.c (copy_loop_body): Wrap variable `cc0_insn' in
	macro HAVE_cc0.
	* varasm.c: Include stdlib.h.

From-SVN: r18290
1998-02-28 07:06:53 +00:00
Jeffrey A Law
614bb5d45d cse.c (delete_dead_from_cse): If a libcall produces a constant result and that result can be substituted into...
* cse.c (delete_dead_from_cse): If a libcall produces a constant
        result and that result can be substituted into SET_SRC of the
        insn with the REG_RETVAL note, then perform the substitution
        and delete the libcall.

From-SVN: r17871
1998-02-12 07:26:47 -07:00
Jeff Law
2d8b0f3ada c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.
a
	* c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.  Add
	prototype for `handle_sysv_pragma', and make it static.  Add
	parentheses around assignment used as truth value.
	* combine.c (combine_instructions): Protect variable `prev' with
	macro HAVE_cc0.
	(can_combine_p): Protect variable `link' with AUTO_INC_DEC.
	(extract_left_shift): Add parentheses around operand of &.
	(merge_outer_ops): Avoid an empty body in an else-statement.
	(gen_rtx_combine): Remove unused variable `i'.
	* sparc/gmon-sol2.c: Include <fcntl.h>.  Make return type of
        function monstartup `void'.  Likewise for internal_mcount.  Add
        `static void' prototype for moncontrol.  Reconcile sprintf format
        vs. args.
	* sparc/sparc.c: Include <stdlib.h> and <string.h>/<strings.h>.
	Make return type of function_arg_slotno explicitly `int'.
	(reg_unused_after): Add	parentheses around assignment used as
	truth value.
	(save_regs): Add explicit braces to avoid ambiguous `else'.
	(function_arg_slotno): Add parentheses around && within ||.
	(function_arg_pass_by_reference): Likewise.
	(sparc_flat_output_function_prologue): Reconcile fprintf format
	vs. args.
	* svr4.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around
	assignment used as truth value.
	* cplus-dem.c: Include <stdlib.h>.
	(demangle_signature): Avoid an empty body in an else-statement.
	(do_type): Remove unused variable `lvl'.
	* cppexp.c: Don't have <stdlib.h> depend on MULTIBYTE_CHARS.
	Include <string.h>/<strings.h>.
	(cpp_lex): Remove unused variable `namelen'.
	(cpp_lex): Explicitly declare `num_chars' as an int.
	* cpplib.c: Avoid duplicate inclusion of <stdlib.h>, include
	<unistd.h> instead.  Explicitly declare is_system_include
	returning int.
	(make_assertion): Remove unused variable `kt'.
	(cpp_expand_to_buffer): Hide variable `obuf'.
	(output_line_command): Remove unused variables, `line_end',
	`line_cmd_buf' and `len'.
	(macarg): Remove unused variable `arg_start'.
	(special_symbol): Remove unused variable `i'.  Add parentheses
	around assignment used as truth value.
	(do_include):  Remove unused variables `pcfname' and `retried',
	hide `pcf' and `pcfbuflimit'.
	(do_line): Remove unused variable `i'.
	(finclude): Hide variable `missing_newline'.
	(cpp_handle_options): Remove unused variable `j'.
	(read_token_list): Remove unused variable `eofp'.
	(cpp_error_with_line): Remove unused variable `i'.
	(cpp_warning_with_line): Likewise.
	(cpp_pedwarn_with_line): Explicitly declare `column' as int.
	(cpp_error_from_errno): Remove unused variable `i'.
	* cse.c (invalidate): Add parentheses around assignment used as
	truth value.
	(find_best_addr): Move declaration of variable `our_cost' inside
	the conditional macro where its used.
	(fold_rtx): Avoid an empty body in an if-statement.
	(cse_insn): Wrap variables  `this_insn_cc0_mode' and
	`this_insn_cc0' in macro HAVE_cc0.
	* dwarf2out.c: Include <stdlib.h> and <string.h>/<string.h>.
	(ASM_OUTPUT_DWARF_DATA8):  Reconcile format vs. args in fprintf's.
	(output_uleb128): Likewise.
	(output_sleb128): Likewise.
	(output_cfi): Likewise.
	(output_call_frame_info): Remove unused variables `j', `fde_size'
	and `fde_pad'.
	(comp_unit_has_inlines): Hide declaration as per rest of file.
	(size_of_line_prolog): Correct typo in prototype.
	(add_arange): Likewise.
	(output_aranges): Likewise.
	(add_name_and_src_coords_attributes): Likewise.
	(gen_array_type_die): Likewise.
	(gen_inlined_subroutine_die): Likewise.
	(equate_decl_number_to_die): Remove unused variable `i'.
	(print_die): Reconcile format vs. args in fprintf's.
	(print_dwarf_line_table): Likewise.
	(output_die): Likewise.
	(output_line_info): Likewise.
	(add_subscript_info): Avoid an empty body in an else-statement.
	(gen_subprogram_die): Remove unused variable `fp_loc'.
	* dwarfout.c: Explicitly declare `next_pubname_number' as int.
	Protect `ordering_attribute' prototype with USE_ORDERING_ATTRIBUTE
	macro.  Protect `src_coords_attribute' prototype with
	DWARF_DECL_COORDINATES macro.  Hide `output_entry_point_die'
	prototype as in the rest of the file.  Likewise for
	`output_pointer_type_die' and `output_reference_type_die'.  Remove
	prototype for `type_of_for_scope'.
	(output_unsigned_leb128): Reconcile format vs. args in fprintf.
	(type_attribute): Add explicit braces to avoid ambiguous `else'.
	* final.c: Include <stdlib.h> and <string.h>/<strings.h>.
	(shorten_branches): Protect declaration of tmp_length with
	SHORTEN_WITH_ADJUST_INSN_LENGTH and ADJUST_INSN_LENGTH macros.
	(profile_function): Protect declaration of `sval' and `cxt'
	variables with appropriate macros.
	(final_scan_insn): Likewise for `note' variable.  Add explicit
	braces to avoid empty body in an if-statement.
	(output_asm_insn): Move variable `i' inside macro conditional
	where it is used.  Add parentheses around assignment used as truth
	value.
	(asm_fprintf) Likewise, likewise.
	* fix-header.c (main): Remove unused variable `done'.  Protect
	declaration of `i' with FIXPROTO_IGNORE_LIST.
	* pexecute.c: Include <unistd.h>.  Prototype `my_strerror'.
	* print-rtl.c (print_inline_rtx): Explicitly declare the parameter
	`ind'.
	* profile.c: Include <string.h>/<strings.h>.
	(instrument_arcs): Remove unused variables `note', `inverted',
	`zero' and `neg_one'.
	(branch_prob): Avoid empty body in an if-statement.
	* regclass.c: Include <stdlib.h>.
	(reg_alternate_class): Explicitly declare parameter `regno'.
	* regmove.c (regmove_optimize): Remove unused variable `p'.  Add
	parentheses around assignment used as truth value.
	(find_matches):  Remove unused variables `output_operand' and
	`matching_operand'.
	(fixup_match_1): Remove statement with no effect: "if (0) ;".
	* scan.c (sstring_append): Explicitly declare `count' as int.
	(scan_string): Explicitly declare parameter `init' as int.
	* sched.c: Include <stdlib.h>.
	(BLOCKAGE_RANGE): Add parentheses around arithmetic in operand of |.
	(rank_for_schedule): Add parentheses around assignment used as
	truth value.
	(schedule_block): Likewise.
	(regno_use_in): Likewise.
	(schedule_insns): Remove unused variable `i'.
	* toplev.c: Include <stdlib.h> and <string.h>/<strings.h>.
	(v_message_with_decl): Remove unused variable `n'.
	(botch): Explicitly declare parameter `s' as char *.
	(main): Add parentheses around assignment used as truth value.
	* tree.c (make_node): Protect the variable `kind' with the
	GATHER_STATISTICS macro.
	(real_value_from_int_cst): Move variable `e' inside conditional
	macro area where it is used.
	(tree_last): Add parentheses around assignment used as truth value.
	(build1): Protect the variable `kind' with the GATHER_STATISTICS
	macro.
	(print_obstack_statistics): Reconcile format vs. args in fprintf.
	Protect variables `i', `total_nodes', and `total_bytes' with the
	GATHER_STATISTICS macro.
Lots more -W -Wall warnings disappear.

From-SVN: r17515
1998-01-27 15:11:37 -07:00
Michael Tiemann
e82ad93d64 cse.c (simplify_ternary_operation): Don't try to simplify IF_THEN_ELSE expressions (created by combine) that don't...
* cse.c (simplify_ternary_operation): Don't try to simplify
        IF_THEN_ELSE expressions (created by combine) that don't use
        relational operators.

From-SVN: r17472
1998-01-25 04:12:26 -07:00
Jeffrey A Law
ed1ecb1930 cse.c (simplify_ternary_operation): Handle more IF_THEN_ELSE simplifications.
* cse.c (simplify_ternary_operation): Handle more IF_THEN_ELSE
        simplifications.

From-SVN: r17465
1998-01-23 16:06:03 -07:00
David S. Miller
7bcac048fd varasm.c (immed_double_const): Add casts to HOST_WIDE_INT where necessary.
* varasm.c (immed_double_const): Add casts to HOST_WIDE_INT where
        necessary.
        (const_hash): Hash val is unsigned long.
        (SYMHASH): Likewise.
        * tree.c (TYPE_HASH): Type of hash val is unsigned long.
        * print-tree.c (print_node_brief): HOST_PTR_PRINTF format wants a
        char pointer, not HOST_WIDE_INT.
        (print_node): Likewise.  Also hash is unsigned long not
        HOST_WIDE_INT.
        * cse.c (canon_hash): Hash is unsigned long not HOST_WIDE_INT.

From-SVN: r17403
1998-01-17 15:50:40 -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
Jeff Law
c85f7c16ad Bring in final gcc-2.8.0 changes.
From-SVN: r17355
1998-01-14 13:57:58 -07:00
Jeffrey A Law
5b5a2a1ecc * cse.c (rtx_cost): Remove conflicting default case.
From-SVN: r17245
1997-12-27 14:44:26 -07:00
Jim Wilson
556c714b3d cse.c (max_insn_uid): New variable.
* cse.c (max_insn_uid): New variable.
        (invalidate): Remove CYGNUS LOCAL patch.
        (cse_around_loop): Use max_insn_uid.
        (cse_main): Set max_insn_uid.

From-SVN: r17231
1997-12-24 15:54:37 -07:00
Kaveh R. Ghazi
9e04c65a52 cse.c (rtx_cost): Add default case in enumeration switch.
* cse.c (rtx_cost): Add default case in enumeration switch.
        * fix-header.c (recognized_macro): Likewise.
        (recognized_extern): Likewise.
        (write_rbrac): Likewise.
        * objc/objc-act.c (encode_aggregate): Likewise.
        (gen_declarator): Likewise.
        (gen_declspecs): Likewise.

From-SVN: r17186
1997-12-22 02:31:41 -07:00
Jeff Law
956d69504d Merge from gcc-2.8
From-SVN: r16987
1997-12-06 17:31:01 -07:00
Jeff Law
da932f04bf m68k.c: Include tree.h for dwarf2out_cfi_label.
* m68k.c: Include tree.h for dwarf2out_cfi_label.

        * gcc.c (process_command): Do not take address of function fatal when
        calling lang_specific_driver.

        * config/i386/cygwin32.h (DWARF2_UNWIND): Exception handling
        doesn't work with it yet, so set it to 0.
        * config/i386/xm-cygwin32.h (NO_SYS_SIGLIST): Define.

        * cse.c (cse_insn): Check for invalid entries when taking references.
More assorted pending patches.

From-SVN: r16978
1997-12-06 08:48:29 -07:00
Jeffrey A Law
85c3ba60dd cse.c (cse_insn): Don't look at JUMP_LABEL field of a conditionl return.
* cse.c (cse_insn): Don't look at JUMP_LABEL field of a conditionl
        return.
        (cse_end_of_basic_block): Similarly.

From-SVN: r16534
1997-11-16 23:51:20 -07:00
Jeff Law
e9a25f70a0 Update mainline egcs to gcc2 snapshot 971021.
From-SVN: r16278
1997-11-02 14:19:36 -07:00
Jim Wilson
3bf1b08254 Patches to fix minor optimizer bugs
Patches to fix minor optimizer bugs
	* expmed.c (extract_bit_field): Don't make flag_force_mem disable
	extzv for memory operands.
	* cse.c (simplify_ternary_operation, case IF_THEN_ELSE): Collapse
	redundant conditional moves to single operand.

From-SVN: r16129
1997-10-20 16:49:48 -07:00
Jeffrey A Law
135d84b899 * cse.c (this_insn_cc0_mode): Initialize.
From-SVN: r15816
1997-09-30 23:46:27 -06:00
David S. Miller
9524f769a7 combine.c (try_combine): Use NULL_RTX instead of '0' where appropriate in calls to gen_rtx().
* combine.c (try_combine): Use NULL_RTX instead of '0' where
        appropriate in calls to gen_rtx().
        * cse.c (cse_main): Likewise.
        * emit-rtl.c (gen_label_rtx): Likewise.
        * expr.c (init_expr_once): Likewise.
        * haifa-sched.c (flush_pending_lists, sched_analyze_insn,
        sched_analyze, init_rgn_data_dependences,
        compute_block_backward_dependences): Likewise.
        * sched.c (schedule_insns): Likewise.
        * varasm.c (immed_double_const): Likewise.

From-SVN: r15630
1997-09-22 11:41:48 -06:00
Jeffrey A Law
cb3bb2a765 cse.c (simplify_relational_operation): Set h0u just like h0s.
* cse.c (simplify_relational_operation): Set h0u just like h0s.
        Similarly for h1u and h1s.

From-SVN: r15616
1997-09-21 19:28:22 -06:00
Jeffrey A Law
05ef889761 cse.c (simplify_relational_operation): If MODE specifies a mode wider than HOST_WIDE_INT...
* cse.c (simplify_relational_operation): If MODE specifies a
        mode wider than HOST_WIDE_INT, then the high word of a CONST_INT
        is derived from the sign bit of the low word.

Brought over from r5900 branch.

From-SVN: r15454
1997-09-15 15:37:39 -06:00
Jim Wilson
bc4ddc77a0 Fix irix6 execute/921117-1.c c-torture failure.
* cse.c (cse_insn): Don't record BLKmode values.

From-SVN: r15024
1997-09-01 16:43:03 -07:00
Jeffrey A Law
9ae8ffe751 * Integrate alias analysis changes from jfc@mit.edu
* Makefile.in (OBJS): Add alias.o
        (alias.o): Add dependencies.
        * alias.c: New file.
        * sched.c: Remove alias analysis code.  It lives in alias.c now.
        (reg_last_uses_size): Declare.
        (sched_analyze_2): Add new arguments to true_dependence.
        (sched_analyze_insn): Use reg_last_uses_size instead of max_reg.
        (schedule_block): Initialize reg_last_uses_size.
        (schedule_insns): Always call init_alias_analysis.
        * calls.c (expand_call): Note calls to malloc, calloc, and realloc;
        mark return value from such functions as a pointer and keep track of
        them for alias analysis.  If a return value from a function is a
        pointer, mark it as such.
        * combine.c (distribute_notes): Handle REG_NOALIAS.
        * cse.c (struct write_data): Delete.  No longer needed.
        (invalidate): Don't call set_nonvarying_address_components anymore.
        Use true_dependence to decide if an entry should be removed from
        the hash table.
        (invalidate_memory): Remove WRITES argument, simplify appropriately.
        Fix all callers.
        (note_mem_written): Similarly for WRITE_PTR argument.
        (invalidate_from_clobbers): Similarly for W argument.
        (invalidate_for_call): Remove memory elements from the hash table.
        (refers_to_mem_p, cse_rtx_addr_varies_p): Deleted.
        (cse_rtx_varies_p): New function.  Derived from old
        cse_rtx_addr_varies_p.
        (cse_insn): Remove WRITES_MEMORY and INIT variables and all references.
        Don't call note_mem_written anymore.  Stack pushes invalidate the stack
        pointer if PUSH_ROUNDING is defined.  No longer need to call
        cse_rtx_addr_varies_p to decide if a MEM should be invalidated.
        (skipped_writes_memory): Remove variable.
        (invalidate_skipped_set): Simplify and wewrite to use invalidate_memory.
        (invalidate_skipped_block): Simplify for new alias analysis code.
        (cse_set_around_loop): Likewise.
        (cse_main): Call init_alias_analysis.
        * flags.h (flag_alias_check, flag_argument_noalias): Declare.
        * toplev.c (flag_alias_check, flag_argument_noalias): Define.
        (f_options): Add new alias checking arguments.
        (main): Set flag_alias_check when optimizing.
        * local_alloc (validate_equiv_mem_from_store): Add new arguments
        to true_dependence.
        (memref_referenced_p): Likewise.
        * loop.c (NUM_STORES): Increase to 30.
        (prescan_loop): Only non-constant calls set unknown_address_altered.
        (invariant_p): Add new arguments to true_dependence.
        (record_giv): Initialize unrolled and shared fields.
        (emit_iv_add_mult): Call record_base_value as needed.
        * loop.h (struct induction): Add unrolled and shared fields.
        * unroll.c  (unroll_loop): Call record_base_value as needed.
        (copy_loop_body): Likewise.
        (final_biv_value): Likewise.
        (final_giv_value): Likewise.
        (find_splittable_regs): Likewise.  Only create one new pseudo
        if we have multiple address GIVs that were combined with the same
        dst_reg GIV.  Note when a new register is created due to unrolling.
        * rtl.c (reg_note_name): Add REG_NOALIAS.
        * rtl.h (enum reg_note): Similarly.
        (rtx_varies_p, may_trap_p, side_effects_p): Declare.
        (volatile_refs_p, volatile_insn_p, remove_note): Likewise.
        (note_stores, refers_to_regno_p, reg_overlap_mentioned_p): Likewise.
        (true_dependence, read_dependence, anti_dependence): Likewise.
        (output_dependence, init_alias_analysis, end_alias_analysis): Likewise.
        (mark_user_reg, mark_reg_pointer): Likewise.
jfc's alias analysis code.

From-SVN: r14768
1997-08-11 14:07:24 -06:00
Richard Kenner
5a03c8c401 (cse_insn): Ignore paradoxical SUBREGs unless we are looking for such.
From-SVN: r14625
1997-08-02 13:48:13 -04:00
Jim Wilson
9a252d2903 (find_best_addr): Add missing rtx_cost arguments.
From-SVN: r14367
1997-07-01 15:29:59 -07:00
Doug Evans
71d306d1b1 Delete erroneous references to (pseudo) in comments.
From-SVN: r14325
1997-06-26 21:21:38 +00:00
Michael Meissner
b1f21e0aef Use accessor macros to access arrays based on regno; move many of the arrays into a single structure.
From-SVN: r14140
1997-05-30 18:19:19 +00:00
Richard Kenner
954a5693c0 (notreg_cost): New function, extracted from COST macro.
(COST): Use notreg_cost.

From-SVN: r14075
1997-05-17 16:00:55 -04:00
Richard Kenner
50196afaca (cse_insn): Don't record a SRC that's a MEM and the same as a
REG_EQUIV note if DEST is set more than once.

From-SVN: r14074
1997-05-17 15:13:18 -04:00
Richard Kenner
5d595063ff (fold_rtx, case PLUS): When seeing if negative of constant is around,
make sure not dealing with largest negative.

From-SVN: r13953
1997-04-21 16:30:16 -04:00
Richard Kenner
5887325513 (canon_reg, cse_insn): Don't examine insn_n_dups if recog_memoized
fails to find a match.

From-SVN: r13888
1997-04-13 14:51:22 -04:00
Doug Evans
899bf2bfa5 cse.c (invalidate_from_clobbers): Delete unnecessary test for (clobber nil).
* cse.c (invalidate_from_clobbers): Delete unnecessary test for
	(clobber nil).

From-SVN: r13618
1997-02-07 18:56:07 +00:00
Ian Lance Taylor
38734e55b3 Get the right COST for a SUBREG when truncating
From-SVN: r13549
1997-01-23 20:05:52 +00:00
Ian Lance Taylor
f95182a4a9 Check SMALL_REGISTER_CLASSES at runtime
From-SVN: r13302
1996-12-13 01:00:49 +00:00
Richard Kenner
9255709cac (fold_rtx): Fold inside ASM_OPERANDS.
From-SVN: r12788
1996-09-23 18:43:54 -04:00
Richard Kenner
a2cabb29bd Correct comments.
From-SVN: r12775
1996-09-23 10:25:56 -04:00
Richard Kenner
9ad91d7115 (canon_hash, cse_insn): MEM is not unchanging if it is in the frame (since
the temp slot might be reused).

From-SVN: r12562
1996-07-24 21:47:52 -04:00
Jim Wilson
5dbc849954 (note_mem_written): Varying structure memory access with
AND address can alias scalars.

From-SVN: r12417
1996-07-08 16:33:15 -07:00
Mike Stump
0f41302f47 formatting tweaks
From-SVN: r12390
1996-07-03 22:07:53 +00:00
Jim Wilson
2d91790329 (simplify_binary_operation...
(simplify_binary_operation, case MULT): Check for case
where width is larger than HOST_BITS_PER_WIDE_INT, and upper most
bit is set.  We can not generate a simple shift in this case.

From-SVN: r12238
1996-06-07 19:36:34 -07:00
Jim Wilson
0b0ee36cd9 (cse_process_notes): Handle SUBREG like ZERO_EXTEND.
From-SVN: r11864
1996-04-21 14:51:42 -07:00
Richard Kenner
f47c02fa79 (invalidate_skipped_set): Ignore CLOBBER after calling
note_mem_written, not before.

From-SVN: r11786
1996-04-15 08:49:02 -04:00
Richard Kenner
2ebcccf3a3 (simplify_unary_operation): Add new arg to REAL_VALUE_FROM_INT.
From-SVN: r11765
1996-04-14 08:54:55 -04:00
Jim Wilson
dcb97651d7 (note_mem_written): Delete obsolete code for handling
(mem (scratch)).

From-SVN: r11585
1996-03-20 15:26:55 -08:00
Richard Kenner
8c87f107ff (find_best_addr): Make sure folded address better before using.
From-SVN: r10873
1995-12-27 15:25:35 -05:00
Richard Kenner
f353588ada (insert): Don't put a REG into qty_const.
From-SVN: r10607
1995-11-26 14:47:28 -05:00
Richard Kenner
85e4d983f3 (invalidate): For a pseudo register, do a loop to invalidate all table
entries, irrespective of mode.

From-SVN: r10556
1995-11-05 11:02:07 -05:00
Richard Kenner
890465354d (set_nonvarying_address_components, case AND): Add *pend to end.
(set_nonvarying_address_components, case AND): Add *pend to end.  Add
constant to start instead of subtracting it.

From-SVN: r10426
1995-10-03 12:25:50 -04:00
Richard Kenner
a5dfb4eee2 (recorded_label_ref): New variable.
(insert): Set instead of cse_jumps_altered.
(cse_main): Initialize it and return 1 if nonzero at end.

From-SVN: r10368
1995-09-16 08:38:04 -04:00
Richard Kenner
970c9acebf (insert): Set cse_jumps_altered when inserting a LABEL_REF.
From-SVN: r10366
1995-09-15 18:24:09 -04:00
Richard Kenner
969c851727 (canon_hash, CONST_DOUBLE): Hash integer and real differently.
From-SVN: r10303
1995-08-31 19:03:23 -04:00
Richard Kenner
abc95ed36d Fix spelling errors.
From-SVN: r10289
1995-08-28 06:54:22 -04:00
Richard Kenner
9c6b0bae3c (set_nonvarying_address_components): Handle addresses which are the sum of two constant pseudo regs.
(set_nonvarying_address_components): Handle addresses which are the sum of
two constant pseudo regs.
(cse_rtx_addr_varies_p): Likewise.

From-SVN: r10220
1995-08-13 18:45:42 -04:00
Richard Kenner
98369a0f8a (cse_insn): When do special handling for (set REG0 REG1), must delete
REG_EQUAL note from insn if it mentions REG0.

From-SVN: r10169
1995-07-26 09:31:00 -04:00
Richard Kenner
e6a125a009 (cse_insn): Ifdef out code that pre-truncates src_folded.
From-SVN: r10127
1995-07-14 08:15:00 -04:00
Richard Kenner
940d9d638b Update FSF address.
From-SVN: r9959
1995-06-15 07:33:25 -04:00
Richard Kenner
146135d6db (cse_basic_block): Fix test for whether block ends with a barrier.
Return next insn, not 0, if block ends in a barrier.

From-SVN: r9916
1995-06-09 18:05:54 -04:00
Richard Kenner
940fd0b54c (simplify_unary_operation, case FLOAT, UNSIGNED_FLOAT): Truncate to
requested mode.

From-SVN: r9872
1995-06-05 07:31:38 -04:00
Richard Kenner
9faa82d8c0 Fix typos in comments.
From-SVN: r9712
1995-05-16 08:39:54 -04:00
Richard Kenner
c256df0bf7 (cse_insn): Properly set IN_MEMORY for SET_DEST.
From-SVN: r9547
1995-04-30 07:19:15 -04:00
Richard Kenner
cceb347c21 (simplify_unary_operation): #ifdef POINTERS_EXTEND_UNSIGNED, handle
sign- or zero-extending addresses.

From-SVN: r9333
1995-04-07 16:04:38 -04:00
Torbjorn Granlund
ad89d6f68a (simplify_unary_operation): Sign-extend constants when they have the most significant bit set for the target.
(simplify_unary_operation): Sign-extend constants when
they have the most significant bit set for the target.
(simplify_binary_operation): Likewise.

From-SVN: r9309
1995-04-03 23:19:02 +00:00
Jim Wilson
c27b5c621a (simplify_relational_operation): Don't simplify A-B for
compare of A and B when the compare is unsigned.

From-SVN: r9296
1995-04-02 14:34:42 -07:00
Richard Kenner
783e5bca05 (cse_insn): When emitting a BARRIER, don't put it after a deleted
insn.

From-SVN: r9283
1995-04-01 09:36:47 -05:00
Richard Kenner
a9c6464d87 (simplify_unary_operation): If operand mode is VOIDmode for
UNSIGNED_FLOAT and operand looks negative, can't simplify.

From-SVN: r9081
1995-02-25 06:55:11 -05:00
Richard Kenner
3826a3da7f Update comments.
From-SVN: r8811
1995-01-25 14:40:53 -05:00
Jim Wilson
4879acf67e (simplify_unary_operation): Cast constant 1 to HOST_WIDE_INT
before shifting left to form mask.

From-SVN: r8707
1994-12-29 11:17:28 -08:00
Torbjorn Granlund
29d72c4b69 (simplify_binary_operation): Do (x - (x & y)) -> (x & ~y).
From-SVN: r8494
1994-11-17 23:31:20 +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
d50d63c056 (simplify_unary_operation, case TRUNCATE): Set LV and HV.
From-SVN: r8375
1994-11-01 18:39:35 -05:00
Richard Kenner
1a8e9a8e05 (cse_insn): Don't record a DEST a paradoxical SUBREG and SRC is a
SIGN_EXTEND or ZERO_EXTEND.

From-SVN: r8354
1994-10-28 18:55:05 -04:00
Jim Wilson
8ae2b8f6f1 (merge_equiv_classes, cse_insn): Call rehash_using_reg after insert_regs.
(merge_equiv_classes, cse_insn): Call rehash_using_reg
after insert_regs.
(canon_hash): Don't use qty_const to compute hash code for a
register.

From-SVN: r8319
1994-10-20 13:06:59 -07:00
Richard Kenner
1bbd065b6c (cse_insn): Don't call force_const_mem on (const (truncate)).
From-SVN: r8231
1994-10-06 17:38:35 -04:00
Jim Wilson
68c1e17399 Fix prototype for invalidate.
From-SVN: r8127
1994-09-23 16:15:54 -07:00
Jim Wilson
bb4034b322 (invalidate): New parameter FULL_MODE. All callers changed.
(set_nonvarying_address_components): Modify initial comment.
(cse_insn): When call invalidate for dest, use the actual dest not
inner_dest.

From-SVN: r8124
1994-09-23 12:54:07 -07:00
Richard Kenner
f1636e8ad8 (cse_around_loop): Don't invalidate SUBREG unless it's a SUBREG of a
REG.

From-SVN: r8085
1994-09-15 13:21:49 -04:00
Richard Kenner
0e227018ba (invalidate_for_call): Properly set IN_TABLE.
From-SVN: r8073
1994-09-10 09:50:27 -04:00
Richard Kenner
af3869c1cc (record_jump_cond): Don't do anything if OP0 and OP1 are already
equivalent.

From-SVN: r7984
1994-08-25 19:21:18 -04:00
Richard Kenner
e650cbda8f (fold_rtx): When folding tablejump, allow LABEL_REF to be in arg0;
also allow other arg to be MINUS, not just be equivalent to it.

From-SVN: r7939
1994-08-17 18:03:37 -04:00
Richard Kenner
336d6f0a7e (set_nonvarying_address_components): If BASE is CONST_INT, add value to start and set BASE to const0_rtx.
(set_nonvarying_address_components): If BASE is CONST_INT, add value to start
and set BASE to const0_rtx.
(refers_to_mem_p): Don't do it here.

From-SVN: r7911
1994-08-12 19:05:07 -04:00
Richard Kenner
8e0ac43b33 (simplify_unary_operation): Clean up some mode and size checks with
CONST_DOUBLEs; TRUNCATE should do nothing.

From-SVN: r7853
1994-08-02 19:06:41 -04:00
Richard Kenner
67a3773731 (fold_rtx, case MEM): Surround TRUNCATE for jump table entry with a CONST.
(fold_rtx, case '1'): Handle operand 0 of a CONST.
(fold_rtx, case PLUS): Handle (const (minus (label_ref) (label_ref))).

From-SVN: r7832
1994-07-30 12:58:42 -04:00
Richard Kenner
f54d49248d (canon_hash, exp_equiv_p): Refer to string in SYMBOL_REF with XSTR,
not XEXP.

From-SVN: r7650
1994-07-04 11:14:54 -04:00
Richard Kenner
138cec5908 (simplify_unary_operation, case UNSIGNED_FLOAT): Add missing cast to
unsigned.

From-SVN: r7547
1994-06-23 19:05:47 -04:00
Richard Earnshaw
b5a09c4171 (simplify_binary_operation, case MINUS): Check mode of op0,
instead of op1, before calling plus_constant.

From-SVN: r7510
1994-06-17 14:51:43 +00:00
Richard Kenner
c85663b1a8 (set_nonvarying_address_components): Rework and also handle an AND
used for non-aligned accesses.

From-SVN: r7503
1994-06-16 06:47:10 -04:00
Richard Kenner
7ac4a26649 (simplify_unary_operation): Fix typo in last change.
From-SVN: r7495
1994-06-15 19:20:18 -04:00
Richard Kenner
4c9a05bc55 Cast pointer operands to bzero, bcopy, and bcmp to (char *).
From-SVN: r7472
1994-06-14 18:19:28 -04:00
Richard Kenner
62c0ea12e9 (simplify_unary_operation): Correctly and consistently handle
CONST_INT cases for FLOAT and UNSIGNED_FLOAT.

From-SVN: r7470
1994-06-14 17:53:33 -04:00
Richard Kenner
6cdbaec41b (cse_insn): Correctly check for two modes being the same number of
words.

From-SVN: r7292
1994-05-13 15:12:01 -04:00
Jim Wilson
7b3ab05e78 (cse_insn): Set src_eqv if the dest is a STRICT_LOW_PART.
From-SVN: r7278
1994-05-11 14:44:22 -07:00
Richard Kenner
f1e7c95f89 (cse_insn): Invalidate CLOBBERed registers.
(count_reg_usage): Count registers in USE rtls on CALL_INSNs.

From-SVN: r7237
1994-05-06 17:45:07 -04:00
Richard Kenner
560c94a2b9 Use CONST_DOUBLE_FROM_REAL_VALUE macro for immed_real_const_1.
From-SVN: r7113
1994-04-21 15:27:24 -04:00
Richard Kenner
45620ed410 No longer handle LSHIFT.
From-SVN: r7020
1994-04-10 08:03:37 -04:00
Richard Kenner
92f9aa5176 (cse_insn): Add missing definition of var TEM; clean up shadowed uses.
From-SVN: r6920
1994-03-30 16:52:21 -05:00
Richard Kenner
2aef6202ad (cse_insn): Remove decl of unused variable TEM.
From-SVN: r6877
1994-03-25 14:00:02 -05:00
Richard Kenner
6ab832bc31 (FIXED_REGNO_P): Treate global regs as fixed.
(CHEAP_REGNO): Renamed from CHEAP_REG.
(CHEAP_REG): New macro; user var in hard reg is cheap.
(COST): Pass RTL to CHEAP_REG, not regno.
(rtx_cost, case REG): Likewise.

From-SVN: r6836
1994-03-21 07:36:48 -05:00
Richard Kenner
831522a46e (simplify_binary_operation): Protect real_value_truncate inside
handler.

From-SVN: r6767
1994-03-13 08:30:11 -05:00
Richard Kenner
1a7c818bd6 (simplify_relational_operation): Fix typos; use
ARG_POINTER_REGNUM and FRAME_POINTER_REGNUM in condtionals.

From-SVN: r6730
1994-03-09 12:07:12 -05:00
Richard Kenner
9ff08f70f3 (count_reg_usage, case SET): If SRC has side-effects, count a usage of
DEST in it.

From-SVN: r6631
1994-02-26 16:11:04 -05:00
Torbjorn Granlund
be8fe47095 Conditionalize special treatment of
PIC_OFFSET_TABLE_REGNUM on PIC_OFFSET_TABLE_REG_CALL_CLOBBERED.

From-SVN: r6539
1994-02-12 13:48:02 +00:00
Richard Kenner
3c54377553 (canon_hash, case LABEL_REF, SYMBOL_REF): Avoid warning on 64-bit
machines.

From-SVN: r6487
1994-02-06 08:40:29 -05:00
Richard Kenner
7bac1be089 (memory_extend_rtx): New variable.
(cse_main): Initialize it.
(cse_insn): See if we have already loaded a MEM in a wider  mode.

From-SVN: r6484
1994-02-05 08:05:42 -05:00
Jim Wilson
f6516aeee4 (find_best_addr): Limit number of cse_gen_binary calls to
20 per iteration.

From-SVN: r6449
1994-01-31 16:02:12 -08:00
Richard Kenner
2197a88a8c (HASHBITS): Removed.
(HASH, struct set, canon_hash, safe_hash, remove_from_table):
Generate and use unsigned hash values, to avoid potential trouble
with signed shift/overflow.
Also name variables consistently: "hash", not "hash_code".
(lookup, lookup_for_remove, insert, merge_equiv_classes): Likewise.
(invalidate, rehash_using_reg, invalidate_for_call): Likewise.
(find_best_addr, record_jump_cond, cse_insn):  Likewise.

From-SVN: r6431
1994-01-25 08:29:50 -05:00
Richard Kenner
28bad1cbc3 (simplify_relational_operation): Don't do anything with CC0 in
addition to MODE_CC values.

From-SVN: r6376
1994-01-10 19:31:01 -05:00
Richard Kenner
64812ded25 (simplify_relational_operation): Correct declaration of variables
holding parts of constants.

From-SVN: r6351
1994-01-02 08:14:22 -05:00
Richard Kenner
a432f20d05 (simplify_relational_operation): Rewrite and simplify.
Add case when we can simplify A-B for compare of A and B.

From-SVN: r6344
1993-12-31 06:47:13 -05:00
Richard Kenner
c407b802da (simplify_binary_operation, case MULT): Don't convert to ASHIFT if
still generating RTL.

From-SVN: r6340
1993-12-29 06:51:45 -05:00
Richard Kenner
a83afb65d0 (simplify_binary_operation, fold_rtx): Allow some FP simplications with -ffast-math.
(simplify_binary_operation, fold_rtx): Allow some FP simplications
with -ffast-math.
(simplify_relational_operation): FP comparisons can be reversed
if -ffast-math is specified.

From-SVN: r6334
1993-12-27 08:48:17 -05:00
Richard Kenner
79644f0689 (count_reg_usage): Don't count a register used within a SET that sets it.
(delete_dead_from_cse): Pass new parm to count_reg_usage.

From-SVN: r6327
1993-12-26 08:30:32 -05:00
Richard Kenner
c2cc077888 (fold_rtx...
(fold_rtx, case PLUS): If we have (plus A B), A is equivalent to a
negative constant, and the negated constant is in register, convert to
(minus A C) where C is the register containing the negated constant.

From-SVN: r6326
1993-12-26 07:55:11 -05:00
Richard Kenner
089481a600 (simplify_unary_operations): Check that operations really are
double-word before doing them.

From-SVN: r6310
1993-12-25 06:05:04 -05:00
Richard Kenner
3308590619 (simplify_binary_operation): Fix typo in CONST_DOUBLE change.
From-SVN: r6309
1993-12-24 21:54:55 -05:00
Richard Kenner
30d69925b6 (simplify_binary_operation, case PLUS, MINUS):
Simplify such things as (X >> 1) - X.

From-SVN: r6308
1993-12-24 21:24:39 -05:00
Jeff Law
4433322379 cse.c (cse_insn): Set "cse_jumps_altered" when collapsing a switch statement into an...
* cse.c (cse_insn): Set "cse_jumps_altered" when collapsing
        a switch statement into an unconditional jump.
        * toplev.c (rest_of_compilation): Rerun jump_optimize
        before the second CSE pass.

From-SVN: r6305
1993-12-24 12:36:04 -07:00
Richard Kenner
fe87324067 (simplify_binary_operation): Can fold multi-word operations when first is CONST_INT.
(simplify_binary_operation): Can fold multi-word operations when first is
CONST_INT.
(simplify_binary_operation, case PLUS, MINUS): Don't call plus_constant when
OP0 is VOIDmode.

From-SVN: r6298
1993-12-24 06:53:52 -05:00
Torbjorn Granlund
4d61f8c559 (simplify_binary_operation, case *SHIFT*): Reduce arg1 as
defined by SHIFT_COUNT_TRUNCATED.

From-SVN: r6296
1993-12-24 11:46:16 +00:00
Richard Kenner
a4e262bcec (delete_reg_equiv): Don't reference elements of REG_{NEXT,PREV}_EQV
that are not defined.

From-SVN: r6276
1993-12-23 06:57:20 -05:00
Richard Stallman
2708da920e (cse_insn): Call `invalidate' also for STRICT_LOW_PART and ZERO_EXTRACT (three places).
(cse_insn):  Call `invalidate' also for STRICT_LOW_PART and
ZERO_EXTRACT (three places).
(invalidate_from_clobbers): Likewise (two places).
(cse_around_loop): Likewise.
(invalidate_skipped_set): Likewise.
(cse_set_around_loop): Likewise.

From-SVN: r5993
1993-11-04 08:30:30 +00:00
Richard Stallman
0af62b41cd (cse_insn): When using src_related, copy the rtx.
Likewise for src_eqv_here.

From-SVN: r5922
1993-10-27 23:22:38 +00:00
Richard Stallman
76fb0b6041 (fold_rtx): Alter previous change: don't fold the shift
if the count exceeds the width of the value inside the subreg.

(note_mem_written): (mem (scratch)) means clobber everything.

(fold_rtx): Special case handling for folding
a subreg of the result of a left shift.

From-SVN: r5854
1993-10-21 02:43:58 +00:00
Richard Stallman
eb5ad42ab3 (record_jump_cond): At end, make missing equivalences
first, and then merge them.

From-SVN: r5769
1993-10-13 04:03:24 +00:00
Richard Kenner
85c0a55631 (simplify_binary_operation): Test value of SHIFT_COUNT_TRUNCATED if it
is defined.

From-SVN: r5731
1993-10-11 07:39:02 -04:00
Richard Kenner
2bb81c86de (record_jump_cond): Rehash OP1 if OP0's insert_regs returns nonzero.
From-SVN: r5631
1993-10-06 06:56:50 -04:00
Torbjorn Granlund
cdf4112f22 (insert_regs): Always return something.
(simplify_unary_operation): Remove unused variable.
(cse_process_notes): Likewise.
(invalidate_skipped_block): Likewise.
(cse_set_around_loop): Likewise.

From-SVN: r5555
1993-10-02 00:27:43 +00:00
Doug Evans
8bc169f258 cse.c: (FIXED_REGNO_P): HARD_FRAME_POINTER_REGNUM is fixed.
* cse.c: (FIXED_REGNO_P): HARD_FRAME_POINTER_REGNUM is fixed.
(CHEAP_REG): HARD_FRAME_POINTER_REGNUM is cheap.
(FIXED_BASE_PLUS): Allow hard frame pointer as base.
(NONZERO_BASE_PLUS_P): Likewise.
(cannon_hash, case REG): Add HARD_FRAME_POINTER_REGNUM to list of
special registers for SMALL_REGISTER_CLASSES.
(find_best_addr): Addresses containing HARD_FRAME_POINTER_REGNUM
cannot be replaced.
(cse_main): value in HARD_FRAME_POINTER_REGNUM is preserved across calls.

From-SVN: r5451
1993-09-24 19:38:20 +00:00
Richard Kenner
f3becefd60 (fold_rtx, case MINUS): Copy result obtained from hash table.
From-SVN: r5347
1993-09-17 18:13:33 -04:00
Richard Kenner
31c85c78b1 (fold_rtx, case SUBREG): If paradoxical SUBREG of a constant, return
the constant.

From-SVN: r5346
1993-09-17 18:10:33 -04:00
Jim Wilson
f7911249bb (cse_insn): After inserting src_eqv...
(cse_insn): After inserting src_eqv, check to see if it is
identical to any uninserted SET_SRCs, and if so, set their src_elt
to src_eqv_elt.

From-SVN: r5129
1993-08-10 12:11:27 -07:00
Richard Stallman
9c3b4c8be3 Include stdio.h before rtl.h.
From-SVN: r4884
1993-07-09 05:09:25 +00:00
Richard Stallman
9d1bedcf3a (simplify_binary_operation, case MINUS): Fix backwards
test added in last change.

From-SVN: r4859
1993-07-06 20:31:01 +00:00
Richard Kenner
cbf6a543dc (simplify_*_operation, fold_rtx, record_jump_cond, cse_insn): Use
INTEGRAL_MODE_P and FLOAT_MODE_P.

From-SVN: r4780
1993-06-27 21:20:38 -04:00
Richard Kenner
5f6be9da2e Fix typo in copyright line.
From-SVN: r4686
1993-06-17 15:16:45 -04:00
Richard Stallman
ffcf63937c (invalidate_skipped_set): Promote "nonscalar" to "all".
From-SVN: r4679
1993-06-14 23:16:31 +00:00
Richard Stallman
5d5ea90929 (record_jump_cond): Look up op1 again after inserting op0.
From-SVN: r4669
1993-06-12 23:42:59 +00:00
Richard Stallman
4908e50870 (fold_rtx): Correct check for associating shifts and ending up with a shift count too large...
(fold_rtx): Correct check for associating shifts and
ending up with a shift count too large; convert to the
largest valid for ASHIFTRT and don't fold all others.

From-SVN: r4585
1993-05-28 22:40:33 +00:00
Richard Kenner
8e7e536500 (simplify_binary_operation, simplify_relational_operation): Check for
MODE_CC modes, not just CCmode.

From-SVN: r4352
1993-05-06 05:44:05 -04:00
Richard Stallman
2e794ee866 (record_jump_cond): Use mode of op0 or op1, not MODE,
when testing for narrowing or widening subregs.

From-SVN: r4301
1993-05-02 12:43:15 +00:00
Richard Stallman
709ab4fc49 (simplify_binary_operation): Reject CCmode in A & (~A) -> 0.
Also fix typos in previous change.

From-SVN: r4295
1993-05-01 16:55:51 +00:00
Richard Stallman
31dcf83f63 (cse_insn): Reset the INSN_CODE for conditional
or computed jumps which have been converted into simplejumps.

From-SVN: r4287
1993-04-30 16:04:40 +00:00
Richard Kenner
dbbe64450e (simplify_binary_operation, case SMAX): Cast to unsiged HOST_WIDE_INT
instead of unsigned int.

From-SVN: r4259
1993-04-28 14:56:43 -04:00
Richard Kenner
54b1de5550 (invalidate): Use proper type for in_table.
From-SVN: r4208
1993-04-24 11:39:59 -04:00
Richard Kenner
5a3d4befaf (simplify_binary_operation...
(simplify_binary_operation, case MULT): When testing for
floating-point equality, make sure we do so inside a region protected
from traps.

From-SVN: r3963
1993-03-31 15:57:24 -05:00
Richard Kenner
1ff0c00d9f (insert_regs): If a REG already is in a class but not in the mode we
want, don't do anything to the classes.

From-SVN: r3951
1993-03-31 07:00:31 -05:00
Richard Stallman
d3159aee6e (simplify_binary_operation): real_value_truncate returns REAL_VALUE_TYPE.
(simplify_binary_operation): real_value_truncate
returns REAL_VALUE_TYPE.
Convert rtx_code into tree_code for argument to REAL_ARITHMETIC.

(simplify_unary_operation): Use new ..._RNDZINT macros
instead of casting value of REAL_VALUE_FIX_TRUNCATE
and REAL_VALUE_UNSIGNED_FIX_TRUNCATE.

From-SVN: r3943
1993-03-31 05:53:29 +00:00
Richard Kenner
6d44728adf (CHEAP_REG): Add missing parens.
From-SVN: r3861
1993-03-23 20:16:17 -05:00
Jim Wilson
7fe34fdfe7 (cse_process_notes): Replace NULL_RTX with just zero.
From-SVN: r3795
1993-03-19 18:17:48 -08:00