Commit 43e72072 by Jakub Jelinek Committed by Jakub Jelinek

gcse.c (gcse_main): Fix comment typo.

	* gcse.c (gcse_main): Fix comment typo.
	(delete_null_pointer_check): Likewise.
	(hash_scan_set): Don't consider sets with REG_EQUIV MEM notes.
	* cse.c (cse_insn): Likewise.
	* function.c (fixup_var_refs_insns_with_hash): The sequence is
	toplevel.

	* gcc.c-torture/execute/20010403-1.c: New test.

From-SVN: r41444
parent 5c8378a7
2001-04-20 Jakub Jelinek <jakub@redhat.com>
* gcse.c (gcse_main): Fix comment typo.
(delete_null_pointer_check): Likewise.
(hash_scan_set): Don't consider sets with REG_EQUIV MEM notes.
* cse.c (cse_insn): Likewise.
* function.c (fixup_var_refs_insns_with_hash): The sequence is
toplevel.
2001-04-19 Zack Weinberg <zackw@stanford.edu> 2001-04-19 Zack Weinberg <zackw@stanford.edu>
* toplev.c: Excise all code for the undocumented -dm option. * toplev.c: Excise all code for the undocumented -dm option.
......
...@@ -5067,18 +5067,16 @@ cse_insn (insn, libcall_insn) ...@@ -5067,18 +5067,16 @@ cse_insn (insn, libcall_insn)
sets[i].src_in_memory = hash_arg_in_memory; sets[i].src_in_memory = hash_arg_in_memory;
/* If SRC is a MEM, there is a REG_EQUIV note for SRC, and DEST is /* If SRC is a MEM, there is a REG_EQUIV note for SRC, and DEST is
a pseudo that is set more than once, do not record SRC. Using a pseudo, do not record SRC. Using SRC as a replacement for
SRC as a replacement for anything else will be incorrect in that anything else will be incorrect in that situation. Note that
situation. Note that this usually occurs only for stack slots, this usually occurs only for stack slots, in which case all the
in which case all the RTL would be referring to SRC, so we don't RTL would be referring to SRC, so we don't lose any optimization
lose any optimization opportunities by not having SRC in the opportunities by not having SRC in the hash table. */
hash table. */
if (GET_CODE (src) == MEM if (GET_CODE (src) == MEM
&& find_reg_note (insn, REG_EQUIV, src) != 0 && find_reg_note (insn, REG_EQUIV, NULL_RTX) != 0
&& GET_CODE (dest) == REG && GET_CODE (dest) == REG
&& REGNO (dest) >= FIRST_PSEUDO_REGISTER && REGNO (dest) >= FIRST_PSEUDO_REGISTER)
&& REG_N_SETS (REGNO (dest)) != 1)
sets[i].src_volatile = 1; sets[i].src_volatile = 1;
#if 0 #if 0
......
...@@ -1682,7 +1682,7 @@ fixup_var_refs_insns_with_hash (ht, var, promoted_mode, unsignedp) ...@@ -1682,7 +1682,7 @@ fixup_var_refs_insns_with_hash (ht, var, promoted_mode, unsignedp)
rtx insn = XEXP (insn_list, 0); rtx insn = XEXP (insn_list, 0);
if (INSN_P (insn)) if (INSN_P (insn))
fixup_var_refs_insn (insn, var, promoted_mode, unsignedp, 0); fixup_var_refs_insn (insn, var, promoted_mode, unsignedp, 1);
insn_list = XEXP (insn_list, 1); insn_list = XEXP (insn_list, 1);
} }
......
...@@ -756,7 +756,7 @@ gcse_main (f, file) ...@@ -756,7 +756,7 @@ gcse_main (f, file)
a high connectivity will take a long time and is unlikely to be a high connectivity will take a long time and is unlikely to be
particularly useful. particularly useful.
In normal circumstances a cfg should have about twice has many edges In normal circumstances a cfg should have about twice as many edges
as blocks. But we do not want to punish small functions which have as blocks. But we do not want to punish small functions which have
a couple switch statements. So we require a relatively large number a couple switch statements. So we require a relatively large number
of basic blocks and the ratio of edges to blocks to be high. */ of basic blocks and the ratio of edges to blocks to be high. */
...@@ -2208,7 +2208,14 @@ hash_scan_set (pat, insn, set_p) ...@@ -2208,7 +2208,14 @@ hash_scan_set (pat, insn, set_p)
/* Is SET_SRC something we want to gcse? */ /* Is SET_SRC something we want to gcse? */
&& want_to_gcse_p (src) && want_to_gcse_p (src)
/* Don't CSE a nop. */ /* Don't CSE a nop. */
&& ! set_noop_p (pat)) && ! set_noop_p (pat)
/* Don't GCSE if it has attached REG_EQUIV note.
At this point this only function parameters should have
REG_EQUIV notes and if the argument slot is used somewhere
explicitely, it means address of parameter has been taken,
so we should not extend the lifetime of the pseudo. */
&& ((note = find_reg_note (insn, REG_EQUIV, NULL_RTX)) == 0
|| GET_CODE (XEXP (note, 0)) != MEM))
{ {
/* An expression is not anticipatable if its operands are /* An expression is not anticipatable if its operands are
modified before this insn or if this is not the only SET in modified before this insn or if this is not the only SET in
...@@ -5541,7 +5548,7 @@ delete_null_pointer_checks (f) ...@@ -5541,7 +5548,7 @@ delete_null_pointer_checks (f)
a high connectivity will take a long time and is unlikely to be a high connectivity will take a long time and is unlikely to be
particularly useful. particularly useful.
In normal circumstances a cfg should have about twice has many edges In normal circumstances a cfg should have about twice as many edges
as blocks. But we do not want to punish small functions which have as blocks. But we do not want to punish small functions which have
a couple switch statements. So we require a relatively large number a couple switch statements. So we require a relatively large number
of basic blocks and the ratio of edges to blocks to be high. */ of basic blocks and the ratio of edges to blocks to be high. */
......
2001-04-20 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/execute/20010403-1.c: New test.
2001-04-19 David Billinghurst <David.Billinghurst@riotinto.com> 2001-04-19 David Billinghurst <David.Billinghurst@riotinto.com>
Mark Mitchell <mark@codesourcery.com> Mark Mitchell <mark@codesourcery.com>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment