| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fsplit-paths -fdump-tree-split-paths-details -w" } */ |
| 3 |
|
| 4 |
typedef struct bitmap_head_def *bitmap; |
| 5 |
extern void vec_assert_fail (const char *, const char *, const char *file_, |
| 6 |
unsigned line_, const char *function_) |
| 7 |
__attribute__ ((__noreturn__)); |
| 8 |
typedef struct VEC_int_base |
| 9 |
{ |
| 10 |
unsigned num; |
| 11 |
unsigned alloc; |
| 12 |
int vec[1]; |
| 13 |
} |
| 14 |
VEC_int_base; |
| 15 |
static __inline__ int |
| 16 |
VEC_int_base_space (VEC_int_base * vec_, int alloc_, const char *file_, |
| 17 |
unsigned line_, const char *function_) |
| 18 |
{ |
| 19 |
return vec_ ? vec_->alloc - vec_->num >= (unsigned) alloc_ : !alloc_; |
| 20 |
} |
| 21 |
|
| 22 |
static __inline__ int * |
| 23 |
VEC_int_base_quick_push (VEC_int_base * vec_, int obj_, const char *file_, |
| 24 |
unsigned line_, const char *function_) |
| 25 |
{ |
| 26 |
(void) ((vec_->num < |
| 27 |
vec_->alloc) ? 0 : (vec_assert_fail ("push", "VEC(int,base)", |
| 28 |
file_, line_, function_), 0)); |
| 29 |
} |
| 30 |
|
| 31 |
typedef struct VEC_int_heap |
| 32 |
{ |
| 33 |
VEC_int_base base; |
| 34 |
} |
| 35 |
VEC_int_heap; |
| 36 |
void *vec_heap_o_reserve (VEC_int_heap *, int, __SIZE_TYPE__, __SIZE_TYPE__); |
| 37 |
int VEC_int_base_length (VEC_int_base *); |
| 38 |
static __inline__ int |
| 39 |
VEC_int_heap_reserve (VEC_int_heap ** vec_, int alloc_, const char *file_, |
| 40 |
unsigned line_, const char *function_) |
| 41 |
{ |
| 42 |
int extend = |
| 43 |
!VEC_int_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_, file_, line_, |
| 44 |
function_); |
| 45 |
if (extend) |
| 46 |
*vec_ = |
| 47 |
(VEC_int_heap *) vec_heap_o_reserve (*vec_, alloc_, |
| 48 |
__builtin_offsetof (VEC_int_heap, |
| 49 |
base.vec), |
| 50 |
sizeof (int)); |
| 51 |
} |
| 52 |
|
| 53 |
static __inline__ int * |
| 54 |
VEC_int_heap_safe_push (VEC_int_heap ** vec_, const int obj_, |
| 55 |
const char *file_, unsigned line_, |
| 56 |
const char *function_) |
| 57 |
{ |
| 58 |
VEC_int_heap_reserve (vec_, 1, file_, line_, function_); |
| 59 |
return VEC_int_base_quick_push (((*vec_) ? &(*vec_)->base : 0), obj_, file_, |
| 60 |
line_, function_); |
| 61 |
}; |
| 62 |
|
| 63 |
typedef struct bitmap_head_def |
| 64 |
{ |
| 65 |
} |
| 66 |
bitmap_head; |
| 67 |
typedef struct |
| 68 |
{ |
| 69 |
} |
| 70 |
bitmap_iterator; |
| 71 |
int bmp_iter_and_compl_init (bitmap_iterator *, bitmap_head *, bitmap, int, |
| 72 |
int *); |
| 73 |
int bmp_iter_and_compl (bitmap_iterator *, int *); |
| 74 |
void bmp_iter_next (bitmap_iterator *, int *); |
| 75 |
void VEC_int_heap_free (VEC_int_heap **); |
| 76 |
bitmap |
| 77 |
compute_idf (bitmap_head * dfs) |
| 78 |
{ |
| 79 |
bitmap_iterator bi; |
| 80 |
unsigned bb_index, i; |
| 81 |
VEC_int_heap *work_stack; |
| 82 |
bitmap phi_insertion_points; |
| 83 |
while ((VEC_int_base_length (((work_stack) ? &(work_stack)->base : 0))) > 0) |
| 84 |
{ |
| 85 |
for (bmp_iter_and_compl_init |
| 86 |
(&(bi), (&dfs[bb_index]), (phi_insertion_points), (0), &(i)); |
| 87 |
bmp_iter_and_compl (&(bi), &(i)); bmp_iter_next (&(bi), &(i))) |
| 88 |
{ |
| 89 |
(VEC_int_heap_safe_push |
| 90 |
(&(work_stack), i, "/home/gcc/virgin-gcc/gcc/cfganal.c", 1349, |
| 91 |
__FUNCTION__)); |
| 92 |
} |
| 93 |
} |
| 94 |
(VEC_int_heap_free (&work_stack)); |
| 95 |
} |
| 96 |
|
| 97 |
/* { dg-final { scan-tree-dump-not "Duplicating join block" "split-paths" } } */ |