Coverage Report

Created: 2017-08-18 19:41

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/polly/lib/External/isl/isl_multi_cmp.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright 2016      Sven Verdoolaege
3
 *
4
 * Use of this software is governed by the MIT license
5
 *
6
 * Written by Sven Verdoolaege
7
 */
8
9
#include <isl_multi_macro.h>
10
11
/* Compare two multi expressions.
12
 *
13
 * Return -1 if "multi1" is "smaller" than "multi2", 1 if "multi1" is "greater"
14
 * than "multi2" and 0 if they are equal.
15
 */
16
int FN(MULTI(BASE),plain_cmp)(__isl_keep MULTI(BASE) *multi1,
17
  __isl_keep MULTI(BASE) *multi2)
18
2.47k
{
19
2.47k
  int i;
20
2.47k
  int cmp;
21
2.47k
22
2.47k
  if (multi1 == multi2)
23
0
    return 0;
24
2.47k
  
if (2.47k
!multi12.47k
)
25
0
    return -1;
26
2.47k
  
if (2.47k
!multi22.47k
)
27
0
    return 1;
28
2.47k
29
2.47k
  cmp = isl_space_cmp(multi1->space, multi2->space);
30
2.47k
  if (cmp != 0)
31
0
    return cmp;
32
2.47k
33
3.88k
  
for (i = 0; 2.47k
i < multi1->n3.88k
;
++i1.41k
)
{3.37k
34
3.37k
    cmp = FN(EL,plain_cmp)(multi1->p[i], multi2->p[i]);
35
3.37k
    if (cmp != 0)
36
1.96k
      return cmp;
37
3.37k
  }
38
2.47k
39
513
  return 0;
40
2.47k
}