aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-09 19:29:57 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-09 19:29:57 +0000
commit25ffd9a9fccd6d9cced804647029c43a07adf62d (patch)
treee9a619ee14c1364e56f9f37ea65f70cb157d4827 /libiberty
parentc1aa10e4910892be16f3c9cb1f35f63965677f50 (diff)
Mainline merge as of 2003-04-06. Additional fixes for bugs
exposed by the merge: gcc/ChangeLog.tree-ssa: * gimplify.c (simplify_expr): Handle VECTOR_CST nodes. * tree-cfg.c (make_blocks): Ignore empty statement containers. Create a basic block before processing containers that only have empty statements. (make_loop_expr_blocks): Use the container instead of the statement when setting NEXT_BLOCK_LINK. (make_cond_expr_blocks): Likewise. (make_switch_expr_blocks): Likewise. (make_bind_expr_blocks): Likewise. (successor_block): If the last statement of the block is the empty statement, use its container to get NEXT_BLOCK_LINK. (stmt_starts_bb_p): Return false if the statement is NULL. * tree-pretty-print.c (dump_generic_node): Handle VECTOR_CST nodes. * tree-simple.c (is_simple_const): Accept VECTOR_CST as constants. * objc/objc-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@65404 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog29
-rw-r--r--libiberty/Makefile.in13
-rw-r--r--libiberty/cplus-dem.c58
-rw-r--r--libiberty/hashtab.c36
4 files changed, 105 insertions, 31 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 31d159b9317..0fe3e78e090 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,32 @@
+2003-03-23 Alexandre Oliva <aoliva@redhat.com>
+
+ * Makefile.in (MULTIOSDIR): New macro. Use $(CC) $(LIBCFLAGS)
+ instead of $$CC alone.
+ (install_to_tooldir): Use it.
+
+2003-17-03 Jan Hubicka <jh@suse.cz>
+
+ * hashtab.c (htab_traverse_noresize): Break out from ...
+ * hashtab.c (htab_traverse): ... here.
+
+2003-12-03 Jan Hubicka <jh@suse.cz>
+
+ * hashtab.c (htab_expand): Fix warning.
+
+ * hashtab.c (htab_expand): Compute the size of hashtable based
+ on the number of elements actually used.
+ (htab_traverse): Call htab_expand when table is too empty.
+
+2003-03-11 Carlo Wood <carlo@gnu.org>
+
+ * cplus-dem.c (demangle_integral_value): Correction to reflect
+ patch of 2002-01-10 in order to also make negative multi-digits
+ without leading underscore work.
+
+2003-03-03 Mark Mitchell <mark@codesourcery.com>
+
+ * cplus-dem.c: Add license exception to copyright notice.
+
2003-02-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* physmem.c: Formatting changes from upstream.
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 064179669bd..737d239450a 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -286,11 +286,16 @@ install_to_libdir: all
fi
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
+# This is tricky. Even though CC in the Makefile contains
+# multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
+# default multilib, so we have to take LIBCFLAGS into account as well,
+# since it will be passed the multilib flags.
+MULTIOSDIR = `$(CC) $(LIBCFLAGS) -print-multi-os-directory`
install_to_tooldir: all
- ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)n
- ( cd $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory` ; $(RANLIB) $(TARGETLIB)n )
- mv -f $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)
+ ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)
+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n
+ ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; $(RANLIB) $(TARGETLIB)n )
+ mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
# needed-list is used by libstdc++. NEEDED is the list of functions
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
index 0b5a3e0b29e..59afcd371ba 100644
--- a/libiberty/cplus-dem.c
+++ b/libiberty/cplus-dem.c
@@ -11,6 +11,15 @@ modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
+In addition to the permissions in the GNU Library General Public
+License, the Free Software Foundation gives you unlimited permission
+to link the compiled version of this file into combinations with other
+programs, and to distribute those combinations without any restriction
+coming from the use of this file. (The Library Public License
+restrictions do apply in other respects; for example, they cover
+modification of the file, and distribution when not linked into a
+combined executable.)
+
Libiberty is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -1788,31 +1797,34 @@ demangle_integral_value (work, mangled, s)
success = 0;
- /* Negative numbers are indicated with a leading `m'. */
- if (**mangled == 'm')
- {
- string_appendn (s, "-", 1);
- (*mangled)++;
- }
- else if (mangled[0][0] == '_' && mangled[0][1] == 'm')
- {
- /* Since consume_count_with_underscores does not handle the
- `m'-prefix we must do it here, using consume_count and
- adjusting underscores: we have to consume the underscore
- matching the prepended one. */
- multidigit_without_leading_underscore = 1;
- string_appendn (s, "-", 1);
- (*mangled) += 2;
- }
- else if (**mangled == '_')
- {
- /* Do not consume a following underscore;
- multidigit_without_leading_underscore will consume what should be
- consumed. */
- leave_following_underscore = 1;
+ if (**mangled == '_')
+ {
+ if (mangled[0][1] == 'm')
+ {
+ /* Since consume_count_with_underscores does not handle the
+ `m'-prefix we must do it here, using consume_count and
+ adjusting underscores: we have to consume the underscore
+ matching the prepended one. */
+ multidigit_without_leading_underscore = 1;
+ string_appendn (s, "-", 1);
+ (*mangled) += 2;
+ }
+ else
+ {
+ /* Do not consume a following underscore;
+ consume_count_with_underscores will consume what
+ should be consumed. */
+ leave_following_underscore = 1;
+ }
}
else
{
+ /* Negative numbers are indicated with a leading `m'. */
+ if (**mangled == 'm')
+ {
+ string_appendn (s, "-", 1);
+ (*mangled)++;
+ }
/* Since consume_count_with_underscores does not handle
multi-digit numbers that do not start with an underscore,
and this number can be an integer template parameter,
@@ -1853,7 +1865,7 @@ demangle_integral_value (work, mangled, s)
/* All is well. */
success = 1;
}
- }
+ }
return success;
}
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c
index 0429936e961..2f8dfd6c581 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -373,7 +373,14 @@ htab_expand (htab)
oentries = htab->entries;
olimit = oentries + htab->size;
- nsize = higher_prime_number (htab->size * 2);
+ /* Resize only when table after removal of unused elements is either
+ too full or too empty. */
+ if ((htab->n_elements - htab->n_deleted) * 2 > htab->size
+ || ((htab->n_elements - htab->n_deleted) * 8 < htab->size
+ && htab->size > 32))
+ nsize = higher_prime_number ((htab->n_elements - htab->n_deleted) * 2);
+ else
+ nsize = htab->size;
if (htab->alloc_with_arg_f != NULL)
nentries = (PTR *) (*htab->alloc_with_arg_f) (htab->alloc_arg, nsize,
@@ -596,13 +603,16 @@ htab_clear_slot (htab, slot)
argument. */
void
-htab_traverse (htab, callback, info)
+htab_traverse_noresize (htab, callback, info)
htab_t htab;
htab_trav callback;
PTR info;
{
- PTR *slot = htab->entries;
- PTR *limit = slot + htab->size;
+ PTR *slot;
+ PTR *limit;
+
+ slot = htab->entries;
+ limit = slot + htab->size;
do
{
@@ -615,6 +625,24 @@ htab_traverse (htab, callback, info)
while (++slot < limit);
}
+/* Like htab_traverse_noresize, but does resize the table when it is
+ too empty to improve effectivity of subsequent calls. */
+
+void
+htab_traverse (htab, callback, info)
+ htab_t htab;
+ htab_trav callback;
+ PTR info;
+{
+ PTR *slot;
+ PTR *limit;
+
+ if ((htab->n_elements - htab->n_deleted) * 8 < htab->size)
+ htab_expand (htab);
+
+ htab_traverse_noresize (htab, callback, info);
+}
+
/* Return the current size of given hash table. */
size_t