Commit Graph

137 Commits

Author SHA1 Message Date
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