Coverage Report

Created: 2017-06-28 17:40

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/polly/lib/External/isl/isl_union_eval.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright 2010      INRIA Saclay
3
 *
4
 * Use of this software is governed by the MIT license
5
 *
6
 * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
7
 * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
8
 * 91893 Orsay, France
9
 */
10
11
#include <isl_union_macro.h>
12
13
/* Is the domain space of "entry" equal to "space"?
14
 */
15
static int FN(UNION,has_domain_space)(const void *entry, const void *val)
16
1
{
17
1
  PART *part = (PART *)entry;
18
1
  isl_space *space = (isl_space *) val;
19
1
20
1
  if (isl_space_is_params(space))
21
0
    return isl_space_is_set(part->dim);
22
1
23
1
  return isl_space_tuple_is_equal(part->dim, isl_dim_in,
24
1
          space, isl_dim_set);
25
1
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_has_domain_space
isl_polynomial.c:isl_union_pw_qpolynomial_has_domain_space
Line
Count
Source
16
1
{
17
1
  PART *part = (PART *)entry;
18
1
  isl_space *space = (isl_space *) val;
19
1
20
1
  if (isl_space_is_params(space))
21
0
    return isl_space_is_set(part->dim);
22
1
23
1
  return isl_space_tuple_is_equal(part->dim, isl_dim_in,
24
1
          space, isl_dim_set);
25
1
}
26
27
__isl_give isl_val *FN(UNION,eval)(__isl_take UNION *u,
28
  __isl_take isl_point *pnt)
29
1
{
30
1
  uint32_t hash;
31
1
  struct isl_hash_table_entry *entry;
32
1
  isl_space *space;
33
1
  isl_val *v;
34
1
35
1
  if (
!u || 1
!pnt1
)
36
0
    goto error;
37
1
38
1
  space = isl_space_copy(pnt->dim);
39
1
  if (!space)
40
0
    goto error;
41
1
  hash = isl_space_get_hash(space);
42
1
  entry = isl_hash_table_find(u->space->ctx, &u->table,
43
1
            hash, &FN(UNION,has_domain_space),
44
1
            space, 0);
45
1
  isl_space_free(space);
46
1
  if (
!entry1
)
{0
47
0
    v = isl_val_zero(isl_point_get_ctx(pnt));
48
0
    isl_point_free(pnt);
49
1
  } else {
50
1
    v = 
FN1
(PART,eval)(
FN1
(PART,copy)(entry->data), pnt);
51
1
  }
52
1
  FN(UNION,free)(u);
53
1
  return v;
54
0
error:
55
0
  FN(UNION,free)(u);
56
0
  isl_point_free(pnt);
57
0
  return NULL;
58
1
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_eval
isl_union_pw_qpolynomial_eval
Line
Count
Source
29
1
{
30
1
  uint32_t hash;
31
1
  struct isl_hash_table_entry *entry;
32
1
  isl_space *space;
33
1
  isl_val *v;
34
1
35
1
  if (
!u || 1
!pnt1
)
36
0
    goto error;
37
1
38
1
  space = isl_space_copy(pnt->dim);
39
1
  if (!space)
40
0
    goto error;
41
1
  hash = isl_space_get_hash(space);
42
1
  entry = isl_hash_table_find(u->space->ctx, &u->table,
43
1
            hash, &FN(UNION,has_domain_space),
44
1
            space, 0);
45
1
  isl_space_free(space);
46
1
  if (
!entry1
)
{0
47
0
    v = isl_val_zero(isl_point_get_ctx(pnt));
48
0
    isl_point_free(pnt);
49
1
  } else {
50
1
    v = 
FN1
(PART,eval)(
FN1
(PART,copy)(entry->data), pnt);
51
1
  }
52
1
  FN(UNION,free)(u);
53
1
  return v;
54
0
error:
55
0
  FN(UNION,free)(u);
56
0
  isl_point_free(pnt);
57
0
  return NULL;
58
1
}