This is the mail archive of the gcc@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: [tree-ssa] Bootstraps broken on alpha, ia64 and ppc. Branch closed.


> 
> I've reverted this patch for the time being.
> 
>             * Makefile.in (OBJS-common): Add tree-phinodes.o.
>             (tree-phinodes.o): Add dependencies.
>             * tree-phinodes.c: New file.
>             * tree-dfa.c (create_phi_node): Moved to tree-phinodes.o.
>             (add_phi_arg, remove_phi_arg, remove_phi_arg_num): Similarly.
>             (remove_phi_node, remove_all_phi_nodes_for): Similarly.
>             * tree-ssa.c (init_tree_ssa): Initialize PHI node management.
>             (delete_tree_ssa): Finalize PHI node management.
>             * tree.c (dump_tree_statistics): Dump PHI node stats.
>             (make_phi_node, resize_phi_node): Moved to tree-phinodes.o.
>             * tree.h (init_phinodes): Prototype.
>             (fini_phinodes, release_phi_node): Likewise.
>             (phinodes_print_statistics): Likewise.
> 
> Jeff, another data point that may help.  I got it to fail on x86
> bootstrapping with gc,gcac.  It failed while building libgcc/_gcov.o
> with the stage1 compiler, so it shouldn't take long to get to the
> failure point:
> 
> /home/cygnus/dnovillo/tree-ssa-00/src/gcc/libgcov.c: In function `gcov_exit':
> /home/cygnus/dnovillo/tree-ssa-00/src/gcc/libgcov.c:424: internal compiler error: in ggc_set_mark, at ggc-page.c:1228
> 
> Reverting the patch allowed me to get past that failure as well.  I
> think I'm going to get a new tester to do gc,gcac builds since we're
> going to be doing quite a bit of memory twiddling work in the next
> little while.

Hi,
I decided to go ahead and make GGC to work during SSA optimization
queue.  Main motivation is that GGC is also good sanity checker of
datastructure...Thus I found several problems that cause major surprises
in garbage collection.

I have patches for all problems and will send them once testing is done.
(given current length of queue this will happen in 20-30 hours assuming
that everything goes fluently).

Still I think it would be usefull to send short summary.  I found
problems in:
1) tree-ssanames
   There is GTY marker, but Makefile does not pass the file to gengtype.
   Additionally gt-tree-ssanames.h is not included so everything goes
   wrong.
   Things would get garbagecollected and we would end up re-using
   freed memory if there wasn't bugs 3) and 4)
2) tree-eh.c
   Similar issues, additionaly GTY marked hashtable is malloced
3) SSA_NAME nodes
   There is nasty problem with overloading chain field to point to
   default defintiion.  GGC actually knows that Snode's pointer is
   linked list via frontend specific .h file:
union lang_tree_node
  GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
         chain_next ("TREE_CODE (&%h.generic) == INTEGER_TYPE ? (union
	 lang_tree_node *)TYPE_NEXT_VARIANT (&%h.generic) : (union
	 lang_tree_node *)TREE_CHAIN (&%h.generic)")))
   THus it gets badly confused when the pointers are not linked lists.
   I fixed it by adding new ssa_name filed specialized for this.
4) Statement annotations are not removed after compilation making "dead"
   SSA_NAMES still reachable.  Frankly we get tree-ssanames working IFF
   the very first SSA_NAME in the list is still reachable from dead
   annotations, so we again get loop in latent bug here.

These problems together a lot of mess and can be reason for you seeing
variaous GGC related problem when increasing lifetimes of variables, so
perhaps you can save some time by waiting for this to be fixed before
re-investigating PRE.

HTH
Honza
> 
> I've committed the patch reversal, so the branch is open again.
> 
> 
> Thanks.  Diego.
> 


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