Commit Graph

91 Commits

Author SHA1 Message Date
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
Richard Kenner
91a60f374f (simplify_plus_minus): When seeing if we have reduced the number of operands...
(simplify_plus_minus): When seeing if we have reduced the number of
operands, ensure we count a CONST result as two operands.

From-SVN: r3729
1993-03-13 20:45:44 -05:00
Richard Kenner
7b0d7bd0c9 (refers_to_mem_p): Use rtx_equal_p to see if bases are equal.
From-SVN: r3719
1993-03-12 17:43:28 -05:00
Richard Kenner
6500fb4361 (set_nonvarying_address_components): Fix type mismatch with caller.
(refers_to_mem_p): Call properly in second call.

From-SVN: r3718
1993-03-12 17:39:19 -05:00
Richard Kenner
ac07e0665d (CHEAP_REG): New macro; makes virtual regs cheap too.
(COST): Use CHEAP_REG.
(rtx_cost, case REG): Use CHEAP_REG to return zero for some REGs.

From-SVN: r3708
1993-03-11 19:02:37 -05:00
Jeff Law
f451db8990 cse.c (set_nonvarying_address_components): New function.
* cse.c (set_nonvarying_address_components): New function.
	(invalidate): Use set_nonvarying_address_components instead of
	computing them.
	(refers_to_mem_p): Likewise.  Simplify checks for conflicting
	memory accesses.  Make static.

From-SVN: r3703
1993-03-11 05:46:36 -07:00
Richard Kenner
96b0e48171 (cse_gen_binary, simplify_plus_minus): New functions.
(find_best_addr): Use cse_gen_binary.
(simplify_binary_operation, fold_rtx): Likewise.
Remove most special-cases for PLUS and MINUS and call
simplify_plus_minus instead.
Clean up some tests for FP.

From-SVN: r3680
1993-03-08 16:57:16 -05:00
Richard Kenner
6cd4575ea1 Add prototypes for static functions.
(struct cse_basic_block_data): Move to front of file since it constains
struct used in a prototype.
(refers_to_p, find_best_addr): Now static.

From-SVN: r3675
1993-03-08 07:24:14 -05:00
Richard Kenner
6076248a1e (simplify_binary_operation): Move integer CONST_DOUBLE folding out of REAL_IS_NOT_DOUBLE conditional.
(simplify_binary_operation): Move integer CONST_DOUBLE folding out of
REAL_IS_NOT_DOUBLE conditional.
(simplify_relational_operation): Put float CONST_DOUBLE folding under a
REAL_IS_NOT_DOUBLE conditional.
Add folding for integer CONST_DOUBLE comparisons.

From-SVN: r3661
1993-03-05 17:52:35 -05:00
Jim Wilson
2d08d5b656 (note_mem_written): QImode varying structure memory accesses can alias scalars.
From-SVN: r3654
1993-03-05 09:45:15 -08:00
Richard Kenner
02b8f30077 (simplify_relation_operation): We can compute the result of a comparison of...
(simplify_relation_operation): We can compute the result of a
comparison of CONST_INTs no matter what mode the computation is to be
done in.

From-SVN: r3372
1993-01-27 19:23:36 -05:00
Richard Kenner
721f13b342 (simplify_binary_operation, case SMAX): Correctly compute largest
possible signed integer.

From-SVN: r3360
1993-01-26 19:32:45 -05:00
Brendan Kehoe
a3b5c94a75 * cse.c (fold_rtx): Call itself with missing arg INSN as NULL_RTX.
From-SVN: r3214
1993-01-12 18:31:09 -05:00
Richard Kenner
164c8956a0 (max_uid): New variable.
(cse_end_of_basic_block): Use it to ignore insns made by CSE.
(cse_main): Set it.

From-SVN: r2846
1992-12-08 06:21:29 -05:00
Richard Kenner
7722328eef (cse_insn): Always pass result of canon_reg through validate_change
before using it in insn.

From-SVN: r2835
1992-12-04 19:17:47 -05:00
Richard Stallman
aee9dc31f9 (canon_reg): Don't call validate_change if INSN is zero.
From-SVN: r2511
1992-10-18 19:56:07 +00:00