[graphite] Backend fixes

Tobias Grosser grosser@fim.uni-passau.de
Mon Aug 25 11:25:00 GMT 2008


Hi,

Jan committed on Saturday some large parts for the code generation. Here
the next fixes to hit some more bugs.


Always generate graphite code.
==============================

 * graphite.c (graphite_transform_loops): Always call gloog and
 find_transform.

At the moment we call the GRAPHITE code generation only, if we applied a
transformation like "-floop-block". GRAPHITE does not change the CFG,
if we call gcc only with "-fgraphite",

I propose to always generate code, if "-fgraphite" is enables. This has
some advantages.

 - Better code coverage -> More testing of the backend
 - We can check the performance for a NULL transformation
   GIMPLE -> GRAPHITE -> GIMPLE
 - If cloog optimizations are not disabled, the cloog output is
   always optimized in control flow.

   for (i = 0; i < 100; i ++)
 	if (i < 30 && i > 60)
 		A
   becomes
   for (i = 0; i < 30; i++)
 	A
   for (i = 61; i < 100; i++)
 	A

Patch: graphite-Always_generate_graphite_code_2008-08-25.patch


Disable cloog optimizations
===========================

 * graphite.c (set_cloog_options): Disable optimizations.

Cloog optimizes the output in control flow.

Example:

          for (i = 0; i < 100; i ++)
                if (i < 30 && i > 60)
                        A
          becomes:

          for (i = 0; i < 30; i++)
                A
          for (i = 61; i < 100; i++)
                A

This breaks the current code generation, as some bbs may appear twice
or more often in the clast output.

Wait until codegen is updated.

Patch: graphite-Disable_cloog_optimizations_2008-08-25.patch


Fix SEGFAULT in remove_cond_exprs
=================================

 graphite.c (remove_cond_exprs): Do not fail on empty bbs.

Patch: graphite-Fix_SEGFAULT_in_remove_cond_exprs_2008-08-25.patch


Update dominator info
=====================

 * graphite.c (gloog): Update dominator info.

Patch: graphite-Update_dominator_info_2008-08-25.patch


Together with my latest cloog-ppl patch graphite can generate code for
the first SCoPs. That means we pass about half of the Polyhedron.

See you
Tobi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graphite-Always_generate_graphite_code_2008-08-25.patch
Type: text/x-patch
Size: 1965 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080825/990ed8e6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graphite-Disable_cloog_optimizations_2008-08-25.patch
Type: text/x-patch
Size: 1309 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080825/990ed8e6/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graphite-Fix_SEGFAULT_in_remove_cond_exprs_2008-08-25.patch
Type: text/x-patch
Size: 642 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080825/990ed8e6/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graphite-Update_dominator_info_2008-08-25.patch
Type: text/x-patch
Size: 1236 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080825/990ed8e6/attachment-0003.bin>


More information about the Gcc-patches mailing list