File: split-path-3.c

package info (click to toggle)
gcc-riscv64-unknown-elf 8.3.0.2019.08%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 680,956 kB
  • sloc: ansic: 3,237,715; cpp: 896,882; ada: 772,854; f90: 144,254; asm: 68,788; makefile: 67,456; sh: 29,743; exp: 28,045; objc: 15,273; fortran: 11,885; python: 7,369; pascal: 5,375; awk: 3,725; perl: 2,872; yacc: 316; xml: 311; ml: 285; lex: 198; haskell: 122
file content (90 lines) | stat: -rw-r--r-- 2,431 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/* { dg-do compile } */
/* { dg-options "-O2 -fsplit-paths -fdump-tree-split-paths-details -w" } */

typedef struct bitmap_head_def *bitmap;
extern void vec_assert_fail (const char *, const char *, const char *file_,
			     unsigned line_, const char *function_)
  __attribute__ ((__noreturn__));
typedef struct VEC_int_base
{
  unsigned num;
  unsigned alloc;
  int vec[1];
}
VEC_int_base;
static __inline__ int
VEC_int_base_space (VEC_int_base * vec_, int alloc_, const char *file_,
		    unsigned line_, const char *function_)
{
  return vec_ ? vec_->alloc - vec_->num >= (unsigned) alloc_ : !alloc_;
}

static __inline__ int *
VEC_int_base_quick_push (VEC_int_base * vec_, int obj_, const char *file_,
			 unsigned line_, const char *function_)
{
  (void) ((vec_->num <
	   vec_->alloc) ? 0 : (vec_assert_fail ("push", "VEC(int,base)",
						file_, line_, function_), 0));
}

typedef struct VEC_int_heap
{
  VEC_int_base base;
}
VEC_int_heap;
static __inline__ int
VEC_int_heap_reserve (VEC_int_heap ** vec_, int alloc_, const char *file_,
		      unsigned line_, const char *function_)
{
  int extend =
    !VEC_int_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_, file_, line_,
			 function_);
  if (extend)
    *vec_ =
      (VEC_int_heap *) vec_heap_o_reserve (*vec_, alloc_,
					   __builtin_offsetof (VEC_int_heap,
							       base.vec),
					   sizeof (int));
}

static __inline__ int *
VEC_int_heap_safe_push (VEC_int_heap ** vec_, const int obj_,
			const char *file_, unsigned line_,
			const char *function_)
{
  VEC_int_heap_reserve (vec_, 1, file_, line_, function_);
  return VEC_int_base_quick_push (((*vec_) ? &(*vec_)->base : 0), obj_, file_,
				  line_, function_);
};

typedef struct bitmap_head_def
{
}
bitmap_head;
typedef struct
{
}
bitmap_iterator;
bitmap
compute_idf (bitmap_head * dfs)
{
  bitmap_iterator bi;
  unsigned bb_index, i;
  VEC_int_heap *work_stack;
  bitmap phi_insertion_points;
  while ((VEC_int_base_length (((work_stack) ? &(work_stack)->base : 0))) > 0)
    {
      for (bmp_iter_and_compl_init
	   (&(bi), (&dfs[bb_index]), (phi_insertion_points), (0), &(i));
	   bmp_iter_and_compl (&(bi), &(i)); bmp_iter_next (&(bi), &(i)))
	{
	  (VEC_int_heap_safe_push
	   (&(work_stack), i, "/home/gcc/virgin-gcc/gcc/cfganal.c", 1349,
	    __FUNCTION__));
	}
    }
  (VEC_int_heap_free (&work_stack));
}

/* { dg-final { scan-tree-dump-not "Duplicating join block" "split-paths" } } */