Test correctness of generated code, without requiring textual equality
commitb5fe05522dd338fa6db87b401b63c4fb33f7ffbd
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 2 Sep 2008 13:25:22 +0000 (2 15:25 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 23 Sep 2008 13:07:52 +0000 (23 15:07 +0200)
tree942f0230512a17d54436d168c6972c20100f6cd2
parentca9bb1de489af9a0c11fda465015edaee5a07445
Test correctness of generated code, without requiring textual equality

The exact output of CLooG is not necessarily stable, in that
the order conditional tests are generated is not fixed.
Different versions of the PolyLib and a fortiori different backends
may result in non-identical, but equivalent code.
Furthermore, different backends or different versions of CLooG
may apply different code optimizations.
We therefore want to check whether the generated code is correct,
without relying on textual equality or manual inspection.

We do this by compiling and running code that executes both
a "known good" and a test version of the output for some values
of the parameters and checks whether both versions perform
the same operations for the same original loop iterations in the
same order.  This check itself is performed by having both
versions compute a hash value based on the iterators and
the statement numbers.

The original, textual comparison is kept, since we also
want to check whether we still perform the same optimizations
on the code.  However, these tests can be slightly different
for different backends, while the "correctness" check should
be shared among all backends.
101 files changed:
Makefile.am
test/1point-1.good.c [new file with mode: 0644]
test/1point-2.good.c [new file with mode: 0644]
test/4-param.good.c [new file with mode: 0644]
test/Makefile.am
test/basic-bounds-1.good.c [new file with mode: 0644]
test/basic-bounds-2.good.c [new file with mode: 0644]
test/basic-bounds-3.good.c [new file with mode: 0644]
test/basic-bounds-4.good.c [new file with mode: 0644]
test/basic-bounds-5.good.c [new file with mode: 0644]
test/basic-bounds-6.good.c [new file with mode: 0644]
test/byu98-1-2-3.good.c [new file with mode: 0644]
test/cholesky.good.c [new file with mode: 0644]
test/cholesky2.good.c [new file with mode: 0644]
test/classen.good.c [new file with mode: 0644]
test/darte.good.c [new file with mode: 0644]
test/donotsimp.good.c [new file with mode: 0644]
test/dot.good.c [new file with mode: 0644]
test/dot2.good.c [new file with mode: 0644]
test/double.good.c [new file with mode: 0644]
test/durbin_e_s.good.c [new file with mode: 0644]
test/emploi.good.c [new file with mode: 0644]
test/equality.good.c [new file with mode: 0644]
test/equality2.good.c [new file with mode: 0644]
test/esced.good.c [new file with mode: 0644]
test/ex1.good.c [new file with mode: 0644]
test/forwardsub-1-1-2.good.c [new file with mode: 0644]
test/forwardsub-2-1-2-3.good.c [new file with mode: 0644]
test/forwardsub-3-1-2.good.c [new file with mode: 0644]
test/gauss.good.c [new file with mode: 0644]
test/generate_test.c [new file with mode: 0644]
test/gesced.good.c [new file with mode: 0644]
test/gesced2.good.c [new file with mode: 0644]
test/gesced3.good.c [new file with mode: 0644]
test/guide.good.c [new file with mode: 0644]
test/iftest.good.c [new file with mode: 0644]
test/iftest2.good.c [new file with mode: 0644]
test/largeur.good.c [new file with mode: 0644]
test/levenshtein-1-2-3.good.c [new file with mode: 0644]
test/lineality-1-2.good.c [new file with mode: 0644]
test/lineality-2-1-2.good.c [new file with mode: 0644]
test/logo.good.c [new file with mode: 0644]
test/logopar.good.c [new file with mode: 0644]
test/lu.good.c [new file with mode: 0644]
test/lu2.good.c [new file with mode: 0644]
test/lub.good.c [new file with mode: 0644]
test/lux.good.c [new file with mode: 0644]
test/merge.good.c [new file with mode: 0644]
test/min-1-1.good.c [new file with mode: 0644]
test/min-2-1.good.c [new file with mode: 0644]
test/min-3-1.good.c [new file with mode: 0644]
test/min-4-1.good.c [new file with mode: 0644]
test/mode.good.c [new file with mode: 0644]
test/multi-mm-1.good.c [new file with mode: 0644]
test/no_lindep.good.c [new file with mode: 0644]
test/non_optimal/nul_complex1.good.c [new file with mode: 0644]
test/non_optimal/usvd_e_t.good.c [new file with mode: 0644]
test/non_optimal/youcef.good.c [new file with mode: 0644]
test/orc.good.c [new file with mode: 0644]
test/rectangle.good.c [new file with mode: 0644]
test/reservoir/QR.good.c [new file with mode: 0644]
test/reservoir/cholesky2.good.c [new file with mode: 0644]
test/reservoir/fusion1.good.c [new file with mode: 0644]
test/reservoir/fusion2.good.c [new file with mode: 0644]
test/reservoir/jacobi2.good.c [new file with mode: 0644]
test/reservoir/jacobi3.good.c [new file with mode: 0644]
test/reservoir/lim-lam1.good.c [new file with mode: 0644]
test/reservoir/lim-lam2.good.c [new file with mode: 0644]
test/reservoir/lim-lam3.good.c [new file with mode: 0644]
test/reservoir/lim-lam4.good.c [new file with mode: 0644]
test/reservoir/lim-lam5.good.c [new file with mode: 0644]
test/reservoir/lim-lam6.good.c [new file with mode: 0644]
test/reservoir/liu-zhuge1.good.c [new file with mode: 0644]
test/reservoir/loechner3.good.c [new file with mode: 0644]
test/reservoir/loechner4.good.c [new file with mode: 0644]
test/reservoir/loechner5.good.c [new file with mode: 0644]
test/reservoir/mg-interp.good.c [new file with mode: 0644]
test/reservoir/mg-interp2.good.c [new file with mode: 0644]
test/reservoir/mg-psinv.good.c [new file with mode: 0644]
test/reservoir/mg-resid.good.c [new file with mode: 0644]
test/reservoir/mg-rprj3.good.c [new file with mode: 0644]
test/reservoir/pingali1.good.c [new file with mode: 0644]
test/reservoir/pingali2.good.c [new file with mode: 0644]
test/reservoir/pingali3.good.c [new file with mode: 0644]
test/reservoir/pingali4.good.c [new file with mode: 0644]
test/reservoir/pingali5.good.c [new file with mode: 0644]
test/reservoir/pingali6.good.c [new file with mode: 0644]
test/reservoir/tang-xue1.good.c [new file with mode: 0644]
test/reservoir/two.good.c [new file with mode: 0644]
test/square+triangle-1-1-2-3.good.c [new file with mode: 0644]
test/swim.good.c [new file with mode: 0644]
test/test.good.c [new file with mode: 0644]
test/thomasset.good.c [new file with mode: 0644]
test/tiling.good.c [new file with mode: 0644]
test/uday_scalars.good.c [new file with mode: 0644]
test/vasilache.good.c [new file with mode: 0644]
test/vivien.good.c [new file with mode: 0644]
test/vivien2.good.c [new file with mode: 0644]
test/wavefront.good.c [new file with mode: 0644]
test/yosr.good.c [new file with mode: 0644]
test/yosr2.good.c [new file with mode: 0644]