Makefile.in: Remove the compilation of graphite-clast-to-gimple.o.

[gcc/]

	* Makefile.in: Remove the compilation of graphite-clast-to-gimple.o.
	* common.opt: Remove using of fgraphite-code-generator flag.
	* flag-types.h: Likewise.
	* graphite.c: Remove using of CLooG.
	* graphite-blocking.c: Likewise.
	* graphite-dependences.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-poly.h: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* graphite-clast-to-gimple.c: Removed.
	* graphite-clast-to-gimple.h: Likewise.
	* graphite-htab.h: Likewise.

[gcc/testsuite]

	* gcc.dg/graphite/isl-ast-gen-blocks-1.c: Remove using of
	fgraphite-code-generator flag.
	* gcc.dg/graphite/isl-ast-gen-blocks-2.c: Likewise.
	* gcc.dg/graphite/isl-ast-gen-blocks-3.c: Likewise.
	* gcc.dg/graphite/isl-ast-gen-blocks-4.c: Likewise.
	* gcc.dg/graphite/isl-ast-gen-user-1.c: Likewise.
	* gcc.dg/graphite/isl-codegen-loop-dumping.c: Likewise.
	* gcc.dg/graphite/pr35356-2.c: Likewise.
	* gcc.dg/graphite/isl-ast-gen-single-loop-1.c: Likewise.
	* gcc.dg/graphite/isl-ast-gen-single-loop-2.c: Likewise.
	* gcc.dg/graphite/isl-ast-gen-single-loop-3.c: Likewise.
	* gcc.dg/graphite/isl-ast-gen-if-1.c: Likewise.
	* gcc.dg/graphite/isl-ast-gen-if-2.c: Likewise.

From-SVN: r217315
This commit is contained in:
Roman Gareev 2014-11-10 20:32:31 +00:00 committed by Roman Gareev
parent 642fe4a92d
commit b12749230b
27 changed files with 44 additions and 2085 deletions

View File

@ -1,3 +1,19 @@
2014-11-10 Roman Gareev <gareevroman@gmail.com>
* Makefile.in: Remove the compilation of graphite-clast-to-gimple.o.
* common.opt: Remove using of fgraphite-code-generator flag.
* flag-types.h: Likewise.
* graphite.c: Remove using of CLooG.
* graphite-blocking.c: Likewise.
* graphite-dependences.c: Likewise.
* graphite-poly.c: Likewise.
* graphite-poly.h: Likewise.
* graphite-scop-detection.c: Likewise.
* graphite-sese-to-poly.c: Likewise.
* graphite-clast-to-gimple.c: Removed.
* graphite-clast-to-gimple.h: Likewise.
* graphite-htab.h: Likewise.
2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
* doc/invoke.texi ([-Wshift-count-negative, -Wshift-count-overflow]):

View File

@ -1244,7 +1244,6 @@ OBJS = \
graphds.o \
graphite.o \
graphite-blocking.o \
graphite-clast-to-gimple.o \
graphite-isl-ast-to-gimple.o \
graphite-dependences.o \
graphite-interchange.o \

View File

@ -1293,19 +1293,6 @@ Enable in and out of Graphite representation
fgraphite-identity
Common Report Var(flag_graphite_identity) Optimization
Enable Graphite Identity transformation
fgraphite-code-generator=
Common Report RejectNegative Joined Optimization Enum(fgraphite_generator) Var(flag_graphite_code_gen) Init(FGRAPHITE_CODE_GEN_ISL)
Choose code generator of Graphite
Enum
Name(fgraphite_generator) Type(enum fgraphite_generator) UnknownError(unknown code generator of graphite %qs)
EnumValue
Enum(fgraphite_generator) String(isl) Value(FGRAPHITE_CODE_GEN_ISL)
EnumValue
Enum(fgraphite_generator) String(cloog) Value(FGRAPHITE_CODE_GEN_CLOOG)
fhoist-adjacent-loads
Common Report Var(flag_hoist_adjacent_loads) Optimization

View File

@ -263,10 +263,4 @@ enum lto_partition_model {
LTO_PARTITION_MAX = 4
};
/* The code generator used by graphite */
enum fgraphite_generator {
FGRAPHITE_CODE_GEN_ISL = 0,
FGRAPHITE_CODE_GEN_CLOOG = 1
};
#endif /* ! GCC_FLAG_TYPES_H */

