Coverage Report

Created: 2018-02-20 12:54

/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.87k
#define xCAT(A,B) A ## B
21
4.87k
#define CAT(A,B) xCAT(A,B)
22
#undef EL
23
4.87k
#define EL CAT(isl_,BASE)
24
3.04M
#define xFN(TYPE,NAME) TYPE ## _ ## NAME
25
3.01M
#define FN(TYPE,NAME) xFN(TYPE,NAME)
26
592k
#define xLIST(EL) EL ## _list
27
592k
#define LIST(EL) xLIST(EL)
28
3.02k
#define xS(TYPE,NAME) struct TYPE ## _ ## NAME
29
3.02k
#define S(TYPE,NAME) xS(TYPE,NAME)
30
31
isl_ctx *FN(LIST(EL),get_ctx)(__isl_keep LIST(EL) *list)
32
96.3k
{
33
96.3k
  return list ? list->ctx : NULL;
34
96.3k
}
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
10.3k
{
33
10.3k
  return list ? list->ctx : NULL;
34
10.3k
}
isl_union_pw_aff_list_get_ctx
Line
Count
Source
32
17
{
33
17
  return list ? list->ctx : NULL;
34
17
}
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
519
{
33
519
  return list ? list->ctx : NULL;
34
519
}
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
}
isl_id_list_get_ctx
Line
Count
Source
32
624
{
33
624
  return list ? list->ctx : NULL;
34
624
}
isl_basic_map_list_get_ctx
Line
Count
Source
32
1.73k
{
33
1.73k
  return list ? list->ctx : NULL;
34
1.73k
}
isl_map_list_get_ctx
Line
Count
Source
32
799
{
33
799
  return list ? list->ctx : NULL;
34
799
}
isl_union_map_list_get_ctx
Line
Count
Source
32
1
{
33
1
  return list ? list->ctx : NULL;
34
1
}
isl_schedule_tree_list_get_ctx
Line
Count
Source
32
67.9k
{
33
67.9k
  return list ? list->ctx : NULL;
34
67.9k
}
isl_basic_set_list_get_ctx
Line
Count
Source
32
1.16k
{
33
1.16k
  return list ? list->ctx : NULL;
34
1.16k
}
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
254
{
33
254
  return list ? list->ctx : NULL;
34
254
}
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
146k
{
38
146k
  LIST(EL) *list;
39
146k
40
146k
  if (n < 0)
41
146k
    
isl_die0
(ctx, isl_error_invalid,
42
146k
      "cannot create list of negative length",
43
146k
      return NULL);
44
146k
  list = isl_alloc(ctx, LIST(EL),
45
146k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
146k
  if (!list)
47
0
    return NULL;
48
146k
49
146k
  list->ctx = ctx;
50
146k
  isl_ctx_ref(ctx);
51
146k
  list->ref = 1;
52
146k
  list->size = n;
53
146k
  list->n = 0;
54
146k
  return list;
55
146k
}
isl_aff_list_alloc
Line
Count
Source
37
8.04k
{
38
8.04k
  LIST(EL) *list;
39
8.04k
40
8.04k
  if (n < 0)
41
8.04k
    
isl_die0
(ctx, isl_error_invalid,
42
8.04k
      "cannot create list of negative length",
43
8.04k
      return NULL);
44
8.04k
  list = isl_alloc(ctx, LIST(EL),
45
8.04k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
8.04k
  if (!list)
47
0
    return NULL;
48
8.04k
49
8.04k
  list->ctx = ctx;
50
8.04k
  isl_ctx_ref(ctx);
51
8.04k
  list->ref = 1;
52
8.04k
  list->size = n;
53
8.04k
  list->n = 0;
54
8.04k
  return list;
55
8.04k
}
isl_pw_aff_list_alloc
Line
Count
Source
37
15.3k
{
38
15.3k
  LIST(EL) *list;
39
15.3k
40
15.3k
  if (n < 0)
41
15.3k
    
isl_die0
(ctx, isl_error_invalid,
42
15.3k
      "cannot create list of negative length",
43
15.3k
      return NULL);
44
15.3k
  list = isl_alloc(ctx, LIST(EL),
45
15.3k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
15.3k
  if (!list)
47
0
    return NULL;
48
15.3k
49
15.3k
  list->ctx = ctx;
50
15.3k
  isl_ctx_ref(ctx);
51
15.3k
  list->ref = 1;
52
15.3k
  list->size = n;
53
15.3k
  list->n = 0;
54
15.3k
  return list;
55
15.3k
}
isl_union_pw_aff_list_alloc
Line
Count
Source
37
17
{
38
17
  LIST(EL) *list;
39
17
40
17
  if (n < 0)
41
17
    
isl_die0
(ctx, isl_error_invalid,
42
17
      "cannot create list of negative length",
43
17
      return NULL);
44
17
  list = isl_alloc(ctx, LIST(EL),
45
17
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
17
  if (!list)
47
0
    return NULL;
48
17
49
17
  list->ctx = ctx;
50
17
  isl_ctx_ref(ctx);
51
17
  list->ref = 1;
52
17
  list->size = n;
53
17
  list->n = 0;
54
17
  return list;
55
17
}
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.8k
{
38
17.8k
  LIST(EL) *list;
39
17.8k
40
17.8k
  if (n < 0)
41
17.8k
    
isl_die0
(ctx, isl_error_invalid,
42
17.8k
      "cannot create list of negative length",
43
17.8k
      return NULL);
44
17.8k
  list = isl_alloc(ctx, LIST(EL),
45
17.8k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
17.8k
  if (!list)
47
0
    return NULL;
48
17.8k
49
17.8k
  list->ctx = ctx;
50
17.8k
  isl_ctx_ref(ctx);
51
17.8k
  list->ref = 1;
52
17.8k
  list->size = n;
53
17.8k
  list->n = 0;
54
17.8k
  return list;
55
17.8k
}
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
}
isl_id_list_alloc
Line
Count
Source
37
1.82k
{
38
1.82k
  LIST(EL) *list;
39
1.82k
40
1.82k
  if (n < 0)
41
1.82k
    
isl_die0
(ctx, isl_error_invalid,
42
1.82k
      "cannot create list of negative length",
43
1.82k
      return NULL);
44
1.82k
  list = isl_alloc(ctx, LIST(EL),
45
1.82k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
1.82k
  if (!list)
47
0
    return NULL;
48
1.82k
49
1.82k
  list->ctx = ctx;
50
1.82k
  isl_ctx_ref(ctx);
51
1.82k
  list->ref = 1;
52
1.82k
  list->size = n;
53
1.82k
  list->n = 0;
54
1.82k
  return list;
55
1.82k
}
isl_basic_map_list_alloc
Line
Count
Source
37
4.32k
{
38
4.32k
  LIST(EL) *list;
39
4.32k
40
4.32k
  if (n < 0)
41
4.32k
    
isl_die0
(ctx, isl_error_invalid,
42
4.32k
      "cannot create list of negative length",
43
4.32k
      return NULL);
44
4.32k
  list = isl_alloc(ctx, LIST(EL),
45
4.32k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
4.32k
  if (!list)
47
0
    return NULL;
48
4.32k
49
4.32k
  list->ctx = ctx;
50
4.32k
  isl_ctx_ref(ctx);
51
4.32k
  list->ref = 1;
52
4.32k
  list->size = n;
53
4.32k
  list->n = 0;
54
4.32k
  return list;
55
4.32k
}
isl_map_list_alloc
Line
Count
Source
37
747
{
38
747
  LIST(EL) *list;
39
747
40
747
  if (n < 0)
41
747
    
isl_die0
(ctx, isl_error_invalid,
42
747
      "cannot create list of negative length",
43
747
      return NULL);
44
747
  list = isl_alloc(ctx, LIST(EL),
45
747
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
747
  if (!list)
47
0
    return NULL;
48
747
49
747
  list->ctx = ctx;
50
747
  isl_ctx_ref(ctx);
51
747
  list->ref = 1;
52
747
  list->size = n;
53
747
  list->n = 0;
54
747
  return list;
55
747
}
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
}
isl_schedule_tree_list_alloc
Line
Count
Source
37
77.5k
{
38
77.5k
  LIST(EL) *list;
39
77.5k
40
77.5k
  if (n < 0)
41
77.5k
    
isl_die0
(ctx, isl_error_invalid,
42
77.5k
      "cannot create list of negative length",
43
77.5k
      return NULL);
44
77.5k
  list = isl_alloc(ctx, LIST(EL),
45
77.5k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
77.5k
  if (!list)
47
0
    return NULL;
48
77.5k
49
77.5k
  list->ctx = ctx;
50
77.5k
  isl_ctx_ref(ctx);
51
77.5k
  list->ref = 1;
52
77.5k
  list->size = n;
53
77.5k
  list->n = 0;
54
77.5k
  return list;
55
77.5k
}
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.4k
{
38
11.4k
  LIST(EL) *list;
39
11.4k
40
11.4k
  if (n < 0)
41
11.4k
    
isl_die0
(ctx, isl_error_invalid,
42
11.4k
      "cannot create list of negative length",
43
11.4k
      return NULL);
44
11.4k
  list = isl_alloc(ctx, LIST(EL),
45
11.4k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
11.4k
  if (!list)
47
0
    return NULL;
48
11.4k
49
11.4k
  list->ctx = ctx;
50
11.4k
  isl_ctx_ref(ctx);
51
11.4k
  list->ref = 1;
52
11.4k
  list->size = n;
53
11.4k
  list->n = 0;
54
11.4k
  return list;
55
11.4k
}
isl_union_set_list_alloc
Line
Count
Source
37
477
{
38
477
  LIST(EL) *list;
39
477
40
477
  if (n < 0)
41
477
    
isl_die0
(ctx, isl_error_invalid,
42
477
      "cannot create list of negative length",
43
477
      return NULL);
44
477
  list = isl_alloc(ctx, LIST(EL),
45
477
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
477
  if (!list)
47
0
    return NULL;
48
477
49
477
  list->ctx = ctx;
50
477
  isl_ctx_ref(ctx);
51
477
  list->ref = 1;
52
477
  list->size = n;
53
477
  list->n = 0;
54
477
  return list;
55
477
}
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
107k
{
59
107k
  if (!list)
60
0
    return NULL;
61
107k
62
107k
  list->ref++;
63
107k
  return list;
64
107k
}
Unexecuted instantiation: isl_aff_list_copy
isl_pw_aff_list_copy
Line
Count
Source
58
10.8k
{
59
10.8k
  if (!list)
60
0
    return NULL;
61
10.8k
62
10.8k
  list->ref++;
63
10.8k
  return list;
64
10.8k
}
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
215
{
59
215
  if (!list)
60
0
    return NULL;
61
215
62
215
  list->ref++;
63
215
  return list;
64
215
}
Unexecuted instantiation: isl_ast_graft_list_copy
isl_constraint_list_copy
Line
Count
Source
58
699
{
59
699
  if (!list)
60
0
    return NULL;
61
699
62
699
  list->ref++;
63
699
  return list;
64
699
}
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
isl_schedule_tree_list_copy
Line
Count
Source
58
61.3k
{
59
61.3k
  if (!list)
60
0
    return NULL;
61
61.3k
62
61.3k
  list->ref++;
63
61.3k
  return list;
64
61.3k
}
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.3k
{
68
49.3k
  int i;
69
49.3k
  LIST(EL) *dup;
70
49.3k
71
49.3k
  if (!list)
72
0
    return NULL;
73
49.3k
74
49.3k
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
75
49.3k
  if (!dup)
76
0
    return NULL;
77
242k
  
for (i = 0; 49.3k
i < list->n;
++i193k
)
78
193k
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
79
49.3k
  return dup;
80
49.3k
}
Unexecuted instantiation: isl_aff_list_dup
isl_pw_aff_list_dup
Line
Count
Source
67
287
{
68
287
  int i;
69
287
  LIST(EL) *dup;
70
287
71
287
  if (!list)
72
0
    return NULL;
73
287
74
287
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
75
287
  if (!dup)
76
0
    return NULL;
77
655
  
for (i = 0; 287
i < list->n;
++i368
)
78
368
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
79
287
  return dup;
80
287
}
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
699
{
68
699
  int i;
69
699
  LIST(EL) *dup;
70
699
71
699
  if (!list)
72
0
    return NULL;
73
699
74
699
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
75
699
  if (!dup)
76
0
    return NULL;
77
2.17k
  
for (i = 0; 699
i < list->n;
++i1.47k
)
78
1.47k
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
79
699
  return dup;
80
699
}
Unexecuted instantiation: isl_id_list_dup
Unexecuted instantiation: isl_basic_map_list_dup
Unexecuted instantiation: isl_map_list_dup
Unexecuted instantiation: isl_union_map_list_dup
isl_schedule_tree_list_dup
Line
Count
Source
67
48.3k
{
68
48.3k
  int i;
69
48.3k
  LIST(EL) *dup;
70
48.3k
71
48.3k
  if (!list)
72
0
    return NULL;
73
48.3k
74
48.3k
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
75
48.3k
  if (!dup)
76
0
    return NULL;
77
239k
  
for (i = 0; 48.3k
i < list->n;
++i191k
)
78
191k
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
79
48.3k
  return dup;
80
48.3k
}
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
105k
{
84
105k
  if (!list)
85
0
    return NULL;
86
105k
87
105k
  if (list->ref == 1)
88
56.2k
    return list;
89
49.3k
  list->ref--;
90
49.3k
  return FN(LIST(EL),dup)(list);
91
49.3k
}
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.14k
{
84
3.14k
  if (!list)
85
0
    return NULL;
86
3.14k
87
3.14k
  if (list->ref == 1)
88
2.85k
    return list;
89
287
  list->ref--;
90
287
  return FN(LIST(EL),dup)(list);
91
287
}
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
699
  list->ref--;
90
699
  return FN(LIST(EL),dup)(list);
91
699
}
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
435
{
84
435
  if (!list)
85
0
    return NULL;
86
435
87
435
  if (list->ref == 1)
88
435
    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
}
isl_schedule_tree_list_cow
Line
Count
Source
83
93.1k
{
84
93.1k
  if (!list)
85
0
    return NULL;
86
93.1k
87
93.1k
  if (list->ref == 1)
88
44.8k
    return list;
89
48.3k
  list->ref--;
90
48.3k
  return FN(LIST(EL),dup)(list);
91
48.3k
}
isl_basic_set_list_cow
Line
Count
Source
83
3.50k
{
84
3.50k
  if (!list)
85
0
    return NULL;
86
3.50k
87
3.50k
  if (list->ref == 1)
88
3.50k
    return list;
89
0
  list->ref--;
90
0
  return FN(LIST(EL),dup)(list);
91
0
}
isl_set_list_cow
Line
Count
Source
83
1.84k
{
84
1.84k
  if (!list)
85
0
    return NULL;
86
1.84k
87
1.84k
  if (list->ref == 1)
88
1.84k
    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.21k
{
84
1.21k
  if (!list)
85
0
    return NULL;
86
1.21k
87
1.21k
  if (list->ref == 1)
88
1.21k
    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
357k
{
101
357k
  isl_ctx *ctx;
102
357k
  int i, new_size;
103
357k
  LIST(EL) *res;
104
357k
105
357k
  if (!list)
106
0
    return NULL;
107
357k
  if (list->ref == 1 && 
list->n + n <= list->size347k
)
108
334k
    return list;
109
23.5k
110
23.5k
  ctx = FN(LIST(EL),get_ctx)(list);
111
23.5k
  new_size = ((list->n + n + 1) * 3) / 2;
112
23.5k
  if (list->ref == 1) {
113
13.6k
    res = isl_realloc(ctx, list, LIST(EL),
114
13.6k
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
13.6k
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
13.6k
    res->size = new_size;
118
13.6k
    return res;
119
13.6k
  }
120
9.83k
121
9.83k
  if (list->n + n <= list->size && 
list->size < new_size2.75k
)
122
2.68k
    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.04k
{
101
8.04k
  isl_ctx *ctx;
102
8.04k
  int i, new_size;
103
8.04k
  LIST(EL) *res;
104
8.04k
105
8.04k
  if (!list)
106
0
    return NULL;
107
8.04k
  if (list->ref == 1 && list->n + n <= list->size)
108
8.02k
    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
17.7k
{
101
17.7k
  isl_ctx *ctx;
102
17.7k
  int i, new_size;
103
17.7k
  LIST(EL) *res;
104
17.7k
105
17.7k
  if (!list)
106
0
    return NULL;
107
17.7k
  if (list->ref == 1 && list->n + n <= list->size)
108
12.9k
    return list;
109
4.74k
110
4.74k
  ctx = FN(LIST(EL),get_ctx)(list);
111
4.74k
  new_size = ((list->n + n + 1) * 3) / 2;
112
4.74k
  if (list->ref == 1) {
113
4.74k
    res = isl_realloc(ctx, list, LIST(EL),
114
4.74k
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
4.74k
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
4.74k
    res->size = new_size;
118
4.74k
    return res;
119
4.74k
  }
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_aff_list_grow
Line
Count
Source
100
29
{
101
29
  isl_ctx *ctx;
102
29
  int i, new_size;
103
29
  LIST(EL) *res;
104
29
105
29
  if (!list)
106
0
    return NULL;
107
29
  if (list->ref == 1 && list->n + n <= list->size)
108
12
    return list;
109
17
110
17
  ctx = FN(LIST(EL),get_ctx)(list);
111
17
  new_size = ((list->n + n + 1) * 3) / 2;
112
17
  if (list->ref == 1) {
113
17
    res = isl_realloc(ctx, list, LIST(EL),
114
17
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
17
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
17
    res->size = new_size;
118
17
    return res;
119
17
  }
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.09k
{
101
6.09k
  isl_ctx *ctx;
102
6.09k
  int i, new_size;
103
6.09k
  LIST(EL) *res;
104
6.09k
105
6.09k
  if (!list)
106
0
    return NULL;
107
6.09k
  if (list->ref == 1 && list->n + n <= list->size)
108
6.02k
    return list;
109
72
110
72
  ctx = FN(LIST(EL),get_ctx)(list);
111
72
  new_size = ((list->n + n + 1) * 3) / 2;
112
72
  if (list->ref == 1) {
113
72
    res = isl_realloc(ctx, list, LIST(EL),
114
72
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
72
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
72
    res->size = new_size;
118
72
    return res;
119
72
  }
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.56k
{
101
3.56k
  isl_ctx *ctx;
102
3.56k
  int i, new_size;
103
3.56k
  LIST(EL) *res;
104
3.56k
105
3.56k
  if (!list)
106
0
    return NULL;
107
3.56k
  if (list->ref == 1 && list->n + n <= list->size)
108
3.56k
    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_id.c:isl_id_list_grow
Line
Count
Source
100
2.26k
{
101
2.26k
  isl_ctx *ctx;
102
2.26k
  int i, new_size;
103
2.26k
  LIST(EL) *res;
104
2.26k
105
2.26k
  if (!list)
106
0
    return NULL;
107
2.26k
  if (list->ref == 1 && list->n + n <= list->size)
108
2.26k
    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.3k
{
101
17.3k
  isl_ctx *ctx;
102
17.3k
  int i, new_size;
103
17.3k
  LIST(EL) *res;
104
17.3k
105
17.3k
  if (!list)
106
0
    return NULL;
107
17.3k
  if (list->ref == 1 && list->n + n <= list->size)
108
17.3k
    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.49k
{
101
1.49k
  isl_ctx *ctx;
102
1.49k
  int i, new_size;
103
1.49k
  LIST(EL) *res;
104
1.49k
105
1.49k
  if (!list)
106
0
    return NULL;
107
1.49k
  if (list->ref == 1 && list->n + n <= list->size)
108
1.49k
    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
}
isl_schedule_tree.c:isl_schedule_tree_list_grow
Line
Count
Source
100
267k
{
101
267k
  isl_ctx *ctx;
102
267k
  int i, new_size;
103
267k
  LIST(EL) *res;
104
267k
105
267k
  if (!list)
106
0
    return NULL;
107
267k
  if (list->ref == 1 && 
list->n + n <= list->size257k
)
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.55k
    res = isl_realloc(ctx, list, LIST(EL),
114
8.55k
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
8.55k
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
8.55k
    res->size = new_size;
118
8.55k
    return res;
119
8.55k
  }
120
9.83k
121
9.83k
  if (list->n + n <= list->size && 
list->size < new_size2.75k
)
122
2.68k
    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.23k
{
101
2.23k
  isl_ctx *ctx;
102
2.23k
  int i, new_size;
103
2.23k
  LIST(EL) *res;
104
2.23k
105
2.23k
  if (!list)
106
0
    return NULL;
107
2.23k
  if (list->ref == 1 && list->n + n <= list->size)
108
2.23k
    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
12.9k
{
101
12.9k
  isl_ctx *ctx;
102
12.9k
  int i, new_size;
103
12.9k
  LIST(EL) *res;
104
12.9k
105
12.9k
  if (!list)
106
0
    return NULL;
107
12.9k
  if (list->ref == 1 && list->n + n <= list->size)
108
12.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.77k
{
101
1.77k
  isl_ctx *ctx;
102
1.77k
  int i, new_size;
103
1.77k
  LIST(EL) *res;
104
1.77k
105
1.77k
  if (!list)
106
0
    return NULL;
107
1.77k
  if (list->ref == 1 && list->n + n <= list->size)
108
1.51k
    return list;
109
254
110
254
  ctx = FN(LIST(EL),get_ctx)(list);
111
254
  new_size = ((list->n + n + 1) * 3) / 2;
112
254
  if (list->ref == 1) {
113
254
    res = isl_realloc(ctx, list, LIST(EL),
114
254
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
254
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
254
    res->size = new_size;
118
254
    return res;
119
254
  }
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
697k
{
139
697k
  if (!list)
140
0
    return isl_stat_error;
141
697k
  if (index < 0 || index >= list->n)
142
697k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
697k
      "index out of bounds", return isl_stat_error);
144
697k
  return isl_stat_ok;
145
697k
}
isl_aff.c:isl_aff_list_check_index
Line
Count
Source
138
8.28k
{
139
8.28k
  if (!list)
140
0
    return isl_stat_error;
141
8.28k
  if (index < 0 || index >= list->n)
142
8.28k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
8.28k
      "index out of bounds", return isl_stat_error);
144
8.28k
  return isl_stat_ok;
145
8.28k
}
isl_aff.c:isl_pw_aff_list_check_index
Line
Count
Source
138
15.0k
{
139
15.0k
  if (!list)
140
0
    return isl_stat_error;
141
15.0k
  if (index < 0 || index >= list->n)
142
15.0k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
15.0k
      "index out of bounds", return isl_stat_error);
144
15.0k
  return isl_stat_ok;
145
15.0k
}
isl_aff.c:isl_union_pw_aff_list_check_index
Line
Count
Source
138
29
{
139
29
  if (!list)
140
0
    return isl_stat_error;
141
29
  if (index < 0 || index >= list->n)
142
29
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
29
      "index out of bounds", return isl_stat_error);
144
29
  return isl_stat_ok;
145
29
}
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.1k
{
139
40.1k
  if (!list)
140
0
    return isl_stat_error;
141
40.1k
  if (index < 0 || index >= list->n)
142
40.1k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
40.1k
      "index out of bounds", return isl_stat_error);
144
40.1k
  return isl_stat_ok;
145
40.1k
}
isl_constraint.c:isl_constraint_list_check_index
Line
Count
Source
138
2.03k
{
139
2.03k
  if (!list)
140
0
    return isl_stat_error;
141
2.03k
  if (index < 0 || index >= list->n)
142
2.03k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
2.03k
      "index out of bounds", return isl_stat_error);
144
2.03k
  return isl_stat_ok;
145
2.03k
}
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.5k
{
139
14.5k
  if (!list)
140
0
    return isl_stat_error;
141
14.5k
  if (index < 0 || index >= list->n)
142
14.5k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
14.5k
      "index out of bounds", return isl_stat_error);
144
14.5k
  return isl_stat_ok;
145
14.5k
}
isl_map_list.c:isl_map_list_check_index
Line
Count
Source
138
1.79k
{
139
1.79k
  if (!list)
140
0
    return isl_stat_error;
141
1.79k
  if (index < 0 || index >= list->n)
142
1.79k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
1.79k
      "index out of bounds", return isl_stat_error);
144
1.79k
  return isl_stat_ok;
145
1.79k
}
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
}
isl_schedule_tree.c:isl_schedule_tree_list_check_index
Line
Count
Source
138
553k
{
139
553k
  if (!list)
140
0
    return isl_stat_error;
141
553k
  if (index < 0 || index >= list->n)
142
553k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
553k
      "index out of bounds", return isl_stat_error);
144
553k
  return isl_stat_ok;
145
553k
}
isl_set_list.c:isl_basic_set_list_check_index
Line
Count
Source
138
12.3k
{
139
12.3k
  if (!list)
140
0
    return isl_stat_error;
141
12.3k
  if (index < 0 || index >= list->n)
142
12.3k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
12.3k
      "index out of bounds", return isl_stat_error);
144
12.3k
  return isl_stat_ok;
145
12.3k
}
isl_set_list.c:isl_set_list_check_index
Line
Count
Source
138
19.2k
{
139
19.2k
  if (!list)
140
0
    return isl_stat_error;
141
19.2k
  if (index < 0 || index >= list->n)
142
19.2k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
19.2k
      "index out of bounds", return isl_stat_error);
144
19.2k
  return isl_stat_ok;
145
19.2k
}
isl_set_list.c:isl_union_set_list_check_index
Line
Count
Source
138
2.75k
{
139
2.75k
  if (!list)
140
0
    return isl_stat_error;
141
2.75k
  if (index < 0 || index >= list->n)
142
2.75k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
2.75k
      "index out of bounds", return isl_stat_error);
144
2.75k
  return isl_stat_ok;
145
2.75k
}
isl_val.c:isl_val_list_check_index
Line
Count
Source
138
17
{
139
17
  if (!list)
140
0
    return isl_stat_error;
141
17
  if (index < 0 || index >= list->n)
142
17
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
17
      "index out of bounds", return isl_stat_error);
144
17
  return isl_stat_ok;
145
17
}
146
147
__isl_give LIST(EL) *FN(LIST(EL),add)(__isl_take LIST(EL) *list,
148
  __isl_take struct EL *el)
149
357k
{
150
357k
  list = FN(LIST(EL),grow)(list, 1);
151
357k
  if (!list || !el)
152
0
    goto error;
153
357k
  list->p[list->n] = el;
154
357k
  list->n++;
155
357k
  return list;
156
357k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
357k
}
isl_aff_list_add
Line
Count
Source
149
8.04k
{
150
8.04k
  list = FN(LIST(EL),grow)(list, 1);
151
8.04k
  if (!list || !el)
152
0
    goto error;
153
8.04k
  list->p[list->n] = el;
154
8.04k
  list->n++;
155
8.04k
  return list;
156
8.04k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
8.04k
}
isl_pw_aff_list_add
Line
Count
Source
149
17.7k
{
150
17.7k
  list = FN(LIST(EL),grow)(list, 1);
151
17.7k
  if (!list || !el)
152
0
    goto error;
153
17.7k
  list->p[list->n] = el;
154
17.7k
  list->n++;
155
17.7k
  return list;
156
17.7k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
17.7k
}
isl_union_pw_aff_list_add
Line
Count
Source
149
29
{
150
29
  list = FN(LIST(EL),grow)(list, 1);
151
29
  if (!list || !el)
152
0
    goto error;
153
29
  list->p[list->n] = el;
154
29
  list->n++;
155
29
  return list;
156
29
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
29
}
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.09k
{
150
6.09k
  list = FN(LIST(EL),grow)(list, 1);
151
6.09k
  if (!list || !el)
152
0
    goto error;
153
6.09k
  list->p[list->n] = el;
154
6.09k
  list->n++;
155
6.09k
  return list;
156
6.09k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
6.09k
}
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.56k
{
150
3.56k
  list = FN(LIST(EL),grow)(list, 1);
151
3.56k
  if (!list || !el)
152
0
    goto error;
153
3.56k
  list->p[list->n] = el;
154
3.56k
  list->n++;
155
3.56k
  return list;
156
3.56k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
3.56k
}
isl_id_list_add
Line
Count
Source
149
2.26k
{
150
2.26k
  list = FN(LIST(EL),grow)(list, 1);
151
2.26k
  if (!list || !el)
152
0
    goto error;
153
2.26k
  list->p[list->n] = el;
154
2.26k
  list->n++;
155
2.26k
  return list;
156
2.26k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
2.26k
}
isl_basic_map_list_add
Line
Count
Source
149
17.3k
{
150
17.3k
  list = FN(LIST(EL),grow)(list, 1);
151
17.3k
  if (!list || !el)
152
0
    goto error;
153
17.3k
  list->p[list->n] = el;
154
17.3k
  list->n++;
155
17.3k
  return list;
156
17.3k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
17.3k
}
isl_map_list_add
Line
Count
Source
149
1.49k
{
150
1.49k
  list = FN(LIST(EL),grow)(list, 1);
151
1.49k
  if (!list || !el)
152
0
    goto error;
153
1.49k
  list->p[list->n] = el;
154
1.49k
  list->n++;
155
1.49k
  return list;
156
1.49k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
1.49k
}
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
}
isl_schedule_tree_list_add
Line
Count
Source
149
267k
{
150
267k
  list = FN(LIST(EL),grow)(list, 1);
151
267k
  if (!list || !el)
152
0
    goto error;
153
267k
  list->p[list->n] = el;
154
267k
  list->n++;
155
267k
  return list;
156
267k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
267k
}
isl_basic_set_list_add
Line
Count
Source
149
2.23k
{
150
2.23k
  list = FN(LIST(EL),grow)(list, 1);
151
2.23k
  if (!list || !el)
152
0
    goto error;
153
2.23k
  list->p[list->n] = el;
154
2.23k
  list->n++;
155
2.23k
  return list;
156
2.23k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
2.23k
}
isl_set_list_add
Line
Count
Source
149
12.9k
{
150
12.9k
  list = FN(LIST(EL),grow)(list, 1);
151
12.9k
  if (!list || !el)
152
0
    goto error;
153
12.9k
  list->p[list->n] = el;
154
12.9k
  list->n++;
155
12.9k
  return list;
156
12.9k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
12.9k
}
isl_union_set_list_add
Line
Count
Source
149
1.77k
{
150
1.77k
  list = FN(LIST(EL),grow)(list, 1);
151
1.77k
  if (!list || !el)
152
0
    goto error;
153
1.77k
  list->p[list->n] = el;
154
1.77k
  list->n++;
155
1.77k
  return list;
156
1.77k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
1.77k
}
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
651
    return list;
176
69.9k
  list = FN(LIST(EL),cow)(list);
177
69.9k
  if (!list)
178
0
    return NULL;
179
204k
  
for (i = 0; 69.9k
i < n;
++i134k
)
180
134k
    FN(EL,free)(list->p[first + i]);
181
72.5k
  for (i = first; i + n < list->n; 
++i2.52k
)
182
2.52k
    list->p[i] = list->p[i + n];
183
69.9k
  list->n -= n;
184
69.9k
  return list;
185
69.9k
}
Unexecuted instantiation: isl_aff_list_drop
Unexecuted instantiation: isl_pw_aff_list_drop
Unexecuted instantiation: isl_union_pw_aff_list_drop
Unexecuted instantiation: isl_union_pw_multi_aff_list_drop
Unexecuted instantiation: isl_ast_expr_list_drop
Unexecuted instantiation: isl_ast_node_list_drop
Unexecuted instantiation: isl_ast_graft_list_drop
isl_constraint_list_drop
Line
Count
Source
166
2.09k
{
167
2.09k
  int i;
168
2.09k
169
2.09k
  if (!list)
170
0
    return NULL;
171
2.09k
  if (first + n > list->n || first + n < first)
172
2.09k
    
isl_die0
(list->ctx, isl_error_invalid,
173
2.09k
      "index out of bounds", return FN(LIST(EL),free)(list));
174
2.09k
  if (n == 0)
175
651
    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.53k
)
180
1.53k
    FN(EL,free)(list->p[first + i]);
181
2.31k
  for (i = first; i + n < list->n; 
++i868
)
182
868
    list->p[i] = list->p[i + n];
183
1.44k
  list->n -= n;
184
1.44k
  return list;
185
1.44k
}
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
}
isl_schedule_tree_list_drop
Line
Count
Source
166
67.3k
{
167
67.3k
  int i;
168
67.3k
169
67.3k
  if (!list)
170
0
    return NULL;
171
67.3k
  if (first + n > list->n || first + n < first)
172
67.3k
    
isl_die0
(list->ctx, isl_error_invalid,
173
67.3k
      "index out of bounds", return FN(LIST(EL),free)(list));
174
67.3k
  if (n == 0)
175
0
    return list;
176
67.3k
  list = FN(LIST(EL),cow)(list);
177
67.3k
  if (!list)
178
0
    return NULL;
179
198k
  
for (i = 0; 67.3k
i < n;
++i131k
)
180
131k
    FN(EL,free)(list->p[first + i]);
181
68.9k
  for (i = first; i + n < list->n; 
++i1.65k
)
182
1.65k
    list->p[i] = list->p[i + n];
183
67.3k
  list->n -= n;
184
67.3k
  return list;
185
67.3k
}
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.21k
{
167
1.21k
  int i;
168
1.21k
169
1.21k
  if (!list)
170
0
    return NULL;
171
1.21k
  if (first + n > list->n || first + n < first)
172
1.21k
    
isl_die0
(list->ctx, isl_error_invalid,
173
1.21k
      "index out of bounds", return FN(LIST(EL),free)(list));
174
1.21k
  if (n == 0)
175
0
    return list;
176
1.21k
  list = FN(LIST(EL),cow)(list);
177
1.21k
  if (!list)
178
0
    return NULL;
179
2.42k
  
for (i = 0; 1.21k
i < n;
++i1.21k
)
180
1.21k
    FN(EL,free)(list->p[first + i]);
181
1.21k
  for (i = first; i + n < list->n; 
++i0
)
182
0
    list->p[i] = list->p[i + n];
183
1.21k
  list->n -= n;
184
1.21k
  return list;
185
1.21k
}
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
27
{
197
27
  int i;
198
27
  isl_ctx *ctx;
199
27
  LIST(EL) *res;
200
27
201
27
  if (!list || !el)
202
0
    goto error;
203
27
  ctx = FN(LIST(EL),get_ctx)(list);
204
27
  if (pos > list->n)
205
27
    
isl_die0
(ctx, isl_error_invalid,
206
27
      "index out of bounds", goto error);
207
27
208
27
  if (list->ref == 1 && 
list->size > list->n24
) {
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
26
216
26
  res = FN(LIST(EL),alloc)(ctx, list->n + 1);
217
59
  for (i = 0; i < pos; 
++i33
)
218
33
    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_aff_list_insert
Unexecuted instantiation: isl_pw_aff_list_insert
Unexecuted instantiation: isl_union_pw_aff_list_insert
Unexecuted instantiation: isl_union_pw_multi_aff_list_insert
Unexecuted instantiation: isl_ast_expr_list_insert
Unexecuted instantiation: isl_ast_node_list_insert
isl_ast_graft_list_insert
Line
Count
Source
196
23
{
197
23
  int i;
198
23
  isl_ctx *ctx;
199
23
  LIST(EL) *res;
200
23
201
23
  if (!list || !el)
202
0
    goto error;
203
23
  ctx = FN(LIST(EL),get_ctx)(list);
204
23
  if (pos > list->n)
205
23
    
isl_die0
(ctx, isl_error_invalid,
206
23
      "index out of bounds", goto error);
207
23
208
23
  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
23
216
23
  res = FN(LIST(EL),alloc)(ctx, list->n + 1);
217
53
  for (i = 0; i < pos; 
++i30
)
218
30
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
219
23
  res = FN(LIST(EL),add)(res, el);
220
25
  for (i = pos; i < list->n; 
++i2
)
221
2
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
222
23
  FN(LIST(EL),free)(list);
223
23
224
23
  return res;
225
23
error:
226
0
  FN(EL,free)(el);
227
0
  FN(LIST(EL),free)(list);
228
0
  return NULL;
229
23
}
Unexecuted instantiation: isl_constraint_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_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
242k
{
233
242k
  int i;
234
242k
235
242k
  if (!list)
236
37.9k
    return NULL;
237
204k
238
204k
  if (--list->ref > 0)
239
58.5k
    return NULL;
240
146k
241
146k
  isl_ctx_deref(list->ctx);
242
369k
  for (i = 0; i < list->n; 
++i223k
)
243
223k
    FN(EL,free)(list->p[i]);
244
146k
  free(list);
245
146k
246
146k
  return NULL;
247
146k
}
isl_aff_list_free
Line
Count
Source
232
16.0k
{
233
16.0k
  int i;
234
16.0k
235
16.0k
  if (!list)
236
7.96k
    return NULL;
237
8.04k
238
8.04k
  if (--list->ref > 0)
239
0
    return NULL;
240
8.04k
241
8.04k
  isl_ctx_deref(list->ctx);
242
16.0k
  for (i = 0; i < list->n; 
++i8.04k
)
243
8.04k
    
FN8.04k
(EL,free)(list->p[i])8.04k
;
244
8.04k
  free(list);
245
8.04k
246
8.04k
  return NULL;
247
8.04k
}
isl_pw_aff_list_free
Line
Count
Source
232
25.9k
{
233
25.9k
  int i;
234
25.9k
235
25.9k
  if (!list)
236
3
    return NULL;
237
25.9k
238
25.9k
  if (--list->ref > 0)
239
10.5k
    return NULL;
240
15.3k
241
15.3k
  isl_ctx_deref(list->ctx);
242
33.0k
  for (i = 0; i < list->n; 
++i17.7k
)
243
17.7k
    FN(EL,free)(list->p[i]);
244
15.3k
  free(list);
245
15.3k
246
15.3k
  return NULL;
247
15.3k
}
isl_union_pw_aff_list_free
Line
Count
Source
232
17
{
233
17
  int i;
234
17
235
17
  if (!list)
236
0
    return NULL;
237
17
238
17
  if (--list->ref > 0)
239
0
    return NULL;
240
17
241
17
  isl_ctx_deref(list->ctx);
242
46
  for (i = 0; i < list->n; 
++i29
)
243
29
    FN(EL,free)(list->p[i]);
244
17
  free(list);
245
17
246
17
  return NULL;
247
17
}
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.63k
{
233
4.63k
  int i;
234
4.63k
235
4.63k
  if (!list)
236
0
    return NULL;
237
4.63k
238
4.63k
  if (--list->ref > 0)
239
215
    return NULL;
240
4.42k
241
4.42k
  isl_ctx_deref(list->ctx);
242
10.5k
  for (i = 0; i < list->n; 
++i6.09k
)
243
6.09k
    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.8k
{
233
17.8k
  int i;
234
17.8k
235
17.8k
  if (!list)
236
0
    return NULL;
237
17.8k
238
17.8k
  if (--list->ref > 0)
239
0
    return NULL;
240
17.8k
241
17.8k
  isl_ctx_deref(list->ctx);
242
34.6k
  for (i = 0; i < list->n; 
++i16.7k
)
243
17.8k
    
FN16.7k
(EL,free)(list->p[i])16.7k
;
244
17.8k
  free(list);
245
17.8k
246
17.8k
  return NULL;
247
17.8k
}
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.32k
  for (i = 0; i < list->n; 
++i2.03k
)
243
2.29k
    
FN2.03k
(EL,free)(list->p[i])2.03k
;
244
2.29k
  free(list);
245
2.29k
246
2.29k
  return NULL;
247
2.29k
}
isl_id_list_free
Line
Count
Source
232
36.5k
{
233
36.5k
  int i;
234
36.5k
235
36.5k
  if (!list)
236
0
    return NULL;
237
36.5k
238
36.5k
  if (--list->ref > 0)
239
34.7k
    return NULL;
240
1.82k
241
1.82k
  isl_ctx_deref(list->ctx);
242
4.09k
  for (i = 0; i < list->n; 
++i2.26k
)
243
2.26k
    FN(EL,free)(list->p[i]);
244
1.82k
  free(list);
245
1.82k
246
1.82k
  return NULL;
247
1.82k
}
isl_basic_map_list_free
Line
Count
Source
232
3.52k
{
233
3.52k
  int i;
234
3.52k
235
3.52k
  if (!list)
236
0
    return NULL;
237
3.52k
238
3.52k
  if (--list->ref > 0)
239
0
    return NULL;
240
3.52k
241
3.52k
  isl_ctx_deref(list->ctx);
242
17.4k
  for (i = 0; i < list->n; 
++i13.8k
)
243
13.8k
    FN(EL,free)(list->p[i]);
244
3.52k
  free(list);
245
3.52k
246
3.52k
  return NULL;
247
3.52k
}
isl_map_list_free
Line
Count
Source
232
810
{
233
810
  int i;
234
810
235
810
  if (!list)
236
0
    return NULL;
237
810
238
810
  if (--list->ref > 0)
239
0
    return NULL;
240
810
241
810
  isl_ctx_deref(list->ctx);
242
2.63k
  for (i = 0; i < list->n; 
++i1.82k
)
243
1.82k
    FN(EL,free)(list->p[i]);
244
810
  free(list);
245
810
246
810
  return NULL;
247
810
}
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
}
isl_schedule_tree_list_free
Line
Count
Source
232
112k
{
233
112k
  int i;
234
112k
235
112k
  if (!list)
236
21.9k
    return NULL;
237
90.4k
238
90.4k
  if (--list->ref > 0)
239
13.0k
    return NULL;
240
77.4k
241
77.4k
  isl_ctx_deref(list->ctx);
242
213k
  for (i = 0; i < list->n; 
++i135k
)
243
135k
    FN(EL,free)(list->p[i]);
244
77.4k
  free(list);
245
77.4k
246
77.4k
  return NULL;
247
77.4k
}
isl_basic_set_list_free
Line
Count
Source
232
2.92k
{
233
2.92k
  int i;
234
2.92k
235
2.92k
  if (!list)
236
0
    return NULL;
237
2.92k
238
2.92k
  if (--list->ref > 0)
239
13
    return NULL;
240
2.90k
241
2.90k
  isl_ctx_deref(list->ctx);
242
8.57k
  for (i = 0; i < list->n; 
++i5.66k
)
243
5.66k
    FN(EL,free)(list->p[i]);
244
2.90k
  free(list);
245
2.90k
246
2.90k
  return NULL;
247
2.90k
}
isl_set_list_free
Line
Count
Source
232
19.3k
{
233
19.3k
  int i;
234
19.3k
235
19.3k
  if (!list)
236
7.96k
    return NULL;
237
11.3k
238
11.3k
  if (--list->ref > 0)
239
0
    return NULL;
240
11.3k
241
11.3k
  isl_ctx_deref(list->ctx);
242
23.9k
  for (i = 0; i < list->n; 
++i12.5k
)
243
12.5k
    FN(EL,free)(list->p[i]);
244
11.3k
  free(list);
245
11.3k
246
11.3k
  return NULL;
247
11.3k
}
isl_union_set_list_free
Line
Count
Source
232
477
{
233
477
  int i;
234
477
235
477
  if (!list)
236
0
    return NULL;
237
477
238
477
  if (--list->ref > 0)
239
0
    return NULL;
240
477
241
477
  isl_ctx_deref(list->ctx);
242
1.03k
  for (i = 0; i < list->n; 
++i560
)
243
560
    FN(EL,free)(list->p[i]);
244
477
  free(list);
245
477
246
477
  return NULL;
247
477
}
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
951k
{
251
951k
  return list ? 
list->n936k
:
015.0k
;
252
951k
}
isl_aff_list_n_aff
Line
Count
Source
250
351
{
251
351
  return list ? list->n : 
00
;
252
351
}
isl_pw_aff_list_n_pw_aff
Line
Count
Source
250
15.6k
{
251
15.6k
  return list ? list->n : 
00
;
252
15.6k
}
isl_union_pw_aff_list_n_union_pw_aff
Line
Count
Source
250
17
{
251
17
  return list ? list->n : 
00
;
252
17
}
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.82k
{
251
4.82k
  return list ? list->n : 
00
;
252
4.82k
}
isl_ast_graft_list_n_ast_graft
Line
Count
Source
250
27.0k
{
251
27.0k
  return list ? list->n : 
00
;
252
27.0k
}
isl_constraint_list_n_constraint
Line
Count
Source
250
3.69k
{
251
3.69k
  return list ? list->n : 
00
;
252
3.69k
}
isl_id_list_n_id
Line
Count
Source
250
1.06k
{
251
1.06k
  return list ? list->n : 
00
;
252
1.06k
}
isl_basic_map_list_n_basic_map
Line
Count
Source
250
3.19k
{
251
3.19k
  return list ? list->n : 
00
;
252
3.19k
}
isl_map_list_n_map
Line
Count
Source
250
799
{
251
799
  return list ? list->n : 
00
;
252
799
}
isl_union_map_list_n_union_map
Line
Count
Source
250
13
{
251
13
  return list ? list->n : 
00
;
252
13
}
isl_schedule_tree_list_n_schedule_tree
Line
Count
Source
250
880k
{
251
880k
  return list ? 
list->n864k
:
015.0k
;
252
880k
}
isl_basic_set_list_n_basic_set
Line
Count
Source
250
4.43k
{
251
4.43k
  return list ? list->n : 
00
;
252
4.43k
}
isl_set_list_n_set
Line
Count
Source
250
7.99k
{
251
7.99k
  return list ? list->n : 
00
;
252
7.99k
}
isl_union_set_list_n_union_set
Line
Count
Source
250
2.67k
{
251
2.67k
  return list ? list->n : 
00
;
252
2.67k
}
isl_val_list_n_val
Line
Count
Source
250
7
{
251
7
  return list ? list->n : 
00
;
252
7
}
253
254
__isl_give EL *FN(FN(LIST(EL),get),BASE)(__isl_keep LIST(EL) *list, int index)
255
651k
{
256
651k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
651k
  return FN(EL,copy)(list->p[index]);
259
651k
}
isl_aff_list_get_aff
Line
Count
Source
255
8.28k
{
256
8.28k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
8.28k
  return FN(EL,copy)(list->p[index]);
259
8.28k
}
isl_pw_aff_list_get_pw_aff
Line
Count
Source
255
11.9k
{
256
11.9k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
11.9k
  return FN(EL,copy)(list->p[index]);
259
11.9k
}
isl_union_pw_aff_list_get_union_pw_aff
Line
Count
Source
255
29
{
256
29
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
29
  return FN(EL,copy)(list->p[index]);
259
29
}
isl_union_pw_multi_aff_list_get_union_pw_multi_aff
Line
Count
Source
255
7
{
256
7
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
7
  return FN(EL,copy)(list->p[index]);
259
7
}
Unexecuted instantiation: isl_ast_expr_list_get_ast_expr
isl_ast_node_list_get_ast_node
Line
Count
Source
255
4.39k
{
256
4.39k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
4.39k
  return FN(EL,copy)(list->p[index]);
259
4.39k
}
isl_ast_graft_list_get_ast_graft
Line
Count
Source
255
33.5k
{
256
33.5k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
33.5k
  return FN(EL,copy)(list->p[index]);
259
33.5k
}
isl_constraint_list_get_constraint
Line
Count
Source
255
2.03k
{
256
2.03k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
2.03k
  return FN(EL,copy)(list->p[index]);
259
2.03k
}
isl_id_list_get_id
Line
Count
Source
255
23.1k
{
256
23.1k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
23.1k
  return FN(EL,copy)(list->p[index]);
259
23.1k
}
isl_basic_map_list_get_basic_map
Line
Count
Source
255
11.1k
{
256
11.1k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
11.1k
  return FN(EL,copy)(list->p[index]);
259
11.1k
}
isl_map_list_get_map
Line
Count
Source
255
1.79k
{
256
1.79k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
1.79k
  return FN(EL,copy)(list->p[index]);
259
1.79k
}
isl_union_map_list_get_union_map
Line
Count
Source
255
9
{
256
9
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
9
  return FN(EL,copy)(list->p[index]);
259
9
}
isl_schedule_tree_list_get_schedule_tree
Line
Count
Source
255
527k
{
256
527k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
527k
  return FN(EL,copy)(list->p[index]);
259
527k
}
isl_basic_set_list_get_basic_set
Line
Count
Source
255
8.81k
{
256
8.81k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
8.81k
  return FN(EL,copy)(list->p[index]);
259
8.81k
}
isl_set_list_get_set
Line
Count
Source
255
15.9k
{
256
15.9k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
15.9k
  return FN(EL,copy)(list->p[index]);
259
15.9k
}
isl_union_set_list_get_union_set
Line
Count
Source
255
2.75k
{
256
2.75k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
2.75k
  return FN(EL,copy)(list->p[index]);
259
2.75k
}
isl_val_list_get_val
Line
Count
Source
255
17
{
256
17
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
17
  return FN(EL,copy)(list->p[index]);
259
17
}
260
261
/* Replace the element at position "index" in "list" by "el".
262
 */
263
__isl_give LIST(EL) *FN(FN(LIST(EL),set),BASE)(__isl_take LIST(EL) *list,
264
  int index, __isl_take EL *el)
265
45.7k
{
266
45.7k
  if (!list || !el)
267
0
    goto error;
268
45.7k
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
45.7k
  if (list->p[index] == el) {
271
10.9k
    FN(EL,free)(el);
272
10.9k
    return list;
273
10.9k
  }
274
34.7k
  list = FN(LIST(EL),cow)(list);
275
34.7k
  if (!list)
276
0
    goto error;
277
34.7k
  FN(EL,free)(list->p[index]);
278
34.7k
  list->p[index] = el;
279
34.7k
  return list;
280
34.7k
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
34.7k
}
isl_aff_list_set_aff
Line
Count
Source
265
2
{
266
2
  if (!list || !el)
267
0
    goto error;
268
2
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
2
  if (list->p[index] == el) {
271
0
    FN(EL,free)(el);
272
0
    return list;
273
0
  }
274
2
  list = FN(LIST(EL),cow)(list);
275
2
  if (!list)
276
0
    goto error;
277
2
  FN(EL,free)(list->p[index]);
278
2
  list->p[index] = el;
279
2
  return list;
280
2
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
2
}
isl_pw_aff_list_set_pw_aff
Line
Count
Source
265
3.06k
{
266
3.06k
  if (!list || !el)
267
0
    goto error;
268
3.06k
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
3.06k
  if (list->p[index] == el) {
271
0
    FN(EL,free)(el);
272
0
    return list;
273
0
  }
274
3.06k
  list = FN(LIST(EL),cow)(list);
275
3.06k
  if (!list)
276
0
    goto error;
277
3.06k
  FN(EL,free)(list->p[index]);
278
3.06k
  list->p[index] = el;
279
3.06k
  return list;
280
3.06k
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
3.06k
}
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
265
6.59k
{
266
6.59k
  if (!list || !el)
267
0
    goto error;
268
6.59k
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
6.59k
  if (list->p[index] == el) {
271
6.57k
    FN(EL,free)(el);
272
6.57k
    return list;
273
6.57k
  }
274
24
  list = FN(LIST(EL),cow)(list);
275
24
  if (!list)
276
0
    goto error;
277
24
  FN(EL,free)(list->p[index]);
278
24
  list->p[index] = el;
279
24
  return list;
280
24
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
24
}
Unexecuted instantiation: isl_constraint_list_set_constraint
Unexecuted instantiation: isl_id_list_set_id
isl_basic_map_list_set_basic_map
Line
Count
Source
265
3.44k
{
266
3.44k
  if (!list || !el)
267
0
    goto error;
268
3.44k
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
3.44k
  if (list->p[index] == el) {
271
3.00k
    FN(EL,free)(el);
272
3.00k
    return list;
273
3.00k
  }
274
435
  list = FN(LIST(EL),cow)(list);
275
435
  if (!list)
276
0
    goto error;
277
435
  FN(EL,free)(list->p[index]);
278
435
  list->p[index] = el;
279
435
  return list;
280
435
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
435
}
Unexecuted instantiation: isl_map_list_set_map
isl_union_map_list_set_union_map
Line
Count
Source
265
2
{
266
2
  if (!list || !el)
267
0
    goto error;
268
2
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
2
  if (list->p[index] == el) {
271
0
    FN(EL,free)(el);
272
0
    return list;
273
0
  }
274
2
  list = FN(LIST(EL),cow)(list);
275
2
  if (!list)
276
0
    goto error;
277
2
  FN(EL,free)(list->p[index]);
278
2
  list->p[index] = el;
279
2
  return list;
280
2
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
2
}
isl_schedule_tree_list_set_schedule_tree
Line
Count
Source
265
25.8k
{
266
25.8k
  if (!list || !el)
267
0
    goto error;
268
25.8k
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
25.8k
  if (list->p[index] == el) {
271
3
    FN(EL,free)(el);
272
3
    return list;
273
3
  }
274
25.8k
  list = FN(LIST(EL),cow)(list);
275
25.8k
  if (!list)
276
0
    goto error;
277
25.8k
  FN(EL,free)(list->p[index]);
278
25.8k
  list->p[index] = el;
279
25.8k
  return list;
280
25.8k
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
25.8k
}
isl_basic_set_list_set_basic_set
Line
Count
Source
265
3.50k
{
266
3.50k
  if (!list || !el)
267
0
    goto error;
268
3.50k
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
3.50k
  if (list->p[index] == el) {
271
0
    FN(EL,free)(el);
272
0
    return list;
273
0
  }
274
3.50k
  list = FN(LIST(EL),cow)(list);
275
3.50k
  if (!list)
276
0
    goto error;
277
3.50k
  FN(EL,free)(list->p[index]);
278
3.50k
  list->p[index] = el;
279
3.50k
  return list;
280
3.50k
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
3.50k
}
isl_set_list_set_set
Line
Count
Source
265
3.26k
{
266
3.26k
  if (!list || !el)
267
0
    goto error;
268
3.26k
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
3.26k
  if (list->p[index] == el) {
271
1.41k
    FN(EL,free)(el);
272
1.41k
    return list;
273
1.41k
  }
274
1.84k
  list = FN(LIST(EL),cow)(list);
275
1.84k
  if (!list)
276
0
    goto error;
277
1.84k
  FN(EL,free)(list->p[index]);
278
1.84k
  list->p[index] = el;
279
1.84k
  return list;
280
1.84k
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
1.84k
}
Unexecuted instantiation: isl_union_set_list_set_union_set
Unexecuted instantiation: isl_val_list_set_val
285
286
/* Return the element at position "index" of "list".
287
 * This may be either a copy or the element itself
288
 * if there is only one reference to "list".
289
 * This allows the element to be modified inplace
290
 * if both the list and the element have only a single reference.
291
 * The caller is not allowed to modify "list" between
292
 * this call to isl_list_*_take_* and a subsequent call
293
 * to isl_list_*_restore_*.
294
 * The only exception is that isl_list_*_free can be called instead.
295
 */
296
static __isl_give EL *FN(FN(LIST(EL),take),BASE)(__isl_keep LIST(EL) *list,
297
  int index)
298
64
{
299
64
  EL *el;
300
64
301
64
  if (FN(LIST(EL),check_index)(list, index) < 0)
302
0
    return NULL;
303
64
  if (list->ref != 1)
304
0
    return FN(FN(LIST(EL),get),BASE)(list, index);
305
64
  el = list->p[index];
306
64
  list->p[index] = NULL;
307
64
  return el;
308
64
}
Unexecuted instantiation: isl_aff.c:isl_aff_list_take_aff
Unexecuted instantiation: isl_aff.c:isl_pw_aff_list_take_pw_aff
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_list_take_union_pw_aff
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_list_take_union_pw_multi_aff
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_take_ast_expr
Unexecuted instantiation: isl_ast.c:isl_ast_node_list_take_ast_node
Unexecuted instantiation: isl_ast_graft.c:isl_ast_graft_list_take_ast_graft
Unexecuted instantiation: isl_constraint.c:isl_constraint_list_take_constraint
Unexecuted instantiation: isl_id.c:isl_id_list_take_id
Unexecuted instantiation: isl_map_list.c:isl_basic_map_list_take_basic_map
Unexecuted instantiation: isl_map_list.c:isl_map_list_take_map
Unexecuted instantiation: isl_map_list.c:isl_union_map_list_take_union_map
Unexecuted instantiation: isl_schedule_tree.c:isl_schedule_tree_list_take_schedule_tree
isl_set_list.c:isl_basic_set_list_take_basic_set
Line
Count
Source
298
64
{
299
64
  EL *el;
300
64
301
64
  if (FN(LIST(EL),check_index)(list, index) < 0)
302
0
    return NULL;
303
64
  if (list->ref != 1)
304
0
    return FN(FN(LIST(EL),get),BASE)(list, index);
305
64
  el = list->p[index];
306
64
  list->p[index] = NULL;
307
64
  return el;
308
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
309
310
/* Set the element at position "index" of "list" to "el",
311
 * where the position may be empty due to a previous call
312
 * to isl_list_*_take_*.
313
 */
314
static __isl_give LIST(EL) *FN(FN(LIST(EL),restore),BASE)(
315
  __isl_take LIST(EL) *list, int index, __isl_take EL *el)
316
64
{
317
64
  return FN(FN(LIST(EL),set),BASE)(list, index, el);
318
64
}
Unexecuted instantiation: isl_aff.c:isl_aff_list_restore_aff
Unexecuted instantiation: isl_aff.c:isl_pw_aff_list_restore_pw_aff
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_list_restore_union_pw_aff
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_list_restore_union_pw_multi_aff
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_restore_ast_expr
Unexecuted instantiation: isl_ast.c:isl_ast_node_list_restore_ast_node
Unexecuted instantiation: isl_ast_graft.c:isl_ast_graft_list_restore_ast_graft
Unexecuted instantiation: isl_constraint.c:isl_constraint_list_restore_constraint
Unexecuted instantiation: isl_id.c:isl_id_list_restore_id
Unexecuted instantiation: isl_map_list.c:isl_basic_map_list_restore_basic_map
Unexecuted instantiation: isl_map_list.c:isl_map_list_restore_map
Unexecuted instantiation: isl_map_list.c:isl_union_map_list_restore_union_map
Unexecuted instantiation: isl_schedule_tree.c:isl_schedule_tree_list_restore_schedule_tree
isl_set_list.c:isl_basic_set_list_restore_basic_set
Line
Count
Source
316
64
{
317
64
  return FN(FN(LIST(EL),set),BASE)(list, index, el);
318
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
319
320
isl_stat FN(LIST(EL),foreach)(__isl_keep LIST(EL) *list,
321
  isl_stat (*fn)(__isl_take EL *el, void *user), void *user)
322
1.52k
{
323
1.52k
  int i;
324
1.52k
325
1.52k
  if (!list)
326
0
    return isl_stat_error;
327
1.52k
328
3.36k
  
for (i = 0; 1.52k
i < list->n;
++i1.83k
) {
329
2.36k
    EL *el = FN(EL,copy)(list->p[i]);
330
2.36k
    if (!el)
331
0
      return isl_stat_error;
332
2.36k
    if (fn(el, user) < 0)
333
533
      return isl_stat_error;
334
2.36k
  }
335
1.52k
336
1.52k
  
return isl_stat_ok993
;
337
1.52k
}
Unexecuted instantiation: isl_aff_list_foreach
isl_pw_aff_list_foreach
Line
Count
Source
322
699
{
323
699
  int i;
324
699
325
699
  if (!list)
326
0
    return isl_stat_error;
327
699
328
874
  
for (i = 0; 699
i < list->n;
++i175
) {
329
708
    EL *el = FN(EL,copy)(list->p[i]);
330
708
    if (!el)
331
0
      return isl_stat_error;
332
708
    if (fn(el, user) < 0)
333
533
      return isl_stat_error;
334
708
  }
335
699
336
699
  
return isl_stat_ok166
;
337
699
}
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
322
699
{
323
699
  int i;
324
699
325
699
  if (!list)
326
0
    return isl_stat_error;
327
699
328
2.23k
  
for (i = 0; 699
i < list->n;
++i1.53k
) {
329
1.53k
    EL *el = FN(EL,copy)(list->p[i]);
330
1.53k
    if (!el)
331
0
      return isl_stat_error;
332
1.53k
    if (fn(el, user) < 0)
333
0
      return isl_stat_error;
334
1.53k
  }
335
699
336
699
  return isl_stat_ok;
337
699
}
Unexecuted instantiation: isl_id_list_foreach
Unexecuted instantiation: isl_basic_map_list_foreach
Unexecuted instantiation: isl_map_list_foreach
Unexecuted instantiation: isl_union_map_list_foreach
Unexecuted instantiation: isl_schedule_tree_list_foreach
isl_basic_set_list_foreach
Line
Count
Source
322
128
{
323
128
  int i;
324
128
325
128
  if (!list)
326
0
    return isl_stat_error;
327
128
328
256
  
for (i = 0; 128
i < list->n;
++i128
) {
329
128
    EL *el = FN(EL,copy)(list->p[i]);
330
128
    if (!el)
331
0
      return isl_stat_error;
332
128
    if (fn(el, user) < 0)
333
0
      return isl_stat_error;
334
128
  }
335
128
336
128
  return isl_stat_ok;
337
128
}
Unexecuted instantiation: isl_set_list_foreach
Unexecuted instantiation: isl_union_set_list_foreach
Unexecuted instantiation: isl_val_list_foreach
338
339
/* Replace each element in "list" by the result of calling "fn"
340
 * on the element.
341
 */
342
__isl_give LIST(EL) *FN(LIST(EL),map)(__isl_keep LIST(EL) *list,
343
  __isl_give EL *(*fn)(__isl_take EL *el, void *user), void *user)
344
64
{
345
64
  int i, n;
346
64
347
64
  if (!list)
348
0
    return NULL;
349
64
350
64
  n = list->n;
351
128
  for (i = 0; i < n; 
++i64
) {
352
64
    EL *el = FN(FN(LIST(EL),take),BASE)(list, i);
353
64
    if (!el)
354
0
      return FN(LIST(EL),free)(list);
355
64
    el = fn(el, user);
356
64
    list = FN(FN(LIST(EL),restore),BASE)(list, i, el);
357
64
  }
358
64
359
64
  return list;
360
64
}
Unexecuted instantiation: isl_aff_list_map
Unexecuted instantiation: isl_pw_aff_list_map
Unexecuted instantiation: isl_union_pw_aff_list_map
Unexecuted instantiation: isl_union_pw_multi_aff_list_map
Unexecuted instantiation: isl_ast_expr_list_map
Unexecuted instantiation: isl_ast_node_list_map
Unexecuted instantiation: isl_ast_graft_list_map
Unexecuted instantiation: isl_constraint_list_map
Unexecuted instantiation: isl_id_list_map
Unexecuted instantiation: isl_basic_map_list_map
Unexecuted instantiation: isl_map_list_map
Unexecuted instantiation: isl_union_map_list_map
Unexecuted instantiation: isl_schedule_tree_list_map
isl_basic_set_list_map
Line
Count
Source
344
64
{
345
64
  int i, n;
346
64
347
64
  if (!list)
348
0
    return NULL;
349
64
350
64
  n = list->n;
351
128
  for (i = 0; i < n; 
++i64
) {
352
64
    EL *el = FN(FN(LIST(EL),take),BASE)(list, i);
353
64
    if (!el)
354
0
      return FN(LIST(EL),free)(list);
355
64
    el = fn(el, user);
356
64
    list = FN(FN(LIST(EL),restore),BASE)(list, i, el);
357
64
  }
358
64
359
64
  return list;
360
64
}
Unexecuted instantiation: isl_set_list_map
Unexecuted instantiation: isl_union_set_list_map
Unexecuted instantiation: isl_val_list_map
361
362
/* Internal data structure for isl_*_list_sort.
363
 *
364
 * "cmp" is the original comparison function.
365
 * "user" is a user provided pointer that should be passed to "cmp".
366
 */
367
S(LIST(EL),sort_data) {
368
  int (*cmp)(__isl_keep EL *a, __isl_keep EL *b, void *user);
369
  void *user;
370
};
371
372
/* Compare two entries of an isl_*_list based on the user provided
373
 * comparison function on pairs of isl_* objects.
374
 */
375
static int FN(LIST(EL),cmp)(const void *a, const void *b, void *user)
376
1.14k
{
377
1.14k
  S(LIST(EL),sort_data) *data = user;
378
1.14k
  EL * const *el1 = a;
379
1.14k
  EL * const *el2 = b;
380
1.14k
381
1.14k
  return data->cmp(*el1, *el2, data->user);
382
1.14k
}
Unexecuted instantiation: isl_aff.c:isl_aff_list_cmp
isl_aff.c:isl_pw_aff_list_cmp
Line
Count
Source
376
83
{
377
83
  S(LIST(EL),sort_data) *data = user;
378
83
  EL * const *el1 = a;
379
83
  EL * const *el2 = b;
380
83
381
83
  return data->cmp(*el1, *el2, data->user);
382
83
}
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_list_cmp
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_list_cmp
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_cmp
Unexecuted instantiation: isl_ast.c:isl_ast_node_list_cmp
isl_ast_graft.c:isl_ast_graft_list_cmp
Line
Count
Source
376
20
{
377
20
  S(LIST(EL),sort_data) *data = user;
378
20
  EL * const *el1 = a;
379
20
  EL * const *el2 = b;
380
20
381
20
  return data->cmp(*el1, *el2, data->user);
382
20
}
isl_constraint.c:isl_constraint_list_cmp
Line
Count
Source
376
1.04k
{
377
1.04k
  S(LIST(EL),sort_data) *data = user;
378
1.04k
  EL * const *el1 = a;
379
1.04k
  EL * const *el2 = b;
380
1.04k
381
1.04k
  return data->cmp(*el1, *el2, data->user);
382
1.04k
}
Unexecuted instantiation: isl_id.c:isl_id_list_cmp
Unexecuted instantiation: isl_map_list.c:isl_basic_map_list_cmp
Unexecuted instantiation: isl_map_list.c:isl_map_list_cmp
Unexecuted instantiation: isl_map_list.c:isl_union_map_list_cmp
Unexecuted instantiation: isl_schedule_tree.c:isl_schedule_tree_list_cmp
Unexecuted instantiation: isl_set_list.c:isl_basic_set_list_cmp
Unexecuted instantiation: isl_set_list.c:isl_set_list_cmp
Unexecuted instantiation: isl_set_list.c:isl_union_set_list_cmp
Unexecuted instantiation: isl_val.c:isl_val_list_cmp
383
384
/* Sort the elements of "list" in ascending order according to
385
 * comparison function "cmp".
386
 */
387
__isl_give LIST(EL) *FN(LIST(EL),sort)(__isl_take LIST(EL) *list,
388
  int (*cmp)(__isl_keep EL *a, __isl_keep EL *b, void *user), void *user)
389
1.70k
{
390
1.70k
  S(LIST(EL),sort_data) data = { cmp, user };
391
1.70k
392
1.70k
  if (!list)
393
0
    return NULL;
394
1.70k
  if (list->n <= 1)
395
845
    return list;
396
860
  list = FN(LIST(EL),cow)(list);
397
860
  if (!list)
398
0
    return NULL;
399
860
400
860
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
401
860
      &FN(LIST(EL),cmp), &data) < 0)
402
0
    return FN(LIST(EL),free)(list);
403
860
404
860
  return list;
405
860
}
Unexecuted instantiation: isl_aff_list_sort
isl_pw_aff_list_sort
Line
Count
Source
389
84
{
390
84
  S(LIST(EL),sort_data) data = { cmp, user };
391
84
392
84
  if (!list)
393
0
    return NULL;
394
84
  if (list->n <= 1)
395
11
    return list;
396
73
  list = FN(LIST(EL),cow)(list);
397
73
  if (!list)
398
0
    return NULL;
399
73
400
73
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
401
73
      &FN(LIST(EL),cmp), &data) < 0)
402
0
    return FN(LIST(EL),free)(list);
403
73
404
73
  return list;
405
73
}
Unexecuted instantiation: isl_union_pw_aff_list_sort
Unexecuted instantiation: isl_union_pw_multi_aff_list_sort
Unexecuted instantiation: isl_ast_expr_list_sort
Unexecuted instantiation: isl_ast_node_list_sort
isl_ast_graft_list_sort
Line
Count
Source
389
28
{
390
28
  S(LIST(EL),sort_data) data = { cmp, user };
391
28
392
28
  if (!list)
393
0
    return NULL;
394
28
  if (list->n <= 1)
395
8
    return list;
396
20
  list = FN(LIST(EL),cow)(list);
397
20
  if (!list)
398
0
    return NULL;
399
20
400
20
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
401
20
      &FN(LIST(EL),cmp), &data) < 0)
402
0
    return FN(LIST(EL),free)(list);
403
20
404
20
  return list;
405
20
}
isl_constraint_list_sort
Line
Count
Source
389
1.59k
{
390
1.59k
  S(LIST(EL),sort_data) data = { cmp, user };
391
1.59k
392
1.59k
  if (!list)
393
0
    return NULL;
394
1.59k
  if (list->n <= 1)
395
826
    return list;
396
767
  list = FN(LIST(EL),cow)(list);
397
767
  if (!list)
398
0
    return NULL;
399
767
400
767
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
401
767
      &FN(LIST(EL),cmp), &data) < 0)
402
0
    return FN(LIST(EL),free)(list);
403
767
404
767
  return list;
405
767
}
Unexecuted instantiation: isl_id_list_sort
Unexecuted instantiation: isl_basic_map_list_sort
Unexecuted instantiation: isl_map_list_sort
Unexecuted instantiation: isl_union_map_list_sort
Unexecuted instantiation: isl_schedule_tree_list_sort
Unexecuted instantiation: isl_basic_set_list_sort
Unexecuted instantiation: isl_set_list_sort
Unexecuted instantiation: isl_union_set_list_sort
Unexecuted instantiation: isl_val_list_sort
406
407
/* Internal data structure for isl_*_list_foreach_scc.
408
 *
409
 * "list" is the original list.
410
 * "follows" is the user provided callback that defines the edges of the graph.
411
 */
412
S(LIST(EL),foreach_scc_data) {
413
  LIST(EL) *list;
414
  isl_bool (*follows)(__isl_keep EL *a, __isl_keep EL *b, void *user);
415
  void *follows_user;
416
};
417
418
/* Does element i of data->list follow element j?
419
 *
420
 * Use the user provided callback to find out.
421
 */
422
static isl_bool FN(LIST(EL),follows)(int i, int j, void *user)
423
120
{
424
120
  S(LIST(EL),foreach_scc_data) *data = user;
425
120
426
120
  return data->follows(data->list->p[i], data->list->p[j],
427
120
        data->follows_user);
428
120
}
Unexecuted instantiation: isl_aff.c:isl_aff_list_follows
Unexecuted instantiation: isl_aff.c:isl_pw_aff_list_follows
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_list_follows
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_list_follows
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_follows
Unexecuted instantiation: isl_ast.c:isl_ast_node_list_follows
Unexecuted instantiation: isl_ast_graft.c:isl_ast_graft_list_follows
Unexecuted instantiation: isl_constraint.c:isl_constraint_list_follows
Unexecuted instantiation: isl_id.c:isl_id_list_follows
Unexecuted instantiation: isl_map_list.c:isl_basic_map_list_follows
Unexecuted instantiation: isl_map_list.c:isl_map_list_follows
Unexecuted instantiation: isl_map_list.c:isl_union_map_list_follows
Unexecuted instantiation: isl_schedule_tree.c:isl_schedule_tree_list_follows
isl_set_list.c:isl_basic_set_list_follows
Line
Count
Source
423
120
{
424
120
  S(LIST(EL),foreach_scc_data) *data = user;
425
120
426
120
  return data->follows(data->list->p[i], data->list->p[j],
427
120
        data->follows_user);
428
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
429
430
/* Call "fn" on the sublist of "list" that consists of the elements
431
 * with indices specified by the "n" elements of "pos".
432
 */
433
static isl_stat FN(LIST(EL),call_on_scc)(__isl_keep LIST(EL) *list, int *pos,
434
  int n, isl_stat (*fn)(__isl_take LIST(EL) *scc, void *user), void *user)
435
90
{
436
90
  int i;
437
90
  isl_ctx *ctx;
438
90
  LIST(EL) *slice;
439
90
440
90
  ctx = FN(LIST(EL),get_ctx)(list);
441
90
  slice = FN(LIST(EL),alloc)(ctx, n);
442
180
  for (i = 0; i < n; 
++i90
) {
443
90
    EL *el;
444
90
445
90
    el = FN(EL,copy)(list->p[pos[i]]);
446
90
    slice = FN(LIST(EL),add)(slice, el);
447
90
  }
448
90
449
90
  return fn(slice, user);
450
90
}
Unexecuted instantiation: isl_aff.c:isl_aff_list_call_on_scc
Unexecuted instantiation: isl_aff.c:isl_pw_aff_list_call_on_scc
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_list_call_on_scc
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_list_call_on_scc
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_call_on_scc
Unexecuted instantiation: isl_ast.c:isl_ast_node_list_call_on_scc
Unexecuted instantiation: isl_ast_graft.c:isl_ast_graft_list_call_on_scc
Unexecuted instantiation: isl_constraint.c:isl_constraint_list_call_on_scc
Unexecuted instantiation: isl_id.c:isl_id_list_call_on_scc
Unexecuted instantiation: isl_map_list.c:isl_basic_map_list_call_on_scc
Unexecuted instantiation: isl_map_list.c:isl_map_list_call_on_scc
Unexecuted instantiation: isl_map_list.c:isl_union_map_list_call_on_scc
Unexecuted instantiation: isl_schedule_tree.c:isl_schedule_tree_list_call_on_scc
isl_set_list.c:isl_basic_set_list_call_on_scc
Line
Count
Source
435
90
{
436
90
  int i;
437
90
  isl_ctx *ctx;
438
90
  LIST(EL) *slice;
439
90
440
90
  ctx = FN(LIST(EL),get_ctx)(list);
441
90
  slice = FN(LIST(EL),alloc)(ctx, n);
442
180
  for (i = 0; i < n; 
++i90
) {
443
90
    EL *el;
444
90
445
90
    el = FN(EL,copy)(list->p[pos[i]]);
446
90
    slice = FN(LIST(EL),add)(slice, el);
447
90
  }
448
90
449
90
  return fn(slice, user);
450
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
451
452
/* Call "fn" on each of the strongly connected components (SCCs) of
453
 * the graph with as vertices the elements of "list" and
454
 * a directed edge from node b to node a iff follows(a, b)
455
 * returns 1.  follows should return -1 on error.
456
 *
457
 * If SCC a contains a node i that follows a node j in another SCC b
458
 * (i.e., follows(i, j, user) returns 1), then fn will be called on SCC a
459
 * after being called on SCC b.
460
 *
461
 * We simply call isl_tarjan_graph_init, extract the SCCs from the result and
462
 * call fn on each of them.
463
 */
464
isl_stat FN(LIST(EL),foreach_scc)(__isl_keep LIST(EL) *list,
465
  isl_bool (*follows)(__isl_keep EL *a, __isl_keep EL *b, void *user),
466
  void *follows_user,
467
  isl_stat (*fn)(__isl_take LIST(EL) *scc, void *user), void *fn_user)
468
54
{
469
54
  S(LIST(EL),foreach_scc_data) data = { list, follows, follows_user };
470
54
  int i, n;
471
54
  isl_ctx *ctx;
472
54
  struct isl_tarjan_graph *g;
473
54
474
54
  if (!list)
475
0
    return isl_stat_error;
476
54
  if (list->n == 0)
477
0
    return isl_stat_ok;
478
54
  if (list->n == 1)
479
0
    return fn(FN(LIST(EL),copy)(list), fn_user);
480
54
481
54
  ctx = FN(LIST(EL),get_ctx)(list);
482
54
  n = list->n;
483
54
  g = isl_tarjan_graph_init(ctx, n, &FN(LIST(EL),follows), &data);
484
54
  if (!g)
485
0
    return isl_stat_error;
486
54
487
54
  i = 0;
488
103
  do {
489
103
    int first;
490
103
491
103
    if (g->order[i] == -1)
492
103
      
isl_die0
(ctx, isl_error_internal, "cannot happen",
493
103
        break);
494
103
    first = i;
495
225
    while (g->order[i] != -1) {
496
122
      ++i; --n;
497
122
    }
498
103
    if (first == 0 && 
n == 054
) {
499
13
      isl_tarjan_graph_free(g);
500
13
      return fn(FN(LIST(EL),copy)(list), fn_user);
501
13
    }
502
90
    if (FN(LIST(EL),call_on_scc)(list, g->order + first, i - first,
503
90
              fn, fn_user) < 0)
504
0
      break;
505
90
    ++i;
506
90
  } while (n);
507
54
508
54
  isl_tarjan_graph_free(g);
509
41
510
41
  return n > 0 ? 
isl_stat_error0
: isl_stat_ok;
511
54
}
Unexecuted instantiation: isl_aff_list_foreach_scc
Unexecuted instantiation: isl_pw_aff_list_foreach_scc
Unexecuted instantiation: isl_union_pw_aff_list_foreach_scc
Unexecuted instantiation: isl_union_pw_multi_aff_list_foreach_scc
Unexecuted instantiation: isl_ast_expr_list_foreach_scc
Unexecuted instantiation: isl_ast_node_list_foreach_scc
Unexecuted instantiation: isl_ast_graft_list_foreach_scc
Unexecuted instantiation: isl_constraint_list_foreach_scc
Unexecuted instantiation: isl_id_list_foreach_scc
Unexecuted instantiation: isl_basic_map_list_foreach_scc
Unexecuted instantiation: isl_map_list_foreach_scc
Unexecuted instantiation: isl_union_map_list_foreach_scc
Unexecuted instantiation: isl_schedule_tree_list_foreach_scc
isl_basic_set_list_foreach_scc
Line
Count
Source
468
54
{
469
54
  S(LIST(EL),foreach_scc_data) data = { list, follows, follows_user };
470
54
  int i, n;
471
54
  isl_ctx *ctx;
472
54
  struct isl_tarjan_graph *g;
473
54
474
54
  if (!list)
475
0
    return isl_stat_error;
476
54
  if (list->n == 0)
477
0
    return isl_stat_ok;
478
54
  if (list->n == 1)
479
0
    return fn(FN(LIST(EL),copy)(list), fn_user);
480
54
481
54
  ctx = FN(LIST(EL),get_ctx)(list);
482
54
  n = list->n;
483
54
  g = isl_tarjan_graph_init(ctx, n, &FN(LIST(EL),follows), &data);
484
54
  if (!g)
485
0
    return isl_stat_error;
486
54
487
54
  i = 0;
488
103
  do {
489
103
    int first;
490
103
491
103
    if (g->order[i] == -1)
492
103
      
isl_die0
(ctx, isl_error_internal, "cannot happen",
493
103
        break);
494
103
    first = i;
495
225
    while (g->order[i] != -1) {
496
122
      ++i; --n;
497
122
    }
498
103
    if (first == 0 && 
n == 054
) {
499
13
      isl_tarjan_graph_free(g);
500
13
      return fn(FN(LIST(EL),copy)(list), fn_user);
501
13
    }
502
90
    if (FN(LIST(EL),call_on_scc)(list, g->order + first, i - first,
503
90
              fn, fn_user) < 0)
504
0
      break;
505
90
    ++i;
506
90
  } while (n);
507
54
508
54
  isl_tarjan_graph_free(g);
509
41
510
41
  return n > 0 ? 
isl_stat_error0
: isl_stat_ok;
511
54
}
Unexecuted instantiation: isl_set_list_foreach_scc
Unexecuted instantiation: isl_union_set_list_foreach_scc
Unexecuted instantiation: isl_val_list_foreach_scc
512
513
__isl_give LIST(EL) *FN(FN(LIST(EL),from),BASE)(__isl_take EL *el)
514
30.6k
{
515
30.6k
  isl_ctx *ctx;
516
30.6k
  LIST(EL) *list;
517
30.6k
518
30.6k
  if (!el)
519
1
    return NULL;
520
30.6k
  ctx = FN(EL,get_ctx)(el);
521
30.6k
  list = FN(LIST(EL),alloc)(ctx, 1);
522
30.6k
  if (!list)
523
0
    goto error;
524
30.6k
  list = FN(LIST(EL),add)(list, el);
525
30.6k
  return list;
526
30.6k
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
30.6k
}
isl_aff_list_from_aff
Line
Count
Source
514
7.94k
{
515
7.94k
  isl_ctx *ctx;
516
7.94k
  LIST(EL) *list;
517
7.94k
518
7.94k
  if (!el)
519
0
    return NULL;
520
7.94k
  ctx = FN(EL,get_ctx)(el);
521
7.94k
  list = FN(LIST(EL),alloc)(ctx, 1);
522
7.94k
  if (!list)
523
0
    goto error;
524
7.94k
  list = FN(LIST(EL),add)(list, el);
525
7.94k
  return list;
526
7.94k
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
7.94k
}
isl_pw_aff_list_from_pw_aff
Line
Count
Source
514
8.16k
{
515
8.16k
  isl_ctx *ctx;
516
8.16k
  LIST(EL) *list;
517
8.16k
518
8.16k
  if (!el)
519
1
    return NULL;
520
8.16k
  ctx = FN(EL,get_ctx)(el);
521
8.16k
  list = FN(LIST(EL),alloc)(ctx, 1);
522
8.16k
  if (!list)
523
0
    goto error;
524
8.16k
  list = FN(LIST(EL),add)(list, el);
525
8.16k
  return list;
526
8.16k
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
8.16k
}
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
514
7
{
515
7
  isl_ctx *ctx;
516
7
  LIST(EL) *list;
517
7
518
7
  if (!el)
519
0
    return NULL;
520
7
  ctx = FN(EL,get_ctx)(el);
521
7
  list = FN(LIST(EL),alloc)(ctx, 1);
522
7
  if (!list)
523
0
    goto error;
524
7
  list = FN(LIST(EL),add)(list, el);
525
7
  return list;
526
7
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
7
}
Unexecuted instantiation: isl_ast_expr_list_from_ast_expr
isl_ast_node_list_from_ast_node
Line
Count
Source
514
61
{
515
61
  isl_ctx *ctx;
516
61
  LIST(EL) *list;
517
61
518
61
  if (!el)
519
0
    return NULL;
520
61
  ctx = FN(EL,get_ctx)(el);
521
61
  list = FN(LIST(EL),alloc)(ctx, 1);
522
61
  if (!list)
523
0
    goto error;
524
61
  list = FN(LIST(EL),add)(list, el);
525
61
  return list;
526
61
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
61
}
isl_ast_graft_list_from_ast_graft
Line
Count
Source
514
2.17k
{
515
2.17k
  isl_ctx *ctx;
516
2.17k
  LIST(EL) *list;
517
2.17k
518
2.17k
  if (!el)
519
0
    return NULL;
520
2.17k
  ctx = FN(EL,get_ctx)(el);
521
2.17k
  list = FN(LIST(EL),alloc)(ctx, 1);
522
2.17k
  if (!list)
523
0
    goto error;
524
2.17k
  list = FN(LIST(EL),add)(list, el);
525
2.17k
  return list;
526
2.17k
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
2.17k
}
Unexecuted instantiation: isl_constraint_list_from_constraint
Unexecuted instantiation: isl_id_list_from_id
Unexecuted instantiation: isl_basic_map_list_from_basic_map
Unexecuted instantiation: isl_map_list_from_map
isl_union_map_list_from_union_map
Line
Count
Source
514
1
{
515
1
  isl_ctx *ctx;
516
1
  LIST(EL) *list;
517
1
518
1
  if (!el)
519
0
    return NULL;
520
1
  ctx = FN(EL,get_ctx)(el);
521
1
  list = FN(LIST(EL),alloc)(ctx, 1);
522
1
  if (!list)
523
0
    goto error;
524
1
  list = FN(LIST(EL),add)(list, el);
525
1
  return list;
526
1
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
1
}
isl_schedule_tree_list_from_schedule_tree
Line
Count
Source
514
3.91k
{
515
3.91k
  isl_ctx *ctx;
516
3.91k
  LIST(EL) *list;
517
3.91k
518
3.91k
  if (!el)
519
0
    return NULL;
520
3.91k
  ctx = FN(EL,get_ctx)(el);
521
3.91k
  list = FN(LIST(EL),alloc)(ctx, 1);
522
3.91k
  if (!list)
523
0
    goto error;
524
3.91k
  list = FN(LIST(EL),add)(list, el);
525
3.91k
  return list;
526
3.91k
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
3.91k
}
isl_basic_set_list_from_basic_set
Line
Count
Source
514
16
{
515
16
  isl_ctx *ctx;
516
16
  LIST(EL) *list;
517
16
518
16
  if (!el)
519
0
    return NULL;
520
16
  ctx = FN(EL,get_ctx)(el);
521
16
  list = FN(LIST(EL),alloc)(ctx, 1);
522
16
  if (!list)
523
0
    goto error;
524
16
  list = FN(LIST(EL),add)(list, el);
525
16
  return list;
526
16
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
16
}
isl_set_list_from_set
Line
Count
Source
514
7.94k
{
515
7.94k
  isl_ctx *ctx;
516
7.94k
  LIST(EL) *list;
517
7.94k
518
7.94k
  if (!el)
519
0
    return NULL;
520
7.94k
  ctx = FN(EL,get_ctx)(el);
521
7.94k
  list = FN(LIST(EL),alloc)(ctx, 1);
522
7.94k
  if (!list)
523
0
    goto error;
524
7.94k
  list = FN(LIST(EL),add)(list, el);
525
7.94k
  return list;
526
7.94k
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
7.94k
}
isl_union_set_list_from_union_set
Line
Count
Source
514
408
{
515
408
  isl_ctx *ctx;
516
408
  LIST(EL) *list;
517
408
518
408
  if (!el)
519
0
    return NULL;
520
408
  ctx = FN(EL,get_ctx)(el);
521
408
  list = FN(LIST(EL),alloc)(ctx, 1);
522
408
  if (!list)
523
0
    goto error;
524
408
  list = FN(LIST(EL),add)(list, el);
525
408
  return list;
526
408
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
408
}
Unexecuted instantiation: isl_val_list_from_val
530
531
/* Append the elements of "list2" to "list1", where "list1" is known
532
 * to have only a single reference and enough room to hold
533
 * the extra elements.
534
 */
535
static __isl_give LIST(EL) *FN(LIST(EL),concat_inplace)(
536
  __isl_take LIST(EL) *list1, __isl_take LIST(EL) *list2)
537
2.01k
{
538
2.01k
  int i;
539
2.01k
540
2.07k
  for (i = 0; i < list2->n; 
++i64
)
541
64
    list1 = FN(LIST(EL),add)(list1, FN(EL,copy)(list2->p[i]));
542
2.01k
  FN(LIST(EL),free)(list2);
543
2.01k
  return list1;
544
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_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
537
1.90k
{
538
1.90k
  int i;
539
1.90k
540
1.90k
  for (i = 0; i < list2->n; 
++i0
)
541
0
    list1 = FN(LIST(EL),add)(list1, FN(EL,copy)(list2->p[i]));
542
1.90k
  FN(LIST(EL),free)(list2);
543
1.90k
  return list1;
544
1.90k
}
Unexecuted instantiation: isl_constraint.c:isl_constraint_list_concat_inplace
Unexecuted instantiation: isl_id.c:isl_id_list_concat_inplace
isl_map_list.c:isl_basic_map_list_concat_inplace
Line
Count
Source
537
62
{
538
62
  int i;
539
62
540
62
  for (i = 0; i < list2->n; 
++i0
)
541
0
    list1 = FN(LIST(EL),add)(list1, FN(EL,copy)(list2->p[i]));
542
62
  FN(LIST(EL),free)(list2);
543
62
  return list1;
544
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_schedule_tree.c:isl_schedule_tree_list_concat_inplace
isl_set_list.c:isl_basic_set_list_concat_inplace
Line
Count
Source
537
44
{
538
44
  int i;
539
44
540
108
  for (i = 0; i < list2->n; 
++i64
)
541
64
    list1 = FN(LIST(EL),add)(list1, FN(EL,copy)(list2->p[i]));
542
44
  FN(LIST(EL),free)(list2);
543
44
  return list1;
544
44
}
Unexecuted instantiation: isl_set_list.c:isl_set_list_concat_inplace
Unexecuted instantiation: isl_set_list.c:isl_union_set_list_concat_inplace
Unexecuted instantiation: isl_val.c:isl_val_list_concat_inplace
545
546
/* Concatenate "list1" and "list2".
547
 * If "list1" has only one reference and has enough room
548
 * for the elements of "list2", the add the elements to "list1" itself.
549
 * Otherwise, create a new list to store the result.
550
 */
551
__isl_give LIST(EL) *FN(LIST(EL),concat)(__isl_take LIST(EL) *list1,
552
  __isl_take LIST(EL) *list2)
553
8.13k
{
554
8.13k
  int i;
555
8.13k
  isl_ctx *ctx;
556
8.13k
  LIST(EL) *res;
557
8.13k
558
8.13k
  if (!list1 || !list2)
559
0
    goto error;
560
8.13k
561
8.13k
  if (list1->ref == 1 && 
list1->n + list2->n <= list1->size7.51k
)
562
2.01k
    return FN(LIST(EL),concat_inplace)(list1, list2);
563
6.12k
564
6.12k
  ctx = FN(LIST(EL),get_ctx)(list1);
565
6.12k
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
566
17.6k
  for (i = 0; i < list1->n; 
++i11.5k
)
567
11.5k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
568
14.9k
  for (i = 0; i < list2->n; 
++i8.87k
)
569
8.87k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
570
6.12k
571
6.12k
  FN(LIST(EL),free)(list1);
572
6.12k
  FN(LIST(EL),free)(list2);
573
6.12k
  return res;
574
6.12k
error:
575
0
  FN(LIST(EL),free)(list1);
576
0
  FN(LIST(EL),free)(list2);
577
0
  return NULL;
578
6.12k
}
Unexecuted instantiation: isl_aff_list_concat
isl_pw_aff_list_concat
Line
Count
Source
553
141
{
554
141
  int i;
555
141
  isl_ctx *ctx;
556
141
  LIST(EL) *res;
557
141
558
141
  if (!list1 || !list2)
559
0
    goto error;
560
141
561
141
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
562
0
    return FN(LIST(EL),concat_inplace)(list1, list2);
563
141
564
141
  ctx = FN(LIST(EL),get_ctx)(list1);
565
141
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
566
329
  for (i = 0; i < list1->n; 
++i188
)
567
188
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
568
282
  for (i = 0; i < list2->n; 
++i141
)
569
141
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
570
141
571
141
  FN(LIST(EL),free)(list1);
572
141
  FN(LIST(EL),free)(list2);
573
141
  return res;
574
141
error:
575
0
  FN(LIST(EL),free)(list1);
576
0
  FN(LIST(EL),free)(list2);
577
0
  return NULL;
578
141
}
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
553
5.44k
{
554
5.44k
  int i;
555
5.44k
  isl_ctx *ctx;
556
5.44k
  LIST(EL) *res;
557
5.44k
558
5.44k
  if (!list1 || !list2)
559
0
    goto error;
560
5.44k
561
5.44k
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
562
1.90k
    return FN(LIST(EL),concat_inplace)(list1, list2);
563
3.53k
564
3.53k
  ctx = FN(LIST(EL),get_ctx)(list1);
565
3.53k
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
566
3.93k
  for (i = 0; i < list1->n; 
++i402
)
567
402
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
568
7.86k
  for (i = 0; i < list2->n; 
++i4.33k
)
569
4.33k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
570
3.53k
571
3.53k
  FN(LIST(EL),free)(list1);
572
3.53k
  FN(LIST(EL),free)(list2);
573
3.53k
  return res;
574
3.53k
error:
575
0
  FN(LIST(EL),free)(list1);
576
0
  FN(LIST(EL),free)(list2);
577
0
  return NULL;
578
3.53k
}
Unexecuted instantiation: isl_constraint_list_concat
isl_id_list_concat
Line
Count
Source
553
620
{
554
620
  int i;
555
620
  isl_ctx *ctx;
556
620
  LIST(EL) *res;
557
620
558
620
  if (!list1 || !list2)
559
0
    goto error;
560
620
561
620
  if (list1->ref == 1 && 
list1->n + list2->n <= list1->size0
)
562
0
    return FN(LIST(EL),concat_inplace)(list1, list2);
563
620
564
620
  ctx = FN(LIST(EL),get_ctx)(list1);
565
620
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
566
1.13k
  for (i = 0; i < list1->n; 
++i516
)
567
516
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
568
1.49k
  for (i = 0; i < list2->n; 
++i871
)
569
871
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
570
620
571
620
  FN(LIST(EL),free)(list1);
572
620
  FN(LIST(EL),free)(list2);
573
620
  return res;
574
620
error:
575
0
  FN(LIST(EL),free)(list1);
576
0
  FN(LIST(EL),free)(list2);
577
0
  return NULL;
578
620
}
isl_basic_map_list_concat
Line
Count
Source
553
1.79k
{
554
1.79k
  int i;
555
1.79k
  isl_ctx *ctx;
556
1.79k
  LIST(EL) *res;
557
1.79k
558
1.79k
  if (!list1 || !list2)
559
0
    goto error;
560
1.79k
561
1.79k
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
562
62
    return FN(LIST(EL),concat_inplace)(list1, list2);
563
1.73k
564
1.73k
  ctx = FN(LIST(EL),get_ctx)(list1);
565
1.73k
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
566
12.1k
  for (i = 0; i < list1->n; 
++i10.4k
)
567
10.4k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
568
5.17k
  for (i = 0; i < list2->n; 
++i3.44k
)
569
3.44k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
570
1.73k
571
1.73k
  FN(LIST(EL),free)(list1);
572
1.73k
  FN(LIST(EL),free)(list2);
573
1.73k
  return res;
574
1.73k
error:
575
0
  FN(LIST(EL),free)(list1);
576
0
  FN(LIST(EL),free)(list2);
577
0
  return NULL;
578
1.73k
}
Unexecuted instantiation: isl_map_list_concat
Unexecuted instantiation: isl_union_map_list_concat
Unexecuted instantiation: isl_schedule_tree_list_concat
isl_basic_set_list_concat
Line
Count
Source
553
135
{
554
135
  int i;
555
135
  isl_ctx *ctx;
556
135
  LIST(EL) *res;
557
135
558
135
  if (!list1 || !list2)
559
0
    goto error;
560
135
561
135
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
562
44
    return FN(LIST(EL),concat_inplace)(list1, list2);
563
91
564
91
  ctx = FN(LIST(EL),get_ctx)(list1);
565
91
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
566
105
  for (i = 0; i < list1->n; 
++i14
)
567
14
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
568
183
  for (i = 0; i < list2->n; 
++i92
)
569
92
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
570
91
571
91
  FN(LIST(EL),free)(list1);
572
91
  FN(LIST(EL),free)(list2);
573
91
  return res;
574
91
error:
575
0
  FN(LIST(EL),free)(list1);
576
0
  FN(LIST(EL),free)(list2);
577
0
  return NULL;
578
91
}
Unexecuted instantiation: isl_set_list_concat
Unexecuted instantiation: isl_union_set_list_concat
Unexecuted instantiation: isl_val_list_concat
579
580
__isl_give isl_printer *CAT(isl_printer_print_,LIST(BASE))(
581
  __isl_take isl_printer *p, __isl_keep LIST(EL) *list)
582
0
{
583
0
  int i;
584
0
585
0
  if (!p || !list)
586
0
    goto error;
587
0
  p = isl_printer_print_str(p, "(");
588
0
  for (i = 0; i < list->n; ++i) {
589
0
    if (i)
590
0
      p = isl_printer_print_str(p, ",");
591
0
    p = CAT(isl_printer_print_,BASE)(p, list->p[i]);
592
0
  }
593
0
  p = isl_printer_print_str(p, ")");
594
0
  return p;
595
0
error:
596
0
  isl_printer_free(p);
597
0
  return NULL;
598
0
}
Unexecuted instantiation: isl_printer_print_aff_list
Unexecuted instantiation: isl_printer_print_pw_aff_list
Unexecuted instantiation: isl_printer_print_union_pw_aff_list
Unexecuted instantiation: isl_printer_print_union_pw_multi_aff_list
Unexecuted instantiation: isl_printer_print_ast_expr_list
Unexecuted instantiation: isl_printer_print_ast_node_list
Unexecuted instantiation: isl_printer_print_ast_graft_list
Unexecuted instantiation: isl_printer_print_constraint_list
Unexecuted instantiation: isl_printer_print_id_list
Unexecuted instantiation: isl_printer_print_basic_map_list
Unexecuted instantiation: isl_printer_print_map_list
Unexecuted instantiation: isl_printer_print_union_map_list
Unexecuted instantiation: isl_printer_print_schedule_tree_list
Unexecuted instantiation: isl_printer_print_basic_set_list
Unexecuted instantiation: isl_printer_print_set_list
Unexecuted instantiation: isl_printer_print_union_set_list
Unexecuted instantiation: isl_printer_print_val_list
599
600
void FN(LIST(EL),dump)(__isl_keep LIST(EL) *list)
601
0
{
602
0
  isl_printer *printer;
603
0
604
0
  if (!list)
605
0
    return;
606
0
607
0
  printer = isl_printer_to_file(FN(LIST(EL),get_ctx)(list), stderr);
608
0
  printer = CAT(isl_printer_print_,LIST(BASE))(printer, list);
609
0
  printer = isl_printer_end_line(printer);
610
0
611
0
  isl_printer_free(printer);
612
0
}
Unexecuted instantiation: isl_aff_list_dump
Unexecuted instantiation: isl_pw_aff_list_dump
Unexecuted instantiation: isl_union_pw_aff_list_dump
Unexecuted instantiation: isl_union_pw_multi_aff_list_dump
Unexecuted instantiation: isl_ast_expr_list_dump
Unexecuted instantiation: isl_ast_node_list_dump
Unexecuted instantiation: isl_ast_graft_list_dump
Unexecuted instantiation: isl_constraint_list_dump
Unexecuted instantiation: isl_id_list_dump
Unexecuted instantiation: isl_basic_map_list_dump
Unexecuted instantiation: isl_map_list_dump
Unexecuted instantiation: isl_union_map_list_dump
Unexecuted instantiation: isl_schedule_tree_list_dump
Unexecuted instantiation: isl_basic_set_list_dump
Unexecuted instantiation: isl_set_list_dump
Unexecuted instantiation: isl_union_set_list_dump
Unexecuted instantiation: isl_val_list_dump