diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2006-10-30 21:39:14 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@codesourcery.com> | 2006-10-30 21:39:14 +0000 |
commit | 31fed1d172b20739971cc3627fbd7f7b12deb9ef (patch) | |
tree | f6102cf753069434476ea55ab1793050d7712c4e | |
parent | c3a49337f419c181707b0d1b180e9d2b25cce5a9 (diff) |
Backport from mainline:
gcc/
2006-10-26 Nathan Froyd <froydnj@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
* ggc-common.c (ggc_min_heapsize_heuristic): Be more conservative
when choosing the minimum heapsize.
gcc/
2006-10-24 Nathan Froyd <froydnj@codesourcery.com>
* dwarf2out.c (gen_compile_unit_die): Use IS_ABSOLUTE_PATH.
(dwarf2out_finish): Likewise.
(output_file_names): Use DIR_SEPARATOR and DIR_SEPARATOR_2.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/sourcerygxx-4_1@118202 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | ChangeLog.csl | 18 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 22 | ||||
-rw-r--r-- | gcc/ggc-common.c | 8 |
3 files changed, 39 insertions, 9 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl index 4d222bb9070..6dcab5e9c10 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,21 @@ +2006-10-30 Nathan Froyd <froydnj@codesourcery.com> + + Backport from mainline: + + gcc/ + 2006-10-26 Nathan Froyd <froydnj@codesourcery.com> + Nathan Sidwell <nathan@codesourcery.com> + + * ggc-common.c (ggc_min_heapsize_heuristic): Be more conservative + when choosing the minimum heapsize. + + gcc/ + 2006-10-24 Nathan Froyd <froydnj@codesourcery.com> + + * dwarf2out.c (gen_compile_unit_die): Use IS_ABSOLUTE_PATH. + (dwarf2out_finish): Likewise. + (output_file_names): Use DIR_SEPARATOR and DIR_SEPARATOR_2. + 2006-10-30 Mark Shinwell <shinwell@codesourcery.com> gcc/ diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index c9579dfe013..b05f6ffd0e4 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -7583,7 +7583,7 @@ output_file_names (void) /* Skip all leading "./". */ f = VARRAY_CHAR_PTR (file_table, i); - while (f[0] == '.' && f[1] == '/') + while (f[0] == '.' && IS_DIR_SEPARATOR (f[1])) f += 2; /* Create a new array entry. */ @@ -7592,7 +7592,19 @@ output_file_names (void) files[i].file_idx = i; /* Search for the file name part. */ - f = strrchr (f, '/'); + f = strrchr (f, DIR_SEPARATOR); +#if defined (DIR_SEPARATOR_2) + { + char *g = strrchr (files[i].path, DIR_SEPARATOR_2); + + if (g != NULL) + { + if (f == NULL || f < g) + f = g; + } + } +#endif + files[i].fname = f == NULL ? files[i].path : f + 1; } @@ -12167,7 +12179,7 @@ gen_compile_unit_die (const char *filename) { add_name_attribute (die, filename); /* Don't add cwd for <built-in>. */ - if (filename[0] != DIR_SEPARATOR && filename[0] != '<') + if (!IS_ABSOLUTE_PATH (filename) && filename[0] != '<') add_comp_dir_attribute (die); } @@ -14068,13 +14080,13 @@ dwarf2out_finish (const char *filename) /* Add the name for the main input file now. We delayed this from dwarf2out_init to avoid complications with PCH. */ add_name_attribute (comp_unit_die, filename); - if (filename[0] != DIR_SEPARATOR) + if (!IS_ABSOLUTE_PATH (filename)) add_comp_dir_attribute (comp_unit_die); else if (get_AT (comp_unit_die, DW_AT_comp_dir) == NULL) { size_t i; for (i = 1; i < VARRAY_ACTIVE_SIZE (file_table); i++) - if (VARRAY_CHAR_PTR (file_table, i)[0] != DIR_SEPARATOR + if (!IS_ABSOLUTE_PATH (VARRAY_CHAR_PTR (file_table, i)) /* Don't add cwd for <built-in>. */ && VARRAY_CHAR_PTR (file_table, i)[0] != '<') { diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c index 81a56132057..cadb2dcc2c1 100644 --- a/gcc/ggc-common.c +++ b/gcc/ggc-common.c @@ -751,10 +751,10 @@ ggc_min_heapsize_heuristic (void) # endif /* Don't blindly run over our data limit; do GC at least when the - *next* GC would be within 16Mb of the limit. If GCC does hit the - data limit, compilation will fail, so this tries to be - conservative. */ - limit_kbytes = MAX (0, limit_kbytes - 16 * 1024); + *next* GC would be within 20Mb of the limit or within a quarter of + the limit, whichever is larger. If GCC does hit the data limit, + compilation will fail, so this tries to be conservative. */ + limit_kbytes = MAX (0, limit_kbytes - MAX (limit_kbytes / 4, 20 * 1024)); limit_kbytes = (limit_kbytes * 100) / (110 + ggc_min_expand_heuristic()); phys_kbytes = MIN (phys_kbytes, limit_kbytes); |