From e44f8df182d163d9f394b41642498c47dd026bcb Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 15 May 2012 09:58:35 +0200 Subject: [PATCH] store ppcg_options in ppcg_scop This give us access to the options as soon as we have access to a ppcg_scop, avoid the need to pass both around. Signed-off-by: Sven Verdoolaege --- ppcg.c | 1 + ppcg.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/ppcg.c b/ppcg.c index d6e3e02..1851960 100644 --- a/ppcg.c +++ b/ppcg.c @@ -386,6 +386,7 @@ static struct ppcg_scop *ppcg_scop_from_pet_scop(struct pet_scop *scop, if (!ps) return NULL; + ps->options = options; ps->start = scop->start; ps->end = scop->end; ps->context = isl_set_copy(scop->context); diff --git a/ppcg.h b/ppcg.h index 8c98da7..ec4f7d1 100644 --- a/ppcg.h +++ b/ppcg.h @@ -12,6 +12,9 @@ int ppcg_extract_base_name(char *name, const char *input); /* Representation of the scop for use inside PPCG. * + * "options" are the options specified by the user. + * Some fields in this structure may depend on some of the options. + * * "start" and "end" are file offsets of the corresponding program text. * "context" represents constraints on the parameters. * "domain" is the union of all iteration domains. @@ -29,6 +32,8 @@ int ppcg_extract_base_name(char *name, const char *input); * of the original pet_scop. */ struct ppcg_scop { + struct ppcg_options *options; + unsigned start; unsigned end; -- 2.11.4.GIT