http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55617



--- Comment #30 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-01 
07:31:24 UTC ---

Don't want to spend too much time on this, so just a few hints:

1) you want to store this in a vector (see vec.h)

2) rtxs are GC allocated, you don't want to copy_rtx it, but instead mark the

   structure with GTY(()), mark also the vector var with GTY(()) and make it

   va_gc vector (see doc/gty.texi, and grep around for GTY.*vec.*va_gc

   and see how they are used

3) you want a stable sort, thus sorting on priority is not enough, you need to

   also record the original position in the list and sort by priority first,

   and then by original position (so that all ctors with the same position

   go in the original order)

4) watch formatting, you're violating GNU Coding Conventions in several ways

Reply via email to