diff options
author | Jan Hubicka <jh@suse.cz> | 2004-01-12 10:44:16 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2004-01-12 09:44:16 +0000 |
commit | c65ecebc826db604a52f546fe956da2926ee3486 (patch) | |
tree | d1744bed287bf158f3ba33cbaf31e8ac5720aefb /gcc/cselib.c | |
parent | c0657872082996e355a09edb07d17ec000dfaac4 (diff) | |
download | gcc-c65ecebc826db604a52f546fe956da2926ee3486.zip gcc-c65ecebc826db604a52f546fe956da2926ee3486.tar.gz gcc-c65ecebc826db604a52f546fe956da2926ee3486.tar.bz2 |
Partial fox for PR opt/10776 II
Partial fox for PR opt/10776 II
* cselib.c: Include params.h
(cselib_invalidate_mem): Limit amount of nonconflicting memory
locations.
* params.def (PARAM_MAX_CSELIB_MEMORY_LOCATIONS): New.
* Makefile.in (cselib.o): Depend on params.h
From-SVN: r75710
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r-- | gcc/cselib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cselib.c b/gcc/cselib.c index 8cb325d..99c4bec 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -39,6 +39,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "ggc.h" #include "hashtab.h" #include "cselib.h" +#include "params.h" static int entry_and_rtx_equal_p (const void *, const void *); static hashval_t get_value_hash (const void *); @@ -1114,6 +1115,7 @@ static void cselib_invalidate_mem (rtx mem_rtx) { cselib_val **vp, *v, *next; + int num_mems = 0; vp = &first_containing_mem; for (v = *vp; v != &dummy_val; v = next) @@ -1135,9 +1137,11 @@ cselib_invalidate_mem (rtx mem_rtx) p = &(*p)->next; continue; } - if (! cselib_mem_conflict_p (mem_rtx, x)) + if (num_mems < PARAM_VALUE (PARAM_MAX_CSELIB_MEMORY_LOCATIONS) + && ! cselib_mem_conflict_p (mem_rtx, x)) { has_mem = true; + num_mems++; p = &(*p)->next; continue; } |