Mercurial > hg > CbC > CbC_gcc
comparison gcc/et-forest.c @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | 77e2b8dfacca |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
1 /* ET-trees data structure implementation. | 1 /* ET-trees data structure implementation. |
2 Contributed by Pavel Nejedly | 2 Contributed by Pavel Nejedly |
3 Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008 Free Software | 3 Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2010 Free Software |
4 Foundation, Inc. | 4 Foundation, Inc. |
5 | 5 |
6 This file is part of the libiberty library. | 6 This file is part of the libiberty library. |
7 Libiberty is free software; you can redistribute it and/or | 7 Libiberty is free software; you can redistribute it and/or |
8 modify it under the terms of the GNU Library General Public | 8 modify it under the terms of the GNU Library General Public |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "system.h" | 27 #include "system.h" |
28 #include "coretypes.h" | 28 #include "coretypes.h" |
29 #include "tm.h" | |
30 #include "et-forest.h" | 29 #include "et-forest.h" |
31 #include "alloc-pool.h" | 30 #include "alloc-pool.h" |
32 | 31 |
33 /* We do not enable this with ENABLE_CHECKING, since it is awfully slow. */ | 32 /* We do not enable this with ENABLE_CHECKING, since it is awfully slow. */ |
34 #undef DEBUG_ET | 33 #undef DEBUG_ET |
659 | 658 |
660 set_prev (o1, o2); | 659 set_prev (o1, o2); |
661 if (r) | 660 if (r) |
662 r->parent = o1; | 661 r->parent = o1; |
663 } | 662 } |
664 else | 663 else if (r == o2 || (r && r->parent != NULL)) |
665 { | 664 { |
666 ret = o2->prev; | 665 ret = o2->prev; |
667 | 666 |
668 set_next (o1, o2); | 667 set_next (o1, o2); |
669 if (l) | 668 if (l) |
670 l->parent = o1; | 669 l->parent = o1; |
670 } | |
671 else | |
672 { | |
673 /* O1 and O2 are in different components of the forest. */ | |
674 if (l) | |
675 l->parent = o1; | |
676 if (r) | |
677 r->parent = o1; | |
678 return NULL; | |
671 } | 679 } |
672 | 680 |
673 if (0 < o2->depth) | 681 if (0 < o2->depth) |
674 { | 682 { |
675 om = o1; | 683 om = o1; |