View File

@ -28,10 +28,6 @@ along with GCC; see the file COPYING3. If not see
#include <isl/map.h>
#include <isl/union_map.h>
#include <isl/constraint.h>
#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
#endif
#include "system.h"

File diff suppressed because it is too large Load Diff

View File

@ -1,39 +0,0 @@
/* Translation of CLAST (CLooG AST) to Gimple.
Copyright (C) 2009-2014 Free Software Foundation, Inc.
Contributed by Sebastian Pop <sebastian.pop@amd.com>.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef GCC_GRAPHITE_CLAST_TO_GIMPLE_H
#define GCC_GRAPHITE_CLAST_TO_GIMPLE_H
#include "graphite-htab.h"
extern CloogState *cloog_state;
/* Data structure for CLooG program representation. */
struct cloog_prog_clast {
CloogProgram *prog;
struct clast_stmt *stmt;
};
extern bool graphite_regenerate_ast_cloog (scop_p, bb_pbb_htab_type *);
extern void debug_clast_stmt (struct clast_stmt *);
extern void print_clast_stmt (FILE *, struct clast_stmt *);
#endif

View File

@ -27,10 +27,6 @@ along with GCC; see the file COPYING3. If not see
#include <isl/union_map.h>
#include <isl/flow.h>
#include <isl/constraint.h>
#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
#endif
#include "system.h"
@ -64,7 +60,6 @@ along with GCC; see the file COPYING3. If not see
#ifdef HAVE_isl
#include "graphite-poly.h"
#include "graphite-htab.h"
isl_union_map *
scop_get_dependences (scop_p scop)
@ -643,61 +638,4 @@ graphite_legal_transform (scop_p scop)
return res;
}
#ifdef HAVE_cloog
/* Return true when the loop at DEPTH carries dependences. BODY is
the body of the loop. */
static bool
loop_level_carries_dependences (scop_p scop, vec<poly_bb_p> body,
int depth)
{
isl_union_map *transform = scop_get_transformed_schedule (scop, body);
isl_union_map *must_raw, *may_raw;
isl_union_map *must_war, *may_war;
isl_union_map *must_waw, *may_waw;
int res;
compute_deps (scop, body,
&must_raw, &may_raw, NULL, NULL,
&must_war, &may_war, NULL, NULL,
&must_waw, &may_waw, NULL, NULL);
res = (carries_deps (transform, must_raw, depth)
|| carries_deps (transform, may_raw, depth)
|| carries_deps (transform, must_war, depth)
|| carries_deps (transform, may_war, depth)
|| carries_deps (transform, must_waw, depth)
|| carries_deps (transform, may_waw, depth));
isl_union_map_free (transform);
isl_union_map_free (must_raw);
isl_union_map_free (may_raw);
isl_union_map_free (must_war);
isl_union_map_free (may_war);
isl_union_map_free (must_waw);
isl_union_map_free (may_waw);
return res;
}
/* Returns true when the loop L at level DEPTH is parallel.
BB_PBB_MAPPING is a map between a basic_block and its related
poly_bb_p. */
bool
loop_is_parallel_p (loop_p loop, bb_pbb_htab_type *bb_pbb_mapping, int depth)
{
bool dependences;
scop_p scop;
timevar_push (TV_GRAPHITE_DATA_DEPS);
auto_vec<poly_bb_p, 3> body;
scop = get_loop_body_pbbs (loop, bb_pbb_mapping, &body);
dependences = loop_level_carries_dependences (scop, body, depth);
timevar_pop (TV_GRAPHITE_DATA_DEPS);
return !dependences;
}
#endif
#endif

View File

