aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
AgeCommit message (Collapse)AuthorFilesLines
1998-10-14Warning fixes:Kaveh R. Ghazi1-16/+17
* 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-13I can't believe I havn't done work on my home machine in nearly a month...Richard Henderson1-24/+40
I can't believe I havn't done work on my home machine in nearly a month... * alias.c (base_alias_check): Accept new args for the modes of the two references. Use them to determine if an AND can overlap. Update all callers. (memrefs_conflict_p): Assume sizes are aligned, and uses them to determine if an AND can overlap. From-SVN: r23060
1998-08-25alias.c: Include output.h.Mark Mitchell1-5/+9
* alias.c: Include output.h. (DIFFERENT_ALIAS_SETS_P): Don't treat alias sets as different if we're in a varargs function. * Makefile.in (alias.o): Depend on output.h From-SVN: r21967
1998-08-14i386.h (MODES_TIEABLE_P): Reorganize to shut up warnings.Jason Merrill1-5/+8
* i386.h (MODES_TIEABLE_P): Reorganize to shut up warnings. * alias.c (memrefs_conflict_p): Add braces to shut up warnings. * cse.c (cse_basic_block): Add parens to shut up warnings. From-SVN: r21734
1998-06-29Warning fixes:Kaveh R. Ghazi1-1/+1
* Makefile.in (fix-header): Don't needlessly depend on cpperror.o. * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): Cast expansion to void since it is evaluated in a comma list. * mips.h (ASM_GENERATE_INTERNAL_LABEL): Always sprintf `NUM' argument as a long and cast `NUM' to long to ensure it is of the proper width. Wrap macro arguments in parens when they appear in the expansion. * sol2.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. * sparc.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. (ASM_DECLARE_RESULT): Fix fprintf format specifier to match function argument return type. (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P, REGNO_OK_FOR_FP_P, REGNO_OK_FOR_CCFP_P): Use `(unsigned)' not `U'. * cpplib.c (cpp_message_from_errno): Remove unneeded argument to cpp_message. * dbxout.c: Fix the comments after an #endif to reflect the actual condition tested in the preceding #if. * except.c (find_all_handler_type_matches): Switch to old-style function definition. * expr.c (expand_builtin): Remove unused variable `type' twice. * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Cast -1 before comparing it to an unsigned long. * haifa-sched.c (print_insn_chain): Remove unused function. * objc/objc-act.c (build_msg_pool_reference): Hide prototype and definition. * toplev.c: When testing whether to include dbxout.h, also include it when XCOFF_DEBUGGING_INFO is defined. * unroll.c (unroll_loop): Add parentheses around assignment used as truth value. From-SVN: r20801
1998-06-25invoke.texi (-fstrict-aliasing): Document.Mark Mitchell1-0/+32
* invoke.texi (-fstrict-aliasing): Document. * rtl.texi (MEM_ALIAS_SET): Document. * flags.h (flag_strict_aliasing): Declare. * toplev.c (flag_strict_aliasing): Define. (f_options): Add -strict-aliasing. (main): Set flag_strict_aliasing if -O2 or higher. * tree.h (tree_type): Add alias_set field. (TYPE_ALIAS_SET): New macro. (TYPE_ALIAS_SET_KNOWN_P): Likewise. (get_alias_set): Declare. * tree.c (lang_get_alias_set): Define. (make_node): Initialize TYPE_ALIAS_SET. (get_alias_set): New function. * print-tree.c (print_node): Dump the alias set for a type. * c-tree.h (c_get_alias_set): Declare. * c-common.c (c_get_alias_set): New function. * c-decl.c (init_decl_processing): Set lang_get_alias_set. * expr.c (protect_from_queue): Propogage alias sets. (expand_assignment): Calculate alias set for new MEMs. (expand_expr): Likewise. * function.c (put_var_into_stack): Likewise. (put_reg_into_stack): Likewise. (gen_mem_addressof): Likewise. (assign_parms): Likewise. * stmt.c (expand_decl): Likewise. * varasm.c (make_decl_rtl): Eliminate redundant clearing of DECL_RTL. Calculate alias set for new MEMs. * rtl.def (REG): Add dummy operand. (MEM): Add extra operand to store the MEM_ALIAS_SET. * rtl.h (MEM_ALIAS_SET): New macro. (gen_rtx_MEM): Declare. * emit-rtl.c (gen_rtx_MEM): New function. * gengenrtl.c (sepcial_rtx): Make MEMs special. * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): New macro. (DIFFERENT_ALIAS_SETS_P): Likewise. (canon_rtx): Propogate the alias set to the new MEM. (true_dependence): Check the alias sets. (anti_dependence): Likewise. (output_dependence): Likewise. * explow.c (stabilize): Progoate alias sets. * integrate.c (copy_rtx_and_substitute): Likewise. * final.c (alter_subreg): Make sure not to leave MEM_IN_STRUCT_P in an unpredictable state. Propogate alias sets. * reload1.c (reload): Clear MEM_ALIAS_SET for new MEMs about which we have no alias information. From-SVN: r20719
1998-06-19alias.c: Include toplev.hGraham Stott1-0/+1
* alias.c: Include toplev.h * caller-save.c: Include toplev.h * combine.c: Include toplev.h * flow.c Include toplev.h * global.c: Include toplev.h * jump.c: Include toplev.h * local-alloc.c: Include toplev.h * loop.c: Include toplev.h * regmove.c: Include toplev.h * stupid.c: Include toplev.h * unroll.c: Include toplev.h * Makefile.in: Add toplev.h dependencies. From-SVN: r20623
1998-06-19alias.c (find_base_value): Add prototype.H.J. Lu1-1/+2
* alias.c (find_base_value): Add prototype. (true_dependence): Add prototype for function argument. From-SVN: r20601
1998-06-05* alias.c (find_base_value): Avoid reading past end of reg_base_value.John Carr1-0/+1
From-SVN: r20240
1998-05-21alias.c (rtx_equal_for_memref_p): Handle SCRATCH as a memory address.Jeffrey A Law1-0/+4
* alias.c (rtx_equal_for_memref_p): Handle SCRATCH as a memory address. From-SVN: r19936
1998-05-17Revert April 21 alias.c change from jfc.Jim Wilson1-85/+49
* alias.c (mode_alias_check): Delete. (true_dependence, anti_dependence, output_dependence): Revert April 21 change. From-SVN: r19818
1998-04-29calls.c (expand_call): Fix recognition of C++ operator new.John Carr1-0/+6
* calls.c (expand_call): Fix recognition of C++ operator new. * alias.c (mode_alias_check): Disable type based alias detection. From-SVN: r19492
1998-04-25alias.c (alias_invariant): New variable.John Carr1-25/+64
* alias.c (alias_invariant): New variable. (record_base_value): New argument INVARIANT. (memrefs_conflict_p): If a register has an entry in the alias_invariant array, try substituting that value for the register. * rtl.h: Declare record_base_value. * loop.c, unroll.c: Update callers of record_base_value. * alias.c (find_base_value, find_base_term): SIGN_EXTEND and ZERO_EXTEND do not affect base values. From-SVN: r19408
1998-04-21alias.c (mode_alias_check): New function.John Carr1-49/+79
* alias.c (mode_alias_check): New function. (true_dependence, anti_dependence, output_dependence): Call mode_alias_check. From-SVN: r19357
1998-04-16alias.c (record_set): Add prototype.Jeffrey A Law1-0/+3
* alias.c (record_set): Add prototype. (find_base_term, base_alias_check): Likewise. From-SVN: r19246
1998-03-20Major cutover to using system.h:Kaveh R. Ghazi1-10/+1
* 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-02-15alias.c: Include <stdlib.h> and <string.h>.John Carr1-1/+11
* alias.c: Include <stdlib.h> and <string.h>. (init_alias_analysis): Pass NULL_RTX instead of 0 to record_set. From-SVN: r18011
1998-02-08Document unique_id variable.John Carr1-1/+2
From-SVN: r17783
1998-01-14alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO...Richard Henderson1-13/+13
* 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-05alias.c (*_dependence): Call base_alias_check before canon_rtx.John F. Carr1-18/+40
* alias.c (*_dependence): Call base_alias_check before canon_rtx. (base_alias_check): If no base found for address call canon_rtx and try again. From-SVN: r17296
1997-12-24flags.h, [...]: Remove flag_alias_check; optimization is now always enabled.John Carr1-164/+122
* flags.h, toplev.c, calls.c, alias.c: Remove flag_alias_check; optimization is now always enabled. * calls.c (expand_call): Recognize C++ operator new as malloc-like function. * alias.c (memrefs_conflict_p): Eliminate tests now done by base_alias_check. (*_dependence): Call canon_rtx before base_alias_check. (init_alias_once): New function to precompute set of registers which can hold Pmode function arguments. * rtl.h: Declare init_alias_once. * toplev.c (compile_file): Call init_alias_once. From-SVN: r17226
1997-12-20bitmap.c (bitmap_clear): Ensure `inline' is at the beginning of the declaration.Kaveh R. Ghazi1-0/+6
* bitmap.c (bitmap_clear): Ensure `inline' is at the beginning of the declaration. * c-decl.c (finish_decl): Use parentheses around && within ||. * rtl.c: Include stdlib.h. (read_skip_spaces): Add parentheses around assignments used as truth values. (read_rtx): Initialize list_rtx. * cppexp.c (parse_number): Use || when operands are truth values. * alias.c (find_base_value): Add default case. (memrefs_conflict): Likewise. * combine.c (sets_function_arg_p): Likewise. * genemit.c (gen_exp): Likewise. * local-alloc.c (contains_replace_regs): Likewise. * rtlanal.c (jmp_uses_reg_or_mem): Likewise. * fold-const.c (fold_convert): Use "&&" for truth values. (fold): Add default case. * sdbout.c (sdbout_field_types): Fix typo in declaration. (sdbout_one_type): Add default case. * alpha.c (alpha_sa_mask): Prototype only if OPEN_VMS. (some_operand): Add default case. (input_operand): Likewise. (signed_comparison_operator): Likewise. (divmod_operator): Likewise. (alpha_set_memflags_1): Likewise. * reload1.c (reload_cse_simplify_operands): Ensure function always returns a value. * scan-decls.c (scan_decls): Likewise. * c-lex.c (skip_white_space): Fix typo in declaraion. * c-typeck.c (comp_target_types): Add parentheses around assignment used as truth value. (print_spelling): Likewise. (constructor_implicit, constructor_result): Remove unused variables. * collect2.c (scan_library): Protect prototype with #ifdef SCAN_LIBRARIES. * emit-rtl.c (find_line_note): Fix typo in declaration. * final.c (asm_insn_count): Protect prototype with #ifdef HAVE_ATTR_length. * flow.c (find_auto_inc): Protect prototype with #ifdef AUTO_INC_DEC. (try_pre_increment_1, try_pre_increment): Likewise. * regclass.c (auto_inc_dec_reg_p): Protect prototype with #ifdef FORBIDDEN_INC_DEC_CLASSES. Make return type explicit. * gcov-io.h (__store_long, __write_long, __read_long): Fix unsigned/signed comparisons. * gcov.c (read_files): Remove unused "first_type" variable. (scan _for_source_files): Initialize s_ptr. (function_summary): Eliminate "%lf" formatting, use %ld for longs. (output_data): Initialize branch_probs and last_line_num. Eliminate "%lf" formatting, use "%ld" for longs. Co-Authored-By: Jeffrey A Law <law@cygnus.com> From-SVN: r17158
1997-11-10alias.c (MAX_ALIAS_LOOP_PASSES): Define.Jeffrey A Law1-5/+27
* alias.c (MAX_ALIAS_LOOP_PASSES): Define. (init_alias_analysis): Break out of loops after MAX_ALIAS_LOOP_PASSES. From-SVN: r16415
1997-11-05alias.c (find_base_value): Only return the known base value for pseudo ↵Jeffrey A Law1-4/+8
registers. * alias.c (find_base_value): Only return the known base value for pseudo registers. From-SVN: r16345
1997-11-04alias.c (find_base_value): When copying arguments, return the tenative value ↵Jeffrey A Law1-4/+7
for a hard register. * alias.c (find_base_value): When copying arguments, return the tenative value for a hard register. From-SVN: r16319
1997-11-01alias.c (init_alias_analysis): Handle -fno-alias-check when optimizing ↵Jeffrey A Law1-47/+55
correctly. * alias.c (init_alias_analysis): Handle -fno-alias-check when optimizing correctly. From-SVN: r16268
1997-10-31alias.c (init_alias_analysis): Add struct_value_incoming_rtx and ↵Jeffrey A Law1-53/+138
static_chain_rtx into the potential base... * alias.c (init_alias_analysis): Add struct_value_incoming_rtx and static_chain_rtx into the potential base values array if they are registers. Fixes bugs exposed by improved alias propagation code. * alias.c (new_reg_base_value): New array of potential base values. (unique_id): Now file scoped static. (find_base_value, case REG): Return the value in reg_base_value array for the REG if it exists. Else, return the value from new_reg_base_value if copying args and REG is a hard register. (find_base_value, case PLUS): If either operand of the PLUS is a REG, try to get its base value. Handle base + index and index + base. (record_set): Use new_reg_base_value instead of reg_base_value. (init_alias_analysis): Allocate space for new_reg_base_value too. Rework code to iterate over the insns propagating base value information until nothing changes. Improve alias propagation significantly. From-SVN: r16250
1997-10-26Fix typo in last change.Jeff Law1-1/+1
From-SVN: r16194
1997-10-26Opps. Checked in some development patches by accident.Jeff Law1-23/+1
From-SVN: r16189
1997-10-26alias.c (memrefs_conflict_p): Treat arg_pointer_rtx just like stack_pointer_rtx.Richard Henderson1-2/+2
* alias.c (memrefs_conflict_p): Treat arg_pointer_rtx just like stack_pointer_rtx. From-SVN: r16188
1997-10-26Take out find_base_value change -- not needed, only the find_base_termJeffrey A Law1-8/+23
change was needed. From-SVN: r16185
1997-10-26alias.c (find_base_value): Handle PRE_INC, PRE_DEC, POST_INC, and POS_DEC.Jeffrey A Law1-1/+15
* alias.c (find_base_value): Handle PRE_INC, PRE_DEC, POST_INC, and POS_DEC. (find_base_term): Likewise. * alias.c (true_dependence): Fix typo. From-SVN: r16182
1997-09-29alias.c (base_alias_check): Two symbols can conflict if they are accessed ↵Richard Henderson1-11/+29
via AND. * alias.c (base_alias_check): Two symbols can conflict if they are accessed via AND. (memrefs_conflict_p): Likewise. From-SVN: r15785
1997-09-08alias.c (init_alias_analysis): Clean up incompatible pointer type warning in ↵Weiwen Liu1-1/+1
bzero. * alias.c (init_alias_analysis): Clean up incompatible pointer type warning in bzero. * regmove.c (regmove_optimize): Ditto. * haifa-sched.c (find_rgns): Ditto. * haifa-sched.c (print_value): Clean up ptr->int cast warnings. From-SVN: r15169
1997-09-03Fix H.J. Lu's alpha-linux aliasing bug.Jim Wilson1-2/+10
* alias.c (true_dependence): Address with AND can alias scalars. (anti_dependence, output_dependence): Likewise. From-SVN: r15063
1997-09-03Fix minor alias typo found while working on H.J. Lu's alpha-linux alias bug.Jim Wilson1-1/+1
* alias.c (true_dependence): Test x for BLKmode, in addition to mem. From-SVN: r15061
1997-08-22Fix m68k-next-nextstep3 stage2 enquire compilation hang reported by Moene.Jim Wilson1-1/+1
* alias.c (true_dependence): Pass x_addr not x to varies. From-SVN: r14898
1997-08-22alias.c (find_base_value): Improve handling of PLUS, MINUS, and LO_SUM.John F. Carr1-43/+58
* alias.c (find_base_value): Improve handling of PLUS, MINUS, and LO_SUM. (record_set): Handle LO_SUM like PLUS. (init_alias_analysis): When following chains of base addresses, do not stop on reaching a hard register. Updates from jfc. From-SVN: r14888
1997-08-20alias.c (init_alias_analysis): When simplifying the reg_base_value array, ↵Jeffrey A Law1-1/+1
simplify entries for hard registers too. * alias.c (init_alias_analysis): When simplifying the reg_base_value array, simplify entries for hard registers too. From jfc. Fixes c-torture failure on the PA. From-SVN: r14869
1997-08-11* Integrate alias analysis changes from jfc@mit.eduJeffrey A Law1-0/+1015
* 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