summaryrefslogtreecommitdiff
path: root/gcc/cse.c
Commit message (Collapse)AuthorAgeFilesLines
* (simplify_binary_operation, case MINUS): Check mode of op0,erich1994-06-171-1/+1
| | | | | | | instead of op1, before calling plus_constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7510 138bc75d-0d04-0410-961f-82ee72b054a4
* (set_nonvarying_address_components): Rework and also handle an ANDkenner1994-06-161-13/+51
| | | | | | | used for non-aligned accesses. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7503 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_unary_operation): Fix typo in last change.kenner1994-06-151-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7495 138bc75d-0d04-0410-961f-82ee72b054a4
* Cast pointer operands to bzero, bcopy, and bcmp to (char *).kenner1994-06-141-8/+9
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7472 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_unary_operation): Correctly and consistently handlekenner1994-06-141-36/+33
| | | | | | | CONST_INT cases for FLOAT and UNSIGNED_FLOAT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7470 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): Correctly check for two modes being the same number ofkenner1994-05-131-2/+3
| | | | | | | words. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7292 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): Set src_eqv if the dest is a STRICT_LOW_PART.wilson1994-05-111-2/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7278 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): Invalidate CLOBBERed registers.kenner1994-05-061-8/+20
| | | | | | | (count_reg_usage): Count registers in USE rtls on CALL_INSNs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7237 138bc75d-0d04-0410-961f-82ee72b054a4
* Use CONST_DOUBLE_FROM_REAL_VALUE macro for immed_real_const_1.kenner1994-04-211-5/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7113 138bc75d-0d04-0410-961f-82ee72b054a4
* No longer handle LSHIFT.kenner1994-04-101-8/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7020 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): Add missing definition of var TEM; clean up shadowed uses.kenner1994-03-301-9/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6920 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): Remove decl of unused variable TEM.kenner1994-03-251-1/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6877 138bc75d-0d04-0410-961f-82ee72b054a4
* (FIXED_REGNO_P): Treate global regs as fixed.kenner1994-03-211-5/+12
| | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6836 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_binary_operation): Protect real_value_truncate insidekenner1994-03-131-1/+1
| | | | | | | handler. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6767 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_relational_operation): Fix typos; usekenner1994-03-091-2/+2
| | | | | | | ARG_POINTER_REGNUM and FRAME_POINTER_REGNUM in condtionals. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6730 138bc75d-0d04-0410-961f-82ee72b054a4
* (count_reg_usage, case SET): If SRC has side-effects, count a usage ofkenner1994-02-261-1/+10
| | | | | | | DEST in it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6631 138bc75d-0d04-0410-961f-82ee72b054a4
* Conditionalize special treatment oftege1994-02-121-1/+1
| | | | | | | PIC_OFFSET_TABLE_REGNUM on PIC_OFFSET_TABLE_REG_CALL_CLOBBERED. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6539 138bc75d-0d04-0410-961f-82ee72b054a4
* (canon_hash, case LABEL_REF, SYMBOL_REF): Avoid warning on 64-bitkenner1994-02-061-3/+4
| | | | | | | machines. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6487 138bc75d-0d04-0410-961f-82ee72b054a4
* (memory_extend_rtx): New variable.kenner1994-02-051-1/+60
| | | | | | | | (cse_main): Initialize it. (cse_insn): See if we have already loaded a MEM in a wider mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6484 138bc75d-0d04-0410-961f-82ee72b054a4
* (find_best_addr): Limit number of cse_gen_binary calls towilson1994-02-011-1/+9
| | | | | | | 20 per iteration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6449 138bc75d-0d04-0410-961f-82ee72b054a4
* (HASHBITS): Removed.kenner1994-01-251-98/+92
| | | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6431 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_relational_operation): Don't do anything with CC0 inkenner1994-01-111-3/+7
| | | | | | | addition to MODE_CC values. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6376 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_relational_operation): Correct declaration of variableskenner1994-01-021-2/+3
| | | | | | | holding parts of constants. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6351 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_relational_operation): Rewrite and simplify.kenner1993-12-311-201/+143
| | | | | | | Add case when we can simplify A-B for compare of A and B. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6344 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_binary_operation, case MULT): Don't convert to ASHIFT ifkenner1993-12-291-2/+6
| | | | | | | still generating RTL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6340 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_binary_operation, fold_rtx): Allow some FP simplicationskenner1993-12-271-22/+27
| | | | | | | | | with -ffast-math. (simplify_relational_operation): FP comparisons can be reversed if -ffast-math is specified. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6334 138bc75d-0d04-0410-961f-82ee72b054a4
* (count_reg_usage): Don't count a register used within a SET that sets it.kenner1993-12-261-14/+20
| | | | | | | (delete_dead_from_cse): Pass new parm to count_reg_usage. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6327 138bc75d-0d04-0410-961f-82ee72b054a4
* (fold_rtx, case PLUS): If we have (plus A B), A is equivalent to akenner1993-12-261-0/+21
| | | | | | | | negative constant, and the negated constant is in register, convert to (minus A C) where C is the register containing the negated constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6326 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_unary_operations): Check that operations really arekenner1993-12-251-1/+1
| | | | | | | double-word before doing them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6310 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_binary_operation): Fix typo in CONST_DOUBLE change.kenner1993-12-251-0/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6309 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_binary_operation, case PLUS, MINUS):kenner1993-12-251-0/+108
| | | | | | | Simplify such things as (X >> 1) - X. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6308 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (cse_insn): Set "cse_jumps_altered" when collapsinglaw1993-12-241-0/+1
| | | | | | | | | a switch statement into an unconditional jump. * toplev.c (rest_of_compilation): Rerun jump_optimize before the second CSE pass. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6305 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_binary_operation): Can fold multi-word operations when first iskenner1993-12-241-6/+13
| | | | | | | | | CONST_INT. (simplify_binary_operation, case PLUS, MINUS): Don't call plus_constant when OP0 is VOIDmode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6298 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_binary_operation, case *SHIFT*): Reduce arg1 astege1993-12-241-12/+3
| | | | | | | defined by SHIFT_COUNT_TRUNCATED. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6296 138bc75d-0d04-0410-961f-82ee72b054a4
* (delete_reg_equiv): Don't reference elements of REG_{NEXT,PREV}_EQVkenner1993-12-231-3/+5
| | | | | | | that are not defined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6276 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): Call `invalidate' also for STRICT_LOW_PART andrms1993-11-041-12/+44
| | | | | | | | | | | ZERO_EXTRACT (three places). (invalidate_from_clobbers): Likewise (two places). (cse_around_loop): Likewise. (invalidate_skipped_set): Likewise. (cse_set_around_loop): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5993 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): When using src_related, copy the rtx.rms1993-10-271-2/+2
| | | | | | | Likewise for src_eqv_here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5922 138bc75d-0d04-0410-961f-82ee72b054a4
* (fold_rtx): Alter previous change: don't fold the shiftrms1993-10-211-1/+26
| | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5854 138bc75d-0d04-0410-961f-82ee72b054a4
* (record_jump_cond): At end, make missing equivalencesrms1993-10-131-14/+9
| | | | | | | first, and then merge them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5769 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_binary_operation): Test value of SHIFT_COUNT_TRUNCATED if itkenner1993-10-111-4/+8
| | | | | | | is defined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5731 138bc75d-0d04-0410-961f-82ee72b054a4
* (record_jump_cond): Rehash OP1 if OP0's insert_regs returns nonzero.kenner1993-10-061-0/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5631 138bc75d-0d04-0410-961f-82ee72b054a4
* (insert_regs): Always return something.tege1993-10-021-4/+2
| | | | | | | | | | (simplify_unary_operation): Remove unused variable. (cse_process_notes): Likewise. (invalidate_skipped_block): Likewise. (cse_set_around_loop): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5555 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c: (FIXED_REGNO_P): HARD_FRAME_POINTER_REGNUM is fixed.dje1993-09-241-11/+22
| | | | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5451 138bc75d-0d04-0410-961f-82ee72b054a4
* (fold_rtx, case MINUS): Copy result obtained from hash table.kenner1993-09-171-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5347 138bc75d-0d04-0410-961f-82ee72b054a4
* (fold_rtx, case SUBREG): If paradoxical SUBREG of a constant, returnkenner1993-09-171-4/+10
| | | | | | | the constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5346 138bc75d-0d04-0410-961f-82ee72b054a4
* (cse_insn): After inserting src_eqv, check to see if it iswilson1993-08-101-0/+8
| | | | | | | | identical to any uninserted SET_SRCs, and if so, set their src_elt to src_eqv_elt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5129 138bc75d-0d04-0410-961f-82ee72b054a4
* Include stdio.h before rtl.h.rms1993-07-091-1/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4884 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_binary_operation, case MINUS): Fix backwardsrms1993-07-061-1/+1
| | | | | | | test added in last change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4859 138bc75d-0d04-0410-961f-82ee72b054a4
* (simplify_*_operation, fold_rtx, record_jump_cond, cse_insn): Usekenner1993-06-281-25/+19
| | | | | | | INTEGRAL_MODE_P and FLOAT_MODE_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4780 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix typo in copyright line.kenner1993-06-171-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4686 138bc75d-0d04-0410-961f-82ee72b054a4