2 /**------ ( ----------------------------------------------------------**
4 **----- / ) --------------------------------------------------------**
5 ** ( * ( dependence.h **
6 **---- \#/ --------------------------------------------------------**
7 ** .-"#'-. First version: september 18th 2003 **
8 **--- |"-.-"| -------------------------------------------------------**
11 ******** | | *************************************************************
12 * CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *
13 ******************************************************************************
15 * Copyright (C) 2003-2008 Cedric Bastoul *
17 * This is free software; you can redistribute it and/or modify it under the *
18 * terms of the GNU General Public License as published by the Free Software *
19 * Foundation; either version 2 of the License, or (at your option) any later *
22 * This software is distributed in the hope that it will be useful, but *
23 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
24 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
27 * You should have received a copy of the GNU General Public License along *
28 * with software; if not, write to the Free Software Foundation, Inc., *
29 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
31 * CAnDL, the Chunky Dependence Analyzer *
32 * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
34 ******************************************************************************/
37 #ifndef OLD_CANDL_DEPENDENCE_H
38 # define OLD_CANDL_DEPENDENCE_H
42 //# include <candl/matrix.h>
44 #include "scoplib/scop.h" //to define SCOPLIB_SCOP_INT needed for matrix.h
45 #include "scoplib/matrix.h"
49 # define CANDL_ARRAY_BUFF_SIZE 2048
50 # define CANDL_VAR_UNDEF 1
51 # define CANDL_VAR_IS_DEF 2
52 # define CANDL_VAR_IS_USED 3
53 # define CANDL_VAR_IS_DEF_USED 4
55 //copied from old_candl/candl.h
56 # define CANDL_UNSET -1 /* Must be negative (we do use that property).
57 * All other constants have to be different.
64 # define CANDL_RAW_SCALPRIV 5
69 # if defined(__cplusplus)
74 typedef scoplib_matrix_t CandlMatrix
;
77 * CandlDependence structure:
78 * this structure contains all the informations about a data dependence, it is
79 * also a node of the linked list of all dependences of the dependence graph.
81 struct candldependence
83 int depth
; /**< Dependence level. */
84 int type
; /**< Dependence type: a dependence from source
86 * - CANDL_UNSET if the dependence type is
88 * - CANDL_RAW if source writes M and
89 * target read M (flow-dependence),
90 * - CANDL_WAR if source reads M and
91 * target writes M (anti-dependence),
92 * - CANDL_WAW if source writes M and
93 * target writes M too (output-dependence)
94 * - CANDL_RAR if source reads M and
95 * target reads M too (input-dependence).
97 int label_source
; /**< Position of source statemnt. */
98 int label_target
; /**< Position of target statement. */
99 int ref_source
; /**< Position of source reference. */
100 int ref_target
; /**< Position of target reference. */
102 CandlMatrix
* domain
; /**< Dependence polyhedron. */
104 void* usr
; /**< User field, for library users
106 struct candldependence
* next
; /**< Pointer to next dependence */
108 typedef struct candldependence CandlDependence
;
109 typedef struct candldependence candl_dependence_t
;
110 typedef struct candldependence
* candl_dependence_p
;
113 /******************************************************************************
114 * Memory alloc/dealloc function *
115 ******************************************************************************/
116 candl_dependence_p
candl_dependence_malloc();
117 void candl_dependence_free(candl_dependence_p
);
119 scoplib_matrix_p
convert_dep_domain_osl2scoplib(osl_dependence_p
);
121 # if defined(__cplusplus)
124 #endif /* define OLD_CANDL_DEPENDENCE_H */