@ -1,56 +0,0 @@
/* Translation of CLAST (CLooG AST) to Gimple.
Copyright (C) 2012-2014 Free Software Foundation, Inc.
Contributed by Sebastian Pop <sebastian.pop@amd.com>.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef GCC_GRAPHITE_HTAB_H
#define GCC_GRAPHITE_HTAB_H
#include "hash-map.h"
/* Hashtable helpers. */
struct bb_pbb_hasher : default_hashmap_traits
{
static inline hashval_t hash (const basic_block);
static inline bool equal_keys (const basic_block, const basic_block);
};
/* Hash function. */
inline hashval_t
bb_pbb_hasher::hash (const basic_block bb)
{
return (hashval_t)(bb->index);
}
/* Compare data base element PB1 and PB2. */
inline bool
bb_pbb_hasher::equal_keys (const basic_block a, const basic_block b)
{
return (a->index == b->index);
}
typedef hash_map<basic_block, poly_bb_p, bb_pbb_hasher> bb_pbb_htab_type;
poly_bb_p find_pbb_via_hash (bb_pbb_htab_type *, basic_block);
bool loop_is_parallel_p (loop_p, bb_pbb_htab_type *, int);
scop_p get_loop_body_pbbs (loop_p, bb_pbb_htab_type *, vec<poly_bb_p> *);
#endif

View File

@ -36,10 +36,6 @@ extern "C" {
#if defined(__cplusplus)
}
#endif
#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
#endif
#include "system.h"
@ -858,79 +854,6 @@ print_scop (FILE *file, scop_p scop, int verbosity)
fprintf (file, "#)\n");
}
/* Print to FILE the input file that CLooG would expect as input, at
some VERBOSITY level. */
void
print_cloog (FILE *file, scop_p scop, int verbosity)
{
int i;
poly_bb_p pbb;
fprintf (file, "# SCoP (generated by GCC/Graphite\n");
if (verbosity > 0)
fprintf (file, "# CLooG output language\n");
fprintf (file, "c\n");
print_scop_context (file, scop, verbosity);
print_scop_params (file, scop, verbosity);
if (verbosity > 0)
fprintf (file, "# Number of statements\n");
fprintf (file, "%d\n", SCOP_BBS (scop).length ());
FOR_EACH_VEC_ELT (SCOP_BBS (scop), i, pbb)
{
if (verbosity > 1)
fprintf (file, "# pbb_%d (\n", pbb_index (pbb));
print_pbb_domain (file, pbb, verbosity);
fprintf (file, "0 0 0");
if (verbosity > 0)
fprintf (file, "# For future CLooG options.\n");
else
fprintf (file, "\n");
if (verbosity > 1)
fprintf (file, "#)\n");
}
fprintf (file, "0");
if (verbosity > 0)
fprintf (file, "# Don't set the iterator names.\n");
else
fprintf (file, "\n");
if (verbosity > 0)
fprintf (file, "# Number of scattering functions\n");
fprintf (file, "%d\n", SCOP_BBS (scop).length ());
FOR_EACH_VEC_ELT (SCOP_BBS (scop), i, pbb)
{
if (!(pbb->transformed || pbb->schedule))
continue;
if (verbosity > 1)
fprintf (file, "# pbb_%d (\n", pbb_index (pbb));
print_scattering_function_1 (file, pbb, verbosity);
if (verbosity > 1)
fprintf (file, "#)\n");
}
fprintf (file, "0");
if (verbosity > 0)
fprintf (file, "# Don't set the scattering dimension names.\n");
else
fprintf (file, "\n");
fprintf (file, "#)\n");
}
/* Print to STDERR the domain of PBB, at some VERBOSITY level. */
DEBUG_FUNCTION void
@ -964,15 +887,6 @@ debug_scop (scop_p scop, int verbosity)
print_scop (stderr, scop, verbosity);
}
/* Print to STDERR the SCOP under CLooG format, at some VERBOSITY
level. */
DEBUG_FUNCTION void
debug_cloog (scop_p scop, int verbosity)
{
print_cloog (stderr, scop, verbosity);
}
/* Print to STDERR the parameters of SCOP, at some VERBOSITY
level. */
@ -1255,24 +1169,6 @@ dot_lst (lst_p lst)
#endif
}
/* Computes a checksum for the code generated by CLooG for SCOP. */
DEBUG_FUNCTION void
cloog_checksum (scop_p scop ATTRIBUTE_UNUSED)
{
/* When debugging, enable the following code. This cannot be used
in production compilers because it calls "system". */
#if 0
FILE *stream = fopen ("/tmp/scop.cloog", "w");
gcc_assert (stream);
print_cloog (stream, scop, 0);
fclose (stream);
fputs ("\n", stdout);
system ("cloog -compilable 1 /tmp/scop.cloog > /tmp/scop.c ; gcc -O0 -g /tmp/scop.c -lm -o /tmp/scop; /tmp/scop | md5sum ");
#endif
}
/* Reverse the loop around PBB at level DEPTH. */
isl_map *

