Coverage Report

Created: 2018-06-19 22:08

/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
#include <isl/printer.h>
19
20
4.82k
#define xCAT(A,B) A ## B
21
4.82k
#define CAT(A,B) xCAT(A,B)
22
#undef EL
23
4.82k
#define EL CAT(isl_,BASE)
24
3.75M
#define xFN(TYPE,NAME) TYPE ## _ ## NAME
25
3.71M
#define FN(TYPE,NAME) xFN(TYPE,NAME)
26
602k
#define xLIST(EL) EL ## _list
27
602k
#define LIST(EL) xLIST(EL)
28
2.99k
#define xS(TYPE,NAME) struct TYPE ## _ ## NAME
29
2.99k
#define S(TYPE,NAME) xS(TYPE,NAME)
30
31
isl_ctx *FN(LIST(EL),get_ctx)(__isl_keep LIST(EL) *list)
32
98.0k
{
33
98.0k
  return list ? list->ctx : NULL;
34
98.0k
}
isl_aff_list_get_ctx
Line
Count
Source
32
20
{
33
20
  return list ? list->ctx : NULL;
34
20
}
isl_pw_aff_list_get_ctx
Line
Count
Source
32
11.6k
{
33
11.6k
  return list ? list->ctx : NULL;
34
11.6k
}
Unexecuted instantiation: isl_pw_multi_aff_list_get_ctx
isl_union_pw_aff_list_get_ctx
Line
Count
Source
32
116
{
33
116
  return list ? list->ctx : NULL;
34
116
}
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
32
520
{
33
520
  return list ? list->ctx : NULL;
34
520
}
isl_ast_graft_list_get_ctx
Line
Count
Source
32
11.7k
{
33
11.7k
  return list ? list->ctx : NULL;
34
11.7k
}
isl_constraint_list_get_ctx
Line
Count
Source
32
1.12k
{
33
1.12k
  return list ? list->ctx : NULL;
34
1.12k
}
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_get_ctx
isl_id_list_get_ctx
Line
Count
Source
32
627
{
33
627
  return list ? list->ctx : NULL;
34
627
}
isl_basic_map_list_get_ctx
Line
Count
Source
32
1.75k
{
33
1.75k
  return list ? list->ctx : NULL;
34
1.75k
}
isl_map_list_get_ctx
Line
Count
Source
32
811
{
33
811
  return list ? list->ctx : NULL;
34
811
}
isl_union_map_list_get_ctx
Line
Count
Source
32
1
{
33
1
  return list ? list->ctx : NULL;
34
1
}
Unexecuted instantiation: isl_pw_qpolynomial_list_get_ctx
isl_schedule_tree_list_get_ctx
Line
Count
Source
32
68.1k
{
33
68.1k
  return list ? list->ctx : NULL;
34
68.1k
}
isl_basic_set_list_get_ctx
Line
Count
Source
32
1.17k
{
33
1.17k
  return list ? list->ctx : NULL;
34
1.17k
}
isl_set_list_get_ctx
Line
Count
Source
32
20
{
33
20
  return list ? list->ctx : NULL;
34
20
}
isl_union_set_list_get_ctx
Line
Count
Source
32
260
{
33
260
  return list ? list->ctx : NULL;
34
260
}
isl_val_list_get_ctx
Line
Count
Source
32
8
{
33
8
  return list ? list->ctx : NULL;
34
8
}
35
36
__isl_give LIST(EL) *FN(LIST(EL),alloc)(isl_ctx *ctx, int n)
37
149k
{
38
149k
  LIST(EL) *list;
39
149k
40
149k
  if (n < 0)
41
149k
    
isl_die0
(ctx, isl_error_invalid,
42
149k
      "cannot create list of negative length",
43
149k
      return NULL);
44
149k
  list = isl_alloc(ctx, LIST(EL),
45
149k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
149k
  if (!list)
47
0
    return NULL;
48
149k
49
149k
  list->ctx = ctx;
50
149k
  isl_ctx_ref(ctx);
51
149k
  list->ref = 1;
52
149k
  list->size = n;
53
149k
  list->n = 0;
54
149k
  return list;
55
149k
}
isl_aff_list_alloc
Line
Count
Source
37
8.31k
{
38
8.31k
  LIST(EL) *list;
39
8.31k
40
8.31k
  if (n < 0)
41
8.31k
    
isl_die0
(ctx, isl_error_invalid,
42
8.31k
      "cannot create list of negative length",
43
8.31k
      return NULL);
44
8.31k
  list = isl_alloc(ctx, LIST(EL),
45
8.31k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
8.31k
  if (!list)
47
0
    return NULL;
48
8.31k
49
8.31k
  list->ctx = ctx;
50
8.31k
  isl_ctx_ref(ctx);
51
8.31k
  list->ref = 1;
52
8.31k
  list->size = n;
53
8.31k
  list->n = 0;
54
8.31k
  return list;
55
8.31k
}
isl_pw_aff_list_alloc
Line
Count
Source
37
17.2k
{
38
17.2k
  LIST(EL) *list;
39
17.2k
40
17.2k
  if (n < 0)
41
17.2k
    
isl_die0
(ctx, isl_error_invalid,
42
17.2k
      "cannot create list of negative length",
43
17.2k
      return NULL);
44
17.2k
  list = isl_alloc(ctx, LIST(EL),
45
17.2k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
17.2k
  if (!list)
47
0
    return NULL;
48
17.2k
49
17.2k
  list->ctx = ctx;
50
17.2k
  isl_ctx_ref(ctx);
51
17.2k
  list->ref = 1;
52
17.2k
  list->size = n;
53
17.2k
  list->n = 0;
54
17.2k
  return list;
55
17.2k
}
Unexecuted instantiation: isl_pw_multi_aff_list_alloc
isl_union_pw_aff_list_alloc
Line
Count
Source
37
260
{
38
260
  LIST(EL) *list;
39
260
40
260
  if (n < 0)
41
260
    
isl_die0
(ctx, isl_error_invalid,
42
260
      "cannot create list of negative length",
43
260
      return NULL);
44
260
  list = isl_alloc(ctx, LIST(EL),
45
260
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
260
  if (!list)
47
0
    return NULL;
48
260
49
260
  list->ctx = ctx;
50
260
  isl_ctx_ref(ctx);
51
260
  list->ref = 1;
52
260
  list->size = n;
53
260
  list->n = 0;
54
260
  return list;
55
260
}
isl_union_pw_multi_aff_list_alloc
Line
Count
Source
37
7
{
38
7
  LIST(EL) *list;
39
7
40
7
  if (n < 0)
41
7
    
isl_die0
(ctx, isl_error_invalid,
42
7
      "cannot create list of negative length",
43
7
      return NULL);
44
7
  list = isl_alloc(ctx, LIST(EL),
45
7
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
7
  if (!list)
47
0
    return NULL;
48
7
49
7
  list->ctx = ctx;
50
7
  isl_ctx_ref(ctx);
51
7
  list->ref = 1;
52
7
  list->size = n;
53
7
  list->n = 0;
54
7
  return list;
55
7
}
Unexecuted instantiation: isl_ast_expr_list_alloc
isl_ast_node_list_alloc
Line
Count
Source
37
4.42k
{
38
4.42k
  LIST(EL) *list;
39
4.42k
40
4.42k
  if (n < 0)
41
4.42k
    
isl_die0
(ctx, isl_error_invalid,
42
4.42k
      "cannot create list of negative length",
43
4.42k
      return NULL);
44
4.42k
  list = isl_alloc(ctx, LIST(EL),
45
4.42k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
4.42k
  if (!list)
47
0
    return NULL;
48
4.42k
49
4.42k
  list->ctx = ctx;
50
4.42k
  isl_ctx_ref(ctx);
51
4.42k
  list->ref = 1;
52
4.42k
  list->size = n;
53
4.42k
  list->n = 0;
54
4.42k
  return list;
55
4.42k
}
isl_ast_graft_list_alloc
Line
Count
Source
37
17.9k
{
38
17.9k
  LIST(EL) *list;
39
17.9k
40
17.9k
  if (n < 0)
41
17.9k
    
isl_die0
(ctx, isl_error_invalid,
42
17.9k
      "cannot create list of negative length",
43
17.9k
      return NULL);
44
17.9k
  list = isl_alloc(ctx, LIST(EL),
45
17.9k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
17.9k
  if (!list)
47
0
    return NULL;
48
17.9k
49
17.9k
  list->ctx = ctx;
50
17.9k
  isl_ctx_ref(ctx);
51
17.9k
  list->ref = 1;
52
17.9k
  list->size = n;
53
17.9k
  list->n = 0;
54
17.9k
  return list;
55
17.9k
}
isl_constraint_list_alloc
Line
Count
Source
37
2.29k
{
38
2.29k
  LIST(EL) *list;
39
2.29k
40
2.29k
  if (n < 0)
41
2.29k
    
isl_die0
(ctx, isl_error_invalid,
42
2.29k
      "cannot create list of negative length",
43
2.29k
      return NULL);
44
2.29k
  list = isl_alloc(ctx, LIST(EL),
45
2.29k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
2.29k
  if (!list)
47
0
    return NULL;
48
2.29k
49
2.29k
  list->ctx = ctx;
50
2.29k
  isl_ctx_ref(ctx);
51
2.29k
  list->ref = 1;
52
2.29k
  list->size = n;
53
2.29k
  list->n = 0;
54
2.29k
  return list;
55
2.29k
}
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_alloc
isl_id_list_alloc
Line
Count
Source
37
1.83k
{
38
1.83k
  LIST(EL) *list;
39
1.83k
40
1.83k
  if (n < 0)
41
1.83k
    
isl_die0
(ctx, isl_error_invalid,
42
1.83k
      "cannot create list of negative length",
43
1.83k
      return NULL);
44
1.83k
  list = isl_alloc(ctx, LIST(EL),
45
1.83k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
1.83k
  if (!list)
47
0
    return NULL;
48
1.83k
49
1.83k
  list->ctx = ctx;
50
1.83k
  isl_ctx_ref(ctx);
51
1.83k
  list->ref = 1;
52
1.83k
  list->size = n;
53
1.83k
  list->n = 0;
54
1.83k
  return list;
55
1.83k
}
isl_basic_map_list_alloc
Line
Count
Source
37
4.39k
{
38
4.39k
  LIST(EL) *list;
39
4.39k
40
4.39k
  if (n < 0)
41
4.39k
    
isl_die0
(ctx, isl_error_invalid,
42
4.39k
      "cannot create list of negative length",
43
4.39k
      return NULL);
44
4.39k
  list = isl_alloc(ctx, LIST(EL),
45
4.39k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
4.39k
  if (!list)
47
0
    return NULL;
48
4.39k
49
4.39k
  list->ctx = ctx;
50
4.39k
  isl_ctx_ref(ctx);
51
4.39k
  list->ref = 1;
52
4.39k
  list->size = n;
53
4.39k
  list->n = 0;
54
4.39k
  return list;
55
4.39k
}
isl_map_list_alloc
Line
Count
Source
37
760
{
38
760
  LIST(EL) *list;
39
760
40
760
  if (n < 0)
41
760
    
isl_die0
(ctx, isl_error_invalid,
42
760
      "cannot create list of negative length",
43
760
      return NULL);
44
760
  list = isl_alloc(ctx, LIST(EL),
45
760
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
760
  if (!list)
47
0
    return NULL;
48
760
49
760
  list->ctx = ctx;
50
760
  isl_ctx_ref(ctx);
51
760
  list->ref = 1;
52
760
  list->size = n;
53
760
  list->n = 0;
54
760
  return list;
55
760
}
isl_union_map_list_alloc
Line
Count
Source
37
1
{
38
1
  LIST(EL) *list;
39
1
40
1
  if (n < 0)
41
1
    
isl_die0
(ctx, isl_error_invalid,
42
1
      "cannot create list of negative length",
43
1
      return NULL);
44
1
  list = isl_alloc(ctx, LIST(EL),
45
1
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
1
  if (!list)
47
0
    return NULL;
48
1
49
1
  list->ctx = ctx;
50
1
  isl_ctx_ref(ctx);
51
1
  list->ref = 1;
52
1
  list->size = n;
53
1
  list->n = 0;
54
1
  return list;
55
1
}
Unexecuted instantiation: isl_pw_qpolynomial_list_alloc
isl_schedule_tree_list_alloc
Line
Count
Source
37
77.7k
{
38
77.7k
  LIST(EL) *list;
39
77.7k
40
77.7k
  if (n < 0)
41
77.7k
    
isl_die0
(ctx, isl_error_invalid,
42
77.7k
      "cannot create list of negative length",
43
77.7k
      return NULL);
44
77.7k
  list = isl_alloc(ctx, LIST(EL),
45
77.7k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
77.7k
  if (!list)
47
0
    return NULL;
48
77.7k
49
77.7k
  list->ctx = ctx;
50
77.7k
  isl_ctx_ref(ctx);
51
77.7k
  list->ref = 1;
52
77.7k
  list->size = n;
53
77.7k
  list->n = 0;
54
77.7k
  return list;
55
77.7k
}
isl_basic_set_list_alloc
Line
Count
Source
37
2.11k
{
38
2.11k
  LIST(EL) *list;
39
2.11k
40
2.11k
  if (n < 0)
41
2.11k
    
isl_die0
(ctx, isl_error_invalid,
42
2.11k
      "cannot create list of negative length",
43
2.11k
      return NULL);
44
2.11k
  list = isl_alloc(ctx, LIST(EL),
45
2.11k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
2.11k
  if (!list)
47
0
    return NULL;
48
2.11k
49
2.11k
  list->ctx = ctx;
50
2.11k
  isl_ctx_ref(ctx);
51
2.11k
  list->ref = 1;
52
2.11k
  list->size = n;
53
2.11k
  list->n = 0;
54
2.11k
  return list;
55
2.11k
}
isl_set_list_alloc
Line
Count
Source
37
11.6k
{
38
11.6k
  LIST(EL) *list;
39
11.6k
40
11.6k
  if (n < 0)
41
11.6k
    
isl_die0
(ctx, isl_error_invalid,
42
11.6k
      "cannot create list of negative length",
43
11.6k
      return NULL);
44
11.6k
  list = isl_alloc(ctx, LIST(EL),
45
11.6k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
11.6k
  if (!list)
47
0
    return NULL;
48
11.6k
49
11.6k
  list->ctx = ctx;
50
11.6k
  isl_ctx_ref(ctx);
51
11.6k
  list->ref = 1;
52
11.6k
  list->size = n;
53
11.6k
  list->n = 0;
54
11.6k
  return list;
55
11.6k
}
isl_union_set_list_alloc
Line
Count
Source
37
485
{
38
485
  LIST(EL) *list;
39
485
40
485
  if (n < 0)
41
485
    
isl_die0
(ctx, isl_error_invalid,
42
485
      "cannot create list of negative length",
43
485
      return NULL);
44
485
  list = isl_alloc(ctx, LIST(EL),
45
485
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
485
  if (!list)
47
0
    return NULL;
48
485
49
485
  list->ctx = ctx;
50
485
  isl_ctx_ref(ctx);
51
485
  list->ref = 1;
52
485
  list->size = n;
53
485
  list->n = 0;
54
485
  return list;
55
485
}
isl_val_list_alloc
Line
Count
Source
37
7
{
38
7
  LIST(EL) *list;
39
7
40
7
  if (n < 0)
41
7
    
isl_die0
(ctx, isl_error_invalid,
42
7
      "cannot create list of negative length",
43
7
      return NULL);
44
7
  list = isl_alloc(ctx, LIST(EL),
45
7
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
7
  if (!list)
47
0
    return NULL;
48
7
49
7
  list->ctx = ctx;
50
7
  isl_ctx_ref(ctx);
51
7
  list->ref = 1;
52
7
  list->size = n;
53
7
  list->n = 0;
54
7
  return list;
55
7
}
56
57
__isl_give LIST(EL) *FN(LIST(EL),copy)(__isl_keep LIST(EL) *list)
58
109k
{
59
109k
  if (!list)
60
0
    return NULL;
61
109k
62
109k
  list->ref++;
63
109k
  return list;
64
109k
}
Unexecuted instantiation: isl_aff_list_copy
isl_pw_aff_list_copy
Line
Count
Source
58
11.7k
{
59
11.7k
  if (!list)
60
0
    return NULL;
61
11.7k
62
11.7k
  list->ref++;
63
11.7k
  return list;
64
11.7k
}
Unexecuted instantiation: isl_pw_multi_aff_list_copy
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
58
216
{
59
216
  if (!list)
60
0
    return NULL;
61
216
62
216
  list->ref++;
63
216
  return list;
64
216
}
Unexecuted instantiation: isl_ast_graft_list_copy
isl_constraint_list_copy
Line
Count
Source
58
701
{
59
701
  if (!list)
60
0
    return NULL;
61
701
62
701
  list->ref++;
63
701
  return list;
64
701
}
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_copy
isl_id_list_copy
Line
Count
Source
58
34.7k
{
59
34.7k
  if (!list)
60
0
    return NULL;
61
34.7k
62
34.7k
  list->ref++;
63
34.7k
  return list;
64
34.7k
}
Unexecuted instantiation: isl_basic_map_list_copy
Unexecuted instantiation: isl_map_list_copy
Unexecuted instantiation: isl_union_map_list_copy
Unexecuted instantiation: isl_pw_qpolynomial_list_copy
isl_schedule_tree_list_copy
Line
Count
Source
58
61.6k
{
59
61.6k
  if (!list)
60
0
    return NULL;
61
61.6k
62
61.6k
  list->ref++;
63
61.6k
  return list;
64
61.6k
}
isl_basic_set_list_copy
Line
Count
Source
58
13
{
59
13
  if (!list)
60
0
    return NULL;
61
13
62
13
  list->ref++;
63
13
  return list;
64
13
}
Unexecuted instantiation: isl_set_list_copy
Unexecuted instantiation: isl_union_set_list_copy
Unexecuted instantiation: isl_val_list_copy
65
66
__isl_give LIST(EL) *FN(LIST(EL),dup)(__isl_keep LIST(EL) *list)
67
49.5k
{
68
49.5k
  int i;
69
49.5k
  LIST(EL) *dup;
70
49.5k
71
49.5k
  if (!list)
72
0
    return NULL;
73
49.5k
74
49.5k
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
75
49.5k
  if (!dup)
76
0
    return NULL;
77
243k
  
for (i = 0; 49.5k
i < list->n;
++i194k
)
78
194k
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
79
49.5k
  return dup;
80
49.5k
}
Unexecuted instantiation: isl_aff_list_dup
isl_pw_aff_list_dup
Line
Count
Source
67
285
{
68
285
  int i;
69
285
  LIST(EL) *dup;
70
285
71
285
  if (!list)
72
0
    return NULL;
73
285
74
285
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
75
285
  if (!dup)
76
0
    return NULL;
77
645
  
for (i = 0; 285
i < list->n;
++i360
)
78
360
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
79
285
  return dup;
80
285
}
Unexecuted instantiation: isl_pw_multi_aff_list_dup
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_constraint_list_dup
Line
Count
Source
67
701
{
68
701
  int i;
69
701
  LIST(EL) *dup;
70
701
71
701
  if (!list)
72
0
    return NULL;
73
701
74
701
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
75
701
  if (!dup)
76
0
    return NULL;
77
2.17k
  
for (i = 0; 701
i < list->n;
++i1.47k
)
78
1.47k
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
79
701
  return dup;
80
701
}
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_dup
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
Unexecuted instantiation: isl_pw_qpolynomial_list_dup
isl_schedule_tree_list_dup
Line
Count
Source
67
48.5k
{
68
48.5k
  int i;
69
48.5k
  LIST(EL) *dup;
70
48.5k
71
48.5k
  if (!list)
72
0
    return NULL;
73
48.5k
74
48.5k
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
75
48.5k
  if (!dup)
76
0
    return NULL;
77
240k
  
for (i = 0; 48.5k
i < list->n;
++i192k
)
78
192k
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
79
48.5k
  return dup;
80
48.5k
}
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
81
82
__isl_give LIST(EL) *FN(LIST(EL),cow)(__isl_take LIST(EL) *list)
83
106k
{
84
106k
  if (!list)
85
0
    return NULL;
86
106k
87
106k
  if (list->ref == 1)
88
57.3k
    return list;
89
49.5k
  list->ref--;
90
49.5k
  return FN(LIST(EL),dup)(list);
91
49.5k
}
isl_aff_list_cow
Line
Count
Source
83
2
{
84
2
  if (!list)
85
0
    return NULL;
86
2
87
2
  if (list->ref == 1)
88
2
    return list;
89
0
  list->ref--;
90
0
  return FN(LIST(EL),dup)(list);
91
0
}
isl_pw_aff_list_cow
Line
Count
Source
83
3.52k
{
84
3.52k
  if (!list)
85
0
    return NULL;
86
3.52k
87
3.52k
  if (list->ref == 1)
88
3.24k
    return list;
89
285
  list->ref--;
90
285
  return FN(LIST(EL),dup)(list);
91
285
}
Unexecuted instantiation: isl_pw_multi_aff_list_cow
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
83
44
{
84
44
  if (!list)
85
0
    return NULL;
86
44
87
44
  if (list->ref == 1)
88
44
    return list;
89
0
  list->ref--;
90
0
  return FN(LIST(EL),dup)(list);
91
0
}
isl_constraint_list_cow
Line
Count
Source
83
2.21k
{
84
2.21k
  if (!list)
85
0
    return NULL;
86
2.21k
87
2.21k
  if (list->ref == 1)
88
1.51k
    return list;
89
701
  list->ref--;
90
701
  return FN(LIST(EL),dup)(list);
91
701
}
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_cow
isl_id_list_cow
Line
Count
Source
83
1
{
84
1
  if (!list)
85
0
    return NULL;
86
1
87
1
  if (list->ref == 1)
88
1
    return list;
89
0
  list->ref--;
90
0
  return FN(LIST(EL),dup)(list);
91
0
}
isl_basic_map_list_cow
Line
Count
Source
83
490
{
84
490
  if (!list)
85
0
    return NULL;
86
490
87
490
  if (list->ref == 1)
88
490
    return list;
89
0
  list->ref--;
90
0
  return FN(LIST(EL),dup)(list);
91
0
}
Unexecuted instantiation: isl_map_list_cow
isl_union_map_list_cow
Line
Count
Source
83
6
{
84
6
  if (!list)
85
0
    return NULL;
86
6
87
6
  if (list->ref == 1)
88
6
    return list;
89
0
  list->ref--;
90
0
  return FN(LIST(EL),dup)(list);
91
0
}
Unexecuted instantiation: isl_pw_qpolynomial_list_cow
isl_schedule_tree_list_cow
Line
Count
Source
83
93.7k
{
84
93.7k
  if (!list)
85
0
    return NULL;
86
93.7k
87
93.7k
  if (list->ref == 1)
88
45.1k
    return list;
89
48.5k
  list->ref--;
90
48.5k
  return FN(LIST(EL),dup)(list);
91
48.5k
}
isl_basic_set_list_cow
Line
Count
Source
83
3.55k
{
84
3.55k
  if (!list)
85
0
    return NULL;
86
3.55k
87
3.55k
  if (list->ref == 1)
88
3.55k
    return list;
89
0
  list->ref--;
90
0
  return FN(LIST(EL),dup)(list);
91
0
}
isl_set_list_cow
Line
Count
Source
83
2.01k
{
84
2.01k
  if (!list)
85
0
    return NULL;
86
2.01k
87
2.01k
  if (list->ref == 1)
88
2.01k
    return list;
89
0
  list->ref--;
90
0
  return FN(LIST(EL),dup)(list);
91
0
}
isl_union_set_list_cow
Line
Count
Source
83
1.25k
{
84
1.25k
  if (!list)
85
0
    return NULL;
86
1.25k
87
1.25k
  if (list->ref == 1)
88
1.25k
    return list;
89
0
  list->ref--;
90
0
  return FN(LIST(EL),dup)(list);
91
0
}
Unexecuted instantiation: isl_val_list_cow
92
93
/* Make sure "list" has room for at least "n" more pieces.
94
 * Always return a list with a single reference.
95
 *
96
 * If there is only one reference to list, we extend it in place.
97
 * Otherwise, we create a new LIST(EL) and copy the elements.
98
 */
99
static __isl_give LIST(EL) *FN(LIST(EL),grow)(__isl_take LIST(EL) *list, int n)
100
363k
{
101
363k
  isl_ctx *ctx;
102
363k
  int i, new_size;
103
363k
  LIST(EL) *res;
104
363k
105
363k
  if (!list)
106
0
    return NULL;
107
363k
  if (list->ref == 1 && 
list->n + n <= list->size353k
)
108
338k
    return list;
109
24.5k
110
24.5k
  ctx = FN(LIST(EL),get_ctx)(list);
111
24.5k
  new_size = ((list->n + n + 1) * 3) / 2;
112
24.5k
  if (list->ref == 1) {
113
14.6k
    res = isl_realloc(ctx, list, LIST(EL),
114
14.6k
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
14.6k
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
14.6k
    res->size = new_size;
118
14.6k
    return res;
119
14.6k
  }
120
9.83k
121
9.83k
  if (list->n + n <= list->size && 
list->size < new_size2.75k
)
122
2.69k
    new_size = list->size;
123
9.83k
124
9.83k
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
9.83k
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
9.83k
128
37.9k
  
for (i = 0; 9.83k
i < list->n;
++i28.1k
)
129
28.1k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
9.83k
131
9.83k
  FN(LIST(EL),free)(list);
132
9.83k
  return res;
133
9.83k
}
isl_aff.c:isl_aff_list_grow
Line
Count
Source
100
8.30k
{
101
8.30k
  isl_ctx *ctx;
102
8.30k
  int i, new_size;
103
8.30k
  LIST(EL) *res;
104
8.30k
105
8.30k
  if (!list)
106
0
    return NULL;
107
8.30k
  if (list->ref == 1 && list->n + n <= list->size)
108
8.28k
    return list;
109
20
110
20
  ctx = FN(LIST(EL),get_ctx)(list);
111
20
  new_size = ((list->n + n + 1) * 3) / 2;
112
20
  if (list->ref == 1) {
113
20
    res = isl_realloc(ctx, list, LIST(EL),
114
20
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
20
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
20
    res->size = new_size;
118
20
    return res;
119
20
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_aff.c:isl_pw_aff_list_grow
Line
Count
Source
100
19.8k
{
101
19.8k
  isl_ctx *ctx;
102
19.8k
  int i, new_size;
103
19.8k
  LIST(EL) *res;
104
19.8k
105
19.8k
  if (!list)
106
0
    return NULL;
107
19.8k
  if (list->ref == 1 && list->n + n <= list->size)
108
14.2k
    return list;
109
5.63k
110
5.63k
  ctx = FN(LIST(EL),get_ctx)(list);
111
5.63k
  new_size = ((list->n + n + 1) * 3) / 2;
112
5.63k
  if (list->ref == 1) {
113
5.63k
    res = isl_realloc(ctx, list, LIST(EL),
114
5.63k
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
5.63k
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
5.63k
    res->size = new_size;
118
5.63k
    return res;
119
5.63k
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
Unexecuted instantiation: isl_aff.c:isl_pw_multi_aff_list_grow
isl_aff.c:isl_union_pw_aff_list_grow
Line
Count
Source
100
144
{
101
144
  isl_ctx *ctx;
102
144
  int i, new_size;
103
144
  LIST(EL) *res;
104
144
105
144
  if (!list)
106
0
    return NULL;
107
144
  if (list->ref == 1 && list->n + n <= list->size)
108
28
    return list;
109
116
110
116
  ctx = FN(LIST(EL),get_ctx)(list);
111
116
  new_size = ((list->n + n + 1) * 3) / 2;
112
116
  if (list->ref == 1) {
113
116
    res = isl_realloc(ctx, list, LIST(EL),
114
116
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
116
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
116
    res->size = new_size;
118
116
    return res;
119
116
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_aff.c:isl_union_pw_multi_aff_list_grow
Line
Count
Source
100
7
{
101
7
  isl_ctx *ctx;
102
7
  int i, new_size;
103
7
  LIST(EL) *res;
104
7
105
7
  if (!list)
106
0
    return NULL;
107
7
  if (list->ref == 1 && list->n + n <= list->size)
108
7
    return list;
109
0
110
0
  ctx = FN(LIST(EL),get_ctx)(list);
111
0
  new_size = ((list->n + n + 1) * 3) / 2;
112
0
  if (list->ref == 1) {
113
0
    res = isl_realloc(ctx, list, LIST(EL),
114
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
0
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
0
    res->size = new_size;
118
0
    return res;
119
0
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_grow
isl_ast.c:isl_ast_node_list_grow
Line
Count
Source
100
6.10k
{
101
6.10k
  isl_ctx *ctx;
102
6.10k
  int i, new_size;
103
6.10k
  LIST(EL) *res;
104
6.10k
105
6.10k
  if (!list)
106
0
    return NULL;
107
6.10k
  if (list->ref == 1 && list->n + n <= list->size)
108
6.03k
    return list;
109
71
110
71
  ctx = FN(LIST(EL),get_ctx)(list);
111
71
  new_size = ((list->n + n + 1) * 3) / 2;
112
71
  if (list->ref == 1) {
113
71
    res = isl_realloc(ctx, list, LIST(EL),
114
71
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
71
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
71
    res->size = new_size;
118
71
    return res;
119
71
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_ast_graft.c:isl_ast_graft_list_grow
Line
Count
Source
100
16.7k
{
101
16.7k
  isl_ctx *ctx;
102
16.7k
  int i, new_size;
103
16.7k
  LIST(EL) *res;
104
16.7k
105
16.7k
  if (!list)
106
0
    return NULL;
107
16.7k
  if (list->ref == 1 && list->n + n <= list->size)
108
16.7k
    return list;
109
0
110
0
  ctx = FN(LIST(EL),get_ctx)(list);
111
0
  new_size = ((list->n + n + 1) * 3) / 2;
112
0
  if (list->ref == 1) {
113
0
    res = isl_realloc(ctx, list, LIST(EL),
114
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
0
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
0
    res->size = new_size;
118
0
    return res;
119
0
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_constraint.c:isl_constraint_list_grow
Line
Count
Source
100
3.54k
{
101
3.54k
  isl_ctx *ctx;
102
3.54k
  int i, new_size;
103
3.54k
  LIST(EL) *res;
104
3.54k
105
3.54k
  if (!list)
106
0
    return NULL;
107
3.54k
  if (list->ref == 1 && list->n + n <= list->size)
108
3.54k
    return list;
109
0
110
0
  ctx = FN(LIST(EL),get_ctx)(list);
111
0
  new_size = ((list->n + n + 1) * 3) / 2;
112
0
  if (list->ref == 1) {
113
0
    res = isl_realloc(ctx, list, LIST(EL),
114
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
0
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
0
    res->size = new_size;
118
0
    return res;
119
0
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
Unexecuted instantiation: isl_fold.c:isl_pw_qpolynomial_fold_list_grow
isl_id.c:isl_id_list_grow
Line
Count
Source
100
2.27k
{
101
2.27k
  isl_ctx *ctx;
102
2.27k
  int i, new_size;
103
2.27k
  LIST(EL) *res;
104
2.27k
105
2.27k
  if (!list)
106
0
    return NULL;
107
2.27k
  if (list->ref == 1 && list->n + n <= list->size)
108
2.27k
    return list;
109
0
110
0
  ctx = FN(LIST(EL),get_ctx)(list);
111
0
  new_size = ((list->n + n + 1) * 3) / 2;
112
0
  if (list->ref == 1) {
113
0
    res = isl_realloc(ctx, list, LIST(EL),
114
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
0
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
0
    res->size = new_size;
118
0
    return res;
119
0
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_map_list.c:isl_basic_map_list_grow
Line
Count
Source
100
17.4k
{
101
17.4k
  isl_ctx *ctx;
102
17.4k
  int i, new_size;
103
17.4k
  LIST(EL) *res;
104
17.4k
105
17.4k
  if (!list)
106
0
    return NULL;
107
17.4k
  if (list->ref == 1 && list->n + n <= list->size)
108
17.4k
    return list;
109
0
110
0
  ctx = FN(LIST(EL),get_ctx)(list);
111
0
  new_size = ((list->n + n + 1) * 3) / 2;
112
0
  if (list->ref == 1) {
113
0
    res = isl_realloc(ctx, list, LIST(EL),
114
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
0
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
0
    res->size = new_size;
118
0
    return res;
119
0
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_map_list.c:isl_map_list_grow
Line
Count
Source
100
1.52k
{
101
1.52k
  isl_ctx *ctx;
102
1.52k
  int i, new_size;
103
1.52k
  LIST(EL) *res;
104
1.52k
105
1.52k
  if (!list)
106
0
    return NULL;
107
1.52k
  if (list->ref == 1 && list->n + n <= list->size)
108
1.52k
    return list;
109
0
110
0
  ctx = FN(LIST(EL),get_ctx)(list);
111
0
  new_size = ((list->n + n + 1) * 3) / 2;
112
0
  if (list->ref == 1) {
113
0
    res = isl_realloc(ctx, list, LIST(EL),
114
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
0
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
0
    res->size = new_size;
118
0
    return res;
119
0
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_map_list.c:isl_union_map_list_grow
Line
Count
Source
100
5
{
101
5
  isl_ctx *ctx;
102
5
  int i, new_size;
103
5
  LIST(EL) *res;
104
5
105
5
  if (!list)
106
0
    return NULL;
107
5
  if (list->ref == 1 && list->n + n <= list->size)
108
4
    return list;
109
1
110
1
  ctx = FN(LIST(EL),get_ctx)(list);
111
1
  new_size = ((list->n + n + 1) * 3) / 2;
112
1
  if (list->ref == 1) {
113
1
    res = isl_realloc(ctx, list, LIST(EL),
114
1
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
1
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
1
    res->size = new_size;
118
1
    return res;
119
1
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
Unexecuted instantiation: isl_polynomial.c:isl_pw_qpolynomial_list_grow
isl_schedule_tree.c:isl_schedule_tree_list_grow
Line
Count
Source
100
268k
{
101
268k
  isl_ctx *ctx;
102
268k
  int i, new_size;
103
268k
  LIST(EL) *res;
104
268k
105
268k
  if (!list)
106
0
    return NULL;
107
268k
  if (list->ref == 1 && 
list->n + n <= list->size258k
)
108
249k
    return list;
109
18.3k
110
18.3k
  ctx = FN(LIST(EL),get_ctx)(list);
111
18.3k
  new_size = ((list->n + n + 1) * 3) / 2;
112
18.3k
  if (list->ref == 1) {
113
8.56k
    res = isl_realloc(ctx, list, LIST(EL),
114
8.56k
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
8.56k
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
8.56k
    res->size = new_size;
118
8.56k
    return res;
119
8.56k
  }
120
9.83k
121
9.83k
  if (list->n + n <= list->size && 
list->size < new_size2.75k
)
122
2.69k
    new_size = list->size;
123
9.83k
124
9.83k
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
9.83k
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
9.83k
128
37.9k
  
for (i = 0; 9.83k
i < list->n;
++i28.1k
)
129
28.1k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
9.83k
131
9.83k
  FN(LIST(EL),free)(list);
132
9.83k
  return res;
133
9.83k
}
isl_set_list.c:isl_basic_set_list_grow
Line
Count
Source
100
2.24k
{
101
2.24k
  isl_ctx *ctx;
102
2.24k
  int i, new_size;
103
2.24k
  LIST(EL) *res;
104
2.24k
105
2.24k
  if (!list)
106
0
    return NULL;
107
2.24k
  if (list->ref == 1 && list->n + n <= list->size)
108
2.24k
    return list;
109
2
110
2
  ctx = FN(LIST(EL),get_ctx)(list);
111
2
  new_size = ((list->n + n + 1) * 3) / 2;
112
2
  if (list->ref == 1) {
113
2
    res = isl_realloc(ctx, list, LIST(EL),
114
2
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
2
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
2
    res->size = new_size;
118
2
    return res;
119
2
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_set_list.c:isl_set_list_grow
Line
Count
Source
100
15.0k
{
101
15.0k
  isl_ctx *ctx;
102
15.0k
  int i, new_size;
103
15.0k
  LIST(EL) *res;
104
15.0k
105
15.0k
  if (!list)
106
0
    return NULL;
107
15.0k
  if (list->ref == 1 && list->n + n <= list->size)
108
14.9k
    return list;
109
20
110
20
  ctx = FN(LIST(EL),get_ctx)(list);
111
20
  new_size = ((list->n + n + 1) * 3) / 2;
112
20
  if (list->ref == 1) {
113
20
    res = isl_realloc(ctx, list, LIST(EL),
114
20
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
20
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
20
    res->size = new_size;
118
20
    return res;
119
20
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_set_list.c:isl_union_set_list_grow
Line
Count
Source
100
1.82k
{
101
1.82k
  isl_ctx *ctx;
102
1.82k
  int i, new_size;
103
1.82k
  LIST(EL) *res;
104
1.82k
105
1.82k
  if (!list)
106
0
    return NULL;
107
1.82k
  if (list->ref == 1 && list->n + n <= list->size)
108
1.56k
    return list;
109
260
110
260
  ctx = FN(LIST(EL),get_ctx)(list);
111
260
  new_size = ((list->n + n + 1) * 3) / 2;
112
260
  if (list->ref == 1) {
113
260
    res = isl_realloc(ctx, list, LIST(EL),
114
260
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
260
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
260
    res->size = new_size;
118
260
    return res;
119
260
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_val.c:isl_val_list_grow
Line
Count
Source
100
17
{
101
17
  isl_ctx *ctx;
102
17
  int i, new_size;
103
17
  LIST(EL) *res;
104
17
105
17
  if (!list)
106
0
    return NULL;
107
17
  if (list->ref == 1 && list->n + n <= list->size)
108
9
    return list;
109
8
110
8
  ctx = FN(LIST(EL),get_ctx)(list);
111
8
  new_size = ((list->n + n + 1) * 3) / 2;
112
8
  if (list->ref == 1) {
113
8
    res = isl_realloc(ctx, list, LIST(EL),
114
8
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
8
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
8
    res->size = new_size;
118
8
    return res;
119
8
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
134
135
/* Check that "index" is a valid position in "list".
136
 */
137
static isl_stat FN(LIST(EL),check_index)(__isl_keep LIST(EL) *list, int index)
138
713k
{
139
713k
  if (!list)
140
0
    return isl_stat_error;
141
713k
  if (index < 0 || index >= list->n)
142
713k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
713k
      "index out of bounds", return isl_stat_error);
144
713k
  return isl_stat_ok;
145
713k
}
isl_aff.c:isl_aff_list_check_index
Line
Count
Source
138
8.71k
{
139
8.71k
  if (!list)
140
0
    return isl_stat_error;
141
8.71k
  if (index < 0 || index >= list->n)
142
8.71k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
8.71k
      "index out of bounds", return isl_stat_error);
144
8.71k
  return isl_stat_ok;
145
8.71k
}
isl_aff.c:isl_pw_aff_list_check_index
Line
Count
Source
138
25.7k
{
139
25.7k
  if (!list)
140
0
    return isl_stat_error;
141
25.7k
  if (index < 0 || index >= list->n)
142
25.7k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
25.7k
      "index out of bounds", return isl_stat_error);
144
25.7k
  return isl_stat_ok;
145
25.7k
}
Unexecuted instantiation: isl_aff.c:isl_pw_multi_aff_list_check_index
isl_aff.c:isl_union_pw_aff_list_check_index
Line
Count
Source
138
288
{
139
288
  if (!list)
140
0
    return isl_stat_error;
141
288
  if (index < 0 || index >= list->n)
142
288
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
288
      "index out of bounds", return isl_stat_error);
144
288
  return isl_stat_ok;
145
288
}
isl_aff.c:isl_union_pw_multi_aff_list_check_index
Line
Count
Source
138
7
{
139
7
  if (!list)
140
0
    return isl_stat_error;
141
7
  if (index < 0 || index >= list->n)
142
7
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
7
      "index out of bounds", return isl_stat_error);
144
7
  return isl_stat_ok;
145
7
}
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_check_index
isl_ast.c:isl_ast_node_list_check_index
Line
Count
Source
138
4.39k
{
139
4.39k
  if (!list)
140
0
    return isl_stat_error;
141
4.39k
  if (index < 0 || index >= list->n)
142
4.39k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
4.39k
      "index out of bounds", return isl_stat_error);
144
4.39k
  return isl_stat_ok;
145
4.39k
}
isl_ast_graft.c:isl_ast_graft_list_check_index
Line
Count
Source
138
40.2k
{
139
40.2k
  if (!list)
140
0
    return isl_stat_error;
141
40.2k
  if (index < 0 || index >= list->n)
142
40.2k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
40.2k
      "index out of bounds", return isl_stat_error);
144
40.2k
  return isl_stat_ok;
145
40.2k
}
isl_constraint.c:isl_constraint_list_check_index
Line
Count
Source
138
2.02k
{
139
2.02k
  if (!list)
140
0
    return isl_stat_error;
141
2.02k
  if (index < 0 || index >= list->n)
142
2.02k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
2.02k
      "index out of bounds", return isl_stat_error);
144
2.02k
  return isl_stat_ok;
145
2.02k
}
Unexecuted instantiation: isl_fold.c:isl_pw_qpolynomial_fold_list_check_index
isl_id.c:isl_id_list_check_index
Line
Count
Source
138
23.1k
{
139
23.1k
  if (!list)
140
0
    return isl_stat_error;
141
23.1k
  if (index < 0 || index >= list->n)
142
23.1k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
23.1k
      "index out of bounds", return isl_stat_error);
144
23.1k
  return isl_stat_ok;
145
23.1k
}
isl_map_list.c:isl_basic_map_list_check_index
Line
Count
Source
138
14.7k
{
139
14.7k
  if (!list)
140
0
    return isl_stat_error;
141
14.7k
  if (index < 0 || index >= list->n)
142
14.7k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
14.7k
      "index out of bounds", return isl_stat_error);
144
14.7k
  return isl_stat_ok;
145
14.7k
}
isl_map_list.c:isl_map_list_check_index
Line
Count
Source
138
1.82k
{
139
1.82k
  if (!list)
140
0
    return isl_stat_error;
141
1.82k
  if (index < 0 || index >= list->n)
142
1.82k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
1.82k
      "index out of bounds", return isl_stat_error);
144
1.82k
  return isl_stat_ok;
145
1.82k
}
isl_map_list.c:isl_union_map_list_check_index
Line
Count
Source
138
11
{
139
11
  if (!list)
140
0
    return isl_stat_error;
141
11
  if (index < 0 || index >= list->n)
142
11
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
11
      "index out of bounds", return isl_stat_error);
144
11
  return isl_stat_ok;
145
11
}
Unexecuted instantiation: isl_polynomial.c:isl_pw_qpolynomial_list_check_index
isl_schedule_tree.c:isl_schedule_tree_list_check_index
Line
Count
Source
138
555k
{
139
555k
  if (!list)
140
0
    return isl_stat_error;
141
555k
  if (index < 0 || index >= list->n)
142
555k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
555k
      "index out of bounds", return isl_stat_error);
144
555k
  return isl_stat_ok;
145
555k
}
isl_set_list.c:isl_basic_set_list_check_index
Line
Count
Source
138
12.5k
{
139
12.5k
  if (!list)
140
0
    return isl_stat_error;
141
12.5k
  if (index < 0 || index >= list->n)
142
12.5k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
12.5k
      "index out of bounds", return isl_stat_error);
144
12.5k
  return isl_stat_ok;
145
12.5k
}
isl_set_list.c:isl_set_list_check_index
Line
Count
Source
138
21.8k
{
139
21.8k
  if (!list)
140
0
    return isl_stat_error;
141
21.8k
  if (index < 0 || index >= list->n)
142
21.8k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
21.8k
      "index out of bounds", return isl_stat_error);
144
21.8k
  return isl_stat_ok;
145
21.8k
}
isl_set_list.c:isl_union_set_list_check_index
Line
Count
Source
138
2.84k
{
139
2.84k
  if (!list)
140
0
    return isl_stat_error;
141
2.84k
  if (index < 0 || index >= list->n)
142
2.84k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
2.84k
      "index out of bounds", return isl_stat_error);
144
2.84k
  return isl_stat_ok;
145
2.84k
}
isl_val.c:isl_val_list_check_index
Line
Count
Source
138
34
{
139
34
  if (!list)
140
0
    return isl_stat_error;
141
34
  if (index < 0 || index >= list->n)
142
34
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
34
      "index out of bounds", return isl_stat_error);
144
34
  return isl_stat_ok;
145
34
}
146
147
__isl_give LIST(EL) *FN(LIST(EL),add)(__isl_take LIST(EL) *list,
148
  __isl_take struct EL *el)
149
363k
{
150
363k
  list = FN(LIST(EL),grow)(list, 1);
151
363k
  if (!list || !el)
152
0
    goto error;
153
363k
  list->p[list->n] = el;
154
363k
  list->n++;
155
363k
  return list;
156
363k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
363k
}
isl_aff_list_add
Line
Count
Source
149
8.30k
{
150
8.30k
  list = FN(LIST(EL),grow)(list, 1);
151
8.30k
  if (!list || !el)
152
0
    goto error;
153
8.30k
  list->p[list->n] = el;
154
8.30k
  list->n++;
155
8.30k
  return list;
156
8.30k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
8.30k
}
isl_pw_aff_list_add
Line
Count
Source
149
19.8k
{
150
19.8k
  list = FN(LIST(EL),grow)(list, 1);
151
19.8k
  if (!list || !el)
152
0
    goto error;
153
19.8k
  list->p[list->n] = el;
154
19.8k
  list->n++;
155
19.8k
  return list;
156
19.8k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
19.8k
}
Unexecuted instantiation: isl_pw_multi_aff_list_add
isl_union_pw_aff_list_add
Line
Count
Source
149
144
{
150
144
  list = FN(LIST(EL),grow)(list, 1);
151
144
  if (!list || !el)
152
0
    goto error;
153
144
  list->p[list->n] = el;
154
144
  list->n++;
155
144
  return list;
156
144
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
144
}
isl_union_pw_multi_aff_list_add
Line
Count
Source
149
7
{
150
7
  list = FN(LIST(EL),grow)(list, 1);
151
7
  if (!list || !el)
152
0
    goto error;
153
7
  list->p[list->n] = el;
154
7
  list->n++;
155
7
  return list;
156
7
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
7
}
Unexecuted instantiation: isl_ast_expr_list_add
isl_ast_node_list_add
Line
Count
Source
149
6.10k
{
150
6.10k
  list = FN(LIST(EL),grow)(list, 1);
151
6.10k
  if (!list || !el)
152
0
    goto error;
153
6.10k
  list->p[list->n] = el;
154
6.10k
  list->n++;
155
6.10k
  return list;
156
6.10k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
6.10k
}
isl_ast_graft_list_add
Line
Count
Source
149
16.7k
{
150
16.7k
  list = FN(LIST(EL),grow)(list, 1);
151
16.7k
  if (!list || !el)
152
0
    goto error;
153
16.7k
  list->p[list->n] = el;
154
16.7k
  list->n++;
155
16.7k
  return list;
156
16.7k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
16.7k
}
isl_constraint_list_add
Line
Count
Source
149
3.54k
{
150
3.54k
  list = FN(LIST(EL),grow)(list, 1);
151
3.54k
  if (!list || !el)
152
0
    goto error;
153
3.54k
  list->p[list->n] = el;
154
3.54k
  list->n++;
155
3.54k
  return list;
156
3.54k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
3.54k
}
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_add
isl_id_list_add
Line
Count
Source
149
2.27k
{
150
2.27k
  list = FN(LIST(EL),grow)(list, 1);
151
2.27k
  if (!list || !el)
152
0
    goto error;
153
2.27k
  list->p[list->n] = el;
154
2.27k
  list->n++;
155
2.27k
  return list;
156
2.27k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
2.27k
}
isl_basic_map_list_add
Line
Count
Source
149
17.4k
{
150
17.4k
  list = FN(LIST(EL),grow)(list, 1);
151
17.4k
  if (!list || !el)
152
0
    goto error;
153
17.4k
  list->p[list->n] = el;
154
17.4k
  list->n++;
155
17.4k
  return list;
156
17.4k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
17.4k
}
isl_map_list_add
Line
Count
Source
149
1.52k
{
150
1.52k
  list = FN(LIST(EL),grow)(list, 1);
151
1.52k
  if (!list || !el)
152
0
    goto error;
153
1.52k
  list->p[list->n] = el;
154
1.52k
  list->n++;
155
1.52k
  return list;
156
1.52k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
1.52k
}
isl_union_map_list_add
Line
Count
Source
149
5
{
150
5
  list = FN(LIST(EL),grow)(list, 1);
151
5
  if (!list || !el)
152
0
    goto error;
153
5
  list->p[list->n] = el;
154
5
  list->n++;
155
5
  return list;
156
5
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
5
}
Unexecuted instantiation: isl_pw_qpolynomial_list_add
isl_schedule_tree_list_add
Line
Count
Source
149
268k
{
150
268k
  list = FN(LIST(EL),grow)(list, 1);
151
268k
  if (!list || !el)
152
0
    goto error;
153
268k
  list->p[list->n] = el;
154
268k
  list->n++;
155
268k
  return list;
156
268k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
268k
}
isl_basic_set_list_add
Line
Count
Source
149
2.24k
{
150
2.24k
  list = FN(LIST(EL),grow)(list, 1);
151
2.24k
  if (!list || !el)
152
0
    goto error;
153
2.24k
  list->p[list->n] = el;
154
2.24k
  list->n++;
155
2.24k
  return list;
156
2.24k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
2.24k
}
isl_set_list_add
Line
Count
Source
149
15.0k
{
150
15.0k
  list = FN(LIST(EL),grow)(list, 1);
151
15.0k
  if (!list || !el)
152
0
    goto error;
153
15.0k
  list->p[list->n] = el;
154
15.0k
  list->n++;
155
15.0k
  return list;
156
15.0k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
15.0k
}
isl_union_set_list_add
Line
Count
Source
149
1.82k
{
150
1.82k
  list = FN(LIST(EL),grow)(list, 1);
151
1.82k
  if (!list || !el)
152
0
    goto error;
153
1.82k
  list->p[list->n] = el;
154
1.82k
  list->n++;
155
1.82k
  return list;
156
1.82k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
1.82k
}
isl_val_list_add
Line
Count
Source
149
17
{
150
17
  list = FN(LIST(EL),grow)(list, 1);
151
17
  if (!list || !el)
152
0
    goto error;
153
17
  list->p[list->n] = el;
154
17
  list->n++;
155
17
  return list;
156
17
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
17
}
161
162
/* Remove the "n" elements starting at "first" from "list".
163
 */
164
__isl_give LIST(EL) *FN(LIST(EL),drop)(__isl_take LIST(EL) *list,
165
  unsigned first, unsigned n)
166
70.6k
{
167
70.6k
  int i;
168
70.6k
169
70.6k
  if (!list)
170
0
    return NULL;
171
70.6k
  if (first + n > list->n || first + n < first)
172
70.6k
    
isl_die0
(list->ctx, isl_error_invalid,
173
70.6k
      "index out of bounds", return FN(LIST(EL),free)(list));
174
70.6k
  if (n == 0)
175
654
    return list;
176
70.0k
  list = FN(LIST(EL),cow)(list);
177
70.0k
  if (!list)
178
0
    return NULL;
179
204k
  
for (i = 0; 70.0k
i < n;
++i134k
)
180
134k
    FN(EL,free)(list->p[first + i]);
181
72.5k
  for (i = first; i + n < list->n; 
++i2.53k
)
182
2.53k
    list->p[i] = list->p[i + n];
183
70.0k
  list->n -= n;
184
70.0k
  return list;
185
70.0k
}
Unexecuted instantiation: isl_aff_list_drop
Unexecuted instantiation: isl_pw_aff_list_drop
Unexecuted instantiation: isl_pw_multi_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
isl_constraint_list_drop
Line
Count
Source
166
2.10k
{
167
2.10k
  int i;
168
2.10k
169
2.10k
  if (!list)
170
0
    return NULL;
171
2.10k
  if (first + n > list->n || first + n < first)
172
2.10k
    
isl_die0
(list->ctx, isl_error_invalid,
173
2.10k
      "index out of bounds", return FN(LIST(EL),free)(list));
174
2.10k
  if (n == 0)
175
654
    return list;
176
1.44k
  list = FN(LIST(EL),cow)(list);
177
1.44k
  if (!list)
178
0
    return NULL;
179
2.97k
  
for (i = 0; 1.44k
i < n;
++i1.52k
)
180
1.52k
    FN(EL,free)(list->p[first + i]);
181
2.31k
  for (i = first; i + n < list->n; 
++i864
)
182
864
    list->p[i] = list->p[i + n];
183
1.44k
  list->n -= n;
184
1.44k
  return list;
185
1.44k
}
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_drop
isl_id_list_drop
Line
Count
Source
166
1
{
167
1
  int i;
168
1
169
1
  if (!list)
170
0
    return NULL;
171
1
  if (first + n > list->n || first + n < first)
172
1
    
isl_die0
(list->ctx, isl_error_invalid,
173
1
      "index out of bounds", return FN(LIST(EL),free)(list));
174
1
  if (n == 0)
175
0
    return list;
176
1
  list = FN(LIST(EL),cow)(list);
177
1
  if (!list)
178
0
    return NULL;
179
2
  
for (i = 0; 1
i < n;
++i1
)
180
1
    FN(EL,free)(list->p[first + i]);
181
3
  for (i = first; i + n < list->n; 
++i2
)
182
2
    list->p[i] = list->p[i + n];
183
1
  list->n -= n;
184
1
  return list;
185
1
}
Unexecuted instantiation: isl_basic_map_list_drop
Unexecuted instantiation: isl_map_list_drop
isl_union_map_list_drop
Line
Count
Source
166
4
{
167
4
  int i;
168
4
169
4
  if (!list)
170
0
    return NULL;
171
4
  if (first + n > list->n || first + n < first)
172
4
    
isl_die0
(list->ctx, isl_error_invalid,
173
4
      "index out of bounds", return FN(LIST(EL),free)(list));
174
4
  if (n == 0)
175
0
    return list;
176
4
  list = FN(LIST(EL),cow)(list);
177
4
  if (!list)
178
0
    return NULL;
179
8
  
for (i = 0; 4
i < n;
++i4
)
180
4
    FN(EL,free)(list->p[first + i]);
181
4
  for (i = first; i + n < list->n; 
++i0
)
182
0
    list->p[i] = list->p[i + n];
183
4
  list->n -= n;
184
4
  return list;
185
4
}
Unexecuted instantiation: isl_pw_qpolynomial_list_drop
isl_schedule_tree_list_drop
Line
Count
Source
166
67.2k
{
167
67.2k
  int i;
168
67.2k
169
67.2k
  if (!list)
170
0
    return NULL;
171
67.2k
  if (first + n > list->n || first + n < first)
172
67.2k
    
isl_die0
(list->ctx, isl_error_invalid,
173
67.2k
      "index out of bounds", return FN(LIST(EL),free)(list));
174
67.2k
  if (n == 0)
175
0
    return list;
176
67.2k
  list = FN(LIST(EL),cow)(list);
177
67.2k
  if (!list)
178
0
    return NULL;
179
198k
  
for (i = 0; 67.2k
i < n;
++i131k
)
180
131k
    FN(EL,free)(list->p[first + i]);
181
68.9k
  for (i = first; i + n < list->n; 
++i1.66k
)
182
1.66k
    list->p[i] = list->p[i + n];
183
67.2k
  list->n -= n;
184
67.2k
  return list;
185
67.2k
}
isl_basic_set_list_drop
Line
Count
Source
166
4
{
167
4
  int i;
168
4
169
4
  if (!list)
170
0
    return NULL;
171
4
  if (first + n > list->n || first + n < first)
172
4
    
isl_die0
(list->ctx, isl_error_invalid,
173
4
      "index out of bounds", return FN(LIST(EL),free)(list));
174
4
  if (n == 0)
175
0
    return list;
176
4
  list = FN(LIST(EL),cow)(list);
177
4
  if (!list)
178
0
    return NULL;
179
12
  
for (i = 0; 4
i < n;
++i8
)
180
8
    FN(EL,free)(list->p[first + i]);
181
4
  for (i = first; i + n < list->n; 
++i0
)
182
0
    list->p[i] = list->p[i + n];
183
4
  list->n -= n;
184
4
  return list;
185
4
}
Unexecuted instantiation: isl_set_list_drop
isl_union_set_list_drop
Line
Count
Source
166
1.25k
{
167
1.25k
  int i;
168
1.25k
169
1.25k
  if (!list)
170
0
    return NULL;
171
1.25k
  if (first + n > list->n || first + n < first)
172
1.25k
    
isl_die0
(list->ctx, isl_error_invalid,
173
1.25k
      "index out of bounds", return FN(LIST(EL),free)(list));
174
1.25k
  if (n == 0)
175
0
    return list;
176
1.25k
  list = FN(LIST(EL),cow)(list);
177
1.25k
  if (!list)
178
0
    return NULL;
179
2.50k
  
for (i = 0; 1.25k
i < n;
++i1.25k
)
180
1.25k
    FN(EL,free)(list->p[first + i]);
181
1.25k
  for (i = first; i + n < list->n; 
++i0
)
182
0
    list->p[i] = list->p[i + n];
183
1.25k
  list->n -= n;
184
1.25k
  return list;
185
1.25k
}
Unexecuted instantiation: isl_val_list_drop
186
187
/* Insert "el" at position "pos" in "list".
188
 *
189
 * If there is only one reference to "list" and if it already has space
190
 * for one extra element, we insert it directly into "list".
191
 * Otherwise, we create a new list consisting of "el" and copied
192
 * elements from "list".
193
 */
194
__isl_give LIST(EL) *FN(LIST(EL),insert)(__isl_take LIST(EL) *list,
195
  unsigned pos, __isl_take struct EL *el)
196
30
{
197
30
  int i;
198
30
  isl_ctx *ctx;
199
30
  LIST(EL) *res;
200
30
201
30
  if (!list || !el)
202
0
    goto error;
203
30
  ctx = FN(LIST(EL),get_ctx)(list);
204
30
  if (pos > list->n)
205
30
    
isl_die0
(ctx, isl_error_invalid,
206
30
      "index out of bounds", goto error);
207
30
208
30
  if (list->ref == 1 && 
list->size > list->n27
) {
209
2
    for (i = list->n; i > pos; 
--i1
)
210
1
      list->p[i] = list->p[i - 1];
211
1
    list->n++;
212
1
    list->p[pos] = el;
213
1
    return list;
214
1
  }
215
29
216
29
  res = FN(LIST(EL),alloc)(ctx, list->n + 1);
217
68
  for (i = 0; i < pos; 
++i39
)
218
39
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
219
29
  res = FN(LIST(EL),add)(res, el);
220
31
  for (i = pos; i < list->n; 
++i2
)
221
2
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
222
29
  FN(LIST(EL),free)(list);
223
29
224
29
  return res;
225
29
error:
226
0
  FN(EL,free)(el);
227
0
  FN(LIST(EL),free)(list);
228
0
  return NULL;
229
29
}
Unexecuted instantiation: isl_aff_list_insert
Unexecuted instantiation: isl_pw_aff_list_insert
Unexecuted instantiation: isl_pw_multi_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
196
26
{
197
26
  int i;
198
26
  isl_ctx *ctx;
199
26
  LIST(EL) *res;
200
26
201
26
  if (!list || !el)
202
0
    goto error;
203
26
  ctx = FN(LIST(EL),get_ctx)(list);
204
26
  if (pos > list->n)
205
26
    
isl_die0
(ctx, isl_error_invalid,
206
26
      "index out of bounds", goto error);
207
26
208
26
  if (list->ref == 1 && list->size > list->n) {
209
0
    for (i = list->n; i > pos; --i)
210
0
      list->p[i] = list->p[i - 1];
211
0
    list->n++;
212
0
    list->p[pos] = el;
213
0
    return list;
214
0
  }
215
26
216
26
  res = FN(LIST(EL),alloc)(ctx, list->n + 1);
217
62
  for (i = 0; i < pos; 
++i36
)
218
36
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
219
26
  res = FN(LIST(EL),add)(res, el);
220
28
  for (i = pos; i < list->n; 
++i2
)
221
2
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
222
26
  FN(LIST(EL),free)(list);
223
26
224
26
  return res;
225
26
error:
226
0
  FN(EL,free)(el);
227
0
  FN(LIST(EL),free)(list);
228
0
  return NULL;
229
26
}
Unexecuted instantiation: isl_constraint_list_insert
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_insert
isl_id_list_insert
Line
Count
Source
196
4
{
197
4
  int i;
198
4
  isl_ctx *ctx;
199
4
  LIST(EL) *res;
200
4
201
4
  if (!list || !el)
202
0
    goto error;
203
4
  ctx = FN(LIST(EL),get_ctx)(list);
204
4
  if (pos > list->n)
205
4
    
isl_die0
(ctx, isl_error_invalid,
206
4
      "index out of bounds", goto error);
207
4
208
4
  if (list->ref == 1 && 
list->size > list->n1
) {
209
2
    for (i = list->n; i > pos; 
--i1
)
210
1
      list->p[i] = list->p[i - 1];
211
1
    list->n++;
212
1
    list->p[pos] = el;
213
1
    return list;
214
1
  }
215
3
216
3
  res = FN(LIST(EL),alloc)(ctx, list->n + 1);
217
6
  for (i = 0; i < pos; 
++i3
)
218
3
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
219
3
  res = FN(LIST(EL),add)(res, el);
220
3
  for (i = pos; i < list->n; 
++i0
)
221
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
222
3
  FN(LIST(EL),free)(list);
223
3
224
3
  return res;
225
3
error:
226
0
  FN(EL,free)(el);
227
0
  FN(LIST(EL),free)(list);
228
0
  return NULL;
229
3
}
Unexecuted instantiation: isl_basic_map_list_insert
Unexecuted instantiation: isl_map_list_insert
Unexecuted instantiation: isl_union_map_list_insert
Unexecuted instantiation: isl_pw_qpolynomial_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
230
231
__isl_null LIST(EL) *FN(LIST(EL),free)(__isl_take LIST(EL) *list)
232
247k
{
233
247k
  int i;
234
247k
235
247k
  if (!list)
236
38.1k
    return NULL;
237
208k
238
208k
  if (--list->ref > 0)
239
59.5k
    return NULL;
240
149k
241
149k
  isl_ctx_deref(list->ctx);
242
378k
  for (i = 0; i < list->n; 
++i229k
)
243
229k
    FN(EL,free)(list->p[i]);
244
149k
  free(list);
245
149k
246
149k
  return NULL;
247
149k
}
isl_aff_list_free
Line
Count
Source
232
16.3k
{
233
16.3k
  int i;
234
16.3k
235
16.3k
  if (!list)
236
7.98k
    return NULL;
237
8.31k
238
8.31k
  if (--list->ref > 0)
239
0
    return NULL;
240
8.31k
241
8.31k
  isl_ctx_deref(list->ctx);
242
16.6k
  for (i = 0; i < list->n; 
++i8.30k
)
243
8.31k
    
FN8.30k
(EL,free)(list->p[i])8.30k
;
244
8.31k
  free(list);
245
8.31k
246
8.31k
  return NULL;
247
8.31k
}
isl_pw_aff_list_free
Line
Count
Source
232
28.7k
{
233
28.7k
  int i;
234
28.7k
235
28.7k
  if (!list)
236
3
    return NULL;
237
28.7k
238
28.7k
  if (--list->ref > 0)
239
11.4k
    return NULL;
240
17.2k
241
17.2k
  isl_ctx_deref(list->ctx);
242
37.1k
  for (i = 0; i < list->n; 
++i19.8k
)
243
19.8k
    FN(EL,free)(list->p[i]);
244
17.2k
  free(list);
245
17.2k
246
17.2k
  return NULL;
247
17.2k
}
Unexecuted instantiation: isl_pw_multi_aff_list_free
isl_union_pw_aff_list_free
Line
Count
Source
232
260
{
233
260
  int i;
234
260
235
260
  if (!list)
236
0
    return NULL;
237
260
238
260
  if (--list->ref > 0)
239
0
    return NULL;
240
260
241
260
  isl_ctx_deref(list->ctx);
242
404
  for (i = 0; i < list->n; 
++i144
)
243
260
    
FN144
(EL,free)(list->p[i])144
;
244
260
  free(list);
245
260
246
260
  return NULL;
247
260
}
isl_union_pw_multi_aff_list_free
Line
Count
Source
232
7
{
233
7
  int i;
234
7
235
7
  if (!list)
236
0
    return NULL;
237
7
238
7
  if (--list->ref > 0)
239
0
    return NULL;
240
7
241
7
  isl_ctx_deref(list->ctx);
242
14
  for (i = 0; i < list->n; 
++i7
)
243
7
    FN(EL,free)(list->p[i]);
244
7
  free(list);
245
7
246
7
  return NULL;
247
7
}
Unexecuted instantiation: isl_ast_expr_list_free
isl_ast_node_list_free
Line
Count
Source
232
4.64k
{
233
4.64k
  int i;
234
4.64k
235
4.64k
  if (!list)
236
0
    return NULL;
237
4.64k
238
4.64k
  if (--list->ref > 0)
239
216
    return NULL;
240
4.42k
241
4.42k
  isl_ctx_deref(list->ctx);
242
10.5k
  for (i = 0; i < list->n; 
++i6.10k
)
243
6.10k
    FN(EL,free)(list->p[i]);
244
4.42k
  free(list);
245
4.42k
246
4.42k
  return NULL;
247
4.42k
}
isl_ast_graft_list_free
Line
Count
Source
232
17.9k
{
233
17.9k
  int i;
234
17.9k
235
17.9k
  if (!list)
236
0
    return NULL;
237
17.9k
238
17.9k
  if (--list->ref > 0)
239
0
    return NULL;
240
17.9k
241
17.9k
  isl_ctx_deref(list->ctx);
242
34.6k
  for (i = 0; i < list->n; 
++i16.7k
)
243
17.9k
    
FN16.7k
(EL,free)(list->p[i])16.7k
;
244
17.9k
  free(list);
245
17.9k
246
17.9k
  return NULL;
247
17.9k
}
isl_constraint_list_free
Line
Count
Source
232
2.29k
{
233
2.29k
  int i;
234
2.29k
235
2.29k
  if (!list)
236
0
    return NULL;
237
2.29k
238
2.29k
  if (--list->ref > 0)
239
0
    return NULL;
240
2.29k
241
2.29k
  isl_ctx_deref(list->ctx);
242
4.31k
  for (i = 0; i < list->n; 
++i2.02k
)
243
2.29k
    
FN2.02k
(EL,free)(list->p[i])2.02k
;
244
2.29k
  free(list);
245
2.29k
246
2.29k
  return NULL;
247
2.29k
}
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_free
isl_id_list_free
Line
Count
Source
232
36.6k
{
233
36.6k
  int i;
234
36.6k
235
36.6k
  if (!list)
236
0
    return NULL;
237
36.6k
238
36.6k
  if (--list->ref > 0)
239
34.7k
    return NULL;
240
1.83k
241
1.83k
  isl_ctx_deref(list->ctx);
242
4.11k
  for (i = 0; i < list->n; 
++i2.27k
)
243
2.27k
    FN(EL,free)(list->p[i]);
244
1.83k
  free(list);
245
1.83k
246
1.83k
  return NULL;
247
1.83k
}
isl_basic_map_list_free
Line
Count
Source
232
3.58k
{
233
3.58k
  int i;
234
3.58k
235
3.58k
  if (!list)
236
0
    return NULL;
237
3.58k
238
3.58k
  if (--list->ref > 0)
239
0
    return NULL;
240
3.58k
241
3.58k
  isl_ctx_deref(list->ctx);
242
17.5k
  for (i = 0; i < list->n; 
++i13.9k
)
243
13.9k
    FN(EL,free)(list->p[i]);
244
3.58k
  free(list);
245
3.58k
246
3.58k
  return NULL;
247
3.58k
}
isl_map_list_free
Line
Count
Source
232
823
{
233
823
  int i;
234
823
235
823
  if (!list)
236
0
    return NULL;
237
823
238
823
  if (--list->ref > 0)
239
0
    return NULL;
240
823
241
823
  isl_ctx_deref(list->ctx);
242
2.67k
  for (i = 0; i < list->n; 
++i1.85k
)
243
1.85k
    FN(EL,free)(list->p[i]);
244
823
  free(list);
245
823
246
823
  return NULL;
247
823
}
isl_union_map_list_free
Line
Count
Source
232
1
{
233
1
  int i;
234
1
235
1
  if (!list)
236
0
    return NULL;
237
1
238
1
  if (--list->ref > 0)
239
0
    return NULL;
240
1
241
1
  isl_ctx_deref(list->ctx);
242
2
  for (i = 0; i < list->n; 
++i1
)
243
1
    FN(EL,free)(list->p[i]);
244
1
  free(list);
245
1
246
1
  return NULL;
247
1
}
Unexecuted instantiation: isl_pw_qpolynomial_list_free
isl_schedule_tree_list_free
Line
Count
Source
232
112k
{
233
112k
  int i;
234
112k
235
112k
  if (!list)
236
22.1k
    return NULL;
237
90.7k
238
90.7k
  if (--list->ref > 0)
239
13.0k
    return NULL;
240
77.6k
241
77.6k
  isl_ctx_deref(list->ctx);
242
214k
  for (i = 0; i < list->n; 
++i136k
)
243
136k
    FN(EL,free)(list->p[i]);
244
77.6k
  free(list);
245
77.6k
246
77.6k
  return NULL;
247
77.6k
}
isl_basic_set_list_free
Line
Count
Source
232
2.94k
{
233
2.94k
  int i;
234
2.94k
235
2.94k
  if (!list)
236
0
    return NULL;
237
2.94k
238
2.94k
  if (--list->ref > 0)
239
13
    return NULL;
240
2.93k
241
2.93k
  isl_ctx_deref(list->ctx);
242
8.65k
  for (i = 0; i < list->n; 
++i5.72k
)
243
5.72k
    FN(EL,free)(list->p[i]);
244
2.93k
  free(list);
245
2.93k
246
2.93k
  return NULL;
247
2.93k
}
isl_set_list_free
Line
Count
Source
232
19.5k
{
233
19.5k
  int i;
234
19.5k
235
19.5k
  if (!list)
236
7.98k
    return NULL;
237
11.5k
238
11.5k
  if (--list->ref > 0)
239
0
    return NULL;
240
11.5k
241
11.5k
  isl_ctx_deref(list->ctx);
242
26.2k
  for (i = 0; i < list->n; 
++i14.6k
)
243
14.6k
    FN(EL,free)(list->p[i]);
244
11.5k
  free(list);
245
11.5k
246
11.5k
  return NULL;
247
11.5k
}
isl_union_set_list_free
Line
Count
Source
232
485
{
233
485
  int i;
234
485
235
485
  if (!list)
236
0
    return NULL;
237
485
238
485
  if (--list->ref > 0)
239
0
    return NULL;
240
485
241
485
  isl_ctx_deref(list->ctx);
242
1.05k
  for (i = 0; i < list->n; 
++i569
)
243
569
    FN(EL,free)(list->p[i]);
244
485
  free(list);
245
485
246
485
  return NULL;
247
485
}
isl_val_list_free
Line
Count
Source
232
7
{
233
7
  int i;
234
7
235
7
  if (!list)
236
0
    return NULL;
237
7
238
7
  if (--list->ref > 0)
239
0
    return NULL;
240
7
241
7
  isl_ctx_deref(list->ctx);
242
24
  for (i = 0; i < list->n; 
++i17
)
243
17
    FN(EL,free)(list->p[i]);
244
7
  free(list);
245
7
246
7
  return NULL;
247
7
}
248
249
int FN(FN(LIST(EL),n),BASE)(__isl_keep LIST(EL) *list)
250
955k
{
251
955k
  return list ? 
list->n940k
:
015.0k
;
252
955k
}
isl_aff_list_n_aff
Line
Count
Source
250
1.11k
{
251
1.11k
  return list ? list->n : 
00
;
252
1.11k
}
isl_pw_aff_list_n_pw_aff
Line
Count
Source
250
17.5k
{
251
17.5k
  return list ? list->n : 
00
;
252
17.5k
}
Unexecuted instantiation: isl_pw_multi_aff_list_n_pw_multi_aff
isl_union_pw_aff_list_n_union_pw_aff
Line
Count
Source
250
260
{
251
260
  return list ? list->n : 
00
;
252
260
}
isl_union_pw_multi_aff_list_n_union_pw_multi_aff
Line
Count
Source
250
7
{
251
7
  return list ? list->n : 
00
;
252
7
}
Unexecuted instantiation: isl_ast_expr_list_n_ast_expr
isl_ast_node_list_n_ast_node
Line
Count
Source
250
4.83k
{
251
4.83k
  return list ? list->n : 
00
;
252
4.83k
}
isl_ast_graft_list_n_ast_graft
Line
Count
Source
250
27.1k
{
251
27.1k
  return list ? list->n : 
00
;
252
27.1k
}
isl_constraint_list_n_constraint
Line
Count
Source
250
3.69k
{
251
3.69k
  return list ? list->n : 
00
;
252
3.69k
}
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_n_pw_qpolynomial_fold
isl_id_list_n_id
Line
Count
Source
250
1.07k
{
251
1.07k
  return list ? list->n : 
00
;
252
1.07k
}
isl_basic_map_list_n_basic_map
Line
Count
Source
250
3.24k
{
251
3.24k
  return list ? list->n : 
00
;
252
3.24k
}
isl_map_list_n_map
Line
Count
Source
250
814
{
251
814
  return list ? list->n : 
00
;
252
814
}
isl_union_map_list_n_union_map
Line
Count
Source
250
13
{
251
13
  return list ? list->n : 
00
;
252
13
}
Unexecuted instantiation: isl_pw_qpolynomial_list_n_pw_qpolynomial
isl_schedule_tree_list_n_schedule_tree
Line
Count
Source
250
880k
{
251
880k
  return list ? 
list->n865k
:
015.0k
;
252
880k
}
isl_basic_set_list_n_basic_set
Line
Count
Source
250
4.47k
{
251
4.47k
  return list ? list->n : 
00
;
252
4.47k
}
isl_set_list_n_set
Line
Count
Source
250
8.01k
{
251
8.01k
  return list ? list->n : 
00
;
252
8.01k
}
isl_union_set_list_n_union_set
Line
Count
Source
250
2.76k
{
251
2.76k
  return list ? list->n : 
00
;
252
2.76k
}
isl_val_list_n_val
Line
Count
Source
250
7
{
251
7
  return list ? list->n : 
00
;
252
7
}
253
254
/* Return the element at position "index" in "list".
255
 */
256
static __isl_keep EL *FN(LIST(EL),peek)(__isl_keep LIST(EL) *list, int index)
257
666k
{
258
666k
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
666k
  return list->p[index];
261
666k
}
isl_aff.c:isl_aff_list_peek
Line
Count
Source
257
8.71k
{
258
8.71k
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
8.71k
  return list->p[index];
261
8.71k
}
isl_aff.c:isl_pw_aff_list_peek
Line
Count
Source
257
22.2k
{
258
22.2k
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
22.2k
  return list->p[index];
261
22.2k
}
Unexecuted instantiation: isl_aff.c:isl_pw_multi_aff_list_peek
isl_aff.c:isl_union_pw_aff_list_peek
Line
Count
Source
257
288
{
258
288
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
288
  return list->p[index];
261
288
}
isl_aff.c:isl_union_pw_multi_aff_list_peek
Line
Count
Source
257
7
{
258
7
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
7
  return list->p[index];
261
7
}
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_peek
isl_ast.c:isl_ast_node_list_peek
Line
Count
Source
257
4.39k
{
258
4.39k
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
4.39k
  return list->p[index];
261
4.39k
}
isl_ast_graft.c:isl_ast_graft_list_peek
Line
Count
Source
257
33.6k
{
258
33.6k
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
33.6k
  return list->p[index];
261
33.6k
}
isl_constraint.c:isl_constraint_list_peek
Line
Count
Source
257
2.02k
{
258
2.02k
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
2.02k
  return list->p[index];
261
2.02k
}
Unexecuted instantiation: isl_fold.c:isl_pw_qpolynomial_fold_list_peek
isl_id.c:isl_id_list_peek
Line
Count
Source
257
23.1k
{
258
23.1k
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
23.1k
  return list->p[index];
261
23.1k
}
isl_map_list.c:isl_basic_map_list_peek
Line
Count
Source
257
11.2k
{
258
11.2k
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
11.2k
  return list->p[index];
261
11.2k
}
isl_map_list.c:isl_map_list_peek
Line
Count
Source
257
1.82k
{
258
1.82k
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
1.82k
  return list->p[index];
261
1.82k
}
isl_map_list.c:isl_union_map_list_peek
Line
Count
Source
257
9
{
258
9
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
9
  return list->p[index];
261
9
}
Unexecuted instantiation: isl_polynomial.c:isl_pw_qpolynomial_list_peek
isl_schedule_tree.c:isl_schedule_tree_list_peek
Line
Count
Source
257
528k
{
258
528k
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
528k
  return list->p[index];
261
528k
}
isl_set_list.c:isl_basic_set_list_peek
Line
Count
Source
257
8.91k
{
258
8.91k
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
8.91k
  return list->p[index];
261
8.91k
}
isl_set_list.c:isl_set_list_peek
Line
Count
Source
257
18.3k
{
258
18.3k
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
18.3k
  return list->p[index];
261
18.3k
}
isl_set_list.c:isl_union_set_list_peek
Line
Count
Source
257
2.84k
{
258
2.84k
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
2.84k
  return list->p[index];
261
2.84k
}
isl_val.c:isl_val_list_peek
Line
Count
Source
257
34
{
258
34
  if (FN(LIST(EL),check_index)(list, index) < 0)
259
0
    return NULL;
260
34
  return list->p[index];
261
34
}
262
263
/* Return a copy of the element at position "index" in "list".
264
 */
265
__isl_give EL *FN(FN(LIST(EL),get),BASE)(__isl_keep LIST(EL) *list, int index)
266
657k
{
267
657k
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
657k
}
isl_aff_list_get_aff
Line
Count
Source
266
8.71k
{
267
8.71k
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
8.71k
}
isl_pw_aff_list_get_pw_aff
Line
Count
Source
266
13.6k
{
267
13.6k
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
13.6k
}
Unexecuted instantiation: isl_pw_multi_aff_list_get_pw_multi_aff
isl_union_pw_aff_list_get_union_pw_aff
Line
Count
Source
266
144
{
267
144
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
144
}
isl_union_pw_multi_aff_list_get_union_pw_multi_aff
Line
Count
Source
266
7
{
267
7
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
7
}
Unexecuted instantiation: isl_ast_expr_list_get_ast_expr
isl_ast_node_list_get_ast_node
Line
Count
Source
266
4.39k
{
267
4.39k
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
4.39k
}
isl_ast_graft_list_get_ast_graft
Line
Count
Source
266
33.6k
{
267
33.6k
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
33.6k
}
isl_constraint_list_get_constraint
Line
Count
Source
266
2.02k
{
267
2.02k
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
2.02k
}
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_get_pw_qpolynomial_fold
isl_id_list_get_id
Line
Count
Source
266
23.1k
{
267
23.1k
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
23.1k
}
isl_basic_map_list_get_basic_map
Line
Count
Source
266
11.2k
{
267
11.2k
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
11.2k
}
isl_map_list_get_map
Line
Count
Source
266
1.82k
{
267
1.82k
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
1.82k
}
isl_union_map_list_get_union_map
Line
Count
Source
266
9
{
267
9
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
9
}
Unexecuted instantiation: isl_pw_qpolynomial_list_get_pw_qpolynomial
isl_schedule_tree_list_get_schedule_tree
Line
Count
Source
266
528k
{
267
528k
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
528k
}
isl_basic_set_list_get_basic_set
Line
Count
Source
266
8.91k
{
267
8.91k
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
8.91k
}
isl_set_list_get_set
Line
Count
Source
266
18.3k
{
267
18.3k
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
18.3k
}
isl_union_set_list_get_union_set
Line
Count
Source
266
2.84k
{
267
2.84k
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
2.84k
}
isl_val_list_get_val
Line
Count
Source
266
17
{
267
17
  return FN(EL,copy)(FN(LIST(EL),peek)(list, index));
268
17
}
269
270
/* Replace the element at position "index" in "list" by "el".
271
 */
272
__isl_give LIST(EL) *FN(FN(LIST(EL),set),BASE)(__isl_take LIST(EL) *list,
273
  int index, __isl_take EL *el)
274
47.1k
{
275
47.1k
  if (!list || !el)
276
0
    goto error;
277
47.1k
  if (FN(LIST(EL),check_index)(list, index) < 0)
278
0
    goto error;
279
47.1k
  if (list->p[index] == el) {
280
11.1k
    FN(EL,free)(el);
281
11.1k
    return list;
282
11.1k
  }
283
35.9k
  list = FN(LIST(EL),cow)(list);
284
35.9k
  if (!list)
285
0
    goto error;
286
35.9k
  FN(EL,free)(list->p[index]);
287
35.9k
  list->p[index] = el;
288
35.9k
  return list;
289
35.9k
error:
290
0
  FN(EL,free)(el);
291
0
  FN(LIST(EL),free)(list);
292
0
  return NULL;
293
35.9k
}
isl_aff_list_set_aff
Line
Count
Source
274
2
{
275
2
  if (!list || !el)
276
0
    goto error;
277
2
  if (FN(LIST(EL),check_index)(list, index) < 0)
278
0
    goto error;
279
2
  if (list->p[index] == el) {
280
0
    FN(EL,free)(el);
281
0
    return list;
282
0
  }
283
2
  list = FN(LIST(EL),cow)(list);
284
2
  if (!list)
285
0
    goto error;
286
2
  FN(EL,free)(list->p[index]);
287
2
  list->p[index] = el;
288
2
  return list;
289
2
error:
290
0
  FN(EL,free)(el);
291
0
  FN(LIST(EL),free)(list);
292
0
  return NULL;
293
2
}
isl_pw_aff_list_set_pw_aff
Line
Count
Source
274
3.45k
{
275
3.45k
  if (!list || !el)
276
0
    goto error;
277
3.45k
  if (FN(LIST(EL),check_index)(list, index) < 0)
278
0
    goto error;
279
3.45k
  if (list->p[index] == el) {
280
0
    FN(EL,free)(el);
281
0
    return list;
282
0
  }
283
3.45k
  list = FN(LIST(EL),cow)(list);
284
3.45k
  if (!list)
285
0
    goto error;
286
3.45k
  FN(EL,free)(list->p[index]);
287
3.45k
  list->p[index] = el;
288
3.45k
  return list;
289
3.45k
error:
290
0
  FN(EL,free)(el);
291
0
  FN(LIST(EL),free)(list);
292
0
  return NULL;
293
3.45k
}
Unexecuted instantiation: isl_pw_multi_aff_list_set_pw_multi_aff
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
274
6.60k
{
275
6.60k
  if (!list || !el)
276
0
    goto error;
277
6.60k
  if (FN(LIST(EL),check_index)(list, index) < 0)
278
0
    goto error;
279
6.60k
  if (list->p[index] == el) {
280
6.58k
    FN(EL,free)(el);
281
6.58k
    return list;
282
6.58k
  }
283
24
  list = FN(LIST(EL),cow)(list);
284
24
  if (!list)
285
0
    goto error;
286
24
  FN(EL,free)(list->p[index]);
287
24
  list->p[index] = el;
288
24
  return list;
289
24
error:
290
0
  FN(EL,free)(el);
291
0
  FN(LIST(EL),free)(list);
292
0
  return NULL;
293
24
}
Unexecuted instantiation: isl_constraint_list_set_constraint
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_set_pw_qpolynomial_fold
Unexecuted instantiation: isl_id_list_set_id
isl_basic_map_list_set_basic_map
Line
Count
Source
274
3.48k
{
275
3.48k
  if (!list || !el)
276
0
    goto error;
277
3.48k
  if (FN(LIST(EL),check_index)(list, index) < 0)
278
0
    goto error;
279
3.48k
  if (list->p[index] == el) {
280
2.99k
    FN(EL,free)(el);
281
2.99k
    return list;
282
2.99k
  }
283
490
  list = FN(LIST(EL),cow)(list);
284
490
  if (!list)
285
0
    goto error;
286
490
  FN(EL,free)(list->p[index]);
287
490
  list->p[index] = el;
288
490
  return list;
289
490
error:
290
0
  FN(EL,free)(el);
291
0
  FN(LIST(EL),free)(list);
292
0
  return NULL;
293
490
}
Unexecuted instantiation: isl_map_list_set_map
isl_union_map_list_set_union_map
Line
Count
Source
274
2
{
275
2
  if (!list || !el)
276
0
    goto error;
277
2
  if (FN(LIST(EL),check_index)(list, index) < 0)
278
0
    goto error;
279
2
  if (list->p[index] == el) {
280
0
    FN(EL,free)(el);
281
0
    return list;
282
0
  }
283
2
  list = FN(LIST(EL),cow)(list);
284
2
  if (!list)
285
0
    goto error;
286
2
  FN(EL,free)(list->p[index]);
287
2
  list->p[index] = el;
288
2
  return list;
289
2
error:
290
0
  FN(EL,free)(el);
291
0
  FN(LIST(EL),free)(list);
292
0
  return NULL;
293
2
}
Unexecuted instantiation: isl_pw_qpolynomial_list_set_pw_qpolynomial
isl_schedule_tree_list_set_schedule_tree
Line
Count
Source
274
26.4k
{
275
26.4k
  if (!list || !el)
276
0
    goto error;
277
26.4k
  if (FN(LIST(EL),check_index)(list, index) < 0)
278
0
    goto error;
279
26.4k
  if (list->p[index] == el) {
280
3
    FN(EL,free)(el);
281
3
    return list;
282
3
  }
283
26.4k
  list = FN(LIST(EL),cow)(list);
284
26.4k
  if (!list)
285
0
    goto error;
286
26.4k
  FN(EL,free)(list->p[index]);
287
26.4k
  list->p[index] = el;
288
26.4k
  return list;
289
26.4k
error:
290
0
  FN(EL,free)(el);
291
0
  FN(LIST(EL),free)(list);
292
0
  return NULL;
293
26.4k
}
isl_basic_set_list_set_basic_set
Line
Count
Source
274
3.54k
{
275
3.54k
  if (!list || !el)
276
0
    goto error;
277
3.54k
  if (FN(LIST(EL),check_index)(list, index) < 0)
278
0
    goto error;
279
3.54k
  if (list->p[index] == el) {
280
0
    FN(EL,free)(el);
281
0
    return list;
282
0
  }
283
3.54k
  list = FN(LIST(EL),cow)(list);
284
3.54k
  if (!list)
285
0
    goto error;
286
3.54k
  FN(EL,free)(list->p[index]);
287
3.54k
  list->p[index] = el;
288
3.54k
  return list;
289
3.54k
error:
290
0
  FN(EL,free)(el);
291
0
  FN(LIST(EL),free)(list);
292
0
  return NULL;
293
3.54k
}
isl_set_list_set_set
Line
Count
Source
274
3.55k
{
275
3.55k
  if (!list || !el)
276
0
    goto error;
277
3.55k
  if (FN(LIST(EL),check_index)(list, index) < 0)
278
0
    goto error;
279
3.55k
  if (list->p[index] == el) {
280
1.53k
    FN(EL,free)(el);
281
1.53k
    return list;
282
1.53k
  }
283
2.01k
  list = FN(LIST(EL),cow)(list);
284
2.01k
  if (!list)
285
0
    goto error;
286
2.01k
  FN(EL,free)(list->p[index]);
287
2.01k
  list->p[index] = el;
288
2.01k
  return list;
289
2.01k
error:
290
0
  FN(EL,free)(el);
291
0
  FN(LIST(EL),free)(list);
292
0
  return NULL;
293
2.01k
}
Unexecuted instantiation: isl_union_set_list_set_union_set
Unexecuted instantiation: isl_val_list_set_val
294
295
/* Return the element at position "index" of "list".
296
 * This may be either a copy or the element itself
297
 * if there is only one reference to "list".
298
 * This allows the element to be modified inplace
299
 * if both the list and the element have only a single reference.
300
 * The caller is not allowed to modify "list" between
301
 * this call to isl_list_*_take_* and a subsequent call
302
 * to isl_list_*_restore_*.
303
 * The only exception is that isl_list_*_free can be called instead.
304
 */
305
static __isl_give EL *FN(FN(LIST(EL),take),BASE)(__isl_keep LIST(EL) *list,
306
  int index)
307
64
{
308
64
  EL *el;
309
64
310
64
  if (FN(LIST(EL),check_index)(list, index) < 0)
311
0
    return NULL;
312
64
  if (list->ref != 1)
313
0
    return FN(FN(LIST(EL),get),BASE)(list, index);
314
64
  el = list->p[index];
315
64
  list->p[index] = NULL;
316
64
  return el;
317
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_pw_multi_aff_list_take_pw_multi_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_constraint.c:isl_constraint_list_take_constraint
Unexecuted instantiation: isl_fold.c:isl_pw_qpolynomial_fold_list_take_pw_qpolynomial_fold
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_polynomial.c:isl_pw_qpolynomial_list_take_pw_qpolynomial
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
307
64
{
308
64
  EL *el;
309
64
310
64
  if (FN(LIST(EL),check_index)(list, index) < 0)
311
0
    return NULL;
312
64
  if (list->ref != 1)
313
0
    return FN(FN(LIST(EL),get),BASE)(list, index);
314
64
  el = list->p[index];
315
64
  list->p[index] = NULL;
316
64
  return el;
317
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
318
319
/* Set the element at position "index" of "list" to "el",
320
 * where the position may be empty due to a previous call
321
 * to isl_list_*_take_*.
322
 */
323
static __isl_give LIST(EL) *FN(FN(LIST(EL),restore),BASE)(
324
  __isl_take LIST(EL) *list, int index, __isl_take EL *el)
325
64
{
326
64
  return FN(FN(LIST(EL),set),BASE)(list, index, el);
327
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_pw_multi_aff_list_restore_pw_multi_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_constraint.c:isl_constraint_list_restore_constraint
Unexecuted instantiation: isl_fold.c:isl_pw_qpolynomial_fold_list_restore_pw_qpolynomial_fold
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_polynomial.c:isl_pw_qpolynomial_list_restore_pw_qpolynomial
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
325
64
{
326
64
  return FN(FN(LIST(EL),set),BASE)(list, index, el);
327
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
328
329
isl_stat FN(LIST(EL),foreach)(__isl_keep LIST(EL) *list,
330
  isl_stat (*fn)(__isl_take EL *el, void *user), void *user)
331
1.53k
{
332
1.53k
  int i;
333
1.53k
334
1.53k
  if (!list)
335
0
    return isl_stat_error;
336
1.53k
337
3.36k
  
for (i = 0; 1.53k
i < list->n;
++i1.83k
) {
338
2.36k
    EL *el = FN(EL,copy)(list->p[i]);
339
2.36k
    if (!el)
340
0
      return isl_stat_error;
341
2.36k
    if (fn(el, user) < 0)
342
534
      return isl_stat_error;
343
2.36k
  }
344
1.53k
345
1.53k
  
return isl_stat_ok996
;
346
1.53k
}
Unexecuted instantiation: isl_aff_list_foreach
isl_pw_aff_list_foreach
Line
Count
Source
331
701
{
332
701
  int i;
333
701
334
701
  if (!list)
335
0
    return isl_stat_error;
336
701
337
877
  
for (i = 0; 701
i < list->n;
++i176
) {
338
710
    EL *el = FN(EL,copy)(list->p[i]);
339
710
    if (!el)
340
0
      return isl_stat_error;
341
710
    if (fn(el, user) < 0)
342
534
      return isl_stat_error;
343
710
  }
344
701
345
701
  
return isl_stat_ok167
;
346
701
}
Unexecuted instantiation: isl_pw_multi_aff_list_foreach
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
isl_constraint_list_foreach
Line
Count
Source
331
701
{
332
701
  int i;
333
701
334
701
  if (!list)
335
0
    return isl_stat_error;
336
701
337
2.22k
  
for (i = 0; 701
i < list->n;
++i1.52k
) {
338
1.52k
    EL *el = FN(EL,copy)(list->p[i]);
339
1.52k
    if (!el)
340
0
      return isl_stat_error;
341
1.52k
    if (fn(el, user) < 0)
342
0
      return isl_stat_error;
343
1.52k
  }
344
701
345
701
  return isl_stat_ok;
346
701
}
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_foreach
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_pw_qpolynomial_list_foreach
Unexecuted instantiation: isl_schedule_tree_list_foreach
isl_basic_set_list_foreach
Line
Count
Source
331
128
{
332
128
  int i;
333
128
334
128
  if (!list)
335
0
    return isl_stat_error;
336
128
337
256
  
for (i = 0; 128
i < list->n;
++i128
) {
338
128
    EL *el = FN(EL,copy)(list->p[i]);
339
128
    if (!el)
340
0
      return isl_stat_error;
341
128
    if (fn(el, user) < 0)
342
0
      return isl_stat_error;
343
128
  }
344
128
345
128
  return isl_stat_ok;
346
128
}
Unexecuted instantiation: isl_set_list_foreach
Unexecuted instantiation: isl_union_set_list_foreach
Unexecuted instantiation: isl_val_list_foreach
347
348
/* Replace each element in "list" by the result of calling "fn"
349
 * on the element.
350
 */
351
__isl_give LIST(EL) *FN(LIST(EL),map)(__isl_keep LIST(EL) *list,
352
  __isl_give EL *(*fn)(__isl_take EL *el, void *user), void *user)
353
64
{
354
64
  int i, n;
355
64
356
64
  if (!list)
357
0
    return NULL;
358
64
359
64
  n = list->n;
360
128
  for (i = 0; i < n; 
++i64
) {
361
64
    EL *el = FN(FN(LIST(EL),take),BASE)(list, i);
362
64
    if (!el)
363
0
      return FN(LIST(EL),free)(list);
364
64
    el = fn(el, user);
365
64
    list = FN(FN(LIST(EL),restore),BASE)(list, i, el);
366
64
  }
367
64
368
64
  return list;
369
64
}
Unexecuted instantiation: isl_aff_list_map
Unexecuted instantiation: isl_pw_aff_list_map
Unexecuted instantiation: isl_pw_multi_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_constraint_list_map
Unexecuted instantiation: isl_pw_qpolynomial_fold_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_pw_qpolynomial_list_map
Unexecuted instantiation: isl_schedule_tree_list_map
isl_basic_set_list_map
Line
Count
Source
353
64
{
354
64
  int i, n;
355
64
356
64
  if (!list)
357
0
    return NULL;
358
64
359
64
  n = list->n;
360
128
  for (i = 0; i < n; 
++i64
) {
361
64
    EL *el = FN(FN(LIST(EL),take),BASE)(list, i);
362
64
    if (!el)
363
0
      return FN(LIST(EL),free)(list);
364
64
    el = fn(el, user);
365
64
    list = FN(FN(LIST(EL),restore),BASE)(list, i, el);
366
64
  }
367
64
368
64
  return list;
369
64
}
Unexecuted instantiation: isl_set_list_map
Unexecuted instantiation: isl_union_set_list_map
Unexecuted instantiation: isl_val_list_map
370
371
/* Internal data structure for isl_*_list_sort.
372
 *
373
 * "cmp" is the original comparison function.
374
 * "user" is a user provided pointer that should be passed to "cmp".
375
 */
376
S(LIST(EL),sort_data) {
377
  int (*cmp)(__isl_keep EL *a, __isl_keep EL *b, void *user);
378
  void *user;
379
};
380
381
/* Compare two entries of an isl_*_list based on the user provided
382
 * comparison function on pairs of isl_* objects.
383
 */
384
static int FN(LIST(EL),cmp)(const void *a, const void *b, void *user)
385
1.12k
{
386
1.12k
  S(LIST(EL),sort_data) *data = user;
387
1.12k
  EL * const *el1 = a;
388
1.12k
  EL * const *el2 = b;
389
1.12k
390
1.12k
  return data->cmp(*el1, *el2, data->user);
391
1.12k
}
Unexecuted instantiation: isl_aff.c:isl_aff_list_cmp
isl_aff.c:isl_pw_aff_list_cmp
Line
Count
Source
385
75
{
386
75
  S(LIST(EL),sort_data) *data = user;
387
75
  EL * const *el1 = a;
388
75
  EL * const *el2 = b;
389
75
390
75
  return data->cmp(*el1, *el2, data->user);
391
75
}
Unexecuted instantiation: isl_aff.c:isl_pw_multi_aff_list_cmp
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
385
20
{
386
20
  S(LIST(EL),sort_data) *data = user;
387
20
  EL * const *el1 = a;
388
20
  EL * const *el2 = b;
389
20
390
20
  return data->cmp(*el1, *el2, data->user);
391
20
}
isl_constraint.c:isl_constraint_list_cmp
Line
Count
Source
385
1.02k
{
386
1.02k
  S(LIST(EL),sort_data) *data = user;
387
1.02k
  EL * const *el1 = a;
388
1.02k
  EL * const *el2 = b;
389
1.02k
390
1.02k
  return data->cmp(*el1, *el2, data->user);
391
1.02k
}
Unexecuted instantiation: isl_fold.c:isl_pw_qpolynomial_fold_list_cmp
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_polynomial.c:isl_pw_qpolynomial_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
392
393
/* Sort the elements of "list" in ascending order according to
394
 * comparison function "cmp".
395
 */
396
__isl_give LIST(EL) *FN(LIST(EL),sort)(__isl_take LIST(EL) *list,
397
  int (*cmp)(__isl_keep EL *a, __isl_keep EL *b, void *user), void *user)
398
1.70k
{
399
1.70k
  S(LIST(EL),sort_data) data = { cmp, user };
400
1.70k
401
1.70k
  if (!list)
402
0
    return NULL;
403
1.70k
  if (list->n <= 1)
404
842
    return list;
405
858
  list = FN(LIST(EL),cow)(list);
406
858
  if (!list)
407
0
    return NULL;
408
858
409
858
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
410
858
      &FN(LIST(EL),cmp), &data) < 0)
411
0
    return FN(LIST(EL),free)(list);
412
858
413
858
  return list;
414
858
}
Unexecuted instantiation: isl_aff_list_sort
isl_pw_aff_list_sort
Line
Count
Source
398
81
{
399
81
  S(LIST(EL),sort_data) data = { cmp, user };
400
81
401
81
  if (!list)
402
0
    return NULL;
403
81
  if (list->n <= 1)
404
11
    return list;
405
70
  list = FN(LIST(EL),cow)(list);
406
70
  if (!list)
407
0
    return NULL;
408
70
409
70
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
410
70
      &FN(LIST(EL),cmp), &data) < 0)
411
0
    return FN(LIST(EL),free)(list);
412
70
413
70
  return list;
414
70
}
Unexecuted instantiation: isl_pw_multi_aff_list_sort
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
398
28
{
399
28
  S(LIST(EL),sort_data) data = { cmp, user };
400
28
401
28
  if (!list)
402
0
    return NULL;
403
28
  if (list->n <= 1)
404
8
    return list;
405
20
  list = FN(LIST(EL),cow)(list);
406
20
  if (!list)
407
0
    return NULL;
408
20
409
20
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
410
20
      &FN(LIST(EL),cmp), &data) < 0)
411
0
    return FN(LIST(EL),free)(list);
412
20
413
20
  return list;
414
20
}
isl_constraint_list_sort
Line
Count
Source
398
1.59k
{
399
1.59k
  S(LIST(EL),sort_data) data = { cmp, user };
400
1.59k
401
1.59k
  if (!list)
402
0
    return NULL;
403
1.59k
  if (list->n <= 1)
404
823
    return list;
405
768
  list = FN(LIST(EL),cow)(list);
406
768
  if (!list)
407
0
    return NULL;
408
768
409
768
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
410
768
      &FN(LIST(EL),cmp), &data) < 0)
411
0
    return FN(LIST(EL),free)(list);
412
768
413
768
  return list;
414
768
}
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_sort
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_pw_qpolynomial_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
415
416
/* Internal data structure for isl_*_list_foreach_scc.
417
 *
418
 * "list" is the original list.
419
 * "follows" is the user provided callback that defines the edges of the graph.
420
 */
421
S(LIST(EL),foreach_scc_data) {
422
  LIST(EL) *list;
423
  isl_bool (*follows)(__isl_keep EL *a, __isl_keep EL *b, void *user);
424
  void *follows_user;
425
};
426
427
/* Does element i of data->list follow element j?
428
 *
429
 * Use the user provided callback to find out.
430
 */
431
static isl_bool FN(LIST(EL),follows)(int i, int j, void *user)
432
120
{
433
120
  S(LIST(EL),foreach_scc_data) *data = user;
434
120
435
120
  return data->follows(data->list->p[i], data->list->p[j],
436
120
        data->follows_user);
437
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_pw_multi_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_constraint.c:isl_constraint_list_follows
Unexecuted instantiation: isl_fold.c:isl_pw_qpolynomial_fold_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_polynomial.c:isl_pw_qpolynomial_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
432
120
{
433
120
  S(LIST(EL),foreach_scc_data) *data = user;
434
120
435
120
  return data->follows(data->list->p[i], data->list->p[j],
436
120
        data->follows_user);
437
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
438
439
/* Call "fn" on the sublist of "list" that consists of the elements
440
 * with indices specified by the "n" elements of "pos".
441
 */
442
static isl_stat FN(LIST(EL),call_on_scc)(__isl_keep LIST(EL) *list, int *pos,
443
  int n, isl_stat (*fn)(__isl_take LIST(EL) *scc, void *user), void *user)
444
90
{
445
90
  int i;
446
90
  isl_ctx *ctx;
447
90
  LIST(EL) *slice;
448
90
449
90
  ctx = FN(LIST(EL),get_ctx)(list);
450
90
  slice = FN(LIST(EL),alloc)(ctx, n);
451
180
  for (i = 0; i < n; 
++i90
) {
452
90
    EL *el;
453
90
454
90
    el = FN(EL,copy)(list->p[pos[i]]);
455
90
    slice = FN(LIST(EL),add)(slice, el);
456
90
  }
457
90
458
90
  return fn(slice, user);
459
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_pw_multi_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_constraint.c:isl_constraint_list_call_on_scc
Unexecuted instantiation: isl_fold.c:isl_pw_qpolynomial_fold_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_polynomial.c:isl_pw_qpolynomial_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
444
90
{
445
90
  int i;
446
90
  isl_ctx *ctx;
447
90
  LIST(EL) *slice;
448
90
449
90
  ctx = FN(LIST(EL),get_ctx)(list);
450
90
  slice = FN(LIST(EL),alloc)(ctx, n);
451
180
  for (i = 0; i < n; 
++i90
) {
452
90
    EL *el;
453
90
454
90
    el = FN(EL,copy)(list->p[pos[i]]);
455
90
    slice = FN(LIST(EL),add)(slice, el);
456
90
  }
457
90
458
90
  return fn(slice, user);
459
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
460
461
/* Call "fn" on each of the strongly connected components (SCCs) of
462
 * the graph with as vertices the elements of "list" and
463
 * a directed edge from node b to node a iff follows(a, b)
464
 * returns 1.  follows should return -1 on error.
465
 *
466
 * If SCC a contains a node i that follows a node j in another SCC b
467
 * (i.e., follows(i, j, user) returns 1), then fn will be called on SCC a
468
 * after being called on SCC b.
469
 *
470
 * We simply call isl_tarjan_graph_init, extract the SCCs from the result and
471
 * call fn on each of them.
472
 */
473
isl_stat FN(LIST(EL),foreach_scc)(__isl_keep LIST(EL) *list,
474
  isl_bool (*follows)(__isl_keep EL *a, __isl_keep EL *b, void *user),
475
  void *follows_user,
476
  isl_stat (*fn)(__isl_take LIST(EL) *scc, void *user), void *fn_user)
477
54
{
478
54
  S(LIST(EL),foreach_scc_data) data = { list, follows, follows_user };
479
54
  int i, n;
480
54
  isl_ctx *ctx;
481
54
  struct isl_tarjan_graph *g;
482
54
483
54
  if (!list)
484
0
    return isl_stat_error;
485
54
  if (list->n == 0)
486
0
    return isl_stat_ok;
487
54
  if (list->n == 1)
488
0
    return fn(FN(LIST(EL),copy)(list), fn_user);
489
54
490
54
  ctx = FN(LIST(EL),get_ctx)(list);
491
54
  n = list->n;
492
54
  g = isl_tarjan_graph_init(ctx, n, &FN(LIST(EL),follows), &data);
493
54
  if (!g)
494
0
    return isl_stat_error;
495
54
496
54
  i = 0;
497
103
  do {
498
103
    int first;
499
103
500
103
    if (g->order[i] == -1)
501
103
      
isl_die0
(ctx, isl_error_internal, "cannot happen",
502
103
        break);
503
103
    first = i;
504
225
    while (g->order[i] != -1) {
505
122
      ++i; --n;
506
122
    }
507
103
    if (first == 0 && 
n == 054
) {
508
13
      isl_tarjan_graph_free(g);
509
13
      return fn(FN(LIST(EL),copy)(list), fn_user);
510
13
    }
511
90
    if (FN(LIST(EL),call_on_scc)(list, g->order + first, i - first,
512
90
              fn, fn_user) < 0)
513
0
      break;
514
90
    ++i;
515
90
  } while (n);
516
54
517
54
  isl_tarjan_graph_free(g);
518
41
519
41
  return n > 0 ? 
isl_stat_error0
: isl_stat_ok;
520
54
}
Unexecuted instantiation: isl_aff_list_foreach_scc
Unexecuted instantiation: isl_pw_aff_list_foreach_scc
Unexecuted instantiation: isl_pw_multi_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_constraint_list_foreach_scc
Unexecuted instantiation: isl_pw_qpolynomial_fold_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_pw_qpolynomial_list_foreach_scc
Unexecuted instantiation: isl_schedule_tree_list_foreach_scc
isl_basic_set_list_foreach_scc
Line
Count
Source
477
54
{
478
54
  S(LIST(EL),foreach_scc_data) data = { list, follows, follows_user };
479
54
  int i, n;
480
54
  isl_ctx *ctx;
481
54
  struct isl_tarjan_graph *g;
482
54
483
54
  if (!list)
484
0
    return isl_stat_error;
485
54
  if (list->n == 0)
486
0
    return isl_stat_ok;
487
54
  if (list->n == 1)
488
0
    return fn(FN(LIST(EL),copy)(list), fn_user);
489
54
490
54
  ctx = FN(LIST(EL),get_ctx)(list);
491
54
  n = list->n;
492
54
  g = isl_tarjan_graph_init(ctx, n, &FN(LIST(EL),follows), &data);
493
54
  if (!g)
494
0
    return isl_stat_error;
495
54
496
54
  i = 0;
497
103
  do {
498
103
    int first;
499
103
500
103
    if (g->order[i] == -1)
501
103
      
isl_die0
(ctx, isl_error_internal, "cannot happen",
502
103
        break);
503
103
    first = i;
504
225
    while (g->order[i] != -1) {
505
122
      ++i; --n;
506
122
    }
507
103
    if (first == 0 && 
n == 054
) {
508
13
      isl_tarjan_graph_free(g);
509
13
      return fn(FN(LIST(EL),copy)(list), fn_user);
510
13
    }
511
90
    if (FN(LIST(EL),call_on_scc)(list, g->order + first, i - first,
512
90
              fn, fn_user) < 0)
513
0
      break;
514
90
    ++i;
515
90
  } while (n);
516
54
517
54
  isl_tarjan_graph_free(g);
518
41
519
41
  return n > 0 ? 
isl_stat_error0
: isl_stat_ok;
520
54
}
Unexecuted instantiation: isl_set_list_foreach_scc
Unexecuted instantiation: isl_union_set_list_foreach_scc
Unexecuted instantiation: isl_val_list_foreach_scc
521
522
__isl_give LIST(EL) *FN(FN(LIST(EL),from),BASE)(__isl_take EL *el)
523
31.5k
{
524
31.5k
  isl_ctx *ctx;
525
31.5k
  LIST(EL) *list;
526
31.5k
527
31.5k
  if (!el)
528
1
    return NULL;
529
31.5k
  ctx = FN(EL,get_ctx)(el);
530
31.5k
  list = FN(LIST(EL),alloc)(ctx, 1);
531
31.5k
  if (!list)
532
0
    goto error;
533
31.5k
  list = FN(LIST(EL),add)(list, el);
534
31.5k
  return list;
535
31.5k
error:
536
0
  FN(EL,free)(el);
537
0
  return NULL;
538
31.5k
}
isl_aff_list_from_aff
Line
Count
Source
523
7.96k
{
524
7.96k
  isl_ctx *ctx;
525
7.96k
  LIST(EL) *list;
526
7.96k
527
7.96k
  if (!el)
528
0
    return NULL;
529
7.96k
  ctx = FN(EL,get_ctx)(el);
530
7.96k
  list = FN(LIST(EL),alloc)(ctx, 1);
531
7.96k
  if (!list)
532
0
    goto error;
533
7.96k
  list = FN(LIST(EL),add)(list, el);
534
7.96k
  return list;
535
7.96k
error:
536
0
  FN(EL,free)(el);
537
0
  return NULL;
538
7.96k
}
isl_pw_aff_list_from_pw_aff
Line
Count
Source
523
9.03k
{
524
9.03k
  isl_ctx *ctx;
525
9.03k
  LIST(EL) *list;
526
9.03k
527
9.03k
  if (!el)
528
1
    return NULL;
529
9.03k
  ctx = FN(EL,get_ctx)(el);
530
9.03k
  list = FN(LIST(EL),alloc)(ctx, 1);
531
9.03k
  if (!list)
532
0
    goto error;
533
9.03k
  list = FN(LIST(EL),add)(list, el);
534
9.03k
  return list;
535
9.03k
error:
536
0
  FN(EL,free)(el);
537
0
  return NULL;
538
9.03k
}
Unexecuted instantiation: isl_pw_multi_aff_list_from_pw_multi_aff
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
523
7
{
524
7
  isl_ctx *ctx;
525
7
  LIST(EL) *list;
526
7
527
7
  if (!el)
528
0
    return NULL;
529
7
  ctx = FN(EL,get_ctx)(el);
530
7
  list = FN(LIST(EL),alloc)(ctx, 1);
531
7
  if (!list)
532
0
    goto error;
533
7
  list = FN(LIST(EL),add)(list, el);
534
7
  return list;
535
7
error:
536
0
  FN(EL,free)(el);
537
0
  return NULL;
538
7
}
Unexecuted instantiation: isl_ast_expr_list_from_ast_expr
isl_ast_node_list_from_ast_node
Line
Count
Source
523
60
{
524
60
  isl_ctx *ctx;
525
60
  LIST(EL) *list;
526
60
527
60
  if (!el)
528
0
    return NULL;
529
60
  ctx = FN(EL,get_ctx)(el);
530
60
  list = FN(LIST(EL),alloc)(ctx, 1);
531
60
  if (!list)
532
0
    goto error;
533
60
  list = FN(LIST(EL),add)(list, el);
534
60
  return list;
535
60
error:
536
0
  FN(EL,free)(el);
537
0
  return NULL;
538
60
}
isl_ast_graft_list_from_ast_graft
Line
Count
Source
523
2.18k
{
524
2.18k
  isl_ctx *ctx;
525
2.18k
  LIST(EL) *list;
526
2.18k
527
2.18k
  if (!el)
528
0
    return NULL;
529
2.18k
  ctx = FN(EL,get_ctx)(el);
530
2.18k
  list = FN(LIST(EL),alloc)(ctx, 1);
531
2.18k
  if (!list)
532
0
    goto error;
533
2.18k
  list = FN(LIST(EL),add)(list, el);
534
2.18k
  return list;
535
2.18k
error:
536
0
  FN(EL,free)(el);
537
0
  return NULL;
538
2.18k
}
Unexecuted instantiation: isl_constraint_list_from_constraint
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_from_pw_qpolynomial_fold
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
523
1
{
524
1
  isl_ctx *ctx;
525
1
  LIST(EL) *list;
526
1
527
1
  if (!el)
528
0
    return NULL;
529
1
  ctx = FN(EL,get_ctx)(el);
530
1
  list = FN(LIST(EL),alloc)(ctx, 1);
531
1
  if (!list)
532
0
    goto error;
533
1
  list = FN(LIST(EL),add)(list, el);
534
1
  return list;
535
1
error:
536
0
  FN(EL,free)(el);
537
0
  return NULL;
538
1
}
Unexecuted instantiation: isl_pw_qpolynomial_list_from_pw_qpolynomial
isl_schedule_tree_list_from_schedule_tree
Line
Count
Source
523
3.92k
{
524
3.92k
  isl_ctx *ctx;
525
3.92k
  LIST(EL) *list;
526
3.92k
527
3.92k
  if (!el)
528
0
    return NULL;
529
3.92k
  ctx = FN(EL,get_ctx)(el);
530
3.92k
  list = FN(LIST(EL),alloc)(ctx, 1);
531
3.92k
  if (!list)
532
0
    goto error;
533
3.92k
  list = FN(LIST(EL),add)(list, el);
534
3.92k
  return list;
535
3.92k
error:
536
0
  FN(EL,free)(el);
537
0
  return NULL;
538
3.92k
}
isl_basic_set_list_from_basic_set
Line
Count
Source
523
16
{
524
16
  isl_ctx *ctx;
525
16
  LIST(EL) *list;
526
16
527
16
  if (!el)
528
0
    return NULL;
529
16
  ctx = FN(EL,get_ctx)(el);
530
16
  list = FN(LIST(EL),alloc)(ctx, 1);
531
16
  if (!list)
532
0
    goto error;
533
16
  list = FN(LIST(EL),add)(list, el);
534
16
  return list;
535
16
error:
536
0
  FN(EL,free)(el);
537
0
  return NULL;
538
16
}
isl_set_list_from_set
Line
Count
Source
523
7.96k
{
524
7.96k
  isl_ctx *ctx;
525
7.96k
  LIST(EL) *list;
526
7.96k
527
7.96k
  if (!el)
528
0
    return NULL;
529
7.96k
  ctx = FN(EL,get_ctx)(el);
530
7.96k
  list = FN(LIST(EL),alloc)(ctx, 1);
531
7.96k
  if (!list)
532
0
    goto error;
533
7.96k
  list = FN(LIST(EL),add)(list, el);
534
7.96k
  return list;
535
7.96k
error:
536
0
  FN(EL,free)(el);
537
0
  return NULL;
538
7.96k
}
isl_union_set_list_from_union_set
Line
Count
Source
523
416
{
524
416
  isl_ctx *ctx;
525
416
  LIST(EL) *list;
526
416
527
416
  if (!el)
528
0
    return NULL;
529
416
  ctx = FN(EL,get_ctx)(el);
530
416
  list = FN(LIST(EL),alloc)(ctx, 1);
531
416
  if (!list)
532
0
    goto error;
533
416
  list = FN(LIST(EL),add)(list, el);
534
416
  return list;
535
416
error:
536
0
  FN(EL,free)(el);
537
0
  return NULL;
538
416
}
Unexecuted instantiation: isl_val_list_from_val
539
540
/* Append the elements of "list2" to "list1", where "list1" is known
541
 * to have only a single reference and enough room to hold
542
 * the extra elements.
543
 */
544
static __isl_give LIST(EL) *FN(LIST(EL),concat_inplace)(
545
  __isl_take LIST(EL) *list1, __isl_take LIST(EL) *list2)
546
2.01k
{
547
2.01k
  int i;
548
2.01k
549
2.08k
  for (i = 0; i < list2->n; 
++i67
)
550
67
    list1 = FN(LIST(EL),add)(list1, FN(EL,copy)(list2->p[i]));
551
2.01k
  FN(LIST(EL),free)(list2);
552
2.01k
  return list1;
553
2.01k
}
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_pw_multi_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
546
1.90k
{
547
1.90k
  int i;
548
1.90k
549
1.90k
  for (i = 0; i < list2->n; 
++i0
)
550
0
    list1 = FN(LIST(EL),add)(list1, FN(EL,copy)(list2->p[i]));
551
1.90k
  FN(LIST(EL),free)(list2);
552
1.90k
  return list1;
553
1.90k
}
Unexecuted instantiation: isl_constraint.c:isl_constraint_list_concat_inplace
Unexecuted instantiation: isl_fold.c:isl_pw_qpolynomial_fold_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
546
62
{
547
62
  int i;
548
62
549
62
  for (i = 0; i < list2->n; 
++i0
)
550
0
    list1 = FN(LIST(EL),add)(list1, FN(EL,copy)(list2->p[i]));
551
62
  FN(LIST(EL),free)(list2);
552
62
  return list1;
553
62
}
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_polynomial.c:isl_pw_qpolynomial_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
546
46
{
547
46
  int i;
548
46
549
113
  for (i = 0; i < list2->n; 
++i67
)
550
67
    list1 = FN(LIST(EL),add)(list1, FN(EL,copy)(list2->p[i]));
551
46
  FN(LIST(EL),free)(list2);
552
46
  return list1;
553
46
}
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
554
555
/* Concatenate "list1" and "list2".
556
 * If "list1" has only one reference and has enough room
557
 * for the elements of "list2", the add the elements to "list1" itself.
558
 * Otherwise, create a new list to store the result.
559
 */
560
__isl_give LIST(EL) *FN(LIST(EL),concat)(__isl_take LIST(EL) *list1,
561
  __isl_take LIST(EL) *list2)
562
8.17k
{
563
8.17k
  int i;
564
8.17k
  isl_ctx *ctx;
565
8.17k
  LIST(EL) *res;
566
8.17k
567
8.17k
  if (!list1 || !list2)
568
0
    goto error;
569
8.17k
570
8.17k
  if (list1->ref == 1 && 
list1->n + list2->n <= list1->size7.55k
)
571
2.01k
    return FN(LIST(EL),concat_inplace)(list1, list2);
572
6.16k
573
6.16k
  ctx = FN(LIST(EL),get_ctx)(list1);
574
6.16k
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
575
17.7k
  for (i = 0; i < list1->n; 
++i11.5k
)
576
11.5k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
577
15.0k
  for (i = 0; i < list2->n; 
++i8.93k
)
578
8.93k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
579
6.16k
580
6.16k
  FN(LIST(EL),free)(list1);
581
6.16k
  FN(LIST(EL),free)(list2);
582
6.16k
  return res;
583
6.16k
error:
584
0
  FN(LIST(EL),free)(list1);
585
0
  FN(LIST(EL),free)(list2);
586
0
  return NULL;
587
6.16k
}
Unexecuted instantiation: isl_aff_list_concat
isl_pw_aff_list_concat
Line
Count
Source
562
152
{
563
152
  int i;
564
152
  isl_ctx *ctx;
565
152
  LIST(EL) *res;
566
152
567
152
  if (!list1 || !list2)
568
0
    goto error;
569
152
570
152
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
571
0
    return FN(LIST(EL),concat_inplace)(list1, list2);
572
152
573
152
  ctx = FN(LIST(EL),get_ctx)(list1);
574
152
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
575
351
  for (i = 0; i < list1->n; 
++i199
)
576
199
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
577
304
  for (i = 0; i < list2->n; 
++i152
)
578
152
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
579
152
580
152
  FN(LIST(EL),free)(list1);
581
152
  FN(LIST(EL),free)(list2);
582
152
  return res;
583
152
error:
584
0
  FN(LIST(EL),free)(list1);
585
0
  FN(LIST(EL),free)(list2);
586
0
  return NULL;
587
152
}
Unexecuted instantiation: isl_pw_multi_aff_list_concat
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
562
5.44k
{
563
5.44k
  int i;
564
5.44k
  isl_ctx *ctx;
565
5.44k
  LIST(EL) *res;
566
5.44k
567
5.44k
  if (!list1 || !list2)
568
0
    goto error;
569
5.44k
570
5.44k
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
571
1.90k
    return FN(LIST(EL),concat_inplace)(list1, list2);
572
3.53k
573
3.53k
  ctx = FN(LIST(EL),get_ctx)(list1);
574
3.53k
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
575
3.93k
  for (i = 0; i < list1->n; 
++i397
)
576
397
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
577
7.86k
  for (i = 0; i < list2->n; 
++i4.33k
)
578
4.33k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
579
3.53k
580
3.53k
  FN(LIST(EL),free)(list1);
581
3.53k
  FN(LIST(EL),free)(list2);
582
3.53k
  return res;
583
3.53k
error:
584
0
  FN(LIST(EL),free)(list1);
585
0
  FN(LIST(EL),free)(list2);
586
0
  return NULL;
587
3.53k
}
Unexecuted instantiation: isl_constraint_list_concat
Unexecuted instantiation: isl_pw_qpolynomial_fold_list_concat
isl_id_list_concat
Line
Count
Source
562
623
{
563
623
  int i;
564
623
  isl_ctx *ctx;
565
623
  LIST(EL) *res;
566
623
567
623
  if (!list1 || !list2)
568
0
    goto error;
569
623
570
623
  if (list1->ref == 1 && 
list1->n + list2->n <= list1->size0
)
571
0
    return FN(LIST(EL),concat_inplace)(list1, list2);
572
623
573
623
  ctx = FN(LIST(EL),get_ctx)(list1);
574
623
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
575
1.14k
  for (i = 0; i < list1->n; 
++i517
)
576
517
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
577
1.49k
  for (i = 0; i < list2->n; 
++i875
)
578
875
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
579
623
580
623
  FN(LIST(EL),free)(list1);
581
623
  FN(LIST(EL),free)(list2);
582
623
  return res;
583
623
error:
584
0
  FN(LIST(EL),free)(list1);
585
0
  FN(LIST(EL),free)(list2);
586
0
  return NULL;
587
623
}
isl_basic_map_list_concat
Line
Count
Source
562
1.82k
{
563
1.82k
  int i;
564
1.82k
  isl_ctx *ctx;
565
1.82k
  LIST(EL) *res;
566
1.82k
567
1.82k
  if (!list1 || !list2)
568
0
    goto error;
569
1.82k
570
1.82k
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
571
62
    return FN(LIST(EL),concat_inplace)(list1, list2);
572
1.75k
573
1.75k
  ctx = FN(LIST(EL),get_ctx)(list1);
574
1.75k
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
575
12.2k
  for (i = 0; i < list1->n; 
++i10.4k
)
576
10.4k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
577
5.24k
  for (i = 0; i < list2->n; 
++i3.48k
)
578
3.48k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
579
1.75k
580
1.75k
  FN(LIST(EL),free)(list1);
581
1.75k
  FN(LIST(EL),free)(list2);
582
1.75k
  return res;
583
1.75k
error:
584
0
  FN(LIST(EL),free)(list1);
585
0
  FN(LIST(EL),free)(list2);
586
0
  return NULL;
587
1.75k
}
Unexecuted instantiation: isl_map_list_concat
Unexecuted instantiation: isl_union_map_list_concat
Unexecuted instantiation: isl_pw_qpolynomial_list_concat
Unexecuted instantiation: isl_schedule_tree_list_concat
isl_basic_set_list_concat
Line
Count
Source
562
137
{
563
137
  int i;
564
137
  isl_ctx *ctx;
565
137
  LIST(EL) *res;
566
137
567
137
  if (!list1 || !list2)
568
0
    goto error;
569
137
570
137
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
571
46
    return FN(LIST(EL),concat_inplace)(list1, list2);
572
91
573
91
  ctx = FN(LIST(EL),get_ctx)(list1);
574
91
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
575
105
  for (i = 0; i < list1->n; 
++i14
)
576
14
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
577
183
  for (i = 0; i < list2->n; 
++i92
)
578
92
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
579
91
580
91
  FN(LIST(EL),free)(list1);
581
91
  FN(LIST(EL),free)(list2);
582
91
  return res;
583
91
error:
584
0
  FN(LIST(EL),free)(list1);
585
0
  FN(LIST(EL),free)(list2);
586
0
  return NULL;
587
91
}
Unexecuted instantiation: isl_set_list_concat
Unexecuted instantiation: isl_union_set_list_concat
Unexecuted instantiation: isl_val_list_concat
588
589
__isl_give isl_printer *CAT(isl_printer_print_,LIST(BASE))(
590
  __isl_take isl_printer *p, __isl_keep LIST(EL) *list)
591
0
{
592
0
  int i;
593
0
594
0
  if (!p || !list)
595
0
    goto error;
596
0
  p = isl_printer_print_str(p, "(");
597
0
  for (i = 0; i < list->n; ++i) {
598
0
    if (i)
599
0
      p = isl_printer_print_str(p, ",");
600
0
    p = CAT(isl_printer_print_,BASE)(p, list->p[i]);
601
0
  }
602
0
  p = isl_printer_print_str(p, ")");
603
0
  return p;
604
0
error:
605
0
  isl_printer_free(p);
606
0
  return NULL;
607
0
}
Unexecuted instantiation: isl_printer_print_aff_list
Unexecuted instantiation: isl_printer_print_pw_aff_list
Unexecuted instantiation: isl_printer_print_pw_multi_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_constraint_list
Unexecuted instantiation: isl_printer_print_pw_qpolynomial_fold_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_pw_qpolynomial_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
608
609
void FN(LIST(EL),dump)(__isl_keep LIST(EL) *list)
610
0
{
611
0
  isl_printer *printer;
612
0
613
0
  if (!list)
614
0
    return;
615
0
616
0
  printer = isl_printer_to_file(FN(LIST(EL),get_ctx)(list), stderr);
617
0
  printer = CAT(isl_printer_print_,LIST(BASE))(printer, list);
618
0
  printer = isl_printer_end_line(printer);
619
0
620
0
  isl_printer_free(printer);
621
0
}
Unexecuted instantiation: isl_aff_list_dump
Unexecuted instantiation: isl_pw_aff_list_dump
Unexecuted instantiation: isl_pw_multi_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_constraint_list_dump
Unexecuted instantiation: isl_pw_qpolynomial_fold_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_pw_qpolynomial_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