This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [cfg] [RFC] Real datastructure for dominance information


Documentation should be in libiberty.texi, not in the .h file.

+ /* ET-trees datastructure implementation.
+    Contributed by Pavel Nejedly
+    Copyright (C) 2002 Free Software Foundation, Inc.
+    Contributed by Cygnus Solutions.

There is no Cygnus Solutions.  Does Pavel have suitable assignments
for libiberty?  Remember that libiberty code is also used in gdb and
binutils, so I don't know if a generic gcc assignment would be enough.
Jeff?

+ #include <ansidecl.h>

Should be "ansidecl.h"

> DJ: I still plan some changes to et-forest datastructure,
+ struct et_forest

Note that once something's in libiberty, it's pretty much cast in
stone, because other projects will start using it also.  You might
want to put this in gcc for a while until the API settles (or until
some other project wants to use it, whichever comes *last*).  Figuring
out a way to hide the structure definition (i.e. by not defining it in
the .h) would allow you to change it in the future.

+ int
+ calculate_value (node)

Global?

+   et_forest_t forest = xmalloc (sizeof (struct et_forest));

hashtab just changed to support allocation hooks.  You should either
do that, or use malloc(); and properly propogate errors back to the
caller.  BFD, for example, has a rule against using xmalloc.

Plus, htab_create seems to have been rendered obsolete, and you don't
check for htab_create() returning NULL anyway.

+     abort ();

Errors should be properly propogated back to the caller.  Calling
abort() from a library function is a Bad Idea (especially as abort()
in libiberty is *not* fancy_abort()).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]