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
Richard Kenner
6702af89af
(cse_insn): Add missing call to apply_change_group.
...
From-SVN: r2481
1992-10-15 16:55:08 -04:00
Richard Stallman
2166571b8f
(simplify_binary_operation): Insure that folded >> extends
...
the sign even if the host bootstrap compiler doesn't.
From-SVN: r2446
1992-10-14 01:20:21 +00:00
Richard Kenner
b8b88835df
(PATHLENGH): Change from 20 to 10 to speed up compilations.
...
From-SVN: r2367
1992-10-08 04:44:02 -04:00
Richard Kenner
f12564b4c0
(simplify_unary_operation, case SIGN_EXTEND): Use HOST_BITS_PER_WIDE_INT,
...
not HOST_BITS_PER_INT.
From-SVN: r2219
1992-09-23 19:26:03 -04:00
Richard Stallman
13c9910fdd
(find_comparison_args): New args PMODE1, PMODE2.
...
(fold_rtx, record_jump_equiv): Use them to get modes of comparison.
(fold_rtx): Associate MINUS with nested PLUS.
From-SVN: r2197
1992-09-21 03:51:25 +00:00
Richard Stallman
e8d76a395e
(fold_rtx): For SUBREG, actually test subreg_lowpart_p in the code to handle narrowing subregs.
...
(fold_rtx): For SUBREG, actually test subreg_lowpart_p in the
code to handle narrowing subregs. And exclude binary ops like DIV
where truncating the args is not valid.
From-SVN: r2160
1992-09-19 04:48:37 +00:00
Richard Stallman
21d12b804d
(simplify_binary_operation): For DIV by 0, do nothing.
...
From-SVN: r2066
1992-09-07 05:32:35 +00:00
Richard Kenner
b2796a4bdd
(find_comparison_args): Look for comparison operations if the second arg is 0 in any mode.
...
(find_comparison_args): Look for comparison operations if the second arg is
0 in any mode.
(record_jump_cond): Don't make classes equivalent for floating-point equality
comparison.
From-SVN: r1900
1992-08-19 18:19:34 -04:00
Richard Kenner
c7c955eebc
(fold_rtx): Fix typo in two FLOAT_STORE_FLAG_VALUE tests.
...
From-SVN: r1837
1992-08-14 14:44:54 -04:00
Richard Kenner
f89e32e950
(simplify_unary_operation): Remove "else".
...
From-SVN: r1828
1992-08-14 07:41:11 -04:00
Torbjorn Granlund
858a47b165
Fix spelling errors in comments.
...
From-SVN: r1825
1992-08-14 11:33:04 +00:00
Richard Kenner
c4fd10e7e2
(canon_hash): Use HOST_WIDE_INT instead of int when casting pointers
...
to integers.
From-SVN: r1750
1992-08-02 21:38:38 -04:00
Richard Kenner
58c8c59349
entered into RCS
...
From-SVN: r1731
1992-07-31 08:13:38 -04:00
Richard Kenner
0dadecf681
*** empty log message ***
...
From-SVN: r1614
1992-07-17 05:57:24 -04:00
Richard Stallman
e7a522bae6
*** empty log message ***
...
From-SVN: r1560
1992-07-11 22:23:31 +00:00
Charles Hannum
82a5e8985c
*** empty log message ***
...
From-SVN: r1477
1992-07-06 20:21:37 +00:00
Richard Kenner
906c4e36c6
*** empty log message ***
...
From-SVN: r1473
1992-07-06 16:04:13 -04:00