summaryrefslogtreecommitdiffstats
path: root/gcc/cse.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Update mainline egcs to gcc2 snapshot 971021.law1997-11-021-8/+73
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16278 138bc75d-0d04-0410-961f-82ee72b054a4
* Patches to fix minor optimizer bugswilson1997-10-201-0/+10
| | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16129 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (this_insn_cc0_mode): Initialize.law1997-10-011-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15816 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (try_combine): Use NULL_RTX instead of '0' wherelaw1997-09-221-1/+1
| | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15630 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (simplify_relational_operation): Set h0u just like h0s.law1997-09-221-16/+2
| | | | | | | Similarly for h1u and h1s. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15616 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (simplify_relational_operation): If MODE specifies alaw1997-09-151-2/+16
| | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15454 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix irix6 execute/921117-1.c c-torture failure.wilson1997-09-011-0/+4
| | | | | | | * cse.c (cse_insn): Don't record BLKmode values. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15024 138bc75d-0d04-0410-961f-82ee72b054a4
* * Integrate alias analysis changes from jfc@mit.edulaw1997-08-111-299/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14768 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): Ignore paradoxical SUBREGs unless we are looking for such.kenner1997-08-021-0/+31
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14625 138bc75d-0d04-0410-961f-82ee72b054a4
* (find_best_addr): Add missing rtx_cost arguments.wilson1997-07-011-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14367 138bc75d-0d04-0410-961f-82ee72b054a4
* Delete erroneous references to (pseudo) in comments.dje1997-06-261-6/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14325 138bc75d-0d04-0410-961f-82ee72b054a4
* Use accessor macros to access arrays based on regno; move many of the arrays ↵meissner1997-05-301-5/+5
| | | | | | into a single structure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14140 138bc75d-0d04-0410-961f-82ee72b054a4
* (notreg_cost): New function, extracted from COST macro.kenner1997-05-171-13/+24
| | | | | | | (COST): Use notreg_cost. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14075 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): Don't record a SRC that's a MEM and the same as akenner1997-05-171-0/+15
| | | | | | | REG_EQUIV note if DEST is set more than once. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14074 138bc75d-0d04-0410-961f-82ee72b054a4
* (fold_rtx, case PLUS): When seeing if negative of constant is around,kenner1997-04-211-4/+10
| | | | | | | make sure not dealing with largest negative. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13953 138bc75d-0d04-0410-961f-82ee72b054a4
* (canon_reg, cse_insn): Don't examine insn_n_dups if recog_memoizedkenner1997-04-131-2/+6
| | | | | | | fails to find a match. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13888 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (invalidate_from_clobbers): Delete unnecessary test fordje1997-02-071-9/+7
| | | | | | | (clobber nil). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13618 138bc75d-0d04-0410-961f-82ee72b054a4
* Get the right COST for a SUBREG when truncatingian1997-01-231-7/+19
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13549 138bc75d-0d04-0410-961f-82ee72b054a4
* Check SMALL_REGISTER_CLASSES at runtimeian1996-12-131-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13302 138bc75d-0d04-0410-961f-82ee72b054a4
* (fold_rtx): Fold inside ASM_OPERANDS.kenner1996-09-231-0/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12788 138bc75d-0d04-0410-961f-82ee72b054a4
* Correct comments.kenner1996-09-231-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12775 138bc75d-0d04-0410-961f-82ee72b054a4
* (canon_hash, cse_insn): MEM is not unchanging if it is in the frame (sincekenner1996-07-251-2/+4
| | | | | | | the temp slot might be reused). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12562 138bc75d-0d04-0410-961f-82ee72b054a4
* (note_mem_written): Varying structure memory access withwilson1996-07-081-2/+7
| | | | | | | AND address can alias scalars. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12417 138bc75d-0d04-0410-961f-82ee72b054a4
* formatting tweaksmrs1996-07-031-18/+21
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12390 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_binary_operation, case MULT): Check for casewilson1996-06-081-0/+5
| | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12238 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_process_notes): Handle SUBREG like ZERO_EXTEND.wilson1996-04-211-0/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11864 138bc75d-0d04-0410-961f-82ee72b054a4
* (invalidate_skipped_set): Ignore CLOBBER after callingkenner1996-04-151-7/+7
| | | | | | | note_mem_written, not before. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11786 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_unary_operation): Add new arg to REAL_VALUE_FROM_INT.kenner1996-04-141-3/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11765 138bc75d-0d04-0410-961f-82ee72b054a4
* (note_mem_written): Delete obsolete code for handlingwilson1996-03-201-3/+0
| | | | | | | (mem (scratch)). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11585 138bc75d-0d04-0410-961f-82ee72b054a4
* (find_best_addr): Make sure folded address better before using.kenner1995-12-271-3/+15
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10873 138bc75d-0d04-0410-961f-82ee72b054a4
* (insert): Don't put a REG into qty_const.kenner1995-11-261-3/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10607 138bc75d-0d04-0410-961f-82ee72b054a4
* (invalidate): For a pseudo register, do a loop to invalidate all tablekenner1995-11-051-1/+9
| | | | | | | entries, irrespective of mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10556 138bc75d-0d04-0410-961f-82ee72b054a4
* (set_nonvarying_address_components, case AND): Add *pend to end. Addkenner1995-10-031-1/+2
| | | | | | | constant to start instead of subtracting it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10426 138bc75d-0d04-0410-961f-82ee72b054a4
* (recorded_label_ref): New variable.kenner1995-09-161-6/+9
| | | | | | | | (insert): Set instead of cse_jumps_altered. (cse_main): Initialize it and return 1 if nonzero at end. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10368 138bc75d-0d04-0410-961f-82ee72b054a4
* (insert): Set cse_jumps_altered when inserting a LABEL_REF.kenner1995-09-151-0/+8
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10366 138bc75d-0d04-0410-961f-82ee72b054a4
* (canon_hash, CONST_DOUBLE): Hash integer and real differently.kenner1995-08-311-5/+9
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10303 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix spelling errors.kenner1995-08-281-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10289 138bc75d-0d04-0410-961f-82ee72b054a4
* (set_nonvarying_address_components): Handle addresses which are the sum ofkenner1995-08-131-0/+50
| | | | | | | | two constant pseudo regs. (cse_rtx_addr_varies_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10220 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): When do special handling for (set REG0 REG1), must deletekenner1995-07-261-0/+6
| | | | | | | REG_EQUAL note from insn if it mentions REG0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10169 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): Ifdef out code that pre-truncates src_folded.kenner1995-07-141-0/+8
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10127 138bc75d-0d04-0410-961f-82ee72b054a4
* Update FSF address.kenner1995-06-151-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9959 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_basic_block): Fix test for whether block ends with a barrier.kenner1995-06-091-9/+12
| | | | | | | Return next insn, not 0, if block ends in a barrier. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9916 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_unary_operation, case FLOAT, UNSIGNED_FLOAT): Truncate tokenner1995-06-051-2/+2
| | | | | | | requested mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9872 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix typos in comments.kenner1995-05-161-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9712 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): Properly set IN_MEMORY for SET_DEST.kenner1995-04-301-1/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9547 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_unary_operation): #ifdef POINTERS_EXTEND_UNSIGNED, handlekenner1995-04-071-0/+16
| | | | | | | sign- or zero-extending addresses. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9333 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_unary_operation): Sign-extend constants whentege1995-04-031-0/+26
| | | | | | | | they have the most significant bit set for the target. (simplify_binary_operation): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9309 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_relational_operation): Don't simplify A-B forwilson1995-04-021-9/+5
| | | | | | | compare of A and B when the compare is unsigned. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9296 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): When emitting a BARRIER, don't put it after a deletedkenner1995-04-011-1/+1
| | | | | | | insn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9283 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_unary_operation): If operand mode is VOIDmode forkenner1995-02-251-1/+8
| | | | | | | UNSIGNED_FLOAT and operand looks negative, can't simplify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9081 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud