Coverage Report

Created: 2018-04-24 22:41

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/polly/lib/External/isl/isl_list_templ.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright 2008-2009 Katholieke Universiteit Leuven
3
 * Copyright 2011      INRIA Saclay
4
 * Copyright 2012-2013 Ecole Normale Superieure
5
 * Copyright 2017      Sven Verdoolaege
6
 *
7
 * Use of this software is governed by the MIT license
8
 *
9
 * Written by Sven Verdoolaege, K.U.Leuven, Departement
10
 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
11
 * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite,
12
 * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France
13
 * and Ecole Normale Superieure, 45 rue d’Ulm, 75230 Paris, France
14
 */
15
16
#include <isl_sort.h>
17
#include <isl_tarjan.h>
18
#include <isl/printer.h>
19
20
4.82k
#define xCAT(A,B) A ## B
21
4.82k
#define CAT(A,B) xCAT(A,B)
22
#undef EL
23
4.82k
#define EL CAT(isl_,BASE)
24
3.06M
#define xFN(TYPE,NAME) TYPE ## _ ## NAME
25
3.03M
#define FN(TYPE,NAME) xFN(TYPE,NAME)
26
598k
#define xLIST(EL) EL ## _list
27
598k
#define LIST(EL) xLIST(EL)
28
3.00k
#define xS(TYPE,NAME) struct TYPE ## _ ## NAME
29
3.00k
#define S(TYPE,NAME) xS(TYPE,NAME)
30
31
isl_ctx *FN(LIST(EL),get_ctx)(__isl_keep LIST(EL) *list)
32
97.9k
{
33
97.9k
  return list ? list->ctx : NULL;
34
97.9k
}
isl_aff_list_get_ctx
Line
Count
Source
32
20
{
33
20
  return list ? list->ctx : NULL;
34
20
}
isl_pw_aff_list_get_ctx
Line
Count
Source
32
11.5k
{
33
11.5k
  return list ? list->ctx : NULL;
34
11.5k
}
isl_union_pw_aff_list_get_ctx
Line
Count
Source
32
116
{
33
116
  return list ? list->ctx : NULL;
34
116
}
Unexecuted instantiation: isl_union_pw_multi_aff_list_get_ctx
Unexecuted instantiation: isl_ast_expr_list_get_ctx
isl_ast_node_list_get_ctx
Line
Count
Source
32
522
{
33
522
  return list ? list->ctx : NULL;
34
522
}
isl_ast_graft_list_get_ctx
Line
Count
Source
32
11.8k
{
33
11.8k
  return list ? list->ctx : NULL;
34
11.8k
}
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
627
{
33
627
  return list ? list->ctx : NULL;
34
627
}
isl_basic_map_list_get_ctx
Line
Count
Source
32
1.74k
{
33
1.74k
  return list ? list->ctx : NULL;
34
1.74k
}
isl_map_list_get_ctx
Line
Count
Source
32
803
{
33
803
  return list ? list->ctx : NULL;
34
803
}
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
68.1k
{
33
68.1k
  return list ? list->ctx : NULL;
34
68.1k
}
isl_basic_set_list_get_ctx
Line
Count
Source
32
1.17k
{
33
1.17k
  return list ? list->ctx : NULL;
34
1.17k
}
isl_set_list_get_ctx
Line
Count
Source
32
20
{
33
20
  return list ? list->ctx : NULL;
34
20
}
isl_union_set_list_get_ctx
Line
Count
Source
32
257
{
33
257
  return list ? list->ctx : NULL;
34
257
}
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
148k
{
38
148k
  LIST(EL) *list;
39
148k
40
148k
  if (n < 0)
41
148k
    
isl_die0
(ctx, isl_error_invalid,
42
148k
      "cannot create list of negative length",
43
148k
      return NULL);
44
148k
  list = isl_alloc(ctx, LIST(EL),
45
148k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
148k
  if (!list)
47
0
    return NULL;
48
148k
49
148k
  list->ctx = ctx;
50
148k
  isl_ctx_ref(ctx);
51
148k
  list->ref = 1;
52
148k
  list->size = n;
53
148k
  list->n = 0;
54
148k
  return list;
55
148k
}
isl_aff_list_alloc
Line
Count
Source
37
8.07k
{
38
8.07k
  LIST(EL) *list;
39
8.07k
40
8.07k
  if (n < 0)
41
8.07k
    
isl_die0
(ctx, isl_error_invalid,
42
8.07k
      "cannot create list of negative length",
43
8.07k
      return NULL);
44
8.07k
  list = isl_alloc(ctx, LIST(EL),
45
8.07k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
8.07k
  if (!list)
47
0
    return NULL;
48
8.07k
49
8.07k
  list->ctx = ctx;
50
8.07k
  isl_ctx_ref(ctx);
51
8.07k
  list->ref = 1;
52
8.07k
  list->size = n;
53
8.07k
  list->n = 0;
54
8.07k
  return list;
55
8.07k
}
isl_pw_aff_list_alloc
Line
Count
Source
37
17.1k
{
38
17.1k
  LIST(EL) *list;
39
17.1k
40
17.1k
  if (n < 0)
41
17.1k
    
isl_die0
(ctx, isl_error_invalid,
42
17.1k
      "cannot create list of negative length",
43
17.1k
      return NULL);
44
17.1k
  list = isl_alloc(ctx, LIST(EL),
45
17.1k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
17.1k
  if (!list)
47
0
    return NULL;
48
17.1k
49
17.1k
  list->ctx = ctx;
50
17.1k
  isl_ctx_ref(ctx);
51
17.1k
  list->ref = 1;
52
17.1k
  list->size = n;
53
17.1k
  list->n = 0;
54
17.1k
  return list;
55
17.1k
}
isl_union_pw_aff_list_alloc
Line
Count
Source
37
254
{
38
254
  LIST(EL) *list;
39
254
40
254
  if (n < 0)
41
254
    
isl_die0
(ctx, isl_error_invalid,
42
254
      "cannot create list of negative length",
43
254
      return NULL);
44
254
  list = isl_alloc(ctx, LIST(EL),
45
254
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
254
  if (!list)
47
0
    return NULL;
48
254
49
254
  list->ctx = ctx;
50
254
  isl_ctx_ref(ctx);
51
254
  list->ref = 1;
52
254
  list->size = n;
53
254
  list->n = 0;
54
254
  return list;
55
254
}
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.43k
{
38
4.43k
  LIST(EL) *list;
39
4.43k
40
4.43k
  if (n < 0)
41
4.43k
    
isl_die0
(ctx, isl_error_invalid,
42
4.43k
      "cannot create list of negative length",
43
4.43k
      return NULL);
44
4.43k
  list = isl_alloc(ctx, LIST(EL),
45
4.43k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
4.43k
  if (!list)
47
0
    return NULL;
48
4.43k
49
4.43k
  list->ctx = ctx;
50
4.43k
  isl_ctx_ref(ctx);
51
4.43k
  list->ref = 1;
52
4.43k
  list->size = n;
53
4.43k
  list->n = 0;
54
4.43k
  return list;
55
4.43k
}
isl_ast_graft_list_alloc
Line
Count
Source
37
17.9k
{
38
17.9k
  LIST(EL) *list;
39
17.9k
40
17.9k
  if (n < 0)
41
17.9k
    
isl_die0
(ctx, isl_error_invalid,
42
17.9k
      "cannot create list of negative length",
43
17.9k
      return NULL);
44
17.9k
  list = isl_alloc(ctx, LIST(EL),
45
17.9k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
17.9k
  if (!list)
47
0
    return NULL;
48
17.9k
49
17.9k
  list->ctx = ctx;
50
17.9k
  isl_ctx_ref(ctx);
51
17.9k
  list->ref = 1;
52
17.9k
  list->size = n;
53
17.9k
  list->n = 0;
54
17.9k
  return list;
55
17.9k
}
isl_constraint_list_alloc
Line
Count
Source
37
2.29k
{
38
2.29k
  LIST(EL) *list;
39
2.29k
40
2.29k
  if (n < 0)
41
2.29k
    
isl_die0
(ctx, isl_error_invalid,
42
2.29k
      "cannot create list of negative length",
43
2.29k
      return NULL);
44
2.29k
  list = isl_alloc(ctx, LIST(EL),
45
2.29k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
2.29k
  if (!list)
47
0
    return NULL;
48
2.29k
49
2.29k
  list->ctx = ctx;
50
2.29k
  isl_ctx_ref(ctx);
51
2.29k
  list->ref = 1;
52
2.29k
  list->size = n;
53
2.29k
  list->n = 0;
54
2.29k
  return list;
55
2.29k
}
isl_id_list_alloc
Line
Count
Source
37
1.83k
{
38
1.83k
  LIST(EL) *list;
39
1.83k
40
1.83k
  if (n < 0)
41
1.83k
    
isl_die0
(ctx, isl_error_invalid,
42
1.83k
      "cannot create list of negative length",
43
1.83k
      return NULL);
44
1.83k
  list = isl_alloc(ctx, LIST(EL),
45
1.83k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
1.83k
  if (!list)
47
0
    return NULL;
48
1.83k
49
1.83k
  list->ctx = ctx;
50
1.83k
  isl_ctx_ref(ctx);
51
1.83k
  list->ref = 1;
52
1.83k
  list->size = n;
53
1.83k
  list->n = 0;
54
1.83k
  return list;
55
1.83k
}
isl_basic_map_list_alloc
Line
Count
Source
37
4.35k
{
38
4.35k
  LIST(EL) *list;
39
4.35k
40
4.35k
  if (n < 0)
41
4.35k
    
isl_die0
(ctx, isl_error_invalid,
42
4.35k
      "cannot create list of negative length",
43
4.35k
      return NULL);
44
4.35k
  list = isl_alloc(ctx, LIST(EL),
45
4.35k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
4.35k
  if (!list)
47
0
    return NULL;
48
4.35k
49
4.35k
  list->ctx = ctx;
50
4.35k
  isl_ctx_ref(ctx);
51
4.35k
  list->ref = 1;
52
4.35k
  list->size = n;
53
4.35k
  list->n = 0;
54
4.35k
  return list;
55
4.35k
}
isl_map_list_alloc
Line
Count
Source
37
750
{
38
750
  LIST(EL) *list;
39
750
40
750
  if (n < 0)
41
750
    
isl_die0
(ctx, isl_error_invalid,
42
750
      "cannot create list of negative length",
43
750
      return NULL);
44
750
  list = isl_alloc(ctx, LIST(EL),
45
750
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
750
  if (!list)
47
0
    return NULL;
48
750
49
750
  list->ctx = ctx;
50
750
  isl_ctx_ref(ctx);
51
750
  list->ref = 1;
52
750
  list->size = n;
53
750
  list->n = 0;
54
750
  return list;
55
750
}
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.7k
{
38
77.7k
  LIST(EL) *list;
39
77.7k
40
77.7k
  if (n < 0)
41
77.7k
    
isl_die0
(ctx, isl_error_invalid,
42
77.7k
      "cannot create list of negative length",
43
77.7k
      return NULL);
44
77.7k
  list = isl_alloc(ctx, LIST(EL),
45
77.7k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
77.7k
  if (!list)
47
0
    return NULL;
48
77.7k
49
77.7k
  list->ctx = ctx;
50
77.7k
  isl_ctx_ref(ctx);
51
77.7k
  list->ref = 1;
52
77.7k
  list->size = n;
53
77.7k
  list->n = 0;
54
77.7k
  return list;
55
77.7k
}
isl_basic_set_list_alloc
Line
Count
Source
37
2.12k
{
38
2.12k
  LIST(EL) *list;
39
2.12k
40
2.12k
  if (n < 0)
41
2.12k
    
isl_die0
(ctx, isl_error_invalid,
42
2.12k
      "cannot create list of negative length",
43
2.12k
      return NULL);
44
2.12k
  list = isl_alloc(ctx, LIST(EL),
45
2.12k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
2.12k
  if (!list)
47
0
    return NULL;
48
2.12k
49
2.12k
  list->ctx = ctx;
50
2.12k
  isl_ctx_ref(ctx);
51
2.12k
  list->ref = 1;
52
2.12k
  list->size = n;
53
2.12k
  list->n = 0;
54
2.12k
  return list;
55
2.12k
}
isl_set_list_alloc
Line
Count
Source
37
11.3k
{
38
11.3k
  LIST(EL) *list;
39
11.3k
40
11.3k
  if (n < 0)
41
11.3k
    
isl_die0
(ctx, isl_error_invalid,
42
11.3k
      "cannot create list of negative length",
43
11.3k
      return NULL);
44
11.3k
  list = isl_alloc(ctx, LIST(EL),
45
11.3k
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
11.3k
  if (!list)
47
0
    return NULL;
48
11.3k
49
11.3k
  list->ctx = ctx;
50
11.3k
  isl_ctx_ref(ctx);
51
11.3k
  list->ref = 1;
52
11.3k
  list->size = n;
53
11.3k
  list->n = 0;
54
11.3k
  return list;
55
11.3k
}
isl_union_set_list_alloc
Line
Count
Source
37
482
{
38
482
  LIST(EL) *list;
39
482
40
482
  if (n < 0)
41
482
    
isl_die0
(ctx, isl_error_invalid,
42
482
      "cannot create list of negative length",
43
482
      return NULL);
44
482
  list = isl_alloc(ctx, LIST(EL),
45
482
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
482
  if (!list)
47
0
    return NULL;
48
482
49
482
  list->ctx = ctx;
50
482
  isl_ctx_ref(ctx);
51
482
  list->ref = 1;
52
482
  list->size = n;
53
482
  list->n = 0;
54
482
  return list;
55
482
}
isl_val_list_alloc
Line
Count
Source
37
7
{
38
7
  LIST(EL) *list;
39
7
40
7
  if (n < 0)
41
7
    
isl_die0
(ctx, isl_error_invalid,
42
7
      "cannot create list of negative length",
43
7
      return NULL);
44
7
  list = isl_alloc(ctx, LIST(EL),
45
7
       sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *));
46
7
  if (!list)
47
0
    return NULL;
48
7
49
7
  list->ctx = ctx;
50
7
  isl_ctx_ref(ctx);
51
7
  list->ref = 1;
52
7
  list->size = n;
53
7
  list->n = 0;
54
7
  return list;
55
7
}
56
57
__isl_give LIST(EL) *FN(LIST(EL),copy)(__isl_keep LIST(EL) *list)
58
109k
{
59
109k
  if (!list)
60
0
    return NULL;
61
109k
62
109k
  list->ref++;
63
109k
  return list;
64
109k
}
Unexecuted instantiation: isl_aff_list_copy
isl_pw_aff_list_copy
Line
Count
Source
58
11.7k
{
59
11.7k
  if (!list)
60
0
    return NULL;
61
11.7k
62
11.7k
  list->ref++;
63
11.7k
  return list;
64
11.7k
}
Unexecuted instantiation: isl_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
217
{
59
217
  if (!list)
60
0
    return NULL;
61
217
62
217
  list->ref++;
63
217
  return list;
64
217
}
Unexecuted instantiation: isl_ast_graft_list_copy
isl_constraint_list_copy
Line
Count
Source
58
700
{
59
700
  if (!list)
60
0
    return NULL;
61
700
62
700
  list->ref++;
63
700
  return list;
64
700
}
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.5k
{
59
61.5k
  if (!list)
60
0
    return NULL;
61
61.5k
62
61.5k
  list->ref++;
63
61.5k
  return list;
64
61.5k
}
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.4k
{
68
49.4k
  int i;
69
49.4k
  LIST(EL) *dup;
70
49.4k
71
49.4k
  if (!list)
72
0
    return NULL;
73
49.4k
74
49.4k
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
75
49.4k
  if (!dup)
76
0
    return NULL;
77
243k
  
for (i = 0; 49.4k
i < list->n;
++i193k
)
78
193k
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
79
49.4k
  return dup;
80
49.4k
}
Unexecuted instantiation: isl_aff_list_dup
isl_pw_aff_list_dup
Line
Count
Source
67
284
{
68
284
  int i;
69
284
  LIST(EL) *dup;
70
284
71
284
  if (!list)
72
0
    return NULL;
73
284
74
284
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
75
284
  if (!dup)
76
0
    return NULL;
77
643
  
for (i = 0; 284
i < list->n;
++i359
)
78
359
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
79
284
  return dup;
80
284
}
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
700
{
68
700
  int i;
69
700
  LIST(EL) *dup;
70
700
71
700
  if (!list)
72
0
    return NULL;
73
700
74
700
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
75
700
  if (!dup)
76
0
    return NULL;
77
2.17k
  
for (i = 0; 700
i < list->n;
++i1.47k
)
78
1.47k
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
79
700
  return dup;
80
700
}
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.5k
{
68
48.5k
  int i;
69
48.5k
  LIST(EL) *dup;
70
48.5k
71
48.5k
  if (!list)
72
0
    return NULL;
73
48.5k
74
48.5k
  dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n);
75
48.5k
  if (!dup)
76
0
    return NULL;
77
240k
  
for (i = 0; 48.5k
i < list->n;
++i192k
)
78
192k
    dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i]));
79
48.5k
  return dup;
80
48.5k
}
Unexecuted instantiation: isl_basic_set_list_dup
Unexecuted instantiation: isl_set_list_dup
Unexecuted instantiation: isl_union_set_list_dup
Unexecuted instantiation: isl_val_list_dup
81
82
__isl_give LIST(EL) *FN(LIST(EL),cow)(__isl_take LIST(EL) *list)
83
106k
{
84
106k
  if (!list)
85
0
    return NULL;
86
106k
87
106k
  if (list->ref == 1)
88
56.7k
    return list;
89
49.4k
  list->ref--;
90
49.4k
  return FN(LIST(EL),dup)(list);
91
49.4k
}
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.51k
{
84
3.51k
  if (!list)
85
0
    return NULL;
86
3.51k
87
3.51k
  if (list->ref == 1)
88
3.22k
    return list;
89
284
  list->ref--;
90
284
  return FN(LIST(EL),dup)(list);
91
284
}
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
700
  list->ref--;
90
700
  return FN(LIST(EL),dup)(list);
91
700
}
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
437
{
84
437
  if (!list)
85
0
    return NULL;
86
437
87
437
  if (list->ref == 1)
88
437
    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.4k
{
84
93.4k
  if (!list)
85
0
    return NULL;
86
93.4k
87
93.4k
  if (list->ref == 1)
88
44.9k
    return list;
89
48.5k
  list->ref--;
90
48.5k
  return FN(LIST(EL),dup)(list);
91
48.5k
}
isl_basic_set_list_cow
Line
Count
Source
83
3.52k
{
84
3.52k
  if (!list)
85
0
    return NULL;
86
3.52k
87
3.52k
  if (list->ref == 1)
88
3.52k
    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.78k
{
84
1.78k
  if (!list)
85
0
    return NULL;
86
1.78k
87
1.78k
  if (list->ref == 1)
88
1.78k
    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
360k
{
101
360k
  isl_ctx *ctx;
102
360k
  int i, new_size;
103
360k
  LIST(EL) *res;
104
360k
105
360k
  if (!list)
106
0
    return NULL;
107
360k
  if (list->ref == 1 && 
list->n + n <= list->size350k
)
108
336k
    return list;
109
24.5k
110
24.5k
  ctx = FN(LIST(EL),get_ctx)(list);
111
24.5k
  new_size = ((list->n + n + 1) * 3) / 2;
112
24.5k
  if (list->ref == 1) {
113
14.6k
    res = isl_realloc(ctx, list, LIST(EL),
114
14.6k
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
14.6k
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
14.6k
    res->size = new_size;
118
14.6k
    return res;
119
14.6k
  }
120
9.86k
121
9.86k
  if (list->n + n <= list->size && 
list->size < new_size2.76k
)
122
2.69k
    new_size = list->size;
123
9.86k
124
9.86k
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
9.86k
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
9.86k
128
38.0k
  
for (i = 0; 9.86k
i < list->n;
++i28.1k
)
129
28.1k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
9.86k
131
9.86k
  FN(LIST(EL),free)(list);
132
9.86k
  return res;
133
9.86k
}
isl_aff.c:isl_aff_list_grow
Line
Count
Source
100
8.07k
{
101
8.07k
  isl_ctx *ctx;
102
8.07k
  int i, new_size;
103
8.07k
  LIST(EL) *res;
104
8.07k
105
8.07k
  if (!list)
106
0
    return NULL;
107
8.07k
  if (list->ref == 1 && list->n + n <= list->size)
108
8.05k
    return list;
109
20
110
20
  ctx = FN(LIST(EL),get_ctx)(list);
111
20
  new_size = ((list->n + n + 1) * 3) / 2;
112
20
  if (list->ref == 1) {
113
20
    res = isl_realloc(ctx, list, LIST(EL),
114
20
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
20
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
20
    res->size = new_size;
118
20
    return res;
119
20
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_aff.c:isl_pw_aff_list_grow
Line
Count
Source
100
19.7k
{
101
19.7k
  isl_ctx *ctx;
102
19.7k
  int i, new_size;
103
19.7k
  LIST(EL) *res;
104
19.7k
105
19.7k
  if (!list)
106
0
    return NULL;
107
19.7k
  if (list->ref == 1 && list->n + n <= list->size)
108
14.1k
    return list;
109
5.57k
110
5.57k
  ctx = FN(LIST(EL),get_ctx)(list);
111
5.57k
  new_size = ((list->n + n + 1) * 3) / 2;
112
5.57k
  if (list->ref == 1) {
113
5.57k
    res = isl_realloc(ctx, list, LIST(EL),
114
5.57k
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
5.57k
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
5.57k
    res->size = new_size;
118
5.57k
    return res;
119
5.57k
  }
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
144
{
101
144
  isl_ctx *ctx;
102
144
  int i, new_size;
103
144
  LIST(EL) *res;
104
144
105
144
  if (!list)
106
0
    return NULL;
107
144
  if (list->ref == 1 && list->n + n <= list->size)
108
28
    return list;
109
116
110
116
  ctx = FN(LIST(EL),get_ctx)(list);
111
116
  new_size = ((list->n + n + 1) * 3) / 2;
112
116
  if (list->ref == 1) {
113
116
    res = isl_realloc(ctx, list, LIST(EL),
114
116
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
116
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
116
    res->size = new_size;
118
116
    return res;
119
116
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_aff.c:isl_union_pw_multi_aff_list_grow
Line
Count
Source
100
7
{
101
7
  isl_ctx *ctx;
102
7
  int i, new_size;
103
7
  LIST(EL) *res;
104
7
105
7
  if (!list)
106
0
    return NULL;
107
7
  if (list->ref == 1 && list->n + n <= list->size)
108
7
    return list;
109
0
110
0
  ctx = FN(LIST(EL),get_ctx)(list);
111
0
  new_size = ((list->n + n + 1) * 3) / 2;
112
0
  if (list->ref == 1) {
113
0
    res = isl_realloc(ctx, list, LIST(EL),
114
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
0
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
0
    res->size = new_size;
118
0
    return res;
119
0
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
Unexecuted instantiation: isl_ast.c:isl_ast_expr_list_grow
isl_ast.c:isl_ast_node_list_grow
Line
Count
Source
100
6.10k
{
101
6.10k
  isl_ctx *ctx;
102
6.10k
  int i, new_size;
103
6.10k
  LIST(EL) *res;
104
6.10k
105
6.10k
  if (!list)
106
0
    return NULL;
107
6.10k
  if (list->ref == 1 && list->n + n <= list->size)
108
6.03k
    return list;
109
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.8k
{
101
16.8k
  isl_ctx *ctx;
102
16.8k
  int i, new_size;
103
16.8k
  LIST(EL) *res;
104
16.8k
105
16.8k
  if (!list)
106
0
    return NULL;
107
16.8k
  if (list->ref == 1 && list->n + n <= list->size)
108
16.8k
    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.55k
{
101
3.55k
  isl_ctx *ctx;
102
3.55k
  int i, new_size;
103
3.55k
  LIST(EL) *res;
104
3.55k
105
3.55k
  if (!list)
106
0
    return NULL;
107
3.55k
  if (list->ref == 1 && list->n + n <= list->size)
108
3.55k
    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.27k
{
101
2.27k
  isl_ctx *ctx;
102
2.27k
  int i, new_size;
103
2.27k
  LIST(EL) *res;
104
2.27k
105
2.27k
  if (!list)
106
0
    return NULL;
107
2.27k
  if (list->ref == 1 && list->n + n <= list->size)
108
2.27k
    return list;
109
0
110
0
  ctx = FN(LIST(EL),get_ctx)(list);
111
0
  new_size = ((list->n + n + 1) * 3) / 2;
112
0
  if (list->ref == 1) {
113
0
    res = isl_realloc(ctx, list, LIST(EL),
114
0
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
0
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
0
    res->size = new_size;
118
0
    return res;
119
0
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_map_list.c:isl_basic_map_list_grow
Line
Count
Source
100
17.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.50k
{
101
1.50k
  isl_ctx *ctx;
102
1.50k
  int i, new_size;
103
1.50k
  LIST(EL) *res;
104
1.50k
105
1.50k
  if (!list)
106
0
    return NULL;
107
1.50k
  if (list->ref == 1 && list->n + n <= list->size)
108
1.50k
    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
268k
{
101
268k
  isl_ctx *ctx;
102
268k
  int i, new_size;
103
268k
  LIST(EL) *res;
104
268k
105
268k
  if (!list)
106
0
    return NULL;
107
268k
  if (list->ref == 1 && 
list->n + n <= list->size258k
)
108
249k
    return list;
109
18.4k
110
18.4k
  ctx = FN(LIST(EL),get_ctx)(list);
111
18.4k
  new_size = ((list->n + n + 1) * 3) / 2;
112
18.4k
  if (list->ref == 1) {
113
8.58k
    res = isl_realloc(ctx, list, LIST(EL),
114
8.58k
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
8.58k
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
8.58k
    res->size = new_size;
118
8.58k
    return res;
119
8.58k
  }
120
9.86k
121
9.86k
  if (list->n + n <= list->size && 
list->size < new_size2.76k
)
122
2.69k
    new_size = list->size;
123
9.86k
124
9.86k
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
9.86k
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
9.86k
128
38.0k
  
for (i = 0; 9.86k
i < list->n;
++i28.1k
)
129
28.1k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
9.86k
131
9.86k
  FN(LIST(EL),free)(list);
132
9.86k
  return res;
133
9.86k
}
isl_set_list.c:isl_basic_set_list_grow
Line
Count
Source
100
2.24k
{
101
2.24k
  isl_ctx *ctx;
102
2.24k
  int i, new_size;
103
2.24k
  LIST(EL) *res;
104
2.24k
105
2.24k
  if (!list)
106
0
    return NULL;
107
2.24k
  if (list->ref == 1 && list->n + n <= list->size)
108
2.24k
    return list;
109
2
110
2
  ctx = FN(LIST(EL),get_ctx)(list);
111
2
  new_size = ((list->n + n + 1) * 3) / 2;
112
2
  if (list->ref == 1) {
113
2
    res = isl_realloc(ctx, list, LIST(EL),
114
2
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
2
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
2
    res->size = new_size;
118
2
    return res;
119
2
  }
120
0
121
0
  if (list->n + n <= list->size && list->size < new_size)
122
0
    new_size = list->size;
123
0
124
0
  res = FN(LIST(EL),alloc)(ctx, new_size);
125
0
  if (!res)
126
0
    return FN(LIST(EL),free)(list);
127
0
128
0
  for (i = 0; i < list->n; ++i)
129
0
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
130
0
131
0
  FN(LIST(EL),free)(list);
132
0
  return res;
133
0
}
isl_set_list.c:isl_set_list_grow
Line
Count
Source
100
12.8k
{
101
12.8k
  isl_ctx *ctx;
102
12.8k
  int i, new_size;
103
12.8k
  LIST(EL) *res;
104
12.8k
105
12.8k
  if (!list)
106
0
    return NULL;
107
12.8k
  if (list->ref == 1 && list->n + n <= list->size)
108
12.8k
    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.78k
{
101
1.78k
  isl_ctx *ctx;
102
1.78k
  int i, new_size;
103
1.78k
  LIST(EL) *res;
104
1.78k
105
1.78k
  if (!list)
106
0
    return NULL;
107
1.78k
  if (list->ref == 1 && list->n + n <= list->size)
108
1.52k
    return list;
109
257
110
257
  ctx = FN(LIST(EL),get_ctx)(list);
111
257
  new_size = ((list->n + n + 1) * 3) / 2;
112
257
  if (list->ref == 1) {
113
257
    res = isl_realloc(ctx, list, LIST(EL),
114
257
          sizeof(LIST(EL)) + (new_size - 1) * sizeof(EL *));
115
257
    if (!res)
116
0
      return FN(LIST(EL),free)(list);
117
257
    res->size = new_size;
118
257
    return res;
119
257
  }
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
700k
{
139
700k
  if (!list)
140
0
    return isl_stat_error;
141
700k
  if (index < 0 || index >= list->n)
142
700k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
700k
      "index out of bounds", return isl_stat_error);
144
700k
  return isl_stat_ok;
145
700k
}
isl_aff.c:isl_aff_list_check_index
Line
Count
Source
138
8.33k
{
139
8.33k
  if (!list)
140
0
    return isl_stat_error;
141
8.33k
  if (index < 0 || index >= list->n)
142
8.33k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
8.33k
      "index out of bounds", return isl_stat_error);
144
8.33k
  return isl_stat_ok;
145
8.33k
}
isl_aff.c:isl_pw_aff_list_check_index
Line
Count
Source
138
16.9k
{
139
16.9k
  if (!list)
140
0
    return isl_stat_error;
141
16.9k
  if (index < 0 || index >= list->n)
142
16.9k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
16.9k
      "index out of bounds", return isl_stat_error);
144
16.9k
  return isl_stat_ok;
145
16.9k
}
isl_aff.c:isl_union_pw_aff_list_check_index
Line
Count
Source
138
144
{
139
144
  if (!list)
140
0
    return isl_stat_error;
141
144
  if (index < 0 || index >= list->n)
142
144
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
144
      "index out of bounds", return isl_stat_error);
144
144
  return isl_stat_ok;
145
144
}
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.40k
{
139
4.40k
  if (!list)
140
0
    return isl_stat_error;
141
4.40k
  if (index < 0 || index >= list->n)
142
4.40k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
4.40k
      "index out of bounds", return isl_stat_error);
144
4.40k
  return isl_stat_ok;
145
4.40k
}
isl_ast_graft.c:isl_ast_graft_list_check_index
Line
Count
Source
138
40.2k
{
139
40.2k
  if (!list)
140
0
    return isl_stat_error;
141
40.2k
  if (index < 0 || index >= list->n)
142
40.2k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
40.2k
      "index out of bounds", return isl_stat_error);
144
40.2k
  return isl_stat_ok;
145
40.2k
}
isl_constraint.c:isl_constraint_list_check_index
Line
Count
Source
138
2.02k
{
139
2.02k
  if (!list)
140
0
    return isl_stat_error;
141
2.02k
  if (index < 0 || index >= list->n)
142
2.02k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
2.02k
      "index out of bounds", return isl_stat_error);
144
2.02k
  return isl_stat_ok;
145
2.02k
}
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.6k
{
139
14.6k
  if (!list)
140
0
    return isl_stat_error;
141
14.6k
  if (index < 0 || index >= list->n)
142
14.6k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
14.6k
      "index out of bounds", return isl_stat_error);
144
14.6k
  return isl_stat_ok;
145
14.6k
}
isl_map_list.c:isl_map_list_check_index
Line
Count
Source
138
1.80k
{
139
1.80k
  if (!list)
140
0
    return isl_stat_error;
141
1.80k
  if (index < 0 || index >= list->n)
142
1.80k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
1.80k
      "index out of bounds", return isl_stat_error);
144
1.80k
  return isl_stat_ok;
145
1.80k
}
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
554k
{
139
554k
  if (!list)
140
0
    return isl_stat_error;
141
554k
  if (index < 0 || index >= list->n)
142
554k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
554k
      "index out of bounds", return isl_stat_error);
144
554k
  return isl_stat_ok;
145
554k
}
isl_set_list.c:isl_basic_set_list_check_index
Line
Count
Source
138
12.4k
{
139
12.4k
  if (!list)
140
0
    return isl_stat_error;
141
12.4k
  if (index < 0 || index >= list->n)
142
12.4k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
12.4k
      "index out of bounds", return isl_stat_error);
144
12.4k
  return isl_stat_ok;
145
12.4k
}
isl_set_list.c:isl_set_list_check_index
Line
Count
Source
138
18.9k
{
139
18.9k
  if (!list)
140
0
    return isl_stat_error;
141
18.9k
  if (index < 0 || index >= list->n)
142
18.9k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
18.9k
      "index out of bounds", return isl_stat_error);
144
18.9k
  return isl_stat_ok;
145
18.9k
}
isl_set_list.c:isl_union_set_list_check_index
Line
Count
Source
138
2.77k
{
139
2.77k
  if (!list)
140
0
    return isl_stat_error;
141
2.77k
  if (index < 0 || index >= list->n)
142
2.77k
    
isl_die0
(FN(LIST(EL),get_ctx)(list), isl_error_invalid,
143
2.77k
      "index out of bounds", return isl_stat_error);
144
2.77k
  return isl_stat_ok;
145
2.77k
}
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
360k
{
150
360k
  list = FN(LIST(EL),grow)(list, 1);
151
360k
  if (!list || !el)
152
0
    goto error;
153
360k
  list->p[list->n] = el;
154
360k
  list->n++;
155
360k
  return list;
156
360k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
360k
}
isl_aff_list_add
Line
Count
Source
149
8.07k
{
150
8.07k
  list = FN(LIST(EL),grow)(list, 1);
151
8.07k
  if (!list || !el)
152
0
    goto error;
153
8.07k
  list->p[list->n] = el;
154
8.07k
  list->n++;
155
8.07k
  return list;
156
8.07k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
8.07k
}
isl_pw_aff_list_add
Line
Count
Source
149
19.7k
{
150
19.7k
  list = FN(LIST(EL),grow)(list, 1);
151
19.7k
  if (!list || !el)
152
0
    goto error;
153
19.7k
  list->p[list->n] = el;
154
19.7k
  list->n++;
155
19.7k
  return list;
156
19.7k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
19.7k
}
isl_union_pw_aff_list_add
Line
Count
Source
149
144
{
150
144
  list = FN(LIST(EL),grow)(list, 1);
151
144
  if (!list || !el)
152
0
    goto error;
153
144
  list->p[list->n] = el;
154
144
  list->n++;
155
144
  return list;
156
144
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
144
}
isl_union_pw_multi_aff_list_add
Line
Count
Source
149
7
{
150
7
  list = FN(LIST(EL),grow)(list, 1);
151
7
  if (!list || !el)
152
0
    goto error;
153
7
  list->p[list->n] = el;
154
7
  list->n++;
155
7
  return list;
156
7
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
7
}
Unexecuted instantiation: isl_ast_expr_list_add
isl_ast_node_list_add
Line
Count
Source
149
6.10k
{
150
6.10k
  list = FN(LIST(EL),grow)(list, 1);
151
6.10k
  if (!list || !el)
152
0
    goto error;
153
6.10k
  list->p[list->n] = el;
154
6.10k
  list->n++;
155
6.10k
  return list;
156
6.10k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
6.10k
}
isl_ast_graft_list_add
Line
Count
Source
149
16.8k
{
150
16.8k
  list = FN(LIST(EL),grow)(list, 1);
151
16.8k
  if (!list || !el)
152
0
    goto error;
153
16.8k
  list->p[list->n] = el;
154
16.8k
  list->n++;
155
16.8k
  return list;
156
16.8k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
16.8k
}
isl_constraint_list_add
Line
Count
Source
149
3.55k
{
150
3.55k
  list = FN(LIST(EL),grow)(list, 1);
151
3.55k
  if (!list || !el)
152
0
    goto error;
153
3.55k
  list->p[list->n] = el;
154
3.55k
  list->n++;
155
3.55k
  return list;
156
3.55k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
3.55k
}
isl_id_list_add
Line
Count
Source
149
2.27k
{
150
2.27k
  list = FN(LIST(EL),grow)(list, 1);
151
2.27k
  if (!list || !el)
152
0
    goto error;
153
2.27k
  list->p[list->n] = el;
154
2.27k
  list->n++;
155
2.27k
  return list;
156
2.27k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
2.27k
}
isl_basic_map_list_add
Line
Count
Source
149
17.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.50k
{
150
1.50k
  list = FN(LIST(EL),grow)(list, 1);
151
1.50k
  if (!list || !el)
152
0
    goto error;
153
1.50k
  list->p[list->n] = el;
154
1.50k
  list->n++;
155
1.50k
  return list;
156
1.50k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
1.50k
}
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
268k
{
150
268k
  list = FN(LIST(EL),grow)(list, 1);
151
268k
  if (!list || !el)
152
0
    goto error;
153
268k
  list->p[list->n] = el;
154
268k
  list->n++;
155
268k
  return list;
156
268k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
268k
}
isl_basic_set_list_add
Line
Count
Source
149
2.24k
{
150
2.24k
  list = FN(LIST(EL),grow)(list, 1);
151
2.24k
  if (!list || !el)
152
0
    goto error;
153
2.24k
  list->p[list->n] = el;
154
2.24k
  list->n++;
155
2.24k
  return list;
156
2.24k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
2.24k
}
isl_set_list_add
Line
Count
Source
149
12.8k
{
150
12.8k
  list = FN(LIST(EL),grow)(list, 1);
151
12.8k
  if (!list || !el)
152
0
    goto error;
153
12.8k
  list->p[list->n] = el;
154
12.8k
  list->n++;
155
12.8k
  return list;
156
12.8k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
12.8k
}
isl_union_set_list_add
Line
Count
Source
149
1.78k
{
150
1.78k
  list = FN(LIST(EL),grow)(list, 1);
151
1.78k
  if (!list || !el)
152
0
    goto error;
153
1.78k
  list->p[list->n] = el;
154
1.78k
  list->n++;
155
1.78k
  return list;
156
1.78k
error:
157
0
  FN(EL,free)(el);
158
0
  FN(LIST(EL),free)(list);
159
0
  return NULL;
160
1.78k
}
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.8k
{
167
70.8k
  int i;
168
70.8k
169
70.8k
  if (!list)
170
0
    return NULL;
171
70.8k
  if (first + n > list->n || first + n < first)
172
70.8k
    
isl_die0
(list->ctx, isl_error_invalid,
173
70.8k
      "index out of bounds", return FN(LIST(EL),free)(list));
174
70.8k
  if (n == 0)
175
653
    return list;
176
70.2k
  list = FN(LIST(EL),cow)(list);
177
70.2k
  if (!list)
178
0
    return NULL;
179
204k
  
for (i = 0; 70.2k
i < n;
++i134k
)
180
134k
    FN(EL,free)(list->p[first + i]);
181
72.7k
  for (i = first; i + n < list->n; 
++i2.52k
)
182
2.52k
    list->p[i] = list->p[i + n];
183
70.2k
  list->n -= n;
184
70.2k
  return list;
185
70.2k
}
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.10k
{
167
2.10k
  int i;
168
2.10k
169
2.10k
  if (!list)
170
0
    return NULL;
171
2.10k
  if (first + n > list->n || first + n < first)
172
2.10k
    
isl_die0
(list->ctx, isl_error_invalid,
173
2.10k
      "index out of bounds", return FN(LIST(EL),free)(list));
174
2.10k
  if (n == 0)
175
653
    return list;
176
1.44k
  list = FN(LIST(EL),cow)(list);
177
1.44k
  if (!list)
178
0
    return NULL;
179
2.97k
  
for (i = 0; 1.44k
i < n;
++i1.52k
)
180
1.52k
    FN(EL,free)(list->p[first + i]);
181
2.31k
  for (i = first; i + n < list->n; 
++i863
)
182
863
    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.5k
{
167
67.5k
  int i;
168
67.5k
169
67.5k
  if (!list)
170
0
    return NULL;
171
67.5k
  if (first + n > list->n || first + n < first)
172
67.5k
    
isl_die0
(list->ctx, isl_error_invalid,
173
67.5k
      "index out of bounds", return FN(LIST(EL),free)(list));
174
67.5k
  if (n == 0)
175
0
    return list;
176
67.5k
  list = FN(LIST(EL),cow)(list);
177
67.5k
  if (!list)
178
0
    return NULL;
179
199k
  
for (i = 0; 67.5k
i < n;
++i131k
)
180
131k
    FN(EL,free)(list->p[first + i]);
181
69.2k
  for (i = first; i + n < list->n; 
++i1.66k
)
182
1.66k
    list->p[i] = list->p[i + n];
183
67.5k
  list->n -= n;
184
67.5k
  return list;
185
67.5k
}
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.43k
  
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
30
{
197
30
  int i;
198
30
  isl_ctx *ctx;
199
30
  LIST(EL) *res;
200
30
201
30
  if (!list || !el)
202
0
    goto error;
203
30
  ctx = FN(LIST(EL),get_ctx)(list);
204
30
  if (pos > list->n)
205
30
    
isl_die0
(ctx, isl_error_invalid,
206
30
      "index out of bounds", goto error);
207
30
208
30
  if (list->ref == 1 && 
list->size > list->n27
) {
209
2
    for (i = list->n; i > pos; 
--i1
)
210
1
      list->p[i] = list->p[i - 1];
211
1
    list->n++;
212
1
    list->p[pos] = el;
213
1
    return list;
214
1
  }
215
29
216
29
  res = FN(LIST(EL),alloc)(ctx, list->n + 1);
217
68
  for (i = 0; i < pos; 
++i39
)
218
39
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
219
29
  res = FN(LIST(EL),add)(res, el);
220
31
  for (i = pos; i < list->n; 
++i2
)
221
2
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
222
29
  FN(LIST(EL),free)(list);
223
29
224
29
  return res;
225
29
error:
226
0
  FN(EL,free)(el);
227
0
  FN(LIST(EL),free)(list);
228
0
  return NULL;
229
29
}
Unexecuted instantiation: isl_aff_list_insert
Unexecuted instantiation: isl_pw_aff_list_insert
Unexecuted instantiation: isl_union_pw_aff_list_insert
Unexecuted instantiation: isl_union_pw_multi_aff_list_insert
Unexecuted instantiation: isl_ast_expr_list_insert
Unexecuted instantiation: isl_ast_node_list_insert
isl_ast_graft_list_insert
Line
Count
Source
196
26
{
197
26
  int i;
198
26
  isl_ctx *ctx;
199
26
  LIST(EL) *res;
200
26
201
26
  if (!list || !el)
202
0
    goto error;
203
26
  ctx = FN(LIST(EL),get_ctx)(list);
204
26
  if (pos > list->n)
205
26
    
isl_die0
(ctx, isl_error_invalid,
206
26
      "index out of bounds", goto error);
207
26
208
26
  if (list->ref == 1 && list->size > list->n) {
209
0
    for (i = list->n; i > pos; --i)
210
0
      list->p[i] = list->p[i - 1];
211
0
    list->n++;
212
0
    list->p[pos] = el;
213
0
    return list;
214
0
  }
215
26
216
26
  res = FN(LIST(EL),alloc)(ctx, list->n + 1);
217
62
  for (i = 0; i < pos; 
++i36
)
218
36
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
219
26
  res = FN(LIST(EL),add)(res, el);
220
28
  for (i = pos; i < list->n; 
++i2
)
221
2
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list->p[i]));
222
26
  FN(LIST(EL),free)(list);
223
26
224
26
  return res;
225
26
error:
226
0
  FN(EL,free)(el);
227
0
  FN(LIST(EL),free)(list);
228
0
  return NULL;
229
26
}
Unexecuted instantiation: isl_constraint_list_insert
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
246k
{
233
246k
  int i;
234
246k
235
246k
  if (!list)
236
38.0k
    return NULL;
237
208k
238
208k
  if (--list->ref > 0)
239
59.5k
    return NULL;
240
148k
241
148k
  isl_ctx_deref(list->ctx);
242
374k
  for (i = 0; i < list->n; 
++i226k
)
243
226k
    FN(EL,free)(list->p[i]);
244
148k
  free(list);
245
148k
246
148k
  return NULL;
247
148k
}
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.98k
    return NULL;
237
8.07k
238
8.07k
  if (--list->ref > 0)
239
0
    return NULL;
240
8.07k
241
8.07k
  isl_ctx_deref(list->ctx);
242
16.1k
  for (i = 0; i < list->n; 
++i8.07k
)
243
8.07k
    FN(EL,free)(list->p[i]);
244
8.07k
  free(list);
245
8.07k
246
8.07k
  return NULL;
247
8.07k
}
isl_pw_aff_list_free
Line
Count
Source
232
28.6k
{
233
28.6k
  int i;
234
28.6k
235
28.6k
  if (!list)
236
3
    return NULL;
237
28.6k
238
28.6k
  if (--list->ref > 0)
239
11.4k
    return NULL;
240
17.1k
241
17.1k
  isl_ctx_deref(list->ctx);
242
36.9k
  for (i = 0; i < list->n; 
++i19.7k
)
243
19.7k
    FN(EL,free)(list->p[i]);
244
17.1k
  free(list);
245
17.1k
246
17.1k
  return NULL;
247
17.1k
}
isl_union_pw_aff_list_free
Line
Count
Source
232
254
{
233
254
  int i;
234
254
235
254
  if (!list)
236
0
    return NULL;
237
254
238
254
  if (--list->ref > 0)
239
0
    return NULL;
240
254
241
254
  isl_ctx_deref(list->ctx);
242
398
  for (i = 0; i < list->n; 
++i144
)
243
254
    
FN144
(EL,free)(list->p[i])144
;
244
254
  free(list);
245
254
246
254
  return NULL;
247
254
}
isl_union_pw_multi_aff_list_free
Line
Count
Source
232
7
{
233
7
  int i;
234
7
235
7
  if (!list)
236
0
    return NULL;
237
7
238
7
  if (--list->ref > 0)
239
0
    return NULL;
240
7
241
7
  isl_ctx_deref(list->ctx);
242
14
  for (i = 0; i < list->n; 
++i7
)
243
7
    FN(EL,free)(list->p[i]);
244
7
  free(list);
245
7
246
7
  return NULL;
247
7
}
Unexecuted instantiation: isl_ast_expr_list_free
isl_ast_node_list_free
Line
Count
Source
232
4.64k
{
233
4.64k
  int i;
234
4.64k
235
4.64k
  if (!list)
236
0
    return NULL;
237
4.64k
238
4.64k
  if (--list->ref > 0)
239
217
    return NULL;
240
4.43k
241
4.43k
  isl_ctx_deref(list->ctx);
242
10.5k
  for (i = 0; i < list->n; 
++i6.10k
)
243
6.10k
    FN(EL,free)(list->p[i]);
244
4.43k
  free(list);
245
4.43k
246
4.43k
  return NULL;
247
4.43k
}
isl_ast_graft_list_free
Line
Count
Source
232
17.9k
{
233
17.9k
  int i;
234
17.9k
235
17.9k
  if (!list)
236
0
    return NULL;
237
17.9k
238
17.9k
  if (--list->ref > 0)
239
0
    return NULL;
240
17.9k
241
17.9k
  isl_ctx_deref(list->ctx);
242
34.7k
  for (i = 0; i < list->n; 
++i16.8k
)
243
17.9k
    
FN16.8k
(EL,free)(list->p[i])16.8k
;
244
17.9k
  free(list);
245
17.9k
246
17.9k
  return NULL;
247
17.9k
}
isl_constraint_list_free
Line
Count
Source
232
2.29k
{
233
2.29k
  int i;
234
2.29k
235
2.29k
  if (!list)
236
0
    return NULL;
237
2.29k
238
2.29k
  if (--list->ref > 0)
239
0
    return NULL;
240
2.29k
241
2.29k
  isl_ctx_deref(list->ctx);
242
4.32k
  for (i = 0; i < list->n; 
++i2.02k
)
243
2.29k
    
FN2.02k
(EL,free)(list->p[i])2.02k
;
244
2.29k
  free(list);
245
2.29k
246
2.29k
  return NULL;
247
2.29k
}
isl_id_list_free
Line
Count
Source
232
36.6k
{
233
36.6k
  int i;
234
36.6k
235
36.6k
  if (!list)
236
0
    return NULL;
237
36.6k
238
36.6k
  if (--list->ref > 0)
239
34.7k
    return NULL;
240
1.83k
241
1.83k
  isl_ctx_deref(list->ctx);
242
4.11k
  for (i = 0; i < list->n; 
++i2.27k
)
243
2.27k
    FN(EL,free)(list->p[i]);
244
1.83k
  free(list);
245
1.83k
246
1.83k
  return NULL;
247
1.83k
}
isl_basic_map_list_free
Line
Count
Source
232
3.54k
{
233
3.54k
  int i;
234
3.54k
235
3.54k
  if (!list)
236
0
    return NULL;
237
3.54k
238
3.54k
  if (--list->ref > 0)
239
0
    return NULL;
240
3.54k
241
3.54k
  isl_ctx_deref(list->ctx);
242
17.4k
  for (i = 0; i < list->n; 
++i13.9k
)
243
13.9k
    FN(EL,free)(list->p[i]);
244
3.54k
  free(list);
245
3.54k
246
3.54k
  return NULL;
247
3.54k
}
isl_map_list_free
Line
Count
Source
232
814
{
233
814
  int i;
234
814
235
814
  if (!list)
236
0
    return NULL;
237
814
238
814
  if (--list->ref > 0)
239
0
    return NULL;
240
814
241
814
  isl_ctx_deref(list->ctx);
242
2.65k
  for (i = 0; i < list->n; 
++i1.83k
)
243
1.83k
    FN(EL,free)(list->p[i]);
244
814
  free(list);
245
814
246
814
  return NULL;
247
814
}
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
22.0k
    return NULL;
237
90.7k
238
90.7k
  if (--list->ref > 0)
239
13.0k
    return NULL;
240
77.7k
241
77.7k
  isl_ctx_deref(list->ctx);
242
214k
  for (i = 0; i < list->n; 
++i136k
)
243
136k
    FN(EL,free)(list->p[i]);
244
77.7k
  free(list);
245
77.7k
246
77.7k
  return NULL;
247
77.7k
}
isl_basic_set_list_free
Line
Count
Source
232
2.93k
{
233
2.93k
  int i;
234
2.93k
235
2.93k
  if (!list)
236
0
    return NULL;
237
2.93k
238
2.93k
  if (--list->ref > 0)
239
13
    return NULL;
240
2.92k
241
2.92k
  isl_ctx_deref(list->ctx);
242
8.61k
  for (i = 0; i < list->n; 
++i5.69k
)
243
5.69k
    FN(EL,free)(list->p[i]);
244
2.92k
  free(list);
245
2.92k
246
2.92k
  return NULL;
247
2.92k
}
isl_set_list_free
Line
Count
Source
232
19.2k
{
233
19.2k
  int i;
234
19.2k
235
19.2k
  if (!list)
236
7.98k
    return NULL;
237
11.2k
238
11.2k
  if (--list->ref > 0)
239
0
    return NULL;
240
11.2k
241
11.2k
  isl_ctx_deref(list->ctx);
242
23.7k
  for (i = 0; i < list->n; 
++i12.4k
)
243
12.4k
    FN(EL,free)(list->p[i]);
244
11.2k
  free(list);
245
11.2k
246
11.2k
  return NULL;
247
11.2k
}
isl_union_set_list_free
Line
Count
Source
232
482
{
233
482
  int i;
234
482
235
482
  if (!list)
236
0
    return NULL;
237
482
238
482
  if (--list->ref > 0)
239
0
    return NULL;
240
482
241
482
  isl_ctx_deref(list->ctx);
242
1.04k
  for (i = 0; i < list->n; 
++i566
)
243
566
    FN(EL,free)(list->p[i]);
244
482
  free(list);
245
482
246
482
  return NULL;
247
482
}
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
957k
{
251
957k
  return list ? 
list->n942k
:
015.1k
;
252
957k
}
isl_aff_list_n_aff
Line
Count
Source
250
399
{
251
399
  return list ? list->n : 
00
;
252
399
}
isl_pw_aff_list_n_pw_aff
Line
Count
Source
250
17.4k
{
251
17.4k
  return list ? list->n : 
00
;
252
17.4k
}
isl_union_pw_aff_list_n_union_pw_aff
Line
Count
Source
250
254
{
251
254
  return list ? list->n : 
00
;
252
254
}
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.84k
{
251
4.84k
  return list ? list->n : 
00
;
252
4.84k
}
isl_ast_graft_list_n_ast_graft
Line
Count
Source
250
27.1k
{
251
27.1k
  return list ? list->n : 
00
;
252
27.1k
}
isl_constraint_list_n_constraint
Line
Count
Source
250
3.69k
{
251
3.69k
  return list ? list->n : 
00
;
252
3.69k
}
isl_id_list_n_id
Line
Count
Source
250
1.07k
{
251
1.07k
  return list ? list->n : 
00
;
252
1.07k
}
isl_basic_map_list_n_basic_map
Line
Count
Source
250
3.21k
{
251
3.21k
  return list ? list->n : 
00
;
252
3.21k
}
isl_map_list_n_map
Line
Count
Source
250
803
{
251
803
  return list ? list->n : 
00
;
252
803
}
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
883k
{
251
883k
  return list ? 
list->n868k
:
015.1k
;
252
883k
}
isl_basic_set_list_n_basic_set
Line
Count
Source
250
4.45k
{
251
4.45k
  return list ? list->n : 
00
;
252
4.45k
}
isl_set_list_n_set
Line
Count
Source
250
8.01k
{
251
8.01k
  return list ? list->n : 
00
;
252
8.01k
}
isl_union_set_list_n_union_set
Line
Count
Source
250
2.69k
{
251
2.69k
  return list ? list->n : 
00
;
252
2.69k
}
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
654k
{
256
654k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
654k
  return FN(EL,copy)(list->p[index]);
259
654k
}
isl_aff_list_get_aff
Line
Count
Source
255
8.33k
{
256
8.33k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
8.33k
  return FN(EL,copy)(list->p[index]);
259
8.33k
}
isl_pw_aff_list_get_pw_aff
Line
Count
Source
255
13.5k
{
256
13.5k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
13.5k
  return FN(EL,copy)(list->p[index]);
259
13.5k
}
isl_union_pw_aff_list_get_union_pw_aff
Line
Count
Source
255
144
{
256
144
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
144
  return FN(EL,copy)(list->p[index]);
259
144
}
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.40k
{
256
4.40k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
4.40k
  return FN(EL,copy)(list->p[index]);
259
4.40k
}
isl_ast_graft_list_get_ast_graft
Line
Count
Source
255
33.6k
{
256
33.6k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
33.6k
  return FN(EL,copy)(list->p[index]);
259
33.6k
}
isl_constraint_list_get_constraint
Line
Count
Source
255
2.02k
{
256
2.02k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
2.02k
  return FN(EL,copy)(list->p[index]);
259
2.02k
}
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.80k
{
256
1.80k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
1.80k
  return FN(EL,copy)(list->p[index]);
259
1.80k
}
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
528k
{
256
528k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
528k
  return FN(EL,copy)(list->p[index]);
259
528k
}
isl_basic_set_list_get_basic_set
Line
Count
Source
255
8.86k
{
256
8.86k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
8.86k
  return FN(EL,copy)(list->p[index]);
259
8.86k
}
isl_set_list_get_set
Line
Count
Source
255
15.7k
{
256
15.7k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
15.7k
  return FN(EL,copy)(list->p[index]);
259
15.7k
}
isl_union_set_list_get_union_set
Line
Count
Source
255
2.77k
{
256
2.77k
  if (FN(LIST(EL),check_index)(list, index) < 0)
257
0
    return NULL;
258
2.77k
  return FN(EL,copy)(list->p[index]);
259
2.77k
}
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
46.1k
{
266
46.1k
  if (!list || !el)
267
0
    goto error;
268
46.1k
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
46.1k
  if (list->p[index] == el) {
271
10.9k
    FN(EL,free)(el);
272
10.9k
    return list;
273
10.9k
  }
274
35.1k
  list = FN(LIST(EL),cow)(list);
275
35.1k
  if (!list)
276
0
    goto error;
277
35.1k
  FN(EL,free)(list->p[index]);
278
35.1k
  list->p[index] = el;
279
35.1k
  return list;
280
35.1k
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
35.1k
}
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.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
0
    FN(EL,free)(el);
272
0
    return list;
273
0
  }
274
3.44k
  list = FN(LIST(EL),cow)(list);
275
3.44k
  if (!list)
276
0
    goto error;
277
3.44k
  FN(EL,free)(list->p[index]);
278
3.44k
  list->p[index] = el;
279
3.44k
  return list;
280
3.44k
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
3.44k
}
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.61k
{
266
6.61k
  if (!list || !el)
267
0
    goto error;
268
6.61k
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
6.61k
  if (list->p[index] == el) {
271
6.58k
    FN(EL,free)(el);
272
6.58k
    return list;
273
6.58k
  }
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.45k
{
266
3.45k
  if (!list || !el)
267
0
    goto error;
268
3.45k
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
3.45k
  if (list->p[index] == el) {
271
3.02k
    FN(EL,free)(el);
272
3.02k
    return list;
273
3.02k
  }
274
437
  list = FN(LIST(EL),cow)(list);
275
437
  if (!list)
276
0
    goto error;
277
437
  FN(EL,free)(list->p[index]);
278
437
  list->p[index] = el;
279
437
  return list;
280
437
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
437
}
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.9k
{
266
25.9k
  if (!list || !el)
267
0
    goto error;
268
25.9k
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
25.9k
  if (list->p[index] == el) {
271
3
    FN(EL,free)(el);
272
3
    return list;
273
3
  }
274
25.9k
  list = FN(LIST(EL),cow)(list);
275
25.9k
  if (!list)
276
0
    goto error;
277
25.9k
  FN(EL,free)(list->p[index]);
278
25.9k
  list->p[index] = el;
279
25.9k
  return list;
280
25.9k
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
25.9k
}
isl_basic_set_list_set_basic_set
Line
Count
Source
265
3.52k
{
266
3.52k
  if (!list || !el)
267
0
    goto error;
268
3.52k
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
3.52k
  if (list->p[index] == el) {
271
0
    FN(EL,free)(el);
272
0
    return list;
273
0
  }
274
3.52k
  list = FN(LIST(EL),cow)(list);
275
3.52k
  if (!list)
276
0
    goto error;
277
3.52k
  FN(EL,free)(list->p[index]);
278
3.52k
  list->p[index] = el;
279
3.52k
  return list;
280
3.52k
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
3.52k
}
isl_set_list_set_set
Line
Count
Source
265
3.16k
{
266
3.16k
  if (!list || !el)
267
0
    goto error;
268
3.16k
  if (FN(LIST(EL),check_index)(list, index) < 0)
269
0
    goto error;
270
3.16k
  if (list->p[index] == el) {
271
1.37k
    FN(EL,free)(el);
272
1.37k
    return list;
273
1.37k
  }
274
1.78k
  list = FN(LIST(EL),cow)(list);
275
1.78k
  if (!list)
276
0
    goto error;
277
1.78k
  FN(EL,free)(list->p[index]);
278
1.78k
  list->p[index] = el;
279
1.78k
  return list;
280
1.78k
error:
281
0
  FN(EL,free)(el);
282
0
  FN(LIST(EL),free)(list);
283
0
  return NULL;
284
1.78k
}
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.35k
  
for (i = 0; 1.52k
i < list->n;
++i1.82k
) {
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
534
      return isl_stat_error;
334
2.36k
  }
335
1.52k
336
1.52k
  
return isl_stat_ok994
;
337
1.52k
}
Unexecuted instantiation: isl_aff_list_foreach
isl_pw_aff_list_foreach
Line
Count
Source
322
700
{
323
700
  int i;
324
700
325
700
  if (!list)
326
0
    return isl_stat_error;
327
700
328
875
  
for (i = 0; 700
i < list->n;
++i175
) {
329
709
    EL *el = FN(EL,copy)(list->p[i]);
330
709
    if (!el)
331
0
      return isl_stat_error;
332
709
    if (fn(el, user) < 0)
333
534
      return isl_stat_error;
334
709
  }
335
700
336
700
  
return isl_stat_ok166
;
337
700
}
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
700
{
323
700
  int i;
324
700
325
700
  if (!list)
326
0
    return isl_stat_error;
327
700
328
2.22k
  
for (i = 0; 700
i < list->n;
++i1.52k
) {
329
1.52k
    EL *el = FN(EL,copy)(list->p[i]);
330
1.52k
    if (!el)
331
0
      return isl_stat_error;
332
1.52k
    if (fn(el, user) < 0)
333
0
      return isl_stat_error;
334
1.52k
  }
335
700
336
700
  return isl_stat_ok;
337
700
}
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.12k
{
377
1.12k
  S(LIST(EL),sort_data) *data = user;
378
1.12k
  EL * const *el1 = a;
379
1.12k
  EL * const *el2 = b;
380
1.12k
381
1.12k
  return data->cmp(*el1, *el2, data->user);
382
1.12k
}
Unexecuted instantiation: isl_aff.c:isl_aff_list_cmp
isl_aff.c:isl_pw_aff_list_cmp
Line
Count
Source
376
75
{
377
75
  S(LIST(EL),sort_data) *data = user;
378
75
  EL * const *el1 = a;
379
75
  EL * const *el2 = b;
380
75
381
75
  return data->cmp(*el1, *el2, data->user);
382
75
}
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.02k
{
377
1.02k
  S(LIST(EL),sort_data) *data = user;
378
1.02k
  EL * const *el1 = a;
379
1.02k
  EL * const *el2 = b;
380
1.02k
381
1.02k
  return data->cmp(*el1, *el2, data->user);
382
1.02k
}
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
848
    return list;
396
858
  list = FN(LIST(EL),cow)(list);
397
858
  if (!list)
398
0
    return NULL;
399
858
400
858
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
401
858
      &FN(LIST(EL),cmp), &data) < 0)
402
0
    return FN(LIST(EL),free)(list);
403
858
404
858
  return list;
405
858
}
Unexecuted instantiation: isl_aff_list_sort
isl_pw_aff_list_sort
Line
Count
Source
389
81
{
390
81
  S(LIST(EL),sort_data) data = { cmp, user };
391
81
392
81
  if (!list)
393
0
    return NULL;
394
81
  if (list->n <= 1)
395
11
    return list;
396
70
  list = FN(LIST(EL),cow)(list);
397
70
  if (!list)
398
0
    return NULL;
399
70
400
70
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
401
70
      &FN(LIST(EL),cmp), &data) < 0)
402
0
    return FN(LIST(EL),free)(list);
403
70
404
70
  return list;
405
70
}
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
829
    return list;
396
768
  list = FN(LIST(EL),cow)(list);
397
768
  if (!list)
398
0
    return NULL;
399
768
400
768
  if (isl_sort(list->p, list->n, sizeof(list->p[0]),
401
768
      &FN(LIST(EL),cmp), &data) < 0)
402
0
    return FN(LIST(EL),free)(list);
403
768
404
768
  return list;
405
768
}
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
31.5k
{
515
31.5k
  isl_ctx *ctx;
516
31.5k
  LIST(EL) *list;
517
31.5k
518
31.5k
  if (!el)
519
1
    return NULL;
520
31.5k
  ctx = FN(EL,get_ctx)(el);
521
31.5k
  list = FN(LIST(EL),alloc)(ctx, 1);
522
31.5k
  if (!list)
523
0
    goto error;
524
31.5k
  list = FN(LIST(EL),add)(list, el);
525
31.5k
  return list;
526
31.5k
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
31.5k
}
isl_aff_list_from_aff
Line
Count
Source
514
7.96k
{
515
7.96k
  isl_ctx *ctx;
516
7.96k
  LIST(EL) *list;
517
7.96k
518
7.96k
  if (!el)
519
0
    return NULL;
520
7.96k
  ctx = FN(EL,get_ctx)(el);
521
7.96k
  list = FN(LIST(EL),alloc)(ctx, 1);
522
7.96k
  if (!list)
523
0
    goto error;
524
7.96k
  list = FN(LIST(EL),add)(list, el);
525
7.96k
  return list;
526
7.96k
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
7.96k
}
isl_pw_aff_list_from_pw_aff
Line
Count
Source
514
8.99k
{
515
8.99k
  isl_ctx *ctx;
516
8.99k
  LIST(EL) *list;
517
8.99k
518
8.99k
  if (!el)
519
1
    return NULL;
520
8.99k
  ctx = FN(EL,get_ctx)(el);
521
8.99k
  list = FN(LIST(EL),alloc)(ctx, 1);
522
8.99k
  if (!list)
523
0
    goto error;
524
8.99k
  list = FN(LIST(EL),add)(list, el);
525
8.99k
  return list;
526
8.99k
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
8.99k
}
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.18k
{
515
2.18k
  isl_ctx *ctx;
516
2.18k
  LIST(EL) *list;
517
2.18k
518
2.18k
  if (!el)
519
0
    return NULL;
520
2.18k
  ctx = FN(EL,get_ctx)(el);
521
2.18k
  list = FN(LIST(EL),alloc)(ctx, 1);
522
2.18k
  if (!list)
523
0
    goto error;
524
2.18k
  list = FN(LIST(EL),add)(list, el);
525
2.18k
  return list;
526
2.18k
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
2.18k
}
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.92k
{
515
3.92k
  isl_ctx *ctx;
516
3.92k
  LIST(EL) *list;
517
3.92k
518
3.92k
  if (!el)
519
0
    return NULL;
520
3.92k
  ctx = FN(EL,get_ctx)(el);
521
3.92k
  list = FN(LIST(EL),alloc)(ctx, 1);
522
3.92k
  if (!list)
523
0
    goto error;
524
3.92k
  list = FN(LIST(EL),add)(list, el);
525
3.92k
  return list;
526
3.92k
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
3.92k
}
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.96k
{
515
7.96k
  isl_ctx *ctx;
516
7.96k
  LIST(EL) *list;
517
7.96k
518
7.96k
  if (!el)
519
0
    return NULL;
520
7.96k
  ctx = FN(EL,get_ctx)(el);
521
7.96k
  list = FN(LIST(EL),alloc)(ctx, 1);
522
7.96k
  if (!list)
523
0
    goto error;
524
7.96k
  list = FN(LIST(EL),add)(list, el);
525
7.96k
  return list;
526
7.96k
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
7.96k
}
isl_union_set_list_from_union_set
Line
Count
Source
514
413
{
515
413
  isl_ctx *ctx;
516
413
  LIST(EL) *list;
517
413
518
413
  if (!el)
519
0
    return NULL;
520
413
  ctx = FN(EL,get_ctx)(el);
521
413
  list = FN(LIST(EL),alloc)(ctx, 1);
522
413
  if (!list)
523
0
    goto error;
524
413
  list = FN(LIST(EL),add)(list, el);
525
413
  return list;
526
413
error:
527
0
  FN(EL,free)(el);
528
0
  return NULL;
529
413
}
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.16k
{
554
8.16k
  int i;
555
8.16k
  isl_ctx *ctx;
556
8.16k
  LIST(EL) *res;
557
8.16k
558
8.16k
  if (!list1 || !list2)
559
0
    goto error;
560
8.16k
561
8.16k
  if (list1->ref == 1 && 
list1->n + list2->n <= list1->size7.54k
)
562
2.01k
    return FN(LIST(EL),concat_inplace)(list1, list2);
563
6.15k
564
6.15k
  ctx = FN(LIST(EL),get_ctx)(list1);
565
6.15k
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
566
17.7k
  for (i = 0; i < list1->n; 
++i11.5k
)
567
11.5k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
568
15.0k
  for (i = 0; i < list2->n; 
++i8.91k
)
569
8.91k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
570
6.15k
571
6.15k
  FN(LIST(EL),free)(list1);
572
6.15k
  FN(LIST(EL),free)(list2);
573
6.15k
  return res;
574
6.15k
error:
575
0
  FN(LIST(EL),free)(list1);
576
0
  FN(LIST(EL),free)(list2);
577
0
  return NULL;
578
6.15k
}
Unexecuted instantiation: isl_aff_list_concat
isl_pw_aff_list_concat
Line
Count
Source
553
152
{
554
152
  int i;
555
152
  isl_ctx *ctx;
556
152
  LIST(EL) *res;
557
152
558
152
  if (!list1 || !list2)
559
0
    goto error;
560
152
561
152
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
562
0
    return FN(LIST(EL),concat_inplace)(list1, list2);
563
152
564
152
  ctx = FN(LIST(EL),get_ctx)(list1);
565
152
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
566
351
  for (i = 0; i < list1->n; 
++i199
)
567
199
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
568
304
  for (i = 0; i < list2->n; 
++i152
)
569
152
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
570
152
571
152
  FN(LIST(EL),free)(list1);
572
152
  FN(LIST(EL),free)(list2);
573
152
  return res;
574
152
error:
575
0
  FN(LIST(EL),free)(list1);
576
0
  FN(LIST(EL),free)(list2);
577
0
  return NULL;
578
152
}
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.45k
{
554
5.45k
  int i;
555
5.45k
  isl_ctx *ctx;
556
5.45k
  LIST(EL) *res;
557
5.45k
558
5.45k
  if (!list1 || !list2)
559
0
    goto error;
560
5.45k
561
5.45k
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
562
1.90k
    return FN(LIST(EL),concat_inplace)(list1, list2);
563
3.54k
564
3.54k
  ctx = FN(LIST(EL),get_ctx)(list1);
565
3.54k
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
566
3.94k
  for (i = 0; i < list1->n; 
++i403
)
567
403
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
568
7.88k
  for (i = 0; i < list2->n; 
++i4.34k
)
569
4.34k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
570
3.54k
571
3.54k
  FN(LIST(EL),free)(list1);
572
3.54k
  FN(LIST(EL),free)(list2);
573
3.54k
  return res;
574
3.54k
error:
575
0
  FN(LIST(EL),free)(list1);
576
0
  FN(LIST(EL),free)(list2);
577
0
  return NULL;
578
3.54k
}
Unexecuted instantiation: isl_constraint_list_concat
isl_id_list_concat
Line
Count
Source
553
623
{
554
623
  int i;
555
623
  isl_ctx *ctx;
556
623
  LIST(EL) *res;
557
623
558
623
  if (!list1 || !list2)
559
0
    goto error;
560
623
561
623
  if (list1->ref == 1 && 
list1->n + list2->n <= list1->size0
)
562
0
    return FN(LIST(EL),concat_inplace)(list1, list2);
563
623
564
623
  ctx = FN(LIST(EL),get_ctx)(list1);
565
623
  res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n);
566
1.14k
  for (i = 0; i < list1->n; 
++i517
)
567
517
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i]));
568
1.49k
  for (i = 0; i < list2->n; 
++i875
)
569
875
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
570
623
571
623
  FN(LIST(EL),free)(list1);
572
623
  FN(LIST(EL),free)(list2);
573
623
  return res;
574
623
error:
575
0
  FN(LIST(EL),free)(list1);
576
0
  FN(LIST(EL),free)(list2);
577
0
  return NULL;
578
623
}
isl_basic_map_list_concat
Line
Count
Source
553
1.80k
{
554
1.80k
  int i;
555
1.80k
  isl_ctx *ctx;
556
1.80k
  LIST(EL) *res;
557
1.80k
558
1.80k
  if (!list1 || !list2)
559
0
    goto error;
560
1.80k
561
1.80k
  if (list1->ref == 1 && list1->n + list2->n <= list1->size)
562
62
    return FN(LIST(EL),concat_inplace)(list1, list2);
563
1.74k
564
1.74k
  ctx = FN(LIST(EL),get_ctx)(list1);
565
1.74k
  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.20k
  for (i = 0; i < list2->n; 
++i3.45k
)
569
3.45k
    res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i]));
570
1.74k
571
1.74k
  FN(LIST(EL),free)(list1);
572
1.74k
  FN(LIST(EL),free)(list2);
573
1.74k
  return res;
574
1.74k
error:
575
0
  FN(LIST(EL),free)(list1);
576
0
  FN(LIST(EL),free)(list2);
577
0
  return NULL;
578
1.74k
}
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