6 static void check(isl_ctx
*ctx
, const char *base
, const char *options
,
7 int nodes
, int deps
, int regs
)
10 PDG
*pdg
= get_pn(ctx
, base
, options
);
12 assert(pdg
->nodes
.size() == nodes
);
13 assert(pdg
->dependences
.size() == deps
);
15 for (int i
= 0; i
< pdg
->dependences
.size(); ++i
) {
16 pdg::dependence
*dep
= pdg
->dependences
[i
];
17 assert(!dep
->reordering
);
18 assert(!dep
->multiplicity
);
19 if (dep
->value_size
&& dep
->value_size
->v
== 1)
22 assert(registers
== regs
);
28 int main(int argc
, char *argv
[])
30 isl_ctx
*ctx
= isl_ctx_alloc();
31 check(ctx
, "testblocking", NULL
, 3, 3, 3);
32 check(ctx
, "testblocking", "--move", 3, 3, 2);
33 check(ctx
, "testblocking2", NULL
, 4, 5, 5);
34 check(ctx
, "testblocking2", "--move", 4, 5, 5);