View File

@ -377,14 +377,12 @@ extern void print_pbb_domain (FILE *, poly_bb_p, int);
extern void print_pbb (FILE *, poly_bb_p, int);
extern void print_scop_context (FILE *, scop_p, int);
extern void print_scop (FILE *, scop_p, int);
extern void print_cloog (FILE *, scop_p, int);
extern void debug_pbb_domain (poly_bb_p, int);
extern void debug_pbb (poly_bb_p, int);
extern void print_pdrs (FILE *, poly_bb_p, int);
extern void debug_pdrs (poly_bb_p, int);
extern void debug_scop_context (scop_p, int);
extern void debug_scop (scop_p, int);
extern void debug_cloog (scop_p, int);
extern void print_scop_params (FILE *, scop_p, int);
extern void debug_scop_params (scop_p, int);
extern void print_iteration_domain (FILE *, poly_bb_p, int);
@ -1402,7 +1400,6 @@ extern int scop_max_loop_depth (scop_p);
extern int unify_scattering_dimensions (scop_p);
extern bool apply_poly_transforms (scop_p);
extern bool graphite_legal_transform (scop_p);
extern void cloog_checksum (scop_p);
/* Set the region of SCOP to REGION. */

View File

@ -25,10 +25,6 @@ along with GCC; see the file COPYING3. If not see
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
#endif
#include "system.h"

View File

@ -38,11 +38,6 @@ extern "C" {
#if defined(__cplusplus)
}
#endif
#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#endif
#endif
#include "system.h"

View File

@ -39,11 +39,6 @@ along with GCC; see the file COPYING3. If not see
#include <isl/map.h>
#include <isl/options.h>
#include <isl/union_map.h>
#ifdef HAVE_cloog
#include <cloog/cloog.h>
#include <cloog/isl/domain.h>
#include <cloog/isl/cloog.h>
#endif
#endif
#include "system.h"
@ -87,13 +82,6 @@ along with GCC; see the file COPYING3. If not see
#include "graphite-scop-detection.h"
#include "graphite-isl-ast-to-gimple.h"
#include "graphite-sese-to-poly.h"
#include "graphite-htab.h"
#ifdef HAVE_cloog
#include "graphite-clast-to-gimple.h"
CloogState *cloog_state;
#endif
/* Print global statistics to FILE. */
@ -244,10 +232,6 @@ graphite_initialize (isl_ctx *ctx)
recompute_all_dominators ();
initialize_original_copy_tables ();
#ifdef HAVE_cloog
cloog_state = cloog_isl_state_malloc (ctx);
#endif
if (dump_file && dump_flags)
dump_function_to_file (current_function_decl, dump_file, dump_flags);
@ -269,9 +253,6 @@ graphite_finalize (bool need_cfg_cleanup_p)
tree_estimate_probability ();
}
#ifdef HAVE_cloog
cloog_state_free (cloog_state);
#endif
free_original_copy_tables ();
if (dump_file && dump_flags)
@ -311,37 +292,16 @@ graphite_transform_loops (void)
print_global_statistics (dump_file);
}
bb_pbb_htab_type bb_pbb_mapping (10);
#ifndef HAVE_cloog
if(flag_graphite_code_gen == FGRAPHITE_CODE_GEN_CLOOG)
{
flag_graphite_code_gen = FGRAPHITE_CODE_GEN_ISL;
printf ("The CLooG code generator cannot be used (CLooG is not "
"available). The ISL code generator was chosen.\n");
}
#endif
FOR_EACH_VEC_ELT (scops, i, scop)
if (dbg_cnt (graphite_scop))
{
scop->ctx = ctx;
build_poly_scop (scop);
#ifdef HAVE_cloog
if (POLY_SCOP_P (scop)
&& apply_poly_transforms (scop)
&& (((flag_graphite_code_gen == FGRAPHITE_CODE_GEN_ISL)
&& graphite_regenerate_ast_isl (scop))
|| ((flag_graphite_code_gen == FGRAPHITE_CODE_GEN_CLOOG)
&& graphite_regenerate_ast_cloog (scop, &bb_pbb_mapping))))
need_cfg_cleanup_p = true;
#else
if (POLY_SCOP_P (scop)
&& apply_poly_transforms (scop)
&& graphite_regenerate_ast_isl (scop))
need_cfg_cleanup_p = true;
#endif
}

