Tobias Grosser 52a25237d8 Import isl(+imath) as an external library into Polly
With this patch Polly is always GPL-free (no dependency on GMP any more). As a
result, building and distributing Polly will be easier. Furthermore, there is no
need to tightly coordinate isl and Polly releases anymore.

We import isl b3e0fa7a05d as well as imath 4d707e5ef2. These are the git
versions Polly currently was tested with when using utils/checkout_isl.sh. The
imported libraries are both MIT-style licensed.

We build isl and imath with -fvisibility=hidden to avoid clashes in case other
projects (such as gcc) use conflicting versions of isl. The use of imath can
temporarily reduce compile-time performance of Polly. We will work on
performance tuning in tree.

Patches to isl should be contributed first to the main isl repository and can
then later be reimported to Polly.

This patch is also a prerequisite for the upcoming isl C++ interface.

llvm-svn: 228193
2015-02-04 20:55:43 +00:00

61 lines
2.3 KiB
C

/*
* Copyright 2008-2009 Katholieke Universiteit Leuven
*
* Use of this software is governed by the MIT license
*
* Written by Sven Verdoolaege, K.U.Leuven, Departement
* Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
*/
#ifndef ISL_SEQ_H
#define ISL_SEQ_H
#include <sys/types.h>
#include <isl_int.h>
#include <isl/ctx.h>
#if defined(__cplusplus)
extern "C" {
#endif
/* Some common operations on sequences of isl_int's */
void isl_seq_clr(isl_int *p, unsigned len);
void isl_seq_set(isl_int *p, isl_int v, unsigned len);
void isl_seq_set_si(isl_int *p, int v, unsigned len);
void isl_seq_neg(isl_int *dst, isl_int *src, unsigned len);
void isl_seq_cpy(isl_int *dst, isl_int *src, unsigned len);
void isl_seq_addmul(isl_int *dst, isl_int f, isl_int *src, unsigned len);
void isl_seq_submul(isl_int *dst, isl_int f, isl_int *src, unsigned len);
void isl_seq_swp_or_cpy(isl_int *dst, isl_int *src, unsigned len);
void isl_seq_scale(isl_int *dst, isl_int *src, isl_int f, unsigned len);
void isl_seq_scale_down(isl_int *dst, isl_int *src, isl_int f, unsigned len);
void isl_seq_cdiv_q(isl_int *dst, isl_int *src, isl_int m, unsigned len);
void isl_seq_fdiv_q(isl_int *dst, isl_int *src, isl_int m, unsigned len);
void isl_seq_fdiv_r(isl_int *dst, isl_int *src, isl_int m, unsigned len);
void isl_seq_combine(isl_int *dst, isl_int m1, isl_int *src1,
isl_int m2, isl_int *src2, unsigned len);
void isl_seq_elim(isl_int *dst, isl_int *src, unsigned pos, unsigned len,
isl_int *m);
void isl_seq_abs_max(isl_int *p, unsigned len, isl_int *max);
void isl_seq_gcd(isl_int *p, unsigned len, isl_int *gcd);
void isl_seq_lcm(isl_int *p, unsigned len, isl_int *lcm);
void isl_seq_normalize(struct isl_ctx *ctx, isl_int *p, unsigned len);
void isl_seq_inner_product(isl_int *p1, isl_int *p2, unsigned len,
isl_int *prod);
int isl_seq_first_non_zero(isl_int *p, unsigned len);
int isl_seq_last_non_zero(isl_int *p, unsigned len);
int isl_seq_abs_min_non_zero(isl_int *p, unsigned len);
int isl_seq_eq(isl_int *p1, isl_int *p2, unsigned len);
int isl_seq_cmp(isl_int *p1, isl_int *p2, unsigned len);
int isl_seq_is_neg(isl_int *p1, isl_int *p2, unsigned len);
uint32_t isl_seq_get_hash(isl_int *p, unsigned len);
uint32_t isl_seq_get_hash_bits(isl_int *p, unsigned len, unsigned bits);
#if defined(__cplusplus)
}
#endif
#endif