Commit bd32f344 by Sebastian Pop Committed by Sebastian Pop

Compute min and max bounds for IVs and infer types.

2010-04-04  Sebastian Pop  <sebastian.pop@amd.com>

	PR middle-end/43519
	* Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
	* graphite-clast-to-gimple.c: Include langhooks.h.
	(max_signed_precision_type): New.
	(max_precision_type): Takes two types as arguments.
	(precision_for_value): New.
	(precision_for_interval): New.
	(gcc_type_for_interval): New.
	(gcc_type_for_value): New.
	(gcc_type_for_clast_term): New.
	(gcc_type_for_clast_red): New.
	(gcc_type_for_clast_bin): New.
	(gcc_type_for_clast_expr): Split up into several functions.
	(gcc_type_for_clast_eq): Rewritten.
	(compute_bounds_for_level): New.
	(compute_type_for_level_1): New.
	(compute_type_for_level): New.
	(gcc_type_for_cloog_iv): Removed.
	(gcc_type_for_iv_of_clast_loop): Rewritten.
	(graphite_create_new_loop): Compute the lower and upper bound types
	with gcc_type_for_clast_expr.
	(graphite_create_new_loop_guard): Same.
	(find_cloog_iv_in_expr): Removed.
	(compute_cloog_iv_types_1): Removed.
	(compute_cloog_iv_types): Removed.
	(gloog): Do not call compute_cloog_iv_types.
	* graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
	GBB_CLOOG_IV_TYPES.
	(free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
	* sese.h (struct gimple_bb): Removed field cloog_iv_types.
	(GBB_CLOOG_IV_TYPES): Removed.

	* gcc.dg/graphite/run-id-pr42644.c: Call abort.

From-SVN: r158026
parent 79d03cf8
2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/43519
* Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
* graphite-clast-to-gimple.c: Include langhooks.h.
(max_signed_precision_type): New.
(max_precision_type): Takes two types as arguments.
(precision_for_value): New.
(precision_for_interval): New.
(gcc_type_for_interval): New.
(gcc_type_for_value): New.
(gcc_type_for_clast_term): New.
(gcc_type_for_clast_red): New.
(gcc_type_for_clast_bin): New.
(gcc_type_for_clast_expr): Split up into several functions.
(gcc_type_for_clast_eq): Rewritten.
(compute_bounds_for_level): New.
(compute_type_for_level_1): New.
(compute_type_for_level): New.
(gcc_type_for_cloog_iv): Removed.
(gcc_type_for_iv_of_clast_loop): Rewritten.
(graphite_create_new_loop): Compute the lower and upper bound types
with gcc_type_for_clast_expr.
(graphite_create_new_loop_guard): Same.
(find_cloog_iv_in_expr): Removed.
(compute_cloog_iv_types_1): Removed.
(compute_cloog_iv_types): Removed.
(gloog): Do not call compute_cloog_iv_types.
* graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
GBB_CLOOG_IV_TYPES.
(free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
* sese.h (struct gimple_bb): Removed field cloog_iv_types.
(GBB_CLOOG_IV_TYPES): Removed.
* gcc.dg/graphite/run-id-pr42644.c: Call abort.
2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
Reverted this commit: as at this point the loop closed SSA form
......
......@@ -2577,7 +2577,7 @@ graphite-blocking.o: graphite-blocking.c $(CONFIG_H) $(SYSTEM_H) \
$(GIMPLE_H) $(TREE_DATA_REF_H) tree-pass.h domwalk.h value-prof.h \
graphite.h graphite-poly.h graphite-ppl.h
graphite-clast-to-gimple.o: graphite-clast-to-gimple.c $(CONFIG_H) \
$(SYSTEM_H) coretypes.h $(TM_H) \
$(SYSTEM_H) coretypes.h $(TM_H) langhooks.h \
$(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TOPLEV_H) \
$(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) $(GIMPLE_H) \
$(TREE_DATA_REF_H) tree-pass.h domwalk.h graphite.h \
......
......@@ -280,7 +280,6 @@ new_gimple_bb (basic_block bb, VEC (data_reference_p, heap) *drs)
GBB_DATA_REFS (gbb) = drs;
GBB_CONDITIONS (gbb) = NULL;
GBB_CONDITION_CASES (gbb) = NULL;
GBB_CLOOG_IV_TYPES (gbb) = NULL;
return gbb;
}
......@@ -308,9 +307,6 @@ free_data_refs_aux (VEC (data_reference_p, heap) *datarefs)
static void
free_gimple_bb (struct gimple_bb *gbb)
{
if (GBB_CLOOG_IV_TYPES (gbb))
htab_delete (GBB_CLOOG_IV_TYPES (gbb));
free_data_refs_aux (GBB_DATA_REFS (gbb));
free_data_refs (GBB_DATA_REFS (gbb));
......
......@@ -346,14 +346,12 @@ typedef struct gimple_bb
VEC (gimple, heap) *conditions;
VEC (gimple, heap) *condition_cases;
VEC (data_reference_p, heap) *data_refs;
htab_t cloog_iv_types;
} *gimple_bb_p;
#define GBB_BB(GBB) GBB->bb
#define GBB_DATA_REFS(GBB) GBB->data_refs
#define GBB_CONDITIONS(GBB) GBB->conditions
#define GBB_CONDITION_CASES(GBB) GBB->condition_cases
#define GBB_CLOOG_IV_TYPES(GBB) GBB->cloog_iv_types
/* Return the innermost loop that contains the basic block GBB. */
......
......@@ -18,6 +18,8 @@ void foo(double Ke[2], int i, double ds[], int column)
}
}
extern void abort ();
int
main ()
{
......@@ -28,5 +30,8 @@ main ()
foo(Ke, 0, ds, -1);
return (int) Ke[0] != 124;
if ((int) Ke[0] != 124)
abort ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment