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
Richard Kenner
fb5c8ce64a
(simplify_plus_minus): Count CONSTs coming in and going out...
...
(simplify_plus_minus): Count CONSTs coming in and going out; we have
simplified things if we have more CONSTs going out even if we have the
same number of total terms.
From-SVN: r3787
1993-03-19 06:29:40 -05:00
Richard Kenner
e7bb59fa6c
(FIXED_REGNO_P): Remove previous change; all callers but one already check.
...
(CHEAP_REG): Only call FIXED_REGNO_P for hard regs.
(fold_rtx): Clarify comments.
From-SVN: r3762
1993-03-16 17:41:57 -05:00
James Van Artsdalen
9798977501
(FIXED_REGNO_P): Pseudos can't be fixed regs.
...
From-SVN: r3757
1993-03-16 09:54:12 +00:00
Richard Kenner
b7d9299b30
(simplify_plus_minus): Remove last change.
...
(simplify_plus_minus): Remove last change. Instead, count initial
operands and test against that count to see if we did anything.
From-SVN: r3748
1993-03-15 17:38:40 -05:00
Richard Kenner
7463703395
(simplify_plus_minus): Reject "simplifications" that are too complex
...
in form.
From-SVN: r3733
1993-03-14 09:37:43 -05:00
Richard Kenner
5931019b79
(simplify_plus_minus): Correct sign error in expanding NOT.
...
From-SVN: r3732
1993-03-14 06:32:20 -05:00