Commit 2c7a7f46 by Sebastian Pop

[multiple changes]

2008-10-15  Jan Sjodin  <jan.sjodin@amd.com>
    	    Harsha Jagasia  <harsha.jagasia@amd.com>

	PR tree-optimization/37485
	* graphite.c (gmp_cst_to_tree): Moved.
	(iv_stack_entry_is_constant): New.
	(iv_stack_entry_is_iv): New.
	(loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
	(loop_iv_stack_insert_constant): New.
	(loop_iv_stack_pop): Use new datatpype.
	(loop_iv_stack_get_iv): Same.
	(loop_iv_stack_get_iv_from_name): Same.
	(loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
	(loop_iv_stack_patch_for_consts): New.
	(loop_iv_stack_remove_constants): New.
	(graphite_create_new_loop): Use loop_iv_stack_push_iv.
	(translate_clast): Call loop_iv_stack_patch_for_consts and
	loop_iv_stack_remove_constants.
	(gloog): Use new datatype.  Redirect construction edge to end
	block to avoid accidental deletion.
	* graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
	iv stack entry.
	(union iv_stack_entry_data): New.  Data in iv stack entry.
	(struct iv_stack_entry): New.  Datatype for iv stack entries.

2008-10-15  Sebastian Pop  <sebastian.pop@amd.com>

	* tree-data-ref.c (stmt_simple_memref_p): Fix memleak.
	* graphite.c (free_scop): Same.
	(build_scops): Same.
	(free_scattering): New.
	(build_cloog_prog): Call free_scattering.
	(patch_phis_for_virtual_defs): Fix memleak.
	(graphite_trans_bb_strip_mine): Same.
	(limit_scops): Same.

From-SVN: r141143
parent 575da9be
2008-10-15 Jan Sjodin <jan.sjodin@amd.com>
Harsha Jagasia <harsha.jagasia@amd.com>
PR tree-optimization/37485
* graphite.c (gmp_cst_to_tree): Moved.
(iv_stack_entry_is_constant): New.
(iv_stack_entry_is_iv): New.
(loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
(loop_iv_stack_insert_constant): New.
(loop_iv_stack_pop): Use new datatpype.
(loop_iv_stack_get_iv): Same.
(loop_iv_stack_get_iv_from_name): Same.
(loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
(loop_iv_stack_patch_for_consts): New.
(loop_iv_stack_remove_constants): New.
(graphite_create_new_loop): Use loop_iv_stack_push_iv.
(translate_clast): Call loop_iv_stack_patch_for_consts and
loop_iv_stack_remove_constants.
(gloog): Use new datatype. Redirect construction edge to end
block to avoid accidental deletion.
* graphite.h (enum iv_stack_entry_kind): New. Tag for data in
iv stack entry.
(union iv_stack_entry_data): New. Data in iv stack entry.
(struct iv_stack_entry): New. Datatype for iv stack entries.
2008-10-15 Sebastian Pop <sebastian.pop@amd.com>
* tree-data-ref.c (stmt_simple_memref_p): Fix memleak.
* graphite.c (free_scop): Same.
(build_scops): Same.
(free_scattering): New.
(build_cloog_prog): Call free_scattering.
(patch_phis_for_virtual_defs): Fix memleak.
(graphite_trans_bb_strip_mine): Same.
(limit_scops): Same.
2008-10-15 Sebastian Pop <sebastian.pop@amd.com>
Harsha Jagasia <harsha.jagasia@amd.com>
......
......@@ -260,7 +260,7 @@ typedef struct name_tree
{
tree t;
const char *name;
struct loop* loop;
struct loop *loop;
} *name_tree;
DEF_VEC_P(name_tree);
......@@ -340,8 +340,34 @@ extern void debug_clast_stmt (struct clast_stmt *);
extern void debug_loop_vec (graphite_bb_p gb);
extern void debug_oldivs (scop_p);
typedef VEC(name_tree, heap) **loop_iv_stack;
extern void loop_iv_stack_debug (loop_iv_stack);
/* Describes the type of an iv stack entry. */
typedef enum {
iv_stack_entry_unknown = 0,
iv_stack_entry_iv,
iv_stack_entry_const
} iv_stack_entry_kind;
/* Data contained in an iv stack entry. */
typedef union iv_stack_entry_data_union
{
name_tree iv;
tree constant;
} iv_stack_entry_data;
/* Datatype for loop iv stack entry. */
typedef struct iv_stack_entry_struct
{
iv_stack_entry_kind kind;
iv_stack_entry_data data;
} iv_stack_entry;
typedef iv_stack_entry *iv_stack_entry_p;
DEF_VEC_P(iv_stack_entry_p);
DEF_VEC_ALLOC_P(iv_stack_entry_p,heap);
typedef VEC(iv_stack_entry_p, heap) **loop_iv_stack;
extern void debug_loop_iv_stack (loop_iv_stack);
/* Return the number of gimple loops contained in SCOP. */
......
2008-10-15 Jan Sjodin <jan.sjodin@amd.com>
Harsha Jagasia <harsha.jagasia@amd.com>
PR tree-optimization/37485
* gcc.dg/graphite/pr37485.c: New.
2008-10-15 Sebastian Pop <sebastian.pop@amd.com>
Harsha Jagasia <harsha.jagasia@amd.com>
......
/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
typedef unsigned char UChar;
typedef int Int32;
typedef unsigned int UInt32;
void fallbackSort ( UInt32* fmap,
UInt32* eclass,
Int32 nblock,
Int32 verb )
{
Int32 ftab[257];
Int32 ftabCopy[256];
Int32 H, i, j, k, l, r, cc, cc1;
Int32 nNotDone;
Int32 nBhtab;
UChar* eclass8 = (UChar*)eclass;
if (verb >= 4)
VPrintf0 ( " bucket sorting ...\n" );
for (i = 0; i < 257; i++) ftab[i] = 0;
for (i = 0; i < nblock; i++) ftab[eclass8[i]]++;
for (i = 0; i < 256; i++) ftabCopy[i] = ftab[i];
for (i = 1; i < 257; i++) ftab[i] += ftab[i-1];
for (i = 0; i < nblock; i++) {
j = eclass8[i] + ftab [i];
}
AssertH ( j < 256, 1005 );
}
/* { dg-final { scan-tree-dump-times "Loop blocked" 1 "graphite" { xfail *-*-* }} } */
......@@ -3311,13 +3311,14 @@ bool
stmt_simple_memref_p (struct loop *loop, gimple stmt, tree op)
{
data_reference_p dr;
bool res = true;
dr = create_data_ref (loop, op, stmt, true);
if (!access_functions_are_affine_or_constant_p (dr, loop))
return false;
res = false;
free_data_ref (dr);
return true;
return res;
}
/* Initializes an equation for an OMEGA problem using the information
......
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