View File

@ -1,3 +1,19 @@
2014-11-10 Roman Gareev <gareevroman@gmail.com>
* gcc.dg/graphite/isl-ast-gen-blocks-1.c: Remove using of
fgraphite-code-generator flag.
* gcc.dg/graphite/isl-ast-gen-blocks-2.c: Likewise.
* gcc.dg/graphite/isl-ast-gen-blocks-3.c: Likewise.
* gcc.dg/graphite/isl-ast-gen-blocks-4.c: Likewise.
* gcc.dg/graphite/isl-ast-gen-user-1.c: Likewise.
* gcc.dg/graphite/isl-codegen-loop-dumping.c: Likewise.
* gcc.dg/graphite/pr35356-2.c: Likewise.
* gcc.dg/graphite/isl-ast-gen-single-loop-1.c: Likewise.
* gcc.dg/graphite/isl-ast-gen-single-loop-2.c: Likewise.
* gcc.dg/graphite/isl-ast-gen-single-loop-3.c: Likewise.
* gcc.dg/graphite/isl-ast-gen-if-1.c: Likewise.
* gcc.dg/graphite/isl-ast-gen-if-2.c: Likewise.
2014-11-10 H.J. Lu <hongjiu.lu@intel.com>
* gcc.c-torture/compile/pr35468.c: Revert the last change.

View File

@ -1,5 +1,5 @@
/* { dg-do run } */
/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
/* { dg-options "-O2 -fgraphite-identity" } */
int n = 50;
static int __attribute__((noinline))

View File

@ -1,5 +1,5 @@
/* { dg-do run } */
/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
/* { dg-options "-O2 -fgraphite-identity" } */
int k = 50;
static int __attribute__((noinline))

View File

@ -1,5 +1,5 @@
/* { dg-do run } */
/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
/* { dg-options "-O2 -fgraphite-identity" } */
/* We use a global variable 'k' to avoid ipa-cp. */
int k = 50;

View File

@ -1,5 +1,5 @@
/* { dg-do run } */
/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
/* { dg-options "-O2 -fgraphite-identity" } */
static int __attribute__((noinline))
foo (int k, int n1, int n2, int n3)

View File

@ -1,5 +1,5 @@
/* { dg-do run } */
/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
/* { dg-options "-O2 -fgraphite-identity" } */
int st = 1;
static void __attribute__((noinline))

View File

@ -1,5 +1,5 @@
/* { dg-do run } */
/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
/* { dg-options "-O2 -fgraphite-identity" } */
/* This test case tests reduction, where the pbbs are duplicated. */

View File

@ -1,5 +1,5 @@
/* { dg-do run } */
/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
/* { dg-options "-O2 -fgraphite-identity" } */
int
foo ()

View File

@ -1,5 +1,5 @@
/* { dg-do run } */
/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
/* { dg-options "-O2 -fgraphite-identity" } */
int n = 50;
void

View File

@ -1,5 +1,5 @@
/* { dg-do run } */
/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
/* { dg-options "-O2 -fgraphite-identity" } */
int n = 50;
void

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
/* { dg-options "-O2 -fgraphite-identity" } */
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,4 +1,4 @@
/* { dg-options "-O2 -fdump-tree-graphite-all -fgraphite-identity -fgraphite-code-generator=isl" } */
/* { dg-options "-O2 -fdump-tree-graphite-all" } */
int
main (int n, int *a)

View File

@ -1,4 +1,4 @@
/* { dg-options "-O2 -fgraphite-identity -fdump-tree-graphite-all -fgraphite-code-generator=isl" } */
/* { dg-options "-O2 -fgraphite-identity -fdump-tree-graphite-all" } */
int a[100];