summaryrefslogtreecommitdiffstats
path: root/polly/lib/External/isl/isl_ctx.c
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2018-02-20 07:26:42 +0000
committerTobias Grosser <tobias@grosser.es>2018-02-20 07:26:42 +0000
commitfa8079d0dc1b9fbca201b92f30d3c97386c75114 (patch)
tree8163f9c4eb97308b4c7a8a1777fdc9aac3c789be /polly/lib/External/isl/isl_ctx.c
parent85476dc45ad1216e533385964b9ce191968c316f (diff)
downloadbcm5719-llvm-fa8079d0dc1b9fbca201b92f30d3c97386c75114.tar.gz
bcm5719-llvm-fa8079d0dc1b9fbca201b92f30d3c97386c75114.zip
Update isl to isl-0.18-1047-g4a20ef8
This update: - Removes several deprecated functions (e.g., isl_band). - Improves the pretty-printing of sets by detecting modulos and "false" equalities. - Minor improvements to coalescing and increased robustness of the isl scheduler. This update does not yet include isl commit isl-0.18-90-gd00cb45 (isl_pw_*_alloc: add missing check for compatible spaces, Wed Sep 6 12:18:04 2017 +0200), as this additional check is too tight and unfortunately causes two test case failures in Polly. A patch has been submitted to isl and will be included in the next isl update for Polly. llvm-svn: 325557
Diffstat (limited to 'polly/lib/External/isl/isl_ctx.c')
-rw-r--r--polly/lib/External/isl/isl_ctx.c49
1 files changed, 44 insertions, 5 deletions
diff --git a/polly/lib/External/isl/isl_ctx.c b/polly/lib/External/isl/isl_ctx.c
index 002863e2cb3..1a57da7d226 100644
--- a/polly/lib/External/isl/isl_ctx.c
+++ b/polly/lib/External/isl/isl_ctx.c
@@ -85,13 +85,27 @@ void *isl_realloc_or_die(isl_ctx *ctx, void *ptr, size_t size)
return ctx ? check_non_null(ctx, realloc(ptr, size), size) : NULL;
}
+/* Keep track of all information about the current error ("error", "msg",
+ * "file", "line") in "ctx".
+ */
+void isl_ctx_set_full_error(isl_ctx *ctx, enum isl_error error, const char *msg,
+ const char *file, int line)
+{
+ if (!ctx)
+ return;
+ ctx->error = error;
+ ctx->error_msg = msg;
+ ctx->error_file = file;
+ ctx->error_line = line;
+}
+
void isl_handle_error(isl_ctx *ctx, enum isl_error error, const char *msg,
const char *file, int line)
{
if (!ctx)
return;
- isl_ctx_set_error(ctx, error);
+ isl_ctx_set_full_error(ctx, error, msg, file, line);
switch (ctx->opt->on_error) {
case ISL_ON_ERROR_WARN:
@@ -202,7 +216,7 @@ isl_ctx *isl_ctx_alloc_with_options(struct isl_args *args, void *user_opt)
ctx->n_cached = 0;
ctx->n_miss = 0;
- ctx->error = isl_error_none;
+ isl_ctx_reset_error(ctx);
ctx->operations = 0;
isl_ctx_set_max_operations(ctx, ctx->opt->max_operations);
@@ -278,18 +292,43 @@ struct isl_options *isl_ctx_options(isl_ctx *ctx)
enum isl_error isl_ctx_last_error(isl_ctx *ctx)
{
- return ctx->error;
+ return ctx ? ctx->error : isl_error_invalid;
+}
+
+/* Return the error message of the last error in "ctx".
+ */
+const char *isl_ctx_last_error_msg(isl_ctx *ctx)
+{
+ return ctx ? ctx->error_msg : NULL;
+}
+
+/* Return the file name where the last error in "ctx" occurred.
+ */
+const char *isl_ctx_last_error_file(isl_ctx *ctx)
+{
+ return ctx ? ctx->error_file : NULL;
+}
+
+/* Return the line number where the last error in "ctx" occurred.
+ */
+int isl_ctx_last_error_line(isl_ctx *ctx)
+{
+ return ctx ? ctx->error_line : -1;
}
void isl_ctx_reset_error(isl_ctx *ctx)
{
+ if (!ctx)
+ return;
ctx->error = isl_error_none;
+ ctx->error_msg = NULL;
+ ctx->error_file = NULL;
+ ctx->error_line = -1;
}
void isl_ctx_set_error(isl_ctx *ctx, enum isl_error error)
{
- if (ctx)
- ctx->error = error;
+ isl_ctx_set_full_error(ctx, error, NULL, NULL, -1);
}
void isl_ctx_abort(isl_ctx *ctx)
OpenPOWER on IntegriCloud