summaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-20 07:56:50 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-20 07:56:50 +0000
commit75f841040798e4e1456d6f74d5fffb5b6654cdb1 (patch)
tree4120801b04df0c391df22ca45c74588def05e73a /gcc/gcse.c
parent68edee876f4838b470552143a8de6d60a1c5d68f (diff)
downloadgcc-75f841040798e4e1456d6f74d5fffb5b6654cdb1.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41444 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 56117f9a170..dc531c56c7f 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -756,7 +756,7 @@ gcse_main (f, file)
a high connectivity will take a long time and is unlikely to be
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
a couple switch statements. So we require a relatively large number
of basic blocks and the ratio of edges to blocks to be high. */
@@ -2208,7 +2208,14 @@ hash_scan_set (pat, insn, set_p)
/* Is SET_SRC something we want to gcse? */
&& want_to_gcse_p (src)
/* 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
modified before this insn or if this is not the only SET in
@@ -5541,7 +5548,7 @@ delete_null_pointer_checks (f)
a high connectivity will take a long time and is unlikely to be
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
a couple switch statements. So we require a relatively large number
of basic blocks and the ratio of edges to blocks to be high. */