Coverage Report

Created: 2017-11-23 03:11

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/polly/lib/External/isl/isl_list_templ.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright 2008-2009 Katholieke Universiteit Leuven
3
 * Copyright 2011      INRIA Saclay
4
 * Copyright 2012-2013 Ecole Normale Superieure
5
 * Copyright 2017      Sven Verdoolaege
6
 *
7
 * Use of this software is governed by the MIT license
8
 *
9
 * Written by Sven Verdoolaege, K.U.Leuven, Departement
10
 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
11
 * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite,
12
 * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France
13
 * and Ecole Normale Superieure, 45 rue d’Ulm, 75230 Paris, France
14
 */
15
16
#include <isl_sort.h>
17
#include <isl_tarjan.h>
18
19
4.86k
#define xCAT(A,B) A ## B
20
4.86k
#define CAT(A,B) xCAT(A,B)
21
#undef EL
22
4.86k
#define EL CAT(isl_,BASE)
23
2.91M
#define xFN(TYPE,NAME) TYPE ## _ ## NAME
24
2.87M
#define FN(TYPE,NAME) xFN(TYPE,NAME)
25
574k
#define xLIST(EL) EL ## _list
26
574k
#define LIST(EL) xLIST(EL)
27
3.01k
#define xS(TYPE,NAME) struct TYPE ## _ ## NAME
28
3.01k
#define S(TYPE,NAME) xS(TYPE,NAME)
29
30
isl_ctx *FN(LIST(EL),get_ctx)(__isl_keep LIST(EL) *list)
31
92.4k
{
32
92.4k
  return list ? list->ctx : NULL;
33
92.4k
}
isl_aff_list_get_ctx
Line
Count
Source
31
20
{
32
20
  return list ? list->ctx : NULL;
33
20
}
isl_pw_aff_list_get_ctx
Line
Count
Source
31
10.1k
{
32
10.1k
  return list ? list->ctx : NULL;
33
10.1k
}
isl_union_pw_aff_list_get_ctx
Line
Count
Source
31
15
{
32
15
  return list ? list->ctx : NULL;
33
15
}
Unexecuted instantiation: isl_union_pw_multi_aff_list_get_ctx
Unexecuted instantiation: isl_ast_expr_list_get_ctx
isl_ast_node_list_get_ctx
Line
Count
Source
31
499
{
32
499
  return list ? list->ctx : NULL;
33
499
}
isl_ast_graft_list_get_ctx
Line
Count
Source
31
11.6k
{
32
11.6k
  return list ? list->ctx : NULL;
33
11.6k
}
isl_band_list_get_ctx
Line
Count
Source
31
12
{
32
12
  return list ? list->ctx : NULL;
33
12
}
isl_constraint_list_get_ctx
Line
Count
Source
31
1.12k
{
32
1.12k
  return list ? list->ctx : NULL;
33
1.12k
}
isl_id_list_get_ctx
Line
Count
Source
31
623
{
32
623
  return list ? list->ctx : NULL;
33
623
}
isl_basic_map_list_get_ctx
Line
Count
Source
31
1.71k
{
32
1.71k
  return list ? list->ctx : NULL;
33
1.71k
}
isl_map_list_get_ctx
Line
Count
Source
31
792
{
32
792
  return list ? list->ctx : NULL;
33
792
}
isl_union_map_list_get_ctx
Line
Count
Source
31
1
{
32
1
  return list ? list->ctx : NULL;
33
1
}
isl_schedule_tree_list_get_ctx
Line
Count
Source
31
64.4k
{
32
64.4k
  return list ? list->ctx : NULL;
33
64.4k
}
isl_basic_set_list_get_ctx
Line
Count
Source
31
1.16k
{
32
1.16k
  return list ? list->ctx : NULL;
33
1.16k
}
isl_set_list_get_ctx
Line
Count
Source
31
20
{
32
20
  return list ? list->ctx : NULL;
33
20
}
isl_union_set_list_get_ctx
Line
Count
Source
31
184
{
32
184
  return list ? list->ctx : NULL;
33
184
}
isl_val_list_get_ctx
Line
Count
Source
31
8
{
32
8
  return list ? list->ctx : NULL;
33
8
}
34
35
__isl_give LIST(EL) *FN(LIST(EL),alloc)(isl_ctx *ctx, int n)
36
143k
{
37
143k
  LIST(EL) *list;
38
143k
39
143k
  if (n < 0)
40
143k
    
isl_die0
(ctx, isl_error_invalid,
41
143k
      "cannot create list of negative length",
42
143k
      return NULL);
43
143k
  list = isl_alloc(ctx, LIST(EL),
44
143k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
143k
  if (!list)
46
0
    return NULL;
47
143k
48
143k
  list->ctx = ctx;
49
143k
  isl_ctx_ref(ctx);
50
143k
  list->ref = 1;
51
143k
  list->size = n;
52
143k
  list->n = 0;
53
143k
  return list;
54
143k
}
isl_aff_list_alloc
Line
Count
Source
36
8.72k
{
37
8.72k
  LIST(EL) *list;
38
8.72k
39
8.72k
  if (n < 0)
40
8.72k
    
isl_die0
(ctx, isl_error_invalid,
41
8.72k
      "cannot create list of negative length",
42
8.72k
      return NULL);
43
8.72k
  list = isl_alloc(ctx, LIST(EL),
44
8.72k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
8.72k
  if (!list)
46
0
    return NULL;
47
8.72k
48
8.72k
  list->ctx = ctx;
49
8.72k
  isl_ctx_ref(ctx);
50
8.72k
  list->ref = 1;
51
8.72k
  list->size = n;
52
8.72k
  list->n = 0;
53
8.72k
  return list;
54
8.72k
}
isl_pw_aff_list_alloc
Line
Count
Source
36
15.1k
{
37
15.1k
  LIST(EL) *list;
38
15.1k
39
15.1k
  if (n < 0)
40
15.1k
    
isl_die0
(ctx, isl_error_invalid,
41
15.1k
      "cannot create list of negative length",
42
15.1k
      return NULL);
43
15.1k
  list = isl_alloc(ctx, LIST(EL),
44
15.1k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
15.1k
  if (!list)
46
0
    return NULL;
47
15.1k
48
15.1k
  list->ctx = ctx;
49
15.1k
  isl_ctx_ref(ctx);
50
15.1k
  list->ref = 1;
51
15.1k
  list->size = n;
52
15.1k
  list->n = 0;
53
15.1k
  return list;
54
15.1k
}
isl_union_pw_aff_list_alloc
Line
Count
Source
36
15
{
37
15
  LIST(EL) *list;
38
15
39
15
  if (n < 0)
40
15
    
isl_die0
(ctx, isl_error_invalid,
41
15
      "cannot create list of negative length",
42
15
      return NULL);
43
15
  list = isl_alloc(ctx, LIST(EL),
44
15
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
15
  if (!list)
46
0
    return NULL;
47
15
48
15
  list->ctx = ctx;
49
15
  isl_ctx_ref(ctx);
50
15
  list->ref = 1;
51
15
  list->size = n;
52
15
  list->n = 0;
53
15
  return list;
54
15
}
isl_union_pw_multi_aff_list_alloc
Line
Count
Source
36
7
{
37
7
  LIST(EL) *list;
38
7
39
7
  if (n < 0)
40
7
    
isl_die0
(ctx, isl_error_invalid,
41
7
      "cannot create list of negative length",
42
7
      return NULL);
43
7
  list = isl_alloc(ctx, LIST(EL),
44
7
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
7
  if (!list)
46
0
    return NULL;
47
7
48
7
  list->ctx = ctx;
49
7
  isl_ctx_ref(ctx);
50
7
  list->ref = 1;
51
7
  list->size = n;
52
7
  list->n = 0;
53
7
  return list;
54
7
}
Unexecuted instantiation: isl_ast_expr_list_alloc
isl_ast_node_list_alloc
Line
Count
Source
36
4.40k
{
37
4.40k
  LIST(EL) *list;
38
4.40k
39
4.40k
  if (n < 0)
40
4.40k
    
isl_die0
(ctx, isl_error_invalid,
41
4.40k
      "cannot create list of negative length",
42
4.40k
      return NULL);
43
4.40k
  list = isl_alloc(ctx, LIST(EL),
44
4.40k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
4.40k
  if (!list)
46
0
    return NULL;
47
4.40k
48
4.40k
  list->ctx = ctx;
49
4.40k
  isl_ctx_ref(ctx);
50
4.40k
  list->ref = 1;
51
4.40k
  list->size = n;
52
4.40k
  list->n = 0;
53
4.40k
  return list;
54
4.40k
}
isl_ast_graft_list_alloc
Line
Count
Source
36
17.5k
{
37
17.5k
  LIST(EL) *list;
38
17.5k
39
17.5k
  if (n < 0)
40
17.5k
    
isl_die0
(ctx, isl_error_invalid,
41
17.5k
      "cannot create list of negative length",
42
17.5k
      return NULL);
43
17.5k
  list = isl_alloc(ctx, LIST(EL),
44
17.5k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
17.5k
  if (!list)
46
0
    return NULL;
47
17.5k
48
17.5k
  list->ctx = ctx;
49
17.5k
  isl_ctx_ref(ctx);
50
17.5k
  list->ref = 1;
51
17.5k
  list->size = n;
52
17.5k
  list->n = 0;
53
17.5k
  return list;
54
17.5k
}
isl_band_list_alloc
Line
Count
Source
36
16
{
37
16
  LIST(EL) *list;
38
16
39
16
  if (n < 0)
40
16
    
isl_die0
(ctx, isl_error_invalid,
41
16
      "cannot create list of negative length",
42
16
      return NULL);
43
16
  list = isl_alloc(ctx, LIST(EL),
44
16
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
16
  if (!list)
46
0
    return NULL;
47
16
48
16
  list->ctx = ctx;
49
16
  isl_ctx_ref(ctx);
50
16
  list->ref = 1;
51
16
  list->size = n;
52
16
  list->n = 0;
53
16
  return list;
54
16
}
isl_constraint_list_alloc
Line
Count
Source
36
2.28k
{
37
2.28k
  LIST(EL) *list;
38
2.28k
39
2.28k
  if (n < 0)
40
2.28k
    
isl_die0
(ctx, isl_error_invalid,
41
2.28k
      "cannot create list of negative length",
42
2.28k
      return NULL);
43
2.28k
  list = isl_alloc(ctx, LIST(EL),
44
2.28k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
2.28k
  if (!list)
46
0
    return NULL;
47
2.28k
48
2.28k
  list->ctx = ctx;
49
2.28k
  isl_ctx_ref(ctx);
50
2.28k
  list->ref = 1;
51
2.28k
  list->size = n;
52
2.28k
  list->n = 0;
53
2.28k
  return list;
54
2.28k
}
isl_id_list_alloc
Line
Count
Source
36
1.82k
{
37
1.82k
  LIST(EL) *list;
38
1.82k
39
1.82k
  if (n < 0)
40
1.82k
    
isl_die0
(ctx, isl_error_invalid,
41
1.82k
      "cannot create list of negative length",
42
1.82k
      return NULL);
43
1.82k
  list = isl_alloc(ctx, LIST(EL),
44
1.82k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
1.82k
  if (!list)
46
0
    return NULL;
47
1.82k
48
1.82k
  list->ctx = ctx;
49
1.82k
  isl_ctx_ref(ctx);
50
1.82k
  list->ref = 1;
51
1.82k
  list->size = n;
52
1.82k
  list->n = 0;
53
1.82k
  return list;
54
1.82k
}
isl_basic_map_list_alloc
Line
Count
Source
36
4.28k
{
37
4.28k
  LIST(EL) *list;
38
4.28k
39
4.28k
  if (n < 0)
40
4.28k
    
isl_die0
(ctx, isl_error_invalid,
41
4.28k
      "cannot create list of negative length",
42
4.28k
      return NULL);
43
4.28k
  list = isl_alloc(ctx, LIST(EL),
44
4.28k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
4.28k
  if (!list)
46
0
    return NULL;
47
4.28k
48
4.28k
  list->ctx = ctx;
49
4.28k
  isl_ctx_ref(ctx);
50
4.28k
  list->ref = 1;
51
4.28k
  list->size = n;
52
4.28k
  list->n = 0;
53
4.28k
  return list;
54
4.28k
}
isl_map_list_alloc
Line
Count
Source
36
740
{
37
740
  LIST(EL) *list;
38
740
39
740
  if (n < 0)
40
740
    
isl_die0
(ctx, isl_error_invalid,
41
740
      "cannot create list of negative length",
42
740
      return NULL);
43
740
  list = isl_alloc(ctx, LIST(EL),
44
740
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
740
  if (!list)
46
0
    return NULL;
47
740
48
740
  list->ctx = ctx;
49
740
  isl_ctx_ref(ctx);
50
740
  list->ref = 1;
51
740
  list->size = n;
52
740
  list->n = 0;
53
740
  return list;
54
740
}
isl_union_map_list_alloc
Line
Count
Source
36
1
{
37
1
  LIST(EL) *list;
38
1
39
1
  if (n < 0)
40
1
    
isl_die0
(ctx, isl_error_invalid,
41
1
      "cannot create list of negative length",
42
1
      return NULL);
43
1
  list = isl_alloc(ctx, LIST(EL),
44
1
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
1
  if (!list)
46
0
    return NULL;
47
1
48
1
  list->ctx = ctx;
49
1
  isl_ctx_ref(ctx);
50
1
  list->ref = 1;
51
1
  list->size = n;
52
1
  list->n = 0;
53
1
  return list;
54
1
}
isl_schedule_tree_list_alloc
Line
Count
Source
36
74.3k
{
37
74.3k
  LIST(EL) *list;
38
74.3k
39
74.3k
  if (n < 0)
40
74.3k
    
isl_die0
(ctx, isl_error_invalid,
41
74.3k
      "cannot create list of negative length",
42
74.3k
      return NULL);
43
74.3k
  list = isl_alloc(ctx, LIST(EL),
44
74.3k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
74.3k
  if (!list)
46
0
    return NULL;
47
74.3k
48
74.3k
  list->ctx = ctx;
49
74.3k
  isl_ctx_ref(ctx);
50
74.3k
  list->ref = 1;
51
74.3k
  list->size = n;
52
74.3k
  list->n = 0;
53
74.3k
  return list;
54
74.3k
}
isl_basic_set_list_alloc
Line
Count
Source
36
2.10k
{
37
2.10k
  LIST(EL) *list;
38
2.10k
39
2.10k
  if (n < 0)
40
2.10k
    
isl_die0
(ctx, isl_error_invalid,
41
2.10k
      "cannot create list of negative length",
42
2.10k
      return NULL);
43
2.10k
  list = isl_alloc(ctx, LIST(EL),
44
2.10k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
2.10k
  if (!list)
46
0
    return NULL;
47
2.10k
48
2.10k
  list->ctx = ctx;
49
2.10k
  isl_ctx_ref(ctx);
50
2.10k
  list->ref = 1;
51
2.10k
  list->size = n;
52
2.10k
  list->n = 0;
53
2.10k
  return list;
54
2.10k
}
isl_set_list_alloc
Line
Count
Source
36
11.3k
{
37
11.3k
  LIST(EL) *list;
38
11.3k
39
11.3k
  if (n < 0)
40
11.3k
    
isl_die0
(ctx, isl_error_invalid,
41
11.3k
      "cannot create list of negative length",
42
11.3k
      return NULL);
43
11.3k
  list = isl_alloc(ctx, LIST(EL),
44
11.3k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
11.3k
  if (!list)
46
0
    return NULL;
47
11.3k
48
11.3k
  list->ctx = ctx;
49
11.3k
  isl_ctx_ref(ctx);
50
11.3k
  list->ref = 1;
51
11.3k
  list->size = n;
52
11.3k
  list->n = 0;
53
11.3k
  return list;
54
11.3k
}
isl_union_set_list_alloc
Line
Count
Source
36
430
{
37
430
  LIST(EL) *list;
38
430
39
430
  if (n < 0)
40
430
    
isl_die0
(ctx, isl_error_invalid,
41
430
      "cannot create list of negative length",
42
430
      return NULL);
43
430
  list = isl_alloc(ctx, LIST(EL),
44
430
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
430
  if (!list)
46
0
    return NULL;
47
430
48
430
  list->ctx = ctx;
49
430
  isl_ctx_ref(ctx);
50
430
  list->ref = 1;
51
430
  list->size = n;
52
430
  list->n = 0;
53
430
  return list;
54
430
}
isl_val_list_alloc
Line
Count
Source
36
11
{
37
11
  LIST(EL) *list;
38
11
39
11
  if (n < 0)
40
11
    
isl_die0
(ctx, isl_error_invalid,
41
11
      "cannot create list of negative length",
42
11
      return NULL);
43
11
  list = isl_alloc(ctx, LIST(EL),
44
11
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
45
11
  if (!list)
46
0
    return NULL;
47
11
48
11
  list->ctx = ctx;
49
11
  isl_ctx_ref(ctx);
50
11
  list->ref = 1;
51
11
  list->size = n;
52
11
  list->n = 0;
53
11
  return list;
54
11
}
55
56
__isl_give LIST(EL) *FN(LIST(EL),copy)(__isl_keep LIST(EL) *list)
57
104k
{
58
104k
  if (!list)
59
0
    return NULL;
60
104k
61
104k
  list->ref++;
62
104k
  return list;
63
104k
}
Unexecuted instantiation: isl_aff_list_copy
isl_pw_aff_list_copy
Line
Count
Source
57
10.7k
{
58
10.7k
  if (!list)
59
0
    return NULL;
60
10.7k
61
10.7k
  list->ref++;
62
10.7k
  return list;
63
10.7k
}
Unexecuted instantiation: isl_union_pw_aff_list_copy
Unexecuted instantiation: isl_union_pw_multi_aff_list_copy
Unexecuted instantiation: isl_ast_expr_list_copy
isl_ast_node_list_copy
Line
Count
Source
57
202
{
58
202
  if (!list)
59
0
    return NULL;
60
202
61
202
  list->ref++;
62
202
  return list;
63
202
}
Unexecuted instantiation: isl_ast_graft_list_copy
Unexecuted instantiation: isl_band_list_copy
isl_constraint_list_copy
Line
Count
Source
57
698
{
58
698
  if (!list)
59
0
    return NULL;
60
698
61
698
  list->ref++;
62
698
  return list;
63
698
}
isl_id_list_copy
Line
Count
Source
57
34.5k
{
58
34.5k
  if (!list)
59
0
    return NULL;
60
34.5k
61
34.5k
  list->ref++;
62
34.5k
  return list;
63
34.5k
}
Unexecuted instantiation: isl_basic_map_list_copy
Unexecuted instantiation: isl_map_list_copy
Unexecuted instantiation: isl_union_map_list_copy
isl_schedule_tree_list_copy
Line
Count
Source
57
58.2k
{
58
58.2k
  if (!list)
59
0
    return NULL;
60
58.2k
61
58.2k
  list->ref++;
62
58.2k
  return list;
63
58.2k
}
isl_basic_set_list_copy
Line
Count
Source
57
13
{
58
13
  if (!list)
59
0
    return NULL;
60
13
61
13
  list->ref++;
62
13
  return list;
63
13
}
Unexecuted instantiation: isl_set_list_copy
Unexecuted instantiation: isl_union_set_list_copy
Unexecuted instantiation: isl_val_list_copy
64
65
__isl_give LIST(EL) *FN(LIST(EL),dup)(__isl_keep LIST(EL) *list)
66
46.6k
{
67
46.6k
  int i;
68
46.6k
  LIST(EL) *dup;
69
46.6k
70
46.6k
  if (!list)
71
0
    return NULL;
72
46.6k
73
46.6k
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
74
46.6k
  if (!dup)
75
0
    return NULL;
76
231k
  
for (i = 0; 46.6k
i < list->n;
++i184k
)
77
184k
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
78
46.6k
  return dup;
79
46.6k
}
Unexecuted instantiation: isl_aff_list_dup
isl_pw_aff_list_dup
Line
Count
Source
66
286
{
67
286
  int i;
68
286
  LIST(EL) *dup;
69
286
70
286
  if (!list)
71
0
    return NULL;
72
286
73
286
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
74
286
  if (!dup)
75
0
    return NULL;
76
653
  
for (i = 0; 286
i < list->n;
++i367
)
77
367
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
78
286
  return dup;
79
286
}
Unexecuted instantiation: isl_union_pw_aff_list_dup
Unexecuted instantiation: isl_union_pw_multi_aff_list_dup
Unexecuted instantiation: isl_ast_expr_list_dup
Unexecuted instantiation: isl_ast_node_list_dup
Unexecuted instantiation: isl_ast_graft_list_dup
isl_band_list_dup
Line
Count
Source
66
4
{
67
4
  int i;
68
4
  LIST(EL) *dup;
69
4
70
4
  if (!list)
71
0
    return NULL;
72
4
73
4
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
74
4
  if (!dup)
75
0
    return NULL;
76
10
  
for (i = 0; 4
i < list->n;
++i6
)
77
6
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
78
4
  return dup;
79
4
}
isl_constraint_list_dup
Line
Count
Source
66
698
{
67
698
  int i;
68
698
  LIST(EL) *dup;
69
698
70
698
  if (!list)
71
0
    return NULL;
72
698
73
698
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
74
698
  if (!dup)
75
0
    return NULL;
76
2.17k
  
for (i = 0; 698
i < list->n;
++i1.47k
)
77
1.47k
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
78
698
  return dup;
79
698
}
Unexecuted instantiation: isl_id_list_dup
Unexecuted instantiation: isl_basic_map_list_dup
Unexecuted instantiation: isl_map_list_dup
Unexecuted instantiation: isl_union_map_list_dup
isl_schedule_tree_list_dup
Line
Count
Source
66
45.6k
{
67
45.6k
  int i;
68
45.6k
  LIST(EL) *dup;
69
45.6k
70
45.6k
  if (!list)
71
0
    return NULL;
72
45.6k
73
45.6k
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
74
45.6k
  if (!dup)
75
0
    return NULL;
76
228k
  
for (i = 0; 45.6k
i < list->n;
++i183k
)
77
183k
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
78
45.6k
  return dup;
79
45.6k
}
Unexecuted instantiation: isl_basic_set_list_dup
Unexecuted instantiation: isl_set_list_dup
Unexecuted instantiation: isl_union_set_list_dup
Unexecuted instantiation: isl_val_list_dup
80
81
__isl_give LIST(EL) *FN(LIST(EL),cow)(__isl_take LIST(EL) *list)
82
99.1k
{
83
99.1k
  if (!list)
84
0
    return NULL;
85
99.1k
86
99.1k
  if (list->ref == 1)
87
52.4k
    return list;
88
46.6k
  list->ref--;
89
46.6k
  return FN(LIST(EL),dup)(list);
90
99.1k
}
isl_aff_list_cow
Line
Count
Source
82
2
{
83
2
  if (!list)
84
0
    return NULL;
85
2
86
2
  if (list->ref == 1)
87
2
    return list;
88
0
  list->ref--;
89
0
  return FN(LIST(EL),dup)(list);
90
2
}
isl_pw_aff_list_cow
Line
Count
Source
82
3.10k
{
83
3.10k
  if (!list)
84
0
    return NULL;
85
3.10k
86
3.10k
  if (list->ref == 1)
87
2.81k
    return list;
88
286
  list->ref--;
89
286
  return FN(LIST(EL),dup)(list);
90
3.10k
}
Unexecuted instantiation: isl_union_pw_aff_list_cow
Unexecuted instantiation: isl_union_pw_multi_aff_list_cow
Unexecuted instantiation: isl_ast_expr_list_cow
Unexecuted instantiation: isl_ast_node_list_cow
isl_ast_graft_list_cow
Line
Count
Source
82
39
{
83
39
  if (!list)
84
0
    return NULL;
85
39
86
39
  if (list->ref == 1)
87
39
    return list;
88
0
  list->ref--;
89
0
  return FN(LIST(EL),dup)(list);
90
39
}
Unexecuted instantiation: isl_band_list_cow
isl_constraint_list_cow
Line
Count
Source
82
2.21k
{
83
2.21k
  if (!list)
84
0
    return NULL;
85
2.21k
86
2.21k
  if (list->ref == 1)
87
1.51k
    return list;
88
698
  list->ref--;
89
698
  return FN(LIST(EL),dup)(list);
90
2.21k
}
isl_id_list_cow
Line
Count
Source
82
1
{
83
1
  if (!list)
84
0
    return NULL;
85
1
86
1
  if (list->ref == 1)
87
1
    return list;
88
0
  list->ref--;
89
0
  return FN(LIST(EL),dup)(list);
90
1
}
isl_basic_map_list_cow
Line
Count
Source
82
435
{
83
435
  if (!list)
84
0
    return NULL;
85
435
86
435
  if (list->ref == 1)
87
435
    return list;
88
0
  list->ref--;
89
0
  return FN(LIST(EL),dup)(list);
90
435
}
Unexecuted instantiation: isl_map_list_cow
isl_union_map_list_cow
Line
Count
Source
82
6
{
83
6
  if (!list)
84
0
    return NULL;
85
6
86
6
  if (list->ref == 1)
87
6
    return list;
88
0
  list->ref--;
89
0
  return FN(LIST(EL),dup)(list);
90
6
}
isl_schedule_tree_list_cow
Line
Count
Source
82
87.0k
{
83
87.0k
  if (!list)
84
0
    return NULL;
85
87.0k
86
87.0k
  if (list->ref == 1)
87
41.3k
    return list;
88
45.6k
  list->ref--;
89
45.6k
  return FN(LIST(EL),dup)(list);
90
87.0k
}
isl_basic_set_list_cow
Line
Count
Source
82
3.48k
{
83
3.48k
  if (!list)
84
0
    return NULL;
85
3.48k
86
3.48k
  if (list->ref == 1)
87
3.48k
    return list;
88
0
  list->ref--;
89
0
  return FN(LIST(EL),dup)(list);
90
3.48k
}
isl_set_list_cow
Line
Count
Source
82
1.88k
{
83
1.88k
  if (!list)
84
0
    return NULL;
85
1.88k
86
1.88k
  if (list->ref == 1)
87
1.88k
    return list;
88
0
  list->ref--;
89
0
  return FN(LIST(EL),dup)(list);
90
1.88k
}
isl_union_set_list_cow
Line
Count
Source
82
918
{
83
918
  if (!list)
84
0
    return NULL;
85
918
86
918
  if (list->ref == 1)
87
918
    return list;
88
0
  list->ref--;
89
0
  return FN(LIST(EL),dup)(list);
90
918
}
Unexecuted instantiation: isl_val_list_cow
91
92
/* Make sure "list" has room for at least "n" more pieces.
93
 * Always return a list with a single reference.
94
 *
95
 * If there is only one reference to list, we extend it in place.
96
 * Otherwise, we create a new LIST(EL) and copy the elements.
97
 */
98
static __isl_give LIST(EL) *FN(LIST(EL),grow)(__isl_take LIST(EL) *list, int n)
99
346k
{
100
346k
  isl_ctx *ctx;
101
346k
  int i, new_size;
102
346k
  LIST(EL) *res;
103
346k
104
346k
  if (!list)
105
0
    return NULL;
106
346k
  if (list->ref == 1 && 
list->n + n <= list->size336k
)
107
323k
    return list;
108
22.7k
109
22.7k
  ctx = FN(LIST(EL),get_ctx)(list);
110
22.7k
  new_size = ((list->n + n + 1) * 3) / 2;
111
22.7k
  if (list->ref == 1) {
112
13.0k
    res = isl_realloc(ctx, list, LIST(EL),
113
13.0k
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
13.0k
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
13.0k
    res->size = new_size;
117
13.0k
    return res;
118
13.0k
  }
119
9.65k
120
9.65k
  if (list->n + n <= list->size && 
list->size < new_size2.63k
)
121
2.57k
    new_size = list->size;
122
9.65k
123
9.65k
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
9.65k
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
9.65k
127
37.4k
  
for (i = 0; 9.65k
i < list->n;
++i27.7k
)
128
27.7k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
9.65k
130
9.65k
  FN(LIST(EL),free)(list);
131
346k
  return res;
132
346k
}
isl_aff.c:isl_aff_list_grow
Line
Count
Source
99
8.72k
{
100
8.72k
  isl_ctx *ctx;
101
8.72k
  int i, new_size;
102
8.72k
  LIST(EL) *res;
103
8.72k
104
8.72k
  if (!list)
105
0
    return NULL;
106
8.72k
  if (list->ref == 1 && list->n + n <= list->size)
107
8.70k
    return list;
108
20
109
20
  ctx = FN(LIST(EL),get_ctx)(list);
110
20
  new_size = ((list->n + n + 1) * 3) / 2;
111
20
  if (list->ref == 1) {
112
20
    res = isl_realloc(ctx, list, LIST(EL),
113
20
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
20
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
20
    res->size = new_size;
117
20
    return res;
118
20
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
8.72k
  return res;
132
8.72k
}
isl_aff.c:isl_pw_aff_list_grow
Line
Count
Source
99
17.4k
{
100
17.4k
  isl_ctx *ctx;
101
17.4k
  int i, new_size;
102
17.4k
  LIST(EL) *res;
103
17.4k
104
17.4k
  if (!list)
105
0
    return NULL;
106
17.4k
  if (list->ref == 1 && list->n + n <= list->size)
107
12.7k
    return list;
108
4.69k
109
4.69k
  ctx = FN(LIST(EL),get_ctx)(list);
110
4.69k
  new_size = ((list->n + n + 1) * 3) / 2;
111
4.69k
  if (list->ref == 1) {
112
4.69k
    res = isl_realloc(ctx, list, LIST(EL),
113
4.69k
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
4.69k
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
4.69k
    res->size = new_size;
117
4.69k
    return res;
118
4.69k
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
17.4k
  return res;
132
17.4k
}
isl_aff.c:isl_union_pw_aff_list_grow
Line
Count
Source
99
27
{
100
27
  isl_ctx *ctx;
101
27
  int i, new_size;
102
27
  LIST(EL) *res;
103
27
104
27
  if (!list)
105
0
    return NULL;
106
27
  if (list->ref == 1 && list->n + n <= list->size)
107
12
    return list;
108
15
109
15
  ctx = FN(LIST(EL),get_ctx)(list);
110
15
  new_size = ((list->n + n + 1) * 3) / 2;
111
15
  if (list->ref == 1) {
112
15
    res = isl_realloc(ctx, list, LIST(EL),
113
15
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
15
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
15
    res->size = new_size;
117
15
    return res;
118
15
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
27
  return res;
132
27
}
isl_aff.c:isl_union_pw_multi_aff_list_grow
Line
Count
Source
99
7
{
100
7
  isl_ctx *ctx;
101
7
  int i, new_size;
102
7
  LIST(EL) *res;
103
7
104
7
  if (!list)
105
0
    return NULL;
106
7
  if (list->ref == 1 && list->n + n <= list->size)
107
7
    return list;
108
0
109
0
  ctx = FN(LIST(EL),get_ctx)(list);
110
0
  new_size = ((list->n + n + 1) * 3) / 2;
111
0
  if (list->ref == 1) {
112
0
    res = isl_realloc(ctx, list, LIST(EL),
113
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
0
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
0
    res->size = new_size;
117
0
    return res;
118
0
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
7
  return res;
132
7
}
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_grow
isl_ast.c:isl_ast_node_list_grow
Line
Count
Source
99
6.03k
{
100
6.03k
  isl_ctx *ctx;
101
6.03k
  int i, new_size;
102
6.03k
  LIST(EL) *res;
103
6.03k
104
6.03k
  if (!list)
105
0
    return NULL;
106
6.03k
  if (list->ref == 1 && list->n + n <= list->size)
107
5.95k
    return list;
108
72
109
72
  ctx = FN(LIST(EL),get_ctx)(list);
110
72
  new_size = ((list->n + n + 1) * 3) / 2;
111
72
  if (list->ref == 1) {
112
72
    res = isl_realloc(ctx, list, LIST(EL),
113
72
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
72
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
72
    res->size = new_size;
117
72
    return res;
118
72
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
6.03k
  return res;
132
6.03k
}
isl_ast_graft.c:isl_ast_graft_list_grow
Line
Count
Source
99
16.3k
{
100
16.3k
  isl_ctx *ctx;
101
16.3k
  int i, new_size;
102
16.3k
  LIST(EL) *res;
103
16.3k
104
16.3k
  if (!list)
105
0
    return NULL;
106
16.3k
  if (list->ref == 1 && list->n + n <= list->size)
107
16.3k
    return list;
108
0
109
0
  ctx = FN(LIST(EL),get_ctx)(list);
110
0
  new_size = ((list->n + n + 1) * 3) / 2;
111
0
  if (list->ref == 1) {
112
0
    res = isl_realloc(ctx, list, LIST(EL),
113
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
0
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
0
    res->size = new_size;
117
0
    return res;
118
0
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
16.3k
  return res;
132
16.3k
}
isl_band.c:isl_band_list_grow
Line
Count
Source
99
18
{
100
18
  isl_ctx *ctx;
101
18
  int i, new_size;
102
18
  LIST(EL) *res;
103
18
104
18
  if (!list)
105
0
    return NULL;
106
18
  if (list->ref == 1 && list->n + n <= list->size)
107
18
    return list;
108
0
109
0
  ctx = FN(LIST(EL),get_ctx)(list);
110
0
  new_size = ((list->n + n + 1) * 3) / 2;
111
0
  if (list->ref == 1) {
112
0
    res = isl_realloc(ctx, list, LIST(EL),
113
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
0
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
0
    res->size = new_size;
117
0
    return res;
118
0
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
18
  return res;
132
18
}
isl_constraint.c:isl_constraint_list_grow
Line
Count
Source
99
3.55k
{
100
3.55k
  isl_ctx *ctx;
101
3.55k
  int i, new_size;
102
3.55k
  LIST(EL) *res;
103
3.55k
104
3.55k
  if (!list)
105
0
    return NULL;
106
3.55k
  if (list->ref == 1 && list->n + n <= list->size)
107
3.55k
    return list;
108
0
109
0
  ctx = FN(LIST(EL),get_ctx)(list);
110
0
  new_size = ((list->n + n + 1) * 3) / 2;
111
0
  if (list->ref == 1) {
112
0
    res = isl_realloc(ctx, list, LIST(EL),
113
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
0
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
0
    res->size = new_size;
117
0
    return res;
118
0
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
3.55k
  return res;
132
3.55k
}
isl_id.c:isl_id_list_grow
Line
Count
Source
99
2.26k
{
100
2.26k
  isl_ctx *ctx;
101
2.26k
  int i, new_size;
102
2.26k
  LIST(EL) *res;
103
2.26k
104
2.26k
  if (!list)
105
0
    return NULL;
106
2.26k
  if (list->ref == 1 && list->n + n <= list->size)
107
2.26k
    return list;
108
0
109
0
  ctx = FN(LIST(EL),get_ctx)(list);
110
0
  new_size = ((list->n + n + 1) * 3) / 2;
111
0
  if (list->ref == 1) {
112
0
    res = isl_realloc(ctx, list, LIST(EL),
113
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
0
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
0
    res->size = new_size;
117
0
    return res;
118
0
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
2.26k
  return res;
132
2.26k
}
isl_map_list.c:isl_basic_map_list_grow
Line
Count
Source
99
17.2k
{
100
17.2k
  isl_ctx *ctx;
101
17.2k
  int i, new_size;
102
17.2k
  LIST(EL) *res;
103
17.2k
104
17.2k
  if (!list)
105
0
    return NULL;
106
17.2k
  if (list->ref == 1 && list->n + n <= list->size)
107
17.2k
    return list;
108
0
109
0
  ctx = FN(LIST(EL),get_ctx)(list);
110
0
  new_size = ((list->n + n + 1) * 3) / 2;
111
0
  if (list->ref == 1) {
112
0
    res = isl_realloc(ctx, list, LIST(EL),
113
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
0
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
0
    res->size = new_size;
117
0
    return res;
118
0
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
17.2k
  return res;
132
17.2k
}
isl_map_list.c:isl_map_list_grow
Line
Count
Source
99
1.48k
{
100
1.48k
  isl_ctx *ctx;
101
1.48k
  int i, new_size;
102
1.48k
  LIST(EL) *res;
103
1.48k
104
1.48k
  if (!list)
105
0
    return NULL;
106
1.48k
  if (list->ref == 1 && list->n + n <= list->size)
107
1.48k
    return list;
108
0
109
0
  ctx = FN(LIST(EL),get_ctx)(list);
110
0
  new_size = ((list->n + n + 1) * 3) / 2;
111
0
  if (list->ref == 1) {
112
0
    res = isl_realloc(ctx, list, LIST(EL),
113
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
0
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
0
    res->size = new_size;
117
0
    return res;
118
0
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
1.48k
  return res;
132
1.48k
}
isl_map_list.c:isl_union_map_list_grow
Line
Count
Source
99
5
{
100
5
  isl_ctx *ctx;
101
5
  int i, new_size;
102
5
  LIST(EL) *res;
103
5
104
5
  if (!list)
105
0
    return NULL;
106
5
  if (list->ref == 1 && list->n + n <= list->size)
107
4
    return list;
108
1
109
1
  ctx = FN(LIST(EL),get_ctx)(list);
110
1
  new_size = ((list->n + n + 1) * 3) / 2;
111
1
  if (list->ref == 1) {
112
1
    res = isl_realloc(ctx, list, LIST(EL),
113
1
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
1
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
1
    res->size = new_size;
117
1
    return res;
118
1
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
5
  return res;
132
5
}
isl_schedule_tree.c:isl_schedule_tree_list_grow
Line
Count
Source
99
256k
{
100
256k
  isl_ctx *ctx;
101
256k
  int i, new_size;
102
256k
  LIST(EL) *res;
103
256k
104
256k
  if (!list)
105
0
    return NULL;
106
256k
  if (list->ref == 1 && 
list->n + n <= list->size246k
)
107
238k
    return list;
108
17.7k
109
17.7k
  ctx = FN(LIST(EL),get_ctx)(list);
110
17.7k
  new_size = ((list->n + n + 1) * 3) / 2;
111
17.7k
  if (list->ref == 1) {
112
8.05k
    res = isl_realloc(ctx, list, LIST(EL),
113
8.05k
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
8.05k
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
8.05k
    res->size = new_size;
117
8.05k
    return res;
118
8.05k
  }
119
9.65k
120
9.65k
  if (list->n + n <= list->size && 
list->size < new_size2.63k
)
121
2.57k
    new_size = list->size;
122
9.65k
123
9.65k
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
9.65k
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
9.65k
127
37.4k
  
for (i = 0; 9.65k
i < list->n;
++i27.7k
)
128
27.7k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
9.65k
130
9.65k
  FN(LIST(EL),free)(list);
131
256k
  return res;
132
256k
}
isl_set_list.c:isl_basic_set_list_grow
Line
Count
Source
99
2.22k
{
100
2.22k
  isl_ctx *ctx;
101
2.22k
  int i, new_size;
102
2.22k
  LIST(EL) *res;
103
2.22k
104
2.22k
  if (!list)
105
0
    return NULL;
106
2.22k
  if (list->ref == 1 && list->n + n <= list->size)
107
2.22k
    return list;
108
2
109
2
  ctx = FN(LIST(EL),get_ctx)(list);
110
2
  new_size = ((list->n + n + 1) * 3) / 2;
111
2
  if (list->ref == 1) {
112
2
    res = isl_realloc(ctx, list, LIST(EL),
113
2
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
2
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
2
    res->size = new_size;
117
2
    return res;
118
2
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
2.22k
  return res;
132
2.22k
}
isl_set_list.c:isl_set_list_grow
Line
Count
Source
99
12.9k
{
100
12.9k
  isl_ctx *ctx;
101
12.9k
  int i, new_size;
102
12.9k
  LIST(EL) *res;
103
12.9k
104
12.9k
  if (!list)
105
0
    return NULL;
106
12.9k
  if (list->ref == 1 && list->n + n <= list->size)
107
12.9k
    return list;
108
20
109
20
  ctx = FN(LIST(EL),get_ctx)(list);
110
20
  new_size = ((list->n + n + 1) * 3) / 2;
111
20
  if (list->ref == 1) {
112
20
    res = isl_realloc(ctx, list, LIST(EL),
113
20
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
20
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
20
    res->size = new_size;
117
20
    return res;
118
20
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
12.9k
  return res;
132
12.9k
}
isl_set_list.c:isl_union_set_list_grow
Line
Count
Source
99
1.44k
{
100
1.44k
  isl_ctx *ctx;
101
1.44k
  int i, new_size;
102
1.44k
  LIST(EL) *res;
103
1.44k
104
1.44k
  if (!list)
105
0
    return NULL;
106
1.44k
  if (list->ref == 1 && list->n + n <= list->size)
107
1.26k
    return list;
108
184
109
184
  ctx = FN(LIST(EL),get_ctx)(list);
110
184
  new_size = ((list->n + n + 1) * 3) / 2;
111
184
  if (list->ref == 1) {
112
184
    res = isl_realloc(ctx, list, LIST(EL),
113
184
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
184
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
184
    res->size = new_size;
117
184
    return res;
118
184
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
1.44k
  return res;
132
1.44k
}
isl_val.c:isl_val_list_grow
Line
Count
Source
99
21
{
100
21
  isl_ctx *ctx;
101
21
  int i, new_size;
102
21
  LIST(EL) *res;
103
21
104
21
  if (!list)
105
0
    return NULL;
106
21
  if (list->ref == 1 && list->n + n <= list->size)
107
13
    return list;
108
8
109
8
  ctx = FN(LIST(EL),get_ctx)(list);
110
8
  new_size = ((list->n + n + 1) * 3) / 2;
111
8
  if (list->ref == 1) {
112
8
    res = isl_realloc(ctx, list, LIST(EL),
113
8
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
114
8
    if (!res)
115
0
      return FN(LIST(EL),free)(list);
116
8
    res->size = new_size;
117
8
    return res;
118
8
  }
119
0
120
0
  if (list->n + n <= list->size && list->size < new_size)
121
0
    new_size = list->size;
122
0
123
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
124
0
  if (!res)
125
0
    return FN(LIST(EL),free)(list);
126
0
127
0
  for (i = 0; i < list->n; ++i)
128
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
129
0
130
0
  FN(LIST(EL),free)(list);
131
21
  return res;
132
21
}
133
134
/* Check that "index" is a valid position in "list".
135
 */
136
static isl_stat FN(LIST(EL),check_index)(__isl_keep LIST(EL) *list, int index)
137
658k
{
138
658k
  if (!list)
139
0
    return isl_stat_error;
140
658k
  if (index < 0 || index >= list->n)
141
658k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
658k
      "index out of bounds", return isl_stat_error);
143
658k
  return isl_stat_ok;
144
658k
}
isl_aff.c:isl_aff_list_check_index
Line
Count
Source
137
8.94k
{
138
8.94k
  if (!list)
139
0
    return isl_stat_error;
140
8.94k
  if (index < 0 || index >= list->n)
141
8.94k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
8.94k
      "index out of bounds", return isl_stat_error);
143
8.94k
  return isl_stat_ok;
144
8.94k
}
isl_aff.c:isl_pw_aff_list_check_index
Line
Count
Source
137
14.8k
{
138
14.8k
  if (!list)
139
0
    return isl_stat_error;
140
14.8k
  if (index < 0 || index >= list->n)
141
14.8k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
14.8k
      "index out of bounds", return isl_stat_error);
143
14.8k
  return isl_stat_ok;
144
14.8k
}
isl_aff.c:isl_union_pw_aff_list_check_index
Line
Count
Source
137
27
{
138
27
  if (!list)
139
0
    return isl_stat_error;
140
27
  if (index < 0 || index >= list->n)
141
27
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
27
      "index out of bounds", return isl_stat_error);
143
27
  return isl_stat_ok;
144
27
}
isl_aff.c:isl_union_pw_multi_aff_list_check_index
Line
Count
Source
137
7
{
138
7
  if (!list)
139
0
    return isl_stat_error;
140
7
  if (index < 0 || index >= list->n)
141
7
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
7
      "index out of bounds", return isl_stat_error);
143
7
  return isl_stat_ok;
144
7
}
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_check_index
isl_ast.c:isl_ast_node_list_check_index
Line
Count
Source
137
4.34k
{
138
4.34k
  if (!list)
139
0
    return isl_stat_error;
140
4.34k
  if (index < 0 || index >= list->n)
141
4.34k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
4.34k
      "index out of bounds", return isl_stat_error);
143
4.34k
  return isl_stat_ok;
144
4.34k
}
isl_ast_graft.c:isl_ast_graft_list_check_index
Line
Count
Source
137
39.8k
{
138
39.8k
  if (!list)
139
0
    return isl_stat_error;
140
39.8k
  if (index < 0 || index >= list->n)
141
39.8k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
39.8k
      "index out of bounds", return isl_stat_error);
143
39.8k
  return isl_stat_ok;
144
39.8k
}
isl_band.c:isl_band_list_check_index
Line
Count
Source
137
6
{
138
6
  if (!list)
139
0
    return isl_stat_error;
140
6
  if (index < 0 || index >= list->n)
141
6
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
6
      "index out of bounds", return isl_stat_error);
143
6
  return isl_stat_ok;
144
6
}
isl_constraint.c:isl_constraint_list_check_index
Line
Count
Source
137
2.02k
{
138
2.02k
  if (!list)
139
0
    return isl_stat_error;
140
2.02k
  if (index < 0 || index >= list->n)
141
2.02k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
2.02k
      "index out of bounds", return isl_stat_error);
143
2.02k
  return isl_stat_ok;
144
2.02k
}
isl_id.c:isl_id_list_check_index
Line
Count
Source
137
23.0k
{
138
23.0k
  if (!list)
139
0
    return isl_stat_error;
140
23.0k
  if (index < 0 || index >= list->n)
141
23.0k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
23.0k
      "index out of bounds", return isl_stat_error);
143
23.0k
  return isl_stat_ok;
144
23.0k
}
isl_map_list.c:isl_basic_map_list_check_index
Line
Count
Source
137
14.4k
{
138
14.4k
  if (!list)
139
0
    return isl_stat_error;
140
14.4k
  if (index < 0 || index >= list->n)
141
14.4k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
14.4k
      "index out of bounds", return isl_stat_error);
143
14.4k
  return isl_stat_ok;
144
14.4k
}
isl_map_list.c:isl_map_list_check_index
Line
Count
Source
137
1.77k
{
138
1.77k
  if (!list)
139
0
    return isl_stat_error;
140
1.77k
  if (index < 0 || index >= list->n)
141
1.77k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
1.77k
      "index out of bounds", return isl_stat_error);
143
1.77k
  return isl_stat_ok;
144
1.77k
}
isl_map_list.c:isl_union_map_list_check_index
Line
Count
Source
137
11
{
138
11
  if (!list)
139
0
    return isl_stat_error;
140
11
  if (index < 0 || index >= list->n)
141
11
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
11
      "index out of bounds", return isl_stat_error);
143
11
  return isl_stat_ok;
144
11
}
isl_schedule_tree.c:isl_schedule_tree_list_check_index
Line
Count
Source
137
515k
{
138
515k
  if (!list)
139
0
    return isl_stat_error;
140
515k
  if (index < 0 || index >= list->n)
141
515k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
515k
      "index out of bounds", return isl_stat_error);
143
515k
  return isl_stat_ok;
144
515k
}
isl_set_list.c:isl_basic_set_list_check_index
Line
Count
Source
137
12.3k
{
138
12.3k
  if (!list)
139
0
    return isl_stat_error;
140
12.3k
  if (index < 0 || index >= list->n)
141
12.3k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
12.3k
      "index out of bounds", return isl_stat_error);
143
12.3k
  return isl_stat_ok;
144
12.3k
}
isl_set_list.c:isl_set_list_check_index
Line
Count
Source
137
19.3k
{
138
19.3k
  if (!list)
139
0
    return isl_stat_error;
140
19.3k
  if (index < 0 || index >= list->n)
141
19.3k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
19.3k
      "index out of bounds", return isl_stat_error);
143
19.3k
  return isl_stat_ok;
144
19.3k
}
isl_set_list.c:isl_union_set_list_check_index
Line
Count
Source
137
2.18k
{
138
2.18k
  if (!list)
139
0
    return isl_stat_error;
140
2.18k
  if (index < 0 || index >= list->n)
141
2.18k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
2.18k
      "index out of bounds", return isl_stat_error);
143
2.18k
  return isl_stat_ok;
144
2.18k
}
isl_val.c:isl_val_list_check_index
Line
Count
Source
137
21
{
138
21
  if (!list)
139
0
    return isl_stat_error;
140
21
  if (index < 0 || index >= list->n)
141
21
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
142
21
      "index out of bounds", return isl_stat_error);
143
21
  return isl_stat_ok;
144
21
}
145
146
__isl_give LIST(EL) *FN(LIST(EL),add)(__isl_take LIST(EL) *list,
147
  __isl_take struct EL *el)
148
346k
{
149
346k
  list = FN(LIST(EL),grow)(list, 1);
150
346k
  if (!list || !el)
151
0
    goto error;
152
346k
  list->p[list->n] = el;
153
346k
  list->n++;
154
346k
  return list;
155
346k
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
346k
}
isl_aff_list_add
Line
Count
Source
148
8.72k
{
149
8.72k
  list = FN(LIST(EL),grow)(list, 1);
150
8.72k
  if (!list || !el)
151
0
    goto error;
152
8.72k
  list->p[list->n] = el;
153
8.72k
  list->n++;
154
8.72k
  return list;
155
8.72k
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
8.72k
}
isl_pw_aff_list_add
Line
Count
Source
148
17.4k
{
149
17.4k
  list = FN(LIST(EL),grow)(list, 1);
150
17.4k
  if (!list || !el)
151
0
    goto error;
152
17.4k
  list->p[list->n] = el;
153
17.4k
  list->n++;
154
17.4k
  return list;
155
17.4k
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
17.4k
}
isl_union_pw_aff_list_add
Line
Count
Source
148
27
{
149
27
  list = FN(LIST(EL),grow)(list, 1);
150
27
  if (!list || !el)
151
0
    goto error;
152
27
  list->p[list->n] = el;
153
27
  list->n++;
154
27
  return list;
155
27
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
27
}
isl_union_pw_multi_aff_list_add
Line
Count
Source
148
7
{
149
7
  list = FN(LIST(EL),grow)(list, 1);
150
7
  if (!list || !el)
151
0
    goto error;
152
7
  list->p[list->n] = el;
153
7
  list->n++;
154
7
  return list;
155
7
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
7
}
Unexecuted instantiation: isl_ast_expr_list_add
isl_ast_node_list_add
Line
Count
Source
148
6.03k
{
149
6.03k
  list = FN(LIST(EL),grow)(list, 1);
150
6.03k
  if (!list || !el)
151
0
    goto error;
152
6.03k
  list->p[list->n] = el;
153
6.03k
  list->n++;
154
6.03k
  return list;
155
6.03k
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
6.03k
}
isl_ast_graft_list_add
Line
Count
Source
148
16.3k
{
149
16.3k
  list = FN(LIST(EL),grow)(list, 1);
150
16.3k
  if (!list || !el)
151
0
    goto error;
152
16.3k
  list->p[list->n] = el;
153
16.3k
  list->n++;
154
16.3k
  return list;
155
16.3k
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
16.3k
}
isl_band_list_add
Line
Count
Source
148
18
{
149
18
  list = FN(LIST(EL),grow)(list, 1);
150
18
  if (!list || !el)
151
0
    goto error;
152
18
  list->p[list->n] = el;
153
18
  list->n++;
154
18
  return list;
155
18
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
18
}
isl_constraint_list_add
Line
Count
Source
148
3.55k
{
149
3.55k
  list = FN(LIST(EL),grow)(list, 1);
150
3.55k
  if (!list || !el)
151
0
    goto error;
152
3.55k
  list->p[list->n] = el;
153
3.55k
  list->n++;
154
3.55k
  return list;
155
3.55k
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
3.55k
}
isl_id_list_add
Line
Count
Source
148
2.26k
{
149
2.26k
  list = FN(LIST(EL),grow)(list, 1);
150
2.26k
  if (!list || !el)
151
0
    goto error;
152
2.26k
  list->p[list->n] = el;
153
2.26k
  list->n++;
154
2.26k
  return list;
155
2.26k
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
2.26k
}
isl_basic_map_list_add
Line
Count
Source
148
17.2k
{
149
17.2k
  list = FN(LIST(EL),grow)(list, 1);
150
17.2k
  if (!list || !el)
151
0
    goto error;
152
17.2k
  list->p[list->n] = el;
153
17.2k
  list->n++;
154
17.2k
  return list;
155
17.2k
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
17.2k
}
isl_map_list_add
Line
Count
Source
148
1.48k
{
149
1.48k
  list = FN(LIST(EL),grow)(list, 1);
150
1.48k
  if (!list || !el)
151
0
    goto error;
152
1.48k
  list->p[list->n] = el;
153
1.48k
  list->n++;
154
1.48k
  return list;
155
1.48k
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
1.48k
}
isl_union_map_list_add
Line
Count
Source
148
5
{
149
5
  list = FN(LIST(EL),grow)(list, 1);
150
5
  if (!list || !el)
151
0
    goto error;
152
5
  list->p[list->n] = el;
153
5
  list->n++;
154
5
  return list;
155
5
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
5
}
isl_schedule_tree_list_add
Line
Count
Source
148
256k
{
149
256k
  list = FN(LIST(EL),grow)(list, 1);
150
256k
  if (!list || !el)
151
0
    goto error;
152
256k
  list->p[list->n] = el;
153
256k
  list->n++;
154
256k
  return list;
155
256k
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
256k
}
isl_basic_set_list_add
Line
Count
Source
148
2.22k
{
149
2.22k
  list = FN(LIST(EL),grow)(list, 1);
150
2.22k
  if (!list || !el)
151
0
    goto error;
152
2.22k
  list->p[list->n] = el;
153
2.22k
  list->n++;
154
2.22k
  return list;
155
2.22k
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
2.22k
}
isl_set_list_add
Line
Count
Source
148
12.9k
{
149
12.9k
  list = FN(LIST(EL),grow)(list, 1);
150
12.9k
  if (!list || !el)
151
0
    goto error;
152
12.9k
  list->p[list->n] = el;
153
12.9k
  list->n++;
154
12.9k
  return list;
155
12.9k
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
12.9k
}
isl_union_set_list_add
Line
Count
Source
148
1.44k
{
149
1.44k
  list = FN(LIST(EL),grow)(list, 1);
150
1.44k
  if (!list || !el)
151
0
    goto error;
152
1.44k
  list->p[list->n] = el;
153
1.44k
  list->n++;
154
1.44k
  return list;
155
1.44k
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
1.44k
}
isl_val_list_add
Line
Count
Source
148
21
{
149
21
  list = FN(LIST(EL),grow)(list, 1);
150
21
  if (!list || !el)
151
0
    goto error;
152
21
  list->p[list->n] = el;
153
21
  list->n++;
154
21
  return list;
155
21
error:
156
0
  FN(EL,free)(el);
157
0
  FN(LIST(EL),free)(list);
158
0
  return NULL;
159
21
}
160
161
/* Remove the "n" elements starting at "first" from "list".
162
 */
163
__isl_give LIST(EL) *FN(LIST(EL),drop)(__isl_take LIST(EL) *list,
164
  unsigned first, unsigned n)
165
67.7k
{
166
67.7k
  int i;
167
67.7k
168
67.7k
  if (!list)
169
0
    return NULL;
170
67.7k
  if (first + n > list->n || first + n < first)
171
67.7k
    
isl_die0
(list->ctx, isl_error_invalid,
172
67.7k
      "index out of bounds", return FN(LIST(EL),free)(list));
173
67.7k
  if (n == 0)
174
650
    return list;
175
67.0k
  list = FN(LIST(EL),cow)(list);
176
67.0k
  if (!list)
177
0
    return NULL;
178
197k
  
for (i = 0; 67.0k
i < n;
++i130k
)
179
130k
    FN(EL,free)(list->p[first + i]);
180
69.4k
  for (i = first; i + n < list->n; 
++i2.43k
)
181
67.0k
    
list->p[i] = list->p[i + n]2.43k
;
182
67.7k
  list->n -= n;
183
67.7k
  return list;
184
67.7k
}
Unexecuted instantiation: isl_aff_list_drop
Unexecuted instantiation: isl_pw_aff_list_drop
Unexecuted instantiation: isl_union_pw_aff_list_drop
Unexecuted instantiation: isl_union_pw_multi_aff_list_drop
Unexecuted instantiation: isl_ast_expr_list_drop
Unexecuted instantiation: isl_ast_node_list_drop
Unexecuted instantiation: isl_ast_graft_list_drop
Unexecuted instantiation: isl_band_list_drop
isl_constraint_list_drop
Line
Count
Source
165
2.09k
{
166
2.09k
  int i;
167
2.09k
168
2.09k
  if (!list)
169
0
    return NULL;
170
2.09k
  if (first + n > list->n || first + n < first)
171
2.09k
    
isl_die0
(list->ctx, isl_error_invalid,
172
2.09k
      "index out of bounds", return FN(LIST(EL),free)(list));
173
2.09k
  if (n == 0)
174
650
    return list;
175
1.44k
  list = FN(LIST(EL),cow)(list);
176
1.44k
  if (!list)
177
0
    return NULL;
178
2.97k
  
for (i = 0; 1.44k
i < n;
++i1.52k
)
179
1.52k
    FN(EL,free)(list->p[first + i]);
180
2.31k
  for (i = first; i + n < list->n; 
++i867
)
181
1.44k
    
list->p[i] = list->p[i + n]867
;
182
2.09k
  list->n -= n;
183
2.09k
  return list;
184
2.09k
}
isl_id_list_drop
Line
Count
Source
165
1
{
166
1
  int i;
167
1
168
1
  if (!list)
169
0
    return NULL;
170
1
  if (first + n > list->n || first + n < first)
171
1
    
isl_die0
(list->ctx, isl_error_invalid,
172
1
      "index out of bounds", return FN(LIST(EL),free)(list));
173
1
  if (n == 0)
174
0
    return list;
175
1
  list = FN(LIST(EL),cow)(list);
176
1
  if (!list)
177
0
    return NULL;
178
2
  
for (i = 0; 1
i < n;
++i1
)
179
1
    FN(EL,free)(list->p[first + i]);
180
3
  for (i = first; i + n < list->n; 
++i2
)
181
2
    list->p[i] = list->p[i + n];
182
1
  list->n -= n;
183
1
  return list;
184
1
}
Unexecuted instantiation: isl_basic_map_list_drop
Unexecuted instantiation: isl_map_list_drop
isl_union_map_list_drop
Line
Count
Source
165
4
{
166
4
  int i;
167
4
168
4
  if (!list)
169
0
    return NULL;
170
4
  if (first + n > list->n || first + n < first)
171
4
    
isl_die0
(list->ctx, isl_error_invalid,
172
4
      "index out of bounds", return FN(LIST(EL),free)(list));
173
4
  if (n == 0)
174
0
    return list;
175
4
  list = FN(LIST(EL),cow)(list);
176
4
  if (!list)
177
0
    return NULL;
178
8
  
for (i = 0; 4
i < n;
++i4
)
179
4
    FN(EL,free)(list->p[first + i]);
180
4
  for (i = first; i + n < list->n; 
++i0
)
181
4
    
list->p[i] = list->p[i + n]0
;
182
4
  list->n -= n;
183
4
  return list;
184
4
}
isl_schedule_tree_list_drop
Line
Count
Source
165
64.6k
{
166
64.6k
  int i;
167
64.6k
168
64.6k
  if (!list)
169
0
    return NULL;
170
64.6k
  if (first + n > list->n || first + n < first)
171
64.6k
    
isl_die0
(list->ctx, isl_error_invalid,
172
64.6k
      "index out of bounds", return FN(LIST(EL),free)(list));
173
64.6k
  if (n == 0)
174
0
    return list;
175
64.6k
  list = FN(LIST(EL),cow)(list);
176
64.6k
  if (!list)
177
0
    return NULL;
178
192k
  
for (i = 0; 64.6k
i < n;
++i128k
)
179
128k
    FN(EL,free)(list->p[first + i]);
180
66.2k
  for (i = first; i + n < list->n; 
++i1.56k
)
181
64.6k
    
list->p[i] = list->p[i + n]1.56k
;
182
64.6k
  list->n -= n;
183
64.6k
  return list;
184
64.6k
}
isl_basic_set_list_drop
Line
Count
Source
165
4
{
166
4
  int i;
167
4
168
4
  if (!list)
169
0
    return NULL;
170
4
  if (first + n > list->n || first + n < first)
171
4
    
isl_die0
(list->ctx, isl_error_invalid,
172
4
      "index out of bounds", return FN(LIST(EL),free)(list));
173
4
  if (n == 0)
174
0
    return list;
175
4
  list = FN(LIST(EL),cow)(list);
176
4
  if (!list)
177
0
    return NULL;
178
12
  
for (i = 0; 4
i < n;
++i8
)
179
8
    FN(EL,free)(list->p[first + i]);
180
4
  for (i = first; i + n < list->n; 
++i0
)
181
4
    
list->p[i] = list->p[i + n]0
;
182
4
  list->n -= n;
183
4
  return list;
184
4
}
Unexecuted instantiation: isl_set_list_drop
isl_union_set_list_drop
Line
Count
Source
165
918
{
166
918
  int i;
167
918
168
918
  if (!list)
169
0
    return NULL;
170
918
  if (first + n > list->n || first + n < first)
171
918
    
isl_die0
(list->ctx, isl_error_invalid,
172
918
      "index out of bounds", return FN(LIST(EL),free)(list));
173
918
  if (n == 0)
174
0
    return list;
175
918
  list = FN(LIST(EL),cow)(list);
176
918
  if (!list)
177
0
    return NULL;
178
1.83k
  
for (i = 0; 918
i < n;
++i918
)
179
918
    FN(EL,free)(list->p[first + i]);
180
918
  for (i = first; i + n < list->n; 
++i0
)
181
918
    
list->p[i] = list->p[i + n]0
;
182
918
  list->n -= n;
183
918
  return list;
184
918
}
Unexecuted instantiation: isl_val_list_drop
185
186
/* Insert "el" at position "pos" in "list".
187
 *
188
 * If there is only one reference to "list" and if it already has space
189
 * for one extra element, we insert it directly into "list".
190
 * Otherwise, we create a new list consisting of "el" and copied
191
 * elements from "list".
192
 */
193
__isl_give LIST(EL) *FN(LIST(EL),insert)(__isl_take LIST(EL) *list,
194
  unsigned pos, __isl_take struct EL *el)
195
27
{
196
27
  int i;
197
27
  isl_ctx *ctx;
198
27
  LIST(EL) *res;
199
27
200
27
  if (!list || !el)
201
0
    goto error;
202
27
  ctx = FN(LIST(EL),get_ctx)(list);
203
27
  if (pos > list->n)
204
27
    
isl_die0
(ctx, isl_error_invalid,
205
27
      "index out of bounds", goto error);
206
27
207
27
  if (list->ref == 1 && 
list->size > list->n24
) {
208
2
    for (i = list->n; i > pos; 
--i1
)
209
1
      list->p[i] = list->p[i - 1];
210
1
    list->n++;
211
1
    list->p[pos] = el;
212
1
    return list;
213
1
  }
214
26
215
26
  res = FN(LIST(EL),alloc)(ctx, list->n + 1);
216
59
  for (i = 0; i < pos; 
++i33
)
217
33
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
218
26
  res = FN(LIST(EL),add)(res, el);
219
28
  for (i = pos; i < list->n; 
++i2
)
220
26
    
res = 2
FN2
(LIST(EL),add)(res,
FN2
(EL,copy)(list->p[i]));
221
26
  FN(LIST(EL),free)(list);
222
26
223
26
  return res;
224
26
error:
225
0
  FN(EL,free)(el);
226
0
  FN(LIST(EL),free)(list);
227
0
  return NULL;
228
27
}
Unexecuted instantiation: isl_aff_list_insert
Unexecuted instantiation: isl_pw_aff_list_insert
Unexecuted instantiation: isl_union_pw_aff_list_insert
Unexecuted instantiation: isl_union_pw_multi_aff_list_insert
Unexecuted instantiation: isl_ast_expr_list_insert
Unexecuted instantiation: isl_ast_node_list_insert
isl_ast_graft_list_insert
Line
Count
Source
195
23
{
196
23
  int i;
197
23
  isl_ctx *ctx;
198
23
  LIST(EL) *res;
199
23
200
23
  if (!list || !el)
201
0
    goto error;
202
23
  ctx = FN(LIST(EL),get_ctx)(list);
203
23
  if (pos > list->n)
204
23
    
isl_die0
(ctx, isl_error_invalid,
205
23
      "index out of bounds", goto error);
206
23
207
23
  if (list->ref == 1 && list->size > list->n) {
208
0
    for (i = list->n; i > pos; --i)
209
0
      list->p[i] = list->p[i - 1];
210
0
    list->n++;
211
0
    list->p[pos] = el;
212
0
    return list;
213
0
  }
214
23
215
23
  res = FN(LIST(EL),alloc)(ctx, list->n + 1);
216
53
  for (i = 0; i < pos; 
++i30
)
217
30
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
218
23
  res = FN(LIST(EL),add)(res, el);
219
25
  for (i = pos; i < list->n; 
++i2
)
220
23
    
res = 2
FN2
(LIST(EL),add)(res,
FN2
(EL,copy)(list->p[i]));
221
23
  FN(LIST(EL),free)(list);
222
23
223
23
  return res;
224
23
error:
225
0
  FN(EL,free)(el);
226
0
  FN(LIST(EL),free)(list);
227
0
  return NULL;
228
23
}
Unexecuted instantiation: isl_band_list_insert
Unexecuted instantiation: isl_constraint_list_insert
isl_id_list_insert
Line
Count
Source
195
4
{
196
4
  int i;
197
4
  isl_ctx *ctx;
198
4
  LIST(EL) *res;
199
4
200
4
  if (!list || !el)
201
0
    goto error;
202
4
  ctx = FN(LIST(EL),get_ctx)(list);
203
4
  if (pos > list->n)
204
4
    
isl_die0
(ctx, isl_error_invalid,
205
4
      "index out of bounds", goto error);
206
4
207
4
  if (list->ref == 1 && 
list->size > list->n1
) {
208
2
    for (i = list->n; i > pos; 
--i1
)
209
1
      list->p[i] = list->p[i - 1];
210
1
    list->n++;
211
1
    list->p[pos] = el;
212
1
    return list;
213
1
  }
214
3
215
3
  res = FN(LIST(EL),alloc)(ctx, list->n + 1);
216
6
  for (i = 0; i < pos; 
++i3
)
217
3
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
218
3
  res = FN(LIST(EL),add)(res, el);
219
3
  for (i = pos; i < list->n; 
++i0
)
220
3
    
res = 0
FN0
(LIST(EL),add)(res,
FN0
(EL,copy)(list->p[i]));
221
3
  FN(LIST(EL),free)(list);
222
3
223
3
  return res;
224
3
error:
225
0
  FN(EL,free)(el);
226
0
  FN(LIST(EL),free)(list);
227
0
  return NULL;
228
4
}
Unexecuted instantiation: isl_basic_map_list_insert
Unexecuted instantiation: isl_map_list_insert
Unexecuted instantiation: isl_union_map_list_insert
Unexecuted instantiation: isl_schedule_tree_list_insert
Unexecuted instantiation: isl_basic_set_list_insert
Unexecuted instantiation: isl_set_list_insert
Unexecuted instantiation: isl_union_set_list_insert
Unexecuted instantiation: isl_val_list_insert
229
230
__isl_null LIST(EL) *FN(LIST(EL),free)(__isl_take LIST(EL) *list)
231
246k
{
232
246k
  int i;
233
246k
234
246k
  if (!list)
235
45.5k
    return NULL;
236
200k
237
200k
  if (--list->ref > 0)
238
57.7k
    return NULL;
239
143k
240
143k
  isl_ctx_deref(list->ctx);
241
359k
  for (i = 0; i < list->n; 
++i215k
)
242
215k
    FN(EL,free)(list->p[i]);
243
246k
  free(list);
244
246k
245
246k
  return NULL;
246
246k
}
isl_aff_list_free
Line
Count
Source
231
16.6k
{
232
16.6k
  int i;
233
16.6k
234
16.6k
  if (!list)
235
7.91k
    return NULL;
236
8.72k
237
8.72k
  if (--list->ref > 0)
238
0
    return NULL;
239
8.72k
240
8.72k
  isl_ctx_deref(list->ctx);
241
17.4k
  for (i = 0; i < list->n; 
++i8.72k
)
242
8.72k
    FN(EL,free)(list->p[i]);
243
16.6k
  free(list);
244
16.6k
245
16.6k
  return NULL;
246
16.6k
}
isl_pw_aff_list_free
Line
Count
Source
231
25.5k
{
232
25.5k
  int i;
233
25.5k
234
25.5k
  if (!list)
235
3
    return NULL;
236
25.5k
237
25.5k
  if (--list->ref > 0)
238
10.4k
    return NULL;
239
15.1k
240
15.1k
  isl_ctx_deref(list->ctx);
241
32.5k
  for (i = 0; i < list->n; 
++i17.4k
)
242
17.4k
    FN(EL,free)(list->p[i]);
243
25.5k
  free(list);
244
25.5k
245
25.5k
  return NULL;
246
25.5k
}
isl_union_pw_aff_list_free
Line
Count
Source
231
15
{
232
15
  int i;
233
15
234
15
  if (!list)
235
0
    return NULL;
236
15
237
15
  if (--list->ref > 0)
238
0
    return NULL;
239
15
240
15
  isl_ctx_deref(list->ctx);
241
42
  for (i = 0; i < list->n; 
++i27
)
242
27
    FN(EL,free)(list->p[i]);
243
15
  free(list);
244
15
245
15
  return NULL;
246
15
}
isl_union_pw_multi_aff_list_free
Line
Count
Source
231
7
{
232
7
  int i;
233
7
234
7
  if (!list)
235
0
    return NULL;
236
7
237
7
  if (--list->ref > 0)
238
0
    return NULL;
239
7
240
7
  isl_ctx_deref(list->ctx);
241
14
  for (i = 0; i < list->n; 
++i7
)
242
7
    FN(EL,free)(list->p[i]);
243
7
  free(list);
244
7
245
7
  return NULL;
246
7
}
Unexecuted instantiation: isl_ast_expr_list_free
isl_ast_node_list_free
Line
Count
Source
231
4.61k
{
232
4.61k
  int i;
233
4.61k
234
4.61k
  if (!list)
235
0
    return NULL;
236
4.61k
237
4.61k
  if (--list->ref > 0)
238
202
    return NULL;
239
4.40k
240
4.40k
  isl_ctx_deref(list->ctx);
241
10.4k
  for (i = 0; i < list->n; 
++i6.03k
)
242
6.03k
    FN(EL,free)(list->p[i]);
243
4.61k
  free(list);
244
4.61k
245
4.61k
  return NULL;
246
4.61k
}
isl_ast_graft_list_free
Line
Count
Source
231
17.5k
{
232
17.5k
  int i;
233
17.5k
234
17.5k
  if (!list)
235
0
    return NULL;
236
17.5k
237
17.5k
  if (--list->ref > 0)
238
0
    return NULL;
239
17.5k
240
17.5k
  isl_ctx_deref(list->ctx);
241
33.9k
  for (i = 0; i < list->n; 
++i16.3k
)
242
17.5k
    
FN16.3k
(EL,free)(list->p[i])16.3k
;
243
17.5k
  free(list);
244
17.5k
245
17.5k
  return NULL;
246
17.5k
}
isl_band_list_free
Line
Count
Source
231
9.42k
{
232
9.42k
  int i;
233
9.42k
234
9.42k
  if (!list)
235
9.40k
    return NULL;
236
16
237
16
  if (--list->ref > 0)
238
0
    return NULL;
239
16
240
16
  isl_ctx_deref(list->ctx);
241
34
  for (i = 0; i < list->n; 
++i18
)
242
18
    FN(EL,free)(list->p[i]);
243
9.42k
  free(list);
244
9.42k
245
9.42k
  return NULL;
246
9.42k
}
isl_constraint_list_free
Line
Count
Source
231
2.28k
{
232
2.28k
  int i;
233
2.28k
234
2.28k
  if (!list)
235
0
    return NULL;
236
2.28k
237
2.28k
  if (--list->ref > 0)
238
0
    return NULL;
239
2.28k
240
2.28k
  isl_ctx_deref(list->ctx);
241
4.31k
  for (i = 0; i < list->n; 
++i2.02k
)
242
2.28k
    
FN2.02k
(EL,free)(list->p[i])2.02k
;
243
2.28k
  free(list);
244
2.28k
245
2.28k
  return NULL;
246
2.28k
}
isl_id_list_free
Line
Count
Source
231
36.3k
{
232
36.3k
  int i;
233
36.3k
234
36.3k
  if (!list)
235
0
    return NULL;
236
36.3k
237
36.3k
  if (--list->ref > 0)
238
34.5k
    return NULL;
239
1.82k
240
1.82k
  isl_ctx_deref(list->ctx);
241
4.08k
  for (i = 0; i < list->n; 
++i2.26k
)
242
2.26k
    FN(EL,free)(list->p[i]);
243
36.3k
  free(list);
244
36.3k
245
36.3k
  return NULL;
246
36.3k
}
isl_basic_map_list_free
Line
Count
Source
231
3.49k
{
232
3.49k
  int i;
233
3.49k
234
3.49k
  if (!list)
235
0
    return NULL;
236
3.49k
237
3.49k
  if (--list->ref > 0)
238
0
    return NULL;
239
3.49k
240
3.49k
  isl_ctx_deref(list->ctx);
241
17.3k
  for (i = 0; i < list->n; 
++i13.8k
)
242
13.8k
    FN(EL,free)(list->p[i]);
243
3.49k
  free(list);
244
3.49k
245
3.49k
  return NULL;
246
3.49k
}
isl_map_list_free
Line
Count
Source
231
803
{
232
803
  int i;
233
803
234
803
  if (!list)
235
0
    return NULL;
236
803
237
803
  if (--list->ref > 0)
238
0
    return NULL;
239
803
240
803
  isl_ctx_deref(list->ctx);
241
2.61k
  for (i = 0; i < list->n; 
++i1.81k
)
242
1.81k
    FN(EL,free)(list->p[i]);
243
803
  free(list);
244
803
245
803
  return NULL;
246
803
}
isl_union_map_list_free
Line
Count
Source
231
1
{
232
1
  int i;
233
1
234
1
  if (!list)
235
0
    return NULL;
236
1
237
1
  if (--list->ref > 0)
238
0
    return NULL;
239
1
240
1
  isl_ctx_deref(list->ctx);
241
2
  for (i = 0; i < list->n; 
++i1
)
242
1
    FN(EL,free)(list->p[i]);
243
1
  free(list);
244
1
245
1
  return NULL;
246
1
}
isl_schedule_tree_list_free
Line
Count
Source
231
107k
{
232
107k
  int i;
233
107k
234
107k
  if (!list)
235
20.3k
    return NULL;
236
86.8k
237
86.8k
  if (--list->ref > 0)
238
12.5k
    return NULL;
239
74.2k
240
74.2k
  isl_ctx_deref(list->ctx);
241
202k
  for (i = 0; i < list->n; 
++i128k
)
242
128k
    FN(EL,free)(list->p[i]);
243
107k
  free(list);
244
107k
245
107k
  return NULL;
246
107k
}
isl_basic_set_list_free
Line
Count
Source
231
2.90k
{
232
2.90k
  int i;
233
2.90k
234
2.90k
  if (!list)
235
0
    return NULL;
236
2.90k
237
2.90k
  if (--list->ref > 0)
238
13
    return NULL;
239
2.89k
240
2.89k
  isl_ctx_deref(list->ctx);
241
8.53k
  for (i = 0; i < list->n; 
++i5.63k
)
242
5.63k
    FN(EL,free)(list->p[i]);
243
2.90k
  free(list);
244
2.90k
245
2.90k
  return NULL;
246
2.90k
}
isl_set_list_free
Line
Count
Source
231
19.2k
{
232
19.2k
  int i;
233
19.2k
234
19.2k
  if (!list)
235
7.91k
    return NULL;
236
11.3k
237
11.3k
  if (--list->ref > 0)
238
0
    return NULL;
239
11.3k
240
11.3k
  isl_ctx_deref(list->ctx);
241
23.9k
  for (i = 0; i < list->n; 
++i12.6k
)
242
12.6k
    FN(EL,free)(list->p[i]);
243
19.2k
  free(list);
244
19.2k
245
19.2k
  return NULL;
246
19.2k
}
isl_union_set_list_free
Line
Count
Source
231
430
{
232
430
  int i;
233
430
234
430
  if (!list)
235
0
    return NULL;
236
430
237
430
  if (--list->ref > 0)
238
0
    return NULL;
239
430
240
430
  isl_ctx_deref(list->ctx);
241
956
  for (i = 0; i < list->n; 
++i526
)
242
526
    FN(EL,free)(list->p[i]);
243
430
  free(list);
244
430
245
430
  return NULL;
246
430
}
isl_val_list_free
Line
Count
Source
231
11
{
232
11
  int i;
233
11
234
11
  if (!list)
235
0
    return NULL;
236
11
237
11
  if (--list->ref > 0)
238
0
    return NULL;
239
11
240
11
  isl_ctx_deref(list->ctx);
241
32
  for (i = 0; i < list->n; 
++i21
)
242
21
    FN(EL,free)(list->p[i]);
243
11
  free(list);
244
11
245
11
  return NULL;
246
11
}
247
248
int FN(FN(LIST(EL),n),BASE)(__isl_keep LIST(EL) *list)
249
917k
{
250
917k
  return list ? 
list->n902k
:
014.3k
;
251
917k
}
isl_aff_list_n_aff
Line
Count
Source
249
1.01k
{
250
1.01k
  return list ? list->n : 
00
;
251
1.01k
}
isl_pw_aff_list_n_pw_aff
Line
Count
Source
249
15.4k
{
250
15.4k
  return list ? list->n : 
00
;
251
15.4k
}
isl_union_pw_aff_list_n_union_pw_aff
Line
Count
Source
249
15
{
250
15
  return list ? list->n : 
00
;
251
15
}
isl_union_pw_multi_aff_list_n_union_pw_multi_aff
Line
Count
Source
249
7
{
250
7
  return list ? list->n : 
00
;
251
7
}
Unexecuted instantiation: isl_ast_expr_list_n_ast_expr
isl_ast_node_list_n_ast_node
Line
Count
Source
249
4.74k
{
250
4.74k
  return list ? list->n : 
00
;
251
4.74k
}
isl_ast_graft_list_n_ast_graft
Line
Count
Source
249
27.0k
{
250
27.0k
  return list ? list->n : 
00
;
251
27.0k
}
isl_band_list_n_band
Line
Count
Source
249
4
{
250
4
  return list ? list->n : 
00
;
251
4
}
isl_constraint_list_n_constraint
Line
Count
Source
249
3.68k
{
250
3.68k
  return list ? list->n : 
00
;
251
3.68k
}
isl_id_list_n_id
Line
Count
Source
249
1.06k
{
250
1.06k
  return list ? list->n : 
00
;
251
1.06k
}
isl_basic_map_list_n_basic_map
Line
Count
Source
249
3.16k
{
250
3.16k
  return list ? list->n : 
00
;
251
3.16k
}
isl_map_list_n_map
Line
Count
Source
249
792
{
250
792
  return list ? list->n : 
00
;
251
792
}
isl_union_map_list_n_union_map
Line
Count
Source
249
13
{
250
13
  return list ? list->n : 
00
;
251
13
}
isl_schedule_tree_list_n_schedule_tree
Line
Count
Source
249
845k
{
250
845k
  return list ? 
list->n831k
:
014.3k
;
251
845k
}
isl_basic_set_list_n_basic_set
Line
Count
Source
249
4.40k
{
250
4.40k
  return list ? list->n : 
00
;
251
4.40k
}
isl_set_list_n_set
Line
Count
Source
249
7.94k
{
250
7.94k
  return list ? list->n : 
00
;
251
7.94k
}
isl_union_set_list_n_union_set
Line
Count
Source
249
2.08k
{
250
2.08k
  return list ? list->n : 
00
;
251
2.08k
}
isl_val_list_n_val
Line
Count
Source
249
11
{
250
11
  return list ? list->n : 
00
;
251
11
}
252
253
__isl_give EL *FN(FN(LIST(EL),get),BASE)(__isl_keep LIST(EL) *list, int index)
254
616k
{
255
616k
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
616k
  return FN(EL,copy)(list->p[index]);
258
616k
}
isl_aff_list_get_aff
Line
Count
Source
254
8.94k
{
255
8.94k
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
8.94k
  return FN(EL,copy)(list->p[index]);
258
8.94k
}
isl_pw_aff_list_get_pw_aff
Line
Count
Source
254
11.8k
{
255
11.8k
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
11.8k
  return FN(EL,copy)(list->p[index]);
258
11.8k
}
isl_union_pw_aff_list_get_union_pw_aff
Line
Count
Source
254
27
{
255
27
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
27
  return FN(EL,copy)(list->p[index]);
258
27
}
isl_union_pw_multi_aff_list_get_union_pw_multi_aff
Line
Count
Source
254
7
{
255
7
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
7
  return FN(EL,copy)(list->p[index]);
258
7
}
Unexecuted instantiation: isl_ast_expr_list_get_ast_expr
isl_ast_node_list_get_ast_node
Line
Count
Source
254
4.34k
{
255
4.34k
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
4.34k
  return FN(EL,copy)(list->p[index]);
258
4.34k
}
isl_ast_graft_list_get_ast_graft
Line
Count
Source
254
33.2k
{
255
33.2k
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
33.2k
  return FN(EL,copy)(list->p[index]);
258
33.2k
}
isl_band_list_get_band
Line
Count
Source
254
6
{
255
6
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
6
  return FN(EL,copy)(list->p[index]);
258
6
}
isl_constraint_list_get_constraint
Line
Count
Source
254
2.02k
{
255
2.02k
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
2.02k
  return FN(EL,copy)(list->p[index]);
258
2.02k
}
isl_id_list_get_id
Line
Count
Source
254
23.0k
{
255
23.0k
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
23.0k
  return FN(EL,copy)(list->p[index]);
258
23.0k
}
isl_basic_map_list_get_basic_map
Line
Count
Source
254
11.0k
{
255
11.0k
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
11.0k
  return FN(EL,copy)(list->p[index]);
258
11.0k
}
isl_map_list_get_map
Line
Count
Source
254
1.77k
{
255
1.77k
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
1.77k
  return FN(EL,copy)(list->p[index]);
258
1.77k
}
isl_union_map_list_get_union_map
Line
Count
Source
254
9
{
255
9
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
9
  return FN(EL,copy)(list->p[index]);
258
9
}
isl_schedule_tree_list_get_schedule_tree
Line
Count
Source
254
493k
{
255
493k
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
493k
  return FN(EL,copy)(list->p[index]);
258
493k
}
isl_basic_set_list_get_basic_set
Line
Count
Source
254
8.76k
{
255
8.76k
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
8.76k
  return FN(EL,copy)(list->p[index]);
258
8.76k
}
isl_set_list_get_set
Line
Count
Source
254
16.0k
{
255
16.0k
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
16.0k
  return FN(EL,copy)(list->p[index]);
258
16.0k
}
isl_union_set_list_get_union_set
Line
Count
Source
254
2.18k
{
255
2.18k
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
2.18k
  return FN(EL,copy)(list->p[index]);
258
2.18k
}
isl_val_list_get_val
Line
Count
Source
254
21
{
255
21
  if (FN(LIST(EL),check_index)(list, index) < 0)
256
0
    return NULL;
257
21
  return FN(EL,copy)(list->p[index]);
258
21
}
259
260
/* Replace the element at position "index" in "list" by "el".
261
 */
262
__isl_give LIST(EL) *FN(FN(LIST(EL),set),BASE)(__isl_take LIST(EL) *list,
263
  int index, __isl_take EL *el)
264
42.1k
{
265
42.1k
  if (!list || !el)
266
0
    goto error;
267
42.1k
  if (FN(LIST(EL),check_index)(list, index) < 0)
268
0
    goto error;
269
42.1k
  if (list->p[index] == el) {
270
10.9k
    FN(EL,free)(el);
271
10.9k
    return list;
272
10.9k
  }
273
31.1k
  list = FN(LIST(EL),cow)(list);
274
31.1k
  if (!list)
275
0
    goto error;
276
31.1k
  FN(EL,free)(list->p[index]);
277
31.1k
  list->p[index] = el;
278
31.1k
  return list;
279
31.1k
error:
280
0
  FN(EL,free)(el);
281
0
  FN(LIST(EL),free)(list);
282
0
  return NULL;
283
42.1k
}
isl_aff_list_set_aff
Line
Count
Source
264
2
{
265
2
  if (!list || !el)
266
0
    goto error;
267
2
  if (FN(LIST(EL),check_index)(list, index) < 0)
268
0
    goto error;
269
2
  if (list->p[index] == el) {
270
0
    FN(EL,free)(el);
271
0
    return list;
272
0
  }
273
2
  list = FN(LIST(EL),cow)(list);
274
2
  if (!list)
275
0
    goto error;
276
2
  FN(EL,free)(list->p[index]);
277
2
  list->p[index] = el;
278
2
  return list;
279
2
error:
280
0
  FN(EL,free)(el);
281
0
  FN(LIST(EL),free)(list);
282
0
  return NULL;
283
2
}
isl_pw_aff_list_set_pw_aff
Line
Count
Source
264
3.03k
{
265
3.03k
  if (!list || !el)
266
0
    goto error;
267
3.03k
  if (FN(LIST(EL),check_index)(list, index) < 0)
268
0
    goto error;
269
3.03k
  if (list->p[index] == el) {
270
0
    FN(EL,free)(el);
271
0
    return list;
272
0
  }
273
3.03k
  list = FN(LIST(EL),cow)(list);
274
3.03k
  if (!list)
275
0
    goto error;
276
3.03k
  FN(EL,free)(list->p[index]);
277
3.03k
  list->p[index] = el;
278
3.03k
  return list;
279
3.03k
error:
280
0
  FN(EL,free)(el);
281
0
  FN(LIST(EL),free)(list);
282
0
  return NULL;
283
3.03k
}
Unexecuted instantiation: isl_union_pw_aff_list_set_union_pw_aff
Unexecuted instantiation: isl_union_pw_multi_aff_list_set_union_pw_multi_aff
Unexecuted instantiation: isl_ast_expr_list_set_ast_expr
Unexecuted instantiation: isl_ast_node_list_set_ast_node
isl_ast_graft_list_set_ast_graft
Line
Count
Source
264
6.53k
{
265
6.53k
  if (!list || !el)
266
0
    goto error;
267
6.53k
  if (FN(LIST(EL),check_index)(list, index) < 0)
268
0
    goto error;
269
6.53k
  if (list->p[index] == el) {
270
6.51k
    FN(EL,free)(el);
271
6.51k
    return list;
272
6.51k
  }
273
19
  list = FN(LIST(EL),cow)(list);
274
19
  if (!list)
275
0
    goto error;
276
19
  FN(EL,free)(list->p[index]);
277
19
  list->p[index] = el;
278
19
  return list;
279
19
error:
280
0
  FN(EL,free)(el);
281
0
  FN(LIST(EL),free)(list);
282
0
  return NULL;
283
6.53k
}
Unexecuted instantiation: isl_band_list_set_band
Unexecuted instantiation: isl_constraint_list_set_constraint
Unexecuted instantiation: isl_id_list_set_id
isl_basic_map_list_set_basic_map
Line
Count
Source
264
3.41k
{
265
3.41k
  if (!list || !el)
266
0
    goto error;
267
3.41k
  if (FN(LIST(EL),check_index)(list, index) < 0)
268
0
    goto error;
269
3.41k
  if (list->p[index] == el) {
270
2.98k
    FN(EL,free)(el);
271
2.98k
    return list;
272
2.98k
  }
273
435
  list = FN(LIST(EL),cow)(list);
274
435
  if (!list)
275
0
    goto error;
276
435
  FN(EL,free)(list->p[index]);
277
435
  list->p[index] = el;
278
435
  return list;
279
435
error:
280
0
  FN(EL,free)(el);
281
0
  FN(LIST(EL),free)(list);
282
0
  return NULL;
283
3.41k
}
Unexecuted instantiation: isl_map_list_set_map
isl_union_map_list_set_union_map
Line
Count
Source
264
2
{
265
2
  if (!list || !el)
266
0
    goto error;
267
2
  if (FN(LIST(EL),check_index)(list, index) < 0)
268
0
    goto error;
269
2
  if (list->p[index] == el) {
270
0
    FN(EL,free)(el);
271
0
    return list;
272
0
  }
273
2
  list = FN(LIST(EL),cow)(list);
274
2
  if (!list)
275
0
    goto error;
276
2
  FN(EL,free)(list->p[index]);
277
2
  list->p[index] = el;
278
2
  return list;
279
2
error:
280
0
  FN(EL,free)(el);
281
0
  FN(LIST(EL),free)(list);
282
0
  return NULL;
283
2
}
isl_schedule_tree_list_set_schedule_tree
Line
Count
Source
264
22.3k
{
265
22.3k
  if (!list || !el)
266
0
    goto error;
267
22.3k
  if (FN(LIST(EL),check_index)(list, index) < 0)
268
0
    goto error;
269
22.3k
  if (list->p[index] == el) {
270
3
    FN(EL,free)(el);
271
3
    return list;
272
3
  }
273
22.3k
  list = FN(LIST(EL),cow)(list);
274
22.3k
  if (!list)
275
0
    goto error;
276
22.3k
  FN(EL,free)(list->p[index]);
277
22.3k
  list->p[index] = el;
278
22.3k
  return list;
279
22.3k
error:
280
0
  FN(EL,free)(el);
281
0
  FN(LIST(EL),free)(list);
282
0
  return NULL;
283
22.3k
}
isl_basic_set_list_set_basic_set
Line
Count
Source
264
3.48k
{
265
3.48k
  if (!list || !el)
266
0
    goto error;
267
3.48k
  if (FN(LIST(EL),check_index)(list, index) < 0)
268
0
    goto error;
269
3.48k
  if (list->p[index] == el) {
270
0
    FN(EL,free)(el);
271
0
    return list;
272
0
  }
273
3.48k
  list = FN(LIST(EL),cow)(list);
274
3.48k
  if (!list)
275
0
    goto error;
276
3.48k
  FN(EL,free)(list->p[index]);
277
3.48k
  list->p[index] = el;
278
3.48k
  return list;
279
3.48k
error:
280
0
  FN(EL,free)(el);
281
0
  FN(LIST(EL),free)(list);
282
0
  return NULL;
283
3.48k
}
isl_set_list_set_set
Line
Count
Source
264
3.30k
{
265
3.30k
  if (!list || !el)
266
0
    goto error;
267
3.30k
  if (FN(LIST(EL),check_index)(list, index) < 0)
268
0
    goto error;
269
3.30k
  if (list->p[index] == el) {
270
1.42k
    FN(EL,free)(el);
271
1.42k
    return list;
272
1.42k
  }
273
1.88k
  list = FN(LIST(EL),cow)(list);
274
1.88k
  if (!list)
275
0
    goto error;
276
1.88k
  FN(EL,free)(list->p[index]);
277
1.88k
  list->p[index] = el;
278
1.88k
  return list;
279
1.88k
error:
280
0
  FN(EL,free)(el);
281
0
  FN(LIST(EL),free)(list);
282
0
  return NULL;
283
3.30k
}
Unexecuted instantiation: isl_union_set_list_set_union_set
Unexecuted instantiation: isl_val_list_set_val
284
285
/* Return the element at position "index" of "list".
286
 * This may be either a copy or the element itself
287
 * if there is only one reference to "list".
288
 * This allows the element to be modified inplace
289
 * if both the list and the element have only a single reference.
290
 * The caller is not allowed to modify "list" between
291
 * this call to isl_list_*_take_* and a subsequent call
292
 * to isl_list_*_restore_*.
293
 * The only exception is that isl_list_*_free can be called instead.
294
 */
295
static __isl_give EL *FN(FN(LIST(EL),take),BASE)(__isl_keep LIST(EL) *list,
296
  int index)
297
64
{
298
64
  EL *el;
299
64
300
64
  if (FN(LIST(EL),check_index)(list, index) < 0)
301
0
    return NULL;
302
64
  if (list->ref != 1)
303
0
    return FN(FN(LIST(EL),get),BASE)(list, index);
304
64
  el = list->p[index];
305
64
  list->p[index] = NULL;
306
64
  return el;
307
64
}
Unexecuted instantiation: isl_aff.c:isl_aff_list_take_aff
Unexecuted instantiation: isl_aff.c:isl_pw_aff_list_take_pw_aff
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_list_take_union_pw_aff
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_list_take_union_pw_multi_aff
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_take_ast_expr
Unexecuted instantiation: isl_ast.c:isl_ast_node_list_take_ast_node
Unexecuted instantiation: isl_ast_graft.c:isl_ast_graft_list_take_ast_graft
Unexecuted instantiation: isl_band.c:isl_band_list_take_band
Unexecuted instantiation: isl_constraint.c:isl_constraint_list_take_constraint
Unexecuted instantiation: isl_id.c:isl_id_list_take_id
Unexecuted instantiation: isl_map_list.c:isl_basic_map_list_take_basic_map
Unexecuted instantiation: isl_map_list.c:isl_map_list_take_map
Unexecuted instantiation: isl_map_list.c:isl_union_map_list_take_union_map
Unexecuted instantiation: isl_schedule_tree.c:isl_schedule_tree_list_take_schedule_tree
isl_set_list.c:isl_basic_set_list_take_basic_set
Line
Count
Source
297
64
{
298
64
  EL *el;
299
64
300
64
  if (FN(LIST(EL),check_index)(list, index) < 0)
301
0
    return NULL;
302
64
  if (list->ref != 1)
303
0
    return FN(FN(LIST(EL),get),BASE)(list, index);
304
64
  el = list->p[index];
305
64
  list->p[index] = NULL;
306
64
  return el;
307
64
}
Unexecuted instantiation: isl_set_list.c:isl_set_list_take_set
Unexecuted instantiation: isl_set_list.c:isl_union_set_list_take_union_set
Unexecuted instantiation: isl_val.c:isl_val_list_take_val
308
309
/* Set the element at position "index" of "list" to "el",
310
 * where the position may be empty due to a previous call
311
 * to isl_list_*_take_*.
312
 */
313
static __isl_give LIST(EL) *FN(FN(LIST(EL),restore),BASE)(
314
  __isl_take LIST(EL) *list, int index, __isl_take EL *el)
315
64
{
316
64
  return FN(FN(LIST(EL),set),BASE)(list, index, el);
317
64
}
Unexecuted instantiation: isl_aff.c:isl_aff_list_restore_aff
Unexecuted instantiation: isl_aff.c:isl_pw_aff_list_restore_pw_aff
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_list_restore_union_pw_aff
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_list_restore_union_pw_multi_aff
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_restore_ast_expr
Unexecuted instantiation: isl_ast.c:isl_ast_node_list_restore_ast_node
Unexecuted instantiation: isl_ast_graft.c:isl_ast_graft_list_restore_ast_graft
Unexecuted instantiation: isl_band.c:isl_band_list_restore_band
Unexecuted instantiation: isl_constraint.c:isl_constraint_list_restore_constraint
Unexecuted instantiation: isl_id.c:isl_id_list_restore_id
Unexecuted instantiation: isl_map_list.c:isl_basic_map_list_restore_basic_map
Unexecuted instantiation: isl_map_list.c:isl_map_list_restore_map
Unexecuted instantiation: isl_map_list.c:isl_union_map_list_restore_union_map
Unexecuted instantiation: isl_schedule_tree.c:isl_schedule_tree_list_restore_schedule_tree
isl_set_list.c:isl_basic_set_list_restore_basic_set
Line
Count
Source
315
64
{
316
64
  return FN(FN(LIST(EL),set),BASE)(list, index, el);
317
64
}
Unexecuted instantiation: isl_set_list.c:isl_set_list_restore_set
Unexecuted instantiation: isl_set_list.c:isl_union_set_list_restore_union_set
Unexecuted instantiation: isl_val.c:isl_val_list_restore_val
318
319
isl_stat FN(LIST(EL),foreach)(__isl_keep LIST(EL) *list,
320
  isl_stat (*fn)(__isl_take EL *el, void *user), void *user)
321
1.52k
{
322
1.52k
  int i;
323
1.52k
324
1.52k
  if (!list)
325
0
    return isl_stat_error;
326
1.52k
327
3.35k
  
for (i = 0; 1.52k
i < list->n;
++i1.83k
) {
328
2.36k
    EL *el = FN(EL,copy)(list->p[i]);
329
2.36k
    if (!el)
330
0
      return isl_stat_error;
331
2.36k
    if (fn(el, user) < 0)
332
533
      return isl_stat_error;
333
2.36k
  }
334
1.52k
335
1.52k
  
return isl_stat_ok991
;
336
1.52k
}
Unexecuted instantiation: isl_aff_list_foreach
isl_pw_aff_list_foreach
Line
Count
Source
321
698
{
322
698
  int i;
323
698
324
698
  if (!list)
325
0
    return isl_stat_error;
326
698
327
872
  
for (i = 0; 698
i < list->n;
++i174
) {
328
707
    EL *el = FN(EL,copy)(list->p[i]);
329
707
    if (!el)
330
0
      return isl_stat_error;
331
707
    if (fn(el, user) < 0)
332
533
      return isl_stat_error;
333
707
  }
334
698
335
698
  
return isl_stat_ok165
;
336
698
}
Unexecuted instantiation: isl_union_pw_aff_list_foreach
Unexecuted instantiation: isl_union_pw_multi_aff_list_foreach
Unexecuted instantiation: isl_ast_expr_list_foreach
Unexecuted instantiation: isl_ast_node_list_foreach
Unexecuted instantiation: isl_ast_graft_list_foreach
Unexecuted instantiation: isl_band_list_foreach
isl_constraint_list_foreach
Line
Count
Source
321
698
{
322
698
  int i;
323
698
324
698
  if (!list)
325
0
    return isl_stat_error;
326
698
327
2.22k
  
for (i = 0; 698
i < list->n;
++i1.52k
) {
328
1.52k
    EL *el = FN(EL,copy)(list->p[i]);
329
1.52k
    if (!el)
330
0
      return isl_stat_error;
331
1.52k
    if (fn(el, user) < 0)
332
0
      return isl_stat_error;
333
1.52k
  }
334
698
335
698
  return isl_stat_ok;
336
698
}
Unexecuted instantiation: isl_id_list_foreach
Unexecuted instantiation: isl_basic_map_list_foreach
Unexecuted instantiation: isl_map_list_foreach
Unexecuted instantiation: isl_union_map_list_foreach
Unexecuted instantiation: isl_schedule_tree_list_foreach
isl_basic_set_list_foreach
Line
Count
Source
321
128
{
322
128
  int i;
323
128
324
128
  if (!list)
325
0
    return isl_stat_error;
326
128
327
256
  
for (i = 0; 128
i < list->n;
++i128
) {
328
128
    EL *el = FN(EL,copy)(list->p[i]);
329
128
    if (!el)
330
0
      return isl_stat_error;
331
128
    if (fn(el, user) < 0)
332
0
      return isl_stat_error;
333
128
  }
334
128
335
128
  return isl_stat_ok;
336
128
}
Unexecuted instantiation: isl_set_list_foreach
Unexecuted instantiation: isl_union_set_list_foreach
Unexecuted instantiation: isl_val_list_foreach
337
338
/* Replace each element in "list" by the result of calling "fn"
339
 * on the element.
340
 */
341
__isl_give LIST(EL) *FN(LIST(EL),map)(__isl_keep LIST(EL) *list,
342
  __isl_give EL *(*fn)(__isl_take EL *el, void *user), void *user)
343
64
{
344
64
  int i, n;
345
64
346
64
  if (!list)
347
0
    return NULL;
348
64
349
64
  n = list->n;
350
128
  for (i = 0; i < n; 
++i64
) {
351
64
    EL *el = FN(FN(LIST(EL),take),BASE)(list, i);
352
64
    if (!el)
353
0
      return FN(LIST(EL),free)(list);
354
64
    el = fn(el, user);
355
64
    list = FN(FN(LIST(EL),restore),BASE)(list, i, el);
356
64
  }
357
64
358
64
  return list;
359
64
}
Unexecuted instantiation: isl_aff_list_map
Unexecuted instantiation: isl_pw_aff_list_map
Unexecuted instantiation: isl_union_pw_aff_list_map
Unexecuted instantiation: isl_union_pw_multi_aff_list_map
Unexecuted instantiation: isl_ast_expr_list_map
Unexecuted instantiation: isl_ast_node_list_map
Unexecuted instantiation: isl_ast_graft_list_map
Unexecuted instantiation: isl_band_list_map
Unexecuted instantiation: isl_constraint_list_map
Unexecuted instantiation: isl_id_list_map
Unexecuted instantiation: isl_basic_map_list_map
Unexecuted instantiation: isl_map_list_map
Unexecuted instantiation: isl_union_map_list_map
Unexecuted instantiation: isl_schedule_tree_list_map
isl_basic_set_list_map
Line
Count
Source
343
64
{
344
64
  int i, n;
345
64
346
64
  if (!list)
347
0
    return NULL;
348
64
349
64
  n = list->n;
350
128
  for (i = 0; i < n; 
++i64
) {
351
64
    EL *el = FN(FN(LIST(EL),take),BASE)(list, i);
352
64
    if (!el)
353
0
      return FN(LIST(EL),free)(list);
354
64
    el = fn(el, user);
355
64
    list = FN(FN(LIST(EL),restore),BASE)(list, i, el);
356
64
  }
357
64
358
64
  return list;
359
64
}
Unexecuted instantiation: isl_set_list_map
Unexecuted instantiation: isl_union_set_list_map
Unexecuted instantiation: isl_val_list_map
360
361
/* Internal data structure for isl_*_list_sort.
362
 *
363
 * "cmp" is the original comparison function.
364
 * "user" is a user provided pointer that should be passed to "cmp".
365
 */
366
S(LIST(EL),sort_data) {
367
  int (*cmp)(__isl_keep EL *a, __isl_keep EL *b, void *user);
368
  void *user;
369
};
370
371
/* Compare two entries of an isl_*_list based on the user provided
372
 * comparison function on pairs of isl_* objects.
373
 */
374
static int FN(LIST(EL),cmp)(const void *a, const void *b, void *user)
375
1.14k
{
376
1.14k
  S(LIST(EL),sort_data) *data = user;
377
1.14k
  EL * const *el1 = a;
378
1.14k
  EL * const *el2 = b;
379
1.14k
380
1.14k
  return data->cmp(*el1, *el2, data->user);
381
1.14k
}
Unexecuted instantiation: isl_aff.c:isl_aff_list_cmp
isl_aff.c:isl_pw_aff_list_cmp
Line
Count
Source
375
83
{
376
83
  S(LIST(EL),sort_data) *data = user;
377
83
  EL * const *el1 = a;
378
83
  EL * const *el2 = b;
379
83
380
83
  return data->cmp(*el1, *el2, data->user);
381
83
}
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_list_cmp
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_list_cmp
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_cmp
Unexecuted instantiation: isl_ast.c:isl_ast_node_list_cmp
isl_ast_graft.c:isl_ast_graft_list_cmp
Line
Count
Source
375
20
{
376
20
  S(LIST(EL),sort_data) *data = user;
377
20
  EL * const *el1 = a;
378
20
  EL * const *el2 = b;
379
20
380
20
  return data->cmp(*el1, *el2, data->user);
381
20
}
Unexecuted instantiation: isl_band.c:isl_band_list_cmp
isl_constraint.c:isl_constraint_list_cmp
Line
Count
Source
375
1.03k
{
376
1.03k
  S(LIST(EL),sort_data) *data = user;
377
1.03k
  EL * const *el1 = a;
378
1.03k
  EL * const *el2 = b;
379
1.03k
380
1.03k
  return data->cmp(*el1, *el2, data->user);
381
1.03k
}
Unexecuted instantiation: isl_id.c:isl_id_list_cmp
Unexecuted instantiation: isl_map_list.c:isl_basic_map_list_cmp
Unexecuted instantiation: isl_map_list.c:isl_map_list_cmp
Unexecuted instantiation: isl_map_list.c:isl_union_map_list_cmp
Unexecuted instantiation: isl_schedule_tree.c:isl_schedule_tree_list_cmp
Unexecuted instantiation: isl_set_list.c:isl_basic_set_list_cmp
Unexecuted instantiation: isl_set_list.c:isl_set_list_cmp
Unexecuted instantiation: isl_set_list.c:isl_union_set_list_cmp
Unexecuted instantiation: isl_val.c:isl_val_list_cmp
382
383
/* Sort the elements of "list" in ascending order according to
384
 * comparison function "cmp".
385
 */
386
__isl_give LIST(EL) *FN(LIST(EL),sort)(__isl_take LIST(EL) *list,
387
  int (*cmp)(__isl_keep EL *a, __isl_keep EL *b, void *user), void *user)
388
1.70k
{
389
1.70k
  S(LIST(EL),sort_data) data = { cmp, user };
390
1.70k
391
1.70k
  if (!list)
392
0
    return NULL;
393
1.70k
  if (list->n <= 1)
394
844
    return list;
395
859
  list = FN(LIST(EL),cow)(list);
396
859
  if (!list)
397
0
    return NULL;
398
859
399
859
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
400
859
      &FN(LIST(EL),cmp), &data) < 0)
401
0
    return FN(LIST(EL),free)(list);
402
859
403
859
  return list;
404
859
}
Unexecuted instantiation: isl_aff_list_sort
isl_pw_aff_list_sort
Line
Count
Source
388
84
{
389
84
  S(LIST(EL),sort_data) data = { cmp, user };
390
84
391
84
  if (!list)
392
0
    return NULL;
393
84
  if (list->n <= 1)
394
11
    return list;
395
73
  list = FN(LIST(EL),cow)(list);
396
73
  if (!list)
397
0
    return NULL;
398
73
399
73
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
400
73
      &FN(LIST(EL),cmp), &data) < 0)
401
0
    return FN(LIST(EL),free)(list);
402
73
403
73
  return list;
404
73
}
Unexecuted instantiation: isl_union_pw_aff_list_sort
Unexecuted instantiation: isl_union_pw_multi_aff_list_sort
Unexecuted instantiation: isl_ast_expr_list_sort
Unexecuted instantiation: isl_ast_node_list_sort
isl_ast_graft_list_sort
Line
Count
Source
388
28
{
389
28
  S(LIST(EL),sort_data) data = { cmp, user };
390
28
391
28
  if (!list)
392
0
    return NULL;
393
28
  if (list->n <= 1)
394
8
    return list;
395
20
  list = FN(LIST(EL),cow)(list);
396
20
  if (!list)
397
0
    return NULL;
398
20
399
20
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
400
20
      &FN(LIST(EL),cmp), &data) < 0)
401
0
    return FN(LIST(EL),free)(list);
402
20
403
20
  return list;
404
20
}
Unexecuted instantiation: isl_band_list_sort
isl_constraint_list_sort
Line
Count
Source
388
1.59k
{
389
1.59k
  S(LIST(EL),sort_data) data = { cmp, user };
390
1.59k
391
1.59k
  if (!list)
392
0
    return NULL;
393
1.59k
  if (list->n <= 1)
394
825
    return list;
395
766
  list = FN(LIST(EL),cow)(list);
396
766
  if (!list)
397
0
    return NULL;
398
766
399
766
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
400
766
      &FN(LIST(EL),cmp), &data) < 0)
401
0
    return FN(LIST(EL),free)(list);
402
766
403
766
  return list;
404
766
}
Unexecuted instantiation: isl_id_list_sort
Unexecuted instantiation: isl_basic_map_list_sort
Unexecuted instantiation: isl_map_list_sort
Unexecuted instantiation: isl_union_map_list_sort
Unexecuted instantiation: isl_schedule_tree_list_sort
Unexecuted instantiation: isl_basic_set_list_sort
Unexecuted instantiation: isl_set_list_sort
Unexecuted instantiation: isl_union_set_list_sort
Unexecuted instantiation: isl_val_list_sort
405
406
/* Internal data structure for isl_*_list_foreach_scc.
407
 *
408
 * "list" is the original list.
409
 * "follows" is the user provided callback that defines the edges of the graph.
410
 */
411
S(LIST(EL),foreach_scc_data) {
412
  LIST(EL) *list;
413
  isl_bool (*follows)(__isl_keep EL *a, __isl_keep EL *b, void *user);
414
  void *follows_user;
415
};
416
417
/* Does element i of data->list follow element j?
418
 *
419
 * Use the user provided callback to find out.
420
 */
421
static isl_bool FN(LIST(EL),follows)(int i, int j, void *user)
422
120
{
423
120
  S(LIST(EL),foreach_scc_data) *data = user;
424
120
425
120
  return data->follows(data->list->p[i], data->list->p[j],
426
120
        data->follows_user);
427
120
}
Unexecuted instantiation: isl_aff.c:isl_aff_list_follows
Unexecuted instantiation: isl_aff.c:isl_pw_aff_list_follows
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_list_follows
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_list_follows
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_follows
Unexecuted instantiation: isl_ast.c:isl_ast_node_list_follows
Unexecuted instantiation: isl_ast_graft.c:isl_ast_graft_list_follows
Unexecuted instantiation: isl_band.c:isl_band_list_follows
Unexecuted instantiation: isl_constraint.c:isl_constraint_list_follows
Unexecuted instantiation: isl_id.c:isl_id_list_follows
Unexecuted instantiation: isl_map_list.c:isl_basic_map_list_follows
Unexecuted instantiation: isl_map_list.c:isl_map_list_follows
Unexecuted instantiation: isl_map_list.c:isl_union_map_list_follows
Unexecuted instantiation: isl_schedule_tree.c:isl_schedule_tree_list_follows
isl_set_list.c:isl_basic_set_list_follows
Line
Count
Source
422
120
{
423
120
  S(LIST(EL),foreach_scc_data) *data = user;
424
120
425
120
  return data->follows(data->list->p[i], data->list->p[j],
426
120
        data->follows_user);
427
120
}
Unexecuted instantiation: isl_set_list.c:isl_set_list_follows
Unexecuted instantiation: isl_set_list.c:isl_union_set_list_follows
Unexecuted instantiation: isl_val.c:isl_val_list_follows
428
429
/* Call "fn" on the sublist of "list" that consists of the elements
430
 * with indices specified by the "n" elements of "pos".
431
 */
432
static isl_stat FN(LIST(EL),call_on_scc)(__isl_keep LIST(EL) *list, int *pos,
433
  int n, isl_stat (*fn)(__isl_take LIST(EL) *scc, void *user), void *user)
434
90
{
435
90
  int i;
436
90
  isl_ctx *ctx;
437
90
  LIST(EL) *slice;
438
90
439
90
  ctx = FN(LIST(EL),get_ctx)(list);
440
90
  slice = FN(LIST(EL),alloc)(ctx, n);
441
180
  for (i = 0; i < n; 
++i90
) {
442
90
    EL *el;
443
90
444
90
    el = FN(EL,copy)(list->p[pos[i]]);
445
90
    slice = FN(LIST(EL),add)(slice, el);
446
90
  }
447
90
448
90
  return fn(slice, user);
449
90
}
Unexecuted instantiation: isl_aff.c:isl_aff_list_call_on_scc
Unexecuted instantiation: isl_aff.c:isl_pw_aff_list_call_on_scc
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_list_call_on_scc
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_list_call_on_scc
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_call_on_scc
Unexecuted instantiation: isl_ast.c:isl_ast_node_list_call_on_scc
Unexecuted instantiation: isl_ast_graft.c:isl_ast_graft_list_call_on_scc
Unexecuted instantiation: isl_band.c:isl_band_list_call_on_scc
Unexecuted instantiation: isl_constraint.c:isl_constraint_list_call_on_scc
Unexecuted instantiation: isl_id.c:isl_id_list_call_on_scc
Unexecuted instantiation: isl_map_list.c:isl_basic_map_list_call_on_scc
Unexecuted instantiation: isl_map_list.c:isl_map_list_call_on_scc
Unexecuted instantiation: isl_map_list.c:isl_union_map_list_call_on_scc
Unexecuted instantiation: isl_schedule_tree.c:isl_schedule_tree_list_call_on_scc
isl_set_list.c:isl_basic_set_list_call_on_scc
Line
Count
Source
434
90
{
435
90
  int i;
436
90
  isl_ctx *ctx;
437
90
  LIST(EL) *slice;
438
90
439
90
  ctx = FN(LIST(EL),get_ctx)(list);
440
90
  slice = FN(LIST(EL),alloc)(ctx, n);
441
180
  for (i = 0; i < n; 
++i90
) {
442
90
    EL *el;
443
90
444
90
    el = FN(EL,copy)(list->p[pos[i]]);
445
90
    slice = FN(LIST(EL),add)(slice, el);
446
90
  }
447
90
448
90
  return fn(slice, user);
449
90
}
Unexecuted instantiation: isl_set_list.c:isl_set_list_call_on_scc
Unexecuted instantiation: isl_set_list.c:isl_union_set_list_call_on_scc
Unexecuted instantiation: isl_val.c:isl_val_list_call_on_scc
450
451
/* Call "fn" on each of the strongly connected components (SCCs) of
452
 * the graph with as vertices the elements of "list" and
453
 * a directed edge from node b to node a iff follows(a, b)
454
 * returns 1.  follows should return -1 on error.
455
 *
456
 * If SCC a contains a node i that follows a node j in another SCC b
457
 * (i.e., follows(i, j, user) returns 1), then fn will be called on SCC a
458
 * after being called on SCC b.
459
 *
460
 * We simply call isl_tarjan_graph_init, extract the SCCs from the result and
461
 * call fn on each of them.
462
 */
463
isl_stat FN(LIST(EL),foreach_scc)(__isl_keep LIST(EL) *list,
464
  isl_bool (*follows)(__isl_keep EL *a, __isl_keep EL *b, void *user),
465
  void *follows_user,
466
  isl_stat (*fn)(__isl_take LIST(EL) *scc, void *user), void *fn_user)
467
54
{
468
54
  S(LIST(EL),foreach_scc_data) data = { list, follows, follows_user };
469
54
  int i, n;
470
54
  isl_ctx *ctx;
471
54
  struct isl_tarjan_graph *g;
472
54
473
54
  if (!list)
474
0
    return isl_stat_error;
475
54
  if (list->n == 0)
476
0
    return isl_stat_ok;
477
54
  if (list->n == 1)
478
0
    return fn(FN(LIST(EL),copy)(list), fn_user);
479
54
480
54
  ctx = FN(LIST(EL),get_ctx)(list);
481
54
  n = list->n;
482
54
  g = isl_tarjan_graph_init(ctx, n, &FN(LIST(EL),follows), &data);
483
54
  if (!g)
484
0
    return isl_stat_error;
485
54
486
54
  i = 0;
487
103
  do {
488
103
    int first;
489
103
490
103
    if (g->order[i] == -1)
491
103
      
isl_die0
(ctx, isl_error_internal, "cannot happen",
492
103
        break);
493
103
    first = i;
494
225
    while (g->order[i] != -1) {
495
122
      ++i; --n;
496
122
    }
497
103
    if (first == 0 && 
n == 054
) {
498
13
      isl_tarjan_graph_free(g);
499
13
      return fn(FN(LIST(EL),copy)(list), fn_user);
500
13
    }
501
90
    if (FN(LIST(EL),call_on_scc)(list, g->order + first, i - first,
502
90
              fn, fn_user) < 0)
503
0
      break;
504
90
    ++i;
505
90
  } while (n);
506
54
507
54
  isl_tarjan_graph_free(g);
508
41
509
41
  return n > 0 ? 
isl_stat_error0
: isl_stat_ok;
510
54
}
Unexecuted instantiation: isl_aff_list_foreach_scc
Unexecuted instantiation: isl_pw_aff_list_foreach_scc
Unexecuted instantiation: isl_union_pw_aff_list_foreach_scc
Unexecuted instantiation: isl_union_pw_multi_aff_list_foreach_scc
Unexecuted instantiation: isl_ast_expr_list_foreach_scc
Unexecuted instantiation: isl_ast_node_list_foreach_scc
Unexecuted instantiation: isl_ast_graft_list_foreach_scc
Unexecuted instantiation: isl_band_list_foreach_scc
Unexecuted instantiation: isl_constraint_list_foreach_scc
Unexecuted instantiation: isl_id_list_foreach_scc
Unexecuted instantiation: isl_basic_map_list_foreach_scc
Unexecuted instantiation: isl_map_list_foreach_scc
Unexecuted instantiation: isl_union_map_list_foreach_scc
Unexecuted instantiation: isl_schedule_tree_list_foreach_scc
isl_basic_set_list_foreach_scc
Line
Count
Source
467
54
{
468
54
  S(LIST(EL),foreach_scc_data) data = { list, follows, follows_user };
469
54
  int i, n;
470
54
  isl_ctx *ctx;
471
54
  struct isl_tarjan_graph *g;
472
54
473
54
  if (!list)
474
0
    return isl_stat_error;
475
54
  if (list->n == 0)
476
0
    return isl_stat_ok;
477
54
  if (list->n == 1)
478
0
    return fn(FN(LIST(EL),copy)(list), fn_user);
479
54
480
54
  ctx = FN(LIST(EL),get_ctx)(list);
481
54
  n = list->n;
482
54
  g = isl_tarjan_graph_init(ctx, n, &FN(LIST(EL),follows), &data);
483
54
  if (!g)
484
0
    return isl_stat_error;
485
54
486
54
  i = 0;
487
103
  do {
488
103
    int first;
489
103
490
103
    if (g->order[i] == -1)
491
103
      
isl_die0
(ctx, isl_error_internal, "cannot happen",
492
103
        break);
493
103
    first = i;
494
225
    while (g->order[i] != -1) {
495
122
      ++i; --n;
496
122
    }
497
103
    if (first == 0 && 
n == 054
) {
498
13
      isl_tarjan_graph_free(g);
499
13
      return fn(FN(LIST(EL),copy)(list), fn_user);
500
13
    }
501
90
    if (FN(LIST(EL),call_on_scc)(list, g->order + first, i - first,
502
90
              fn, fn_user) < 0)
503
0
      break;
504
90
    ++i;
505
90
  } while (n);
506
54
507
54
  isl_tarjan_graph_free(g);
508
41
509
41
  return n > 0 ? 
isl_stat_error0
: isl_stat_ok;
510
54
}
Unexecuted instantiation: isl_set_list_foreach_scc
Unexecuted instantiation: isl_union_set_list_foreach_scc
Unexecuted instantiation: isl_val_list_foreach_scc
511
512
__isl_give LIST(EL) *FN(FN(LIST(EL),from),BASE)(__isl_take EL *el)
513
30.1k
{
514
30.1k
  isl_ctx *ctx;
515
30.1k
  LIST(EL) *list;
516
30.1k
517
30.1k
  if (!el)
518
1
    return NULL;
519
30.1k
  ctx = FN(EL,get_ctx)(el);
520
30.1k
  list = FN(LIST(EL),alloc)(ctx, 1);
521
30.1k
  if (!list)
522
0
    goto error;
523
30.1k
  list = FN(LIST(EL),add)(list, el);
524
30.1k
  return list;
525
30.1k
error:
526
0
  FN(EL,free)(el);
527
0
  return NULL;
528
30.1k
}
isl_aff_list_from_aff
Line
Count
Source
513
7.89k
{
514
7.89k
  isl_ctx *ctx;
515
7.89k
  LIST(EL) *list;
516
7.89k
517
7.89k
  if (!el)
518
0
    return NULL;
519
7.89k
  ctx = FN(EL,get_ctx)(el);
520
7.89k
  list = FN(LIST(EL),alloc)(ctx, 1);
521
7.89k
  if (!list)
522
0
    goto error;
523
7.89k
  list = FN(LIST(EL),add)(list, el);
524
7.89k
  return list;
525
7.89k
error:
526
0
  FN(EL,free)(el);
527
0
  return NULL;
528
7.89k
}
isl_pw_aff_list_from_pw_aff
Line
Count
Source
513
8.03k
{
514
8.03k
  isl_ctx *ctx;
515
8.03k
  LIST(EL) *list;
516
8.03k
517
8.03k
  if (!el)
518
1
    return NULL;
519
8.02k
  ctx = FN(EL,get_ctx)(el);
520
8.02k
  list = FN(LIST(EL),alloc)(ctx, 1);
521
8.02k
  if (!list)
522
0
    goto error;
523
8.02k
  list = FN(LIST(EL),add)(list, el);
524
8.02k
  return list;
525
8.02k
error:
526
0
  FN(EL,free)(el);
527
0
  return NULL;
528
8.03k
}
Unexecuted instantiation: isl_union_pw_aff_list_from_union_pw_aff
isl_union_pw_multi_aff_list_from_union_pw_multi_aff
Line
Count
Source
513
7
{
514
7
  isl_ctx *ctx;
515
7
  LIST(EL) *list;
516
7
517
7
  if (!el)
518
0
    return NULL;
519
7
  ctx = FN(EL,get_ctx)(el);
520
7
  list = FN(LIST(EL),alloc)(ctx, 1);
521
7
  if (!list)
522
0
    goto error;
523
7
  list = FN(LIST(EL),add)(list, el);
524
7
  return list;
525
7
error:
526
0
  FN(EL,free)(el);
527
0
  return NULL;
528
7
}
Unexecuted instantiation: isl_ast_expr_list_from_ast_expr
isl_ast_node_list_from_ast_node
Line
Count
Source
513
61
{
514
61
  isl_ctx *ctx;
515
61
  LIST(EL) *list;
516
61
517
61
  if (!el)
518
0
    return NULL;
519
61
  ctx = FN(EL,get_ctx)(el);
520
61
  list = FN(LIST(EL),alloc)(ctx, 1);
521
61
  if (!list)
522
0
    goto error;
523
61
  list = FN(LIST(EL),add)(list, el);
524
61
  return list;
525
61
error:
526
0
  FN(EL,free)(el);
527
0
  return NULL;
528
61
}
isl_ast_graft_list_from_ast_graft
Line
Count
Source
513
2.12k
{
514
2.12k
  isl_ctx *ctx;
515
2.12k
  LIST(EL) *list;
516
2.12k
517
2.12k
  if (!el)
518
0
    return NULL;
519
2.12k
  ctx = FN(EL,get_ctx)(el);
520
2.12k
  list = FN(LIST(EL),alloc)(ctx, 1);
521
2.12k
  if (!list)
522
0
    goto error;
523
2.12k
  list = FN(LIST(EL),add)(list, el);
524
2.12k
  return list;
525
2.12k
error:
526
0
  FN(EL,free)(el);
527
0
  return NULL;
528
2.12k
}
isl_band_list_from_band
Line
Count
Source
513
6
{
514
6
  isl_ctx *ctx;
515
6
  LIST(EL) *list;
516
6
517
6
  if (!el)
518
0
    return NULL;
519
6
  ctx = FN(EL,get_ctx)(el);
520
6
  list = FN(LIST(EL),alloc)(ctx, 1);
521
6
  if (!list)
522
0
    goto error;
523
6
  list = FN(LIST(EL),add)(list, el);
524
6
  return list;
525
6
error:
526
0
  FN(EL,free)(el);
527
0
  return NULL;
528
6
}
Unexecuted instantiation: isl_constraint_list_from_constraint
Unexecuted instantiation: isl_id_list_from_id
Unexecuted instantiation: isl_basic_map_list_from_basic_map
Unexecuted instantiation: isl_map_list_from_map
isl_union_map_list_from_union_map
Line
Count
Source
513
1
{
514
1
  isl_ctx *ctx;
515
1
  LIST(EL) *list;
516
1
517
1
  if (!el)
518
0
    return NULL;
519
1
  ctx = FN(EL,get_ctx)(el);
520
1
  list = FN(LIST(EL),alloc)(ctx, 1);
521
1
  if (!list)
522
0
    goto error;
523
1
  list = FN(LIST(EL),add)(list, el);
524
1
  return list;
525
1
error:
526
0
  FN(EL,free)(el);
527
0
  return NULL;
528
1
}
isl_schedule_tree_list_from_schedule_tree
Line
Count
Source
513
3.75k
{
514
3.75k
  isl_ctx *ctx;
515
3.75k
  LIST(EL) *list;
516
3.75k
517
3.75k
  if (!el)
518
0
    return NULL;
519
3.75k
  ctx = FN(EL,get_ctx)(el);
520
3.75k
  list = FN(LIST(EL),alloc)(ctx, 1);
521
3.75k
  if (!list)
522
0
    goto error;
523
3.75k
  list = FN(LIST(EL),add)(list, el);
524
3.75k
  return list;
525
3.75k
error:
526
0
  FN(EL,free)(el);
527
0
  return NULL;
528
3.75k
}
isl_basic_set_list_from_basic_set
Line
Count
Source
513
16
{
514
16
  isl_ctx *ctx;
515
16
  LIST(EL) *list;
516
16
517
16
  if (!el)
518
0
    return NULL;
519
16
  ctx = FN(EL,get_ctx)(el);
520
16
  list = FN(LIST(EL),alloc)(ctx, 1);
521
16
  if (!list)
522
0
    goto error;
523
16
  list = FN(LIST(EL),add)(list, el);
524
16
  return list;
525
16
error:
526
0
  FN(EL,free)(el);
527
0
  return NULL;
528
16
}
isl_set_list_from_set
Line
Count
Source
513
7.89k
{
514
7.89k
  isl_ctx *ctx;
515
7.89k
  LIST(EL) *list;
516
7.89k
517
7.89k
  if (!el)
518
0
    return NULL;
519
7.89k
  ctx = FN(EL,get_ctx)(el);
520
7.89k
  list = FN(LIST(EL),alloc)(ctx, 1);
521
7.89k
  if (!list)
522
0
    goto error;
523
7.89k
  list = FN(LIST(EL),add)(list, el);
524
7.89k
  return list;
525
7.89k
error:
526
0
  FN(EL,free)(el);
527
0
  return NULL;
528
7.89k
}
isl_union_set_list_from_union_set
Line
Count
Source
513
356
{
514
356
  isl_ctx *ctx;
515
356
  LIST(EL) *list;
516
356
517
356
  if (!el)
518
0
    return NULL;
519
356
  ctx = FN(EL,get_ctx)(el);
520
356
  list = FN(LIST(EL),alloc)(ctx, 1);
521
356
  if (!list)
522
0
    goto error;
523
356
  list = FN(LIST(EL),add)(list, el);
524
356
  return list;
525
356
error:
526
0
  FN(EL,free)(el);
527
0
  return NULL;
528
356
}
isl_val_list_from_val
Line
Count
Source
513
4
{
514
4
  isl_ctx *ctx;
515
4
  LIST(EL) *list;
516
4
517
4
  if (!el)
518
0
    return NULL;
519
4
  ctx = FN(EL,get_ctx)(el);
520
4
  list = FN(LIST(EL),alloc)(ctx, 1);
521
4
  if (!list)
522
0
    goto error;
523
4
  list = FN(LIST(EL),add)(list, el);
524
4
  return list;
525
4
error:
526
0
  FN(EL,free)(el);
527
0
  return NULL;
528
4
}
529
530
/* Append the elements of "list2" to "list1", where "list1" is known
531
 * to have only a single reference and enough room to hold
532
 * the extra elements.
533
 */
534
static __isl_give LIST(EL) *FN(LIST(EL),concat_inplace)(
535
  __isl_take LIST(EL) *list1, __isl_take LIST(EL) *list2)
536
2.00k
{
537
2.00k
  int i;
538
2.00k
539
2.06k
  for (i = 0; i < list2->n; 
++i64
)
540
2.00k
    
list1 = 64
FN64
(LIST(EL),add)(list1,
FN64
(EL,copy)(list2->p[i]));
541
2.00k
  FN(LIST(EL),free)(list2);
542
2.00k
  return list1;
543
2.00k
}
Unexecuted instantiation: isl_aff.c:isl_aff_list_concat_inplace
Unexecuted instantiation: isl_aff.c:isl_pw_aff_list_concat_inplace
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_list_concat_inplace
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_list_concat_inplace
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_concat_inplace
Unexecuted instantiation: isl_ast.c:isl_ast_node_list_concat_inplace
isl_ast_graft.c:isl_ast_graft_list_concat_inplace
Line
Count
Source
536
1.89k
{
537
1.89k
  int i;
538
1.89k
539
1.89k
  for (i = 0; i < list2->n; 
++i0
)
540
1.89k
    
list1 = 0
FN0
(LIST(EL),add)(list1,
FN0
(EL,copy)(list2->p[i]));
541
1.89k
  FN(LIST(EL),free)(list2);
542
1.89k
  return list1;
543
1.89k
}
Unexecuted instantiation: isl_band.c:isl_band_list_concat_inplace
Unexecuted instantiation: isl_constraint.c:isl_constraint_list_concat_inplace
Unexecuted instantiation: isl_id.c:isl_id_list_concat_inplace
isl_map_list.c:isl_basic_map_list_concat_inplace
Line
Count
Source
536
61
{
537
61
  int i;
538
61
539
61
  for (i = 0; i < list2->n; 
++i0
)
540
61
    
list1 = 0
FN0
(LIST(EL),add)(list1,
FN0
(EL,copy)(list2->p[i]));
541
61
  FN(LIST(EL),free)(list2);
542
61
  return list1;
543
61
}
Unexecuted instantiation: isl_map_list.c:isl_map_list_concat_inplace
Unexecuted instantiation: isl_map_list.c:isl_union_map_list_concat_inplace
Unexecuted instantiation: isl_schedule_tree.c:isl_schedule_tree_list_concat_inplace
isl_set_list.c:isl_basic_set_list_concat_inplace
Line
Count
Source
536
44
{
537
44
  int i;
538
44
539
108
  for (i = 0; i < list2->n; 
++i64
)
540
64
    list1 = FN(LIST(EL),add)(list1, FN(EL,copy)(list2->p[i]));
541
44
  FN(LIST(EL),free)(list2);
542
44
  return list1;
543
44
}
Unexecuted instantiation: isl_set_list.c:isl_set_list_concat_inplace
Unexecuted instantiation: isl_set_list.c:isl_union_set_list_concat_inplace
Unexecuted instantiation: isl_val.c:isl_val_list_concat_inplace
544
545
/* Concatenate "list1" and "list2".
546
 * If "list1" has only one reference and has enough room
547
 * for the elements of "list2", the add the elements to "list1" itself.
548
 * Otherwise, create a new list to store the result.
549
 */
550
__isl_give LIST(EL) *FN(LIST(EL),concat)(__isl_take LIST(EL) *list1,
551
  __isl_take LIST(EL) *list2)
552
7.98k
{
553
7.98k
  int i;
554
7.98k
  isl_ctx *ctx;
555
7.98k
  LIST(EL) *res;
556
7.98k
557
7.98k
  if (!list1 || !list2)
558
0
    goto error;
559
7.98k
560
7.98k
  if (list1->ref == 1 && 
list1->n + list2->n <= list1->size7.36k
)
561
2.00k
    return FN(LIST(EL),concat_inplace)(list1, list2);
562
5.98k
563
5.98k
  ctx = FN(LIST(EL),get_ctx)(list1);
564
5.98k
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
565
17.3k
  for (i = 0; i < list1->n; 
++i11.3k
)
566
11.3k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
567
14.7k
  for (i = 0; i < list2->n; 
++i8.73k
)
568
8.73k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
569
5.98k
570
5.98k
  FN(LIST(EL),free)(list1);
571
5.98k
  FN(LIST(EL),free)(list2);
572
5.98k
  return res;
573
5.98k
error:
574
0
  FN(LIST(EL),free)(list1);
575
0
  FN(LIST(EL),free)(list2);
576
0
  return NULL;
577
7.98k
}
Unexecuted instantiation: isl_aff_list_concat
isl_pw_aff_list_concat
Line
Count
Source
552
137
{
553
137
  int i;
554
137
  isl_ctx *ctx;
555
137
  LIST(EL) *res;
556
137
557
137
  if (!list1 || !list2)
558
0
    goto error;
559
137
560
137
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
561
0
    return FN(LIST(EL),concat_inplace)(list1, list2);
562
137
563
137
  ctx = FN(LIST(EL),get_ctx)(list1);
564
137
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
565
321
  for (i = 0; i < list1->n; 
++i184
)
566
184
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
567
274
  for (i = 0; i < list2->n; 
++i137
)
568
137
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
569
137
570
137
  FN(LIST(EL),free)(list1);
571
137
  FN(LIST(EL),free)(list2);
572
137
  return res;
573
137
error:
574
0
  FN(LIST(EL),free)(list1);
575
0
  FN(LIST(EL),free)(list2);
576
0
  return NULL;
577
137
}
Unexecuted instantiation: isl_union_pw_aff_list_concat
Unexecuted instantiation: isl_union_pw_multi_aff_list_concat
Unexecuted instantiation: isl_ast_expr_list_concat
Unexecuted instantiation: isl_ast_node_list_concat
isl_ast_graft_list_concat
Line
Count
Source
552
5.31k
{
553
5.31k
  int i;
554
5.31k
  isl_ctx *ctx;
555
5.31k
  LIST(EL) *res;
556
5.31k
557
5.31k
  if (!list1 || !list2)
558
0
    goto error;
559
5.31k
560
5.31k
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
561
1.89k
    return FN(LIST(EL),concat_inplace)(list1, list2);
562
3.41k
563
3.41k
  ctx = FN(LIST(EL),get_ctx)(list1);
564
3.41k
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
565
3.67k
  for (i = 0; i < list1->n; 
++i257
)
566
3.41k
    
res = 257
FN257
(LIST(EL),add)(res,
FN257
(EL,copy)(list1->p[i]));
567
7.62k
  for (i = 0; i < list2->n; 
++i4.21k
)
568
4.21k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
569
3.41k
570
3.41k
  FN(LIST(EL),free)(list1);
571
3.41k
  FN(LIST(EL),free)(list2);
572
3.41k
  return res;
573
3.41k
error:
574
0
  FN(LIST(EL),free)(list1);
575
0
  FN(LIST(EL),free)(list2);
576
0
  return NULL;
577
5.31k
}
isl_band_list_concat
Line
Count
Source
552
4
{
553
4
  int i;
554
4
  isl_ctx *ctx;
555
4
  LIST(EL) *res;
556
4
557
4
  if (!list1 || !list2)
558
0
    goto error;
559
4
560
4
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
561
0
    return FN(LIST(EL),concat_inplace)(list1, list2);
562
4
563
4
  ctx = FN(LIST(EL),get_ctx)(list1);
564
4
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
565
6
  for (i = 0; i < list1->n; 
++i2
)
566
4
    
res = 2
FN2
(LIST(EL),add)(res,
FN2
(EL,copy)(list1->p[i]));
567
8
  for (i = 0; i < list2->n; 
++i4
)
568
4
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
569
4
570
4
  FN(LIST(EL),free)(list1);
571
4
  FN(LIST(EL),free)(list2);
572
4
  return res;
573
4
error:
574
0
  FN(LIST(EL),free)(list1);
575
0
  FN(LIST(EL),free)(list2);
576
0
  return NULL;
577
4
}
Unexecuted instantiation: isl_constraint_list_concat
isl_id_list_concat
Line
Count
Source
552
619
{
553
619
  int i;
554
619
  isl_ctx *ctx;
555
619
  LIST(EL) *res;
556
619
557
619
  if (!list1 || !list2)
558
0
    goto error;
559
619
560
619
  if (list1->ref == 1 && 
list1->n + list2->n <= list1->size0
)
561
0
    return FN(LIST(EL),concat_inplace)(list1, list2);
562
619
563
619
  ctx = FN(LIST(EL),get_ctx)(list1);
564
619
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
565
1.13k
  for (i = 0; i < list1->n; 
++i516
)
566
619
    
res = 516
FN516
(LIST(EL),add)(res,
FN516
(EL,copy)(list1->p[i]));
567
1.48k
  for (i = 0; i < list2->n; 
++i870
)
568
870
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
569
619
570
619
  FN(LIST(EL),free)(list1);
571
619
  FN(LIST(EL),free)(list2);
572
619
  return res;
573
619
error:
574
0
  FN(LIST(EL),free)(list1);
575
0
  FN(LIST(EL),free)(list2);
576
0
  return NULL;
577
619
}
isl_basic_map_list_concat
Line
Count
Source
552
1.77k
{
553
1.77k
  int i;
554
1.77k
  isl_ctx *ctx;
555
1.77k
  LIST(EL) *res;
556
1.77k
557
1.77k
  if (!list1 || !list2)
558
0
    goto error;
559
1.77k
560
1.77k
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
561
61
    return FN(LIST(EL),concat_inplace)(list1, list2);
562
1.71k
563
1.71k
  ctx = FN(LIST(EL),get_ctx)(list1);
564
1.71k
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
565
12.1k
  for (i = 0; i < list1->n; 
++i10.4k
)
566
10.4k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
567
5.13k
  for (i = 0; i < list2->n; 
++i3.41k
)
568
3.41k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
569
1.71k
570
1.71k
  FN(LIST(EL),free)(list1);
571
1.71k
  FN(LIST(EL),free)(list2);
572
1.71k
  return res;
573
1.71k
error:
574
0
  FN(LIST(EL),free)(list1);
575
0
  FN(LIST(EL),free)(list2);
576
0
  return NULL;
577
1.77k
}
Unexecuted instantiation: isl_map_list_concat
Unexecuted instantiation: isl_union_map_list_concat
Unexecuted instantiation: isl_schedule_tree_list_concat
isl_basic_set_list_concat
Line
Count
Source
552
135
{
553
135
  int i;
554
135
  isl_ctx *ctx;
555
135
  LIST(EL) *res;
556
135
557
135
  if (!list1 || !list2)
558
0
    goto error;
559
135
560
135
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
561
44
    return FN(LIST(EL),concat_inplace)(list1, list2);
562
91
563
91
  ctx = FN(LIST(EL),get_ctx)(list1);
564
91
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
565
105
  for (i = 0; i < list1->n; 
++i14
)
566
91
    
res = 14
FN14
(LIST(EL),add)(res,
FN14
(EL,copy)(list1->p[i]));
567
183
  for (i = 0; i < list2->n; 
++i92
)
568
92
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
569
91
570
91
  FN(LIST(EL),free)(list1);
571
91
  FN(LIST(EL),free)(list2);
572
91
  return res;
573
91
error:
574
0
  FN(LIST(EL),free)(list1);
575
0
  FN(LIST(EL),free)(list2);
576
0
  return NULL;
577
135
}
Unexecuted instantiation: isl_set_list_concat
Unexecuted instantiation: isl_union_set_list_concat
Unexecuted instantiation: isl_val_list_concat
578
579
__isl_give isl_printer *CAT(isl_printer_print_,LIST(BASE))(
580
  __isl_take isl_printer *p, __isl_keep LIST(EL) *list)
581
0
{
582
0
  int i;
583
0
584
0
  if (!p || !list)
585
0
    goto error;
586
0
  p = isl_printer_print_str(p, "(");
587
0
  for (i = 0; i < list->n; ++i) {
588
0
    if (i)
589
0
      p = isl_printer_print_str(p, ",");
590
0
    p = CAT(isl_printer_print_,BASE)(p, list->p[i]);
591
0
  }
592
0
  p = isl_printer_print_str(p, ")");
593
0
  return p;
594
0
error:
595
0
  isl_printer_free(p);
596
0
  return NULL;
597
0
}
Unexecuted instantiation: isl_printer_print_aff_list
Unexecuted instantiation: isl_printer_print_pw_aff_list
Unexecuted instantiation: isl_printer_print_union_pw_aff_list
Unexecuted instantiation: isl_printer_print_union_pw_multi_aff_list
Unexecuted instantiation: isl_printer_print_ast_expr_list
Unexecuted instantiation: isl_printer_print_ast_node_list
Unexecuted instantiation: isl_printer_print_ast_graft_list
Unexecuted instantiation: isl_printer_print_band_list
Unexecuted instantiation: isl_printer_print_constraint_list
Unexecuted instantiation: isl_printer_print_id_list
Unexecuted instantiation: isl_printer_print_basic_map_list
Unexecuted instantiation: isl_printer_print_map_list
Unexecuted instantiation: isl_printer_print_union_map_list
Unexecuted instantiation: isl_printer_print_schedule_tree_list
Unexecuted instantiation: isl_printer_print_basic_set_list
Unexecuted instantiation: isl_printer_print_set_list
Unexecuted instantiation: isl_printer_print_union_set_list
Unexecuted instantiation: isl_printer_print_val_list
598
599
void FN(LIST(EL),dump)(__isl_keep LIST(EL) *list)
600
0
{
601
0
  isl_printer *printer;
602
0
603
0
  if (!list)
604
0
    return;
605
0
606
0
  printer = isl_printer_to_file(FN(LIST(EL),get_ctx)(list), stderr);
607
0
  printer = CAT(isl_printer_print_,LIST(BASE))(printer, list);
608
0
  printer = isl_printer_end_line(printer);
609
0
610
0
  isl_printer_free(printer);
611
0
}
Unexecuted instantiation: isl_aff_list_dump
Unexecuted instantiation: isl_pw_aff_list_dump
Unexecuted instantiation: isl_union_pw_aff_list_dump
Unexecuted instantiation: isl_union_pw_multi_aff_list_dump
Unexecuted instantiation: isl_ast_expr_list_dump
Unexecuted instantiation: isl_ast_node_list_dump
Unexecuted instantiation: isl_ast_graft_list_dump
Unexecuted instantiation: isl_band_list_dump
Unexecuted instantiation: isl_constraint_list_dump
Unexecuted instantiation: isl_id_list_dump
Unexecuted instantiation: isl_basic_map_list_dump
Unexecuted instantiation: isl_map_list_dump
Unexecuted instantiation: isl_union_map_list_dump
Unexecuted instantiation: isl_schedule_tree_list_dump
Unexecuted instantiation: isl_basic_set_list_dump
Unexecuted instantiation: isl_set_list_dump
Unexecuted instantiation: isl_union_set_list_dump
Unexecuted instantiation: isl_val_list_dump