summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-02 21:27:57 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-02 21:27:57 +0000
commitd93d495ba54e9746659d91d69119157f038a815f (patch)
treebfc67c88ff54c4880beb663c32eedf5f95f15123 /gcc/tree-ssa-loop.c
parente827aa43033edbfc6bac3fa2ff04421737b78421 (diff)
downloadgcc-d93d495ba54e9746659d91d69119157f038a815f.tar.gz
2008-09-02 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r139912 after graphite merge into trunk graphite uses PPL & CLOOG... git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@139915 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop.c')
-rw-r--r--gcc/tree-ssa-loop.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index ec3782a5450..51fc07c558a 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -287,6 +287,49 @@ struct gimple_opt_pass pass_linear_transform =
}
};
+/* GRAPHITE optimizations. */
+
+static unsigned int
+graphite_transforms (void)
+{
+ if (!current_loops)
+ return 0;
+
+ graphite_transform_loops ();
+
+ return 0;
+}
+
+static bool
+gate_graphite_transforms (void)
+{
+ /* Enable -fgraphite pass if any one of the graphite optimization flags
+ is turned on. */
+ if (flag_loop_block || flag_loop_interchange || flag_loop_strip_mine)
+ flag_graphite = 1;
+
+ return flag_graphite != 0;
+}
+
+struct gimple_opt_pass pass_graphite_transforms =
+{
+ {
+ GIMPLE_PASS,
+ "graphite", /* name */
+ gate_graphite_transforms, /* gate */
+ graphite_transforms, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_GRAPHITE_TRANSFORMS, /* tv_id */
+ PROP_cfg | PROP_ssa, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_verify_loops /* todo_flags_finish */
+ }
+};
+
/* Check the correctness of the data dependence analyzers. */
static unsigned int