diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2001-02-24 18:52:23 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2001-02-24 18:52:23 +0000 |
commit | 1cca8b0da3d704e563e451a70cdec4da6d42904b (patch) | |
tree | d0b9f12c35a7f1f24b44614d56262e448b4c4839 /gnu/egcs/gcc/function.c | |
parent | 251222fe41d930f57b81936411de3439f83583a7 (diff) |
Automatic conflict resolution
Diffstat (limited to 'gnu/egcs/gcc/function.c')
-rw-r--r-- | gnu/egcs/gcc/function.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/gnu/egcs/gcc/function.c b/gnu/egcs/gcc/function.c index a4033a9a6b8..edd0bca1216 100644 --- a/gnu/egcs/gcc/function.c +++ b/gnu/egcs/gcc/function.c @@ -1,5 +1,6 @@ /* Expands front end tree to back end RTL for GNU C-Compiler - Copyright (C) 1987, 88, 89, 91-98, 1999 Free Software Foundation, Inc. + Copyright (C) 1987, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, + 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. @@ -3221,13 +3222,7 @@ purge_addressof_1 (loc, insn, force, store, ht) /* Make sure to unshare any shared rtl that store_bit_field might have created. */ - for (p = get_insns(); p; p = NEXT_INSN (p)) - { - reset_used_flags (PATTERN (p)); - reset_used_flags (REG_NOTES (p)); - reset_used_flags (LOG_LINKS (p)); - } - unshare_all_rtl (get_insns ()); + unshare_all_rtl_again (get_insns ()); seq = gen_sequence (); end_sequence (); @@ -3479,6 +3474,20 @@ purge_addressof (insns) hash_table_free (&ht); purge_bitfield_addressof_replacements = 0; purge_addressof_replacements = 0; + + /* REGs are shared. purge_addressof will destructively replace a REG + with a MEM, which creates shared MEMs. + + Unfortunately, the children of put_reg_into_stack assume that MEMs + referring to the same stack slot are shared (fixup_var_refs and + the associated hash table code). + + So, we have to do another unsharing pass after we have flushed any + REGs that had their address taken into the stack. + + It may be worth tracking whether or not we converted any REGs into + MEMs to avoid this overhead when it is not needed. */ + unshare_all_rtl_again (get_insns ()); } /* Pass through the INSNS of function FNDECL and convert virtual register |