Mercurial > hg > CbC > CbC_gcc
comparison gcc/omega.h @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children |
comparison
equal
deleted
inserted
replaced
52:c156f1bd5cd9 | 55:77e2b8dfacca |
---|---|
1 /* Source code for an implementation of the Omega test, an integer | 1 /* Source code for an implementation of the Omega test, an integer |
2 programming algorithm for dependence analysis, by William Pugh, | 2 programming algorithm for dependence analysis, by William Pugh, |
3 appeared in Supercomputing '91 and CACM Aug 92. | 3 appeared in Supercomputing '91 and CACM Aug 92. |
4 | 4 |
5 This code has no license restrictions, and is considered public | 5 This code has no license restrictions, and is considered public |
6 domain. | 6 domain. |
7 | 7 |
8 Changes copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. | 8 Changes copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc. |
9 Contributed by Sebastian Pop <sebastian.pop@inria.fr> | 9 Contributed by Sebastian Pop <sebastian.pop@inria.fr> |
10 | 10 |
11 This file is part of GCC. | 11 This file is part of GCC. |
12 | 12 |
13 GCC is free software; you can redistribute it and/or modify it under | 13 GCC is free software; you can redistribute it and/or modify it under |
50 omega_simplify = 3 | 50 omega_simplify = 3 |
51 }; | 51 }; |
52 | 52 |
53 /* Values used for labeling equations. Private (not used outside the | 53 /* Values used for labeling equations. Private (not used outside the |
54 solver). */ | 54 solver). */ |
55 enum omega_eqn_color { | 55 enum omega_eqn_color { |
56 omega_black = 0, | 56 omega_black = 0, |
57 omega_red = 1 | 57 omega_red = 1 |
58 }; | 58 }; |
59 | 59 |
60 /* Structure for equations. */ | 60 /* Structure for equations. */ |
61 typedef struct eqn | 61 typedef struct eqn_d |
62 { | 62 { |
63 int key; | 63 int key; |
64 int touched; | 64 int touched; |
65 enum omega_eqn_color color; | 65 enum omega_eqn_color color; |
66 | 66 |
70 the equation 0 = 9 + x + 0y + 5z is encoded as [9 1 0 5], the | 70 the equation 0 = 9 + x + 0y + 5z is encoded as [9 1 0 5], the |
71 inequality 0 <= -8 + x + 2y + 3z is encoded as [-8 1 2 3]. */ | 71 inequality 0 <= -8 + x + 2y + 3z is encoded as [-8 1 2 3]. */ |
72 int *coef; | 72 int *coef; |
73 } *eqn; | 73 } *eqn; |
74 | 74 |
75 typedef struct omega_pb | 75 typedef struct omega_pb_d |
76 { | 76 { |
77 /* The number of variables in the system of equations. */ | 77 /* The number of variables in the system of equations. */ |
78 int num_vars; | 78 int num_vars; |
79 | 79 |
80 /* Safe variables are not eliminated during the Fourier-Motzkin | 80 /* Safe variables are not eliminated during the Fourier-Motzkin |
81 simplification of the system. Safe variables are all those | 81 simplification of the system. Safe variables are all those |
82 variables that are placed at the beginning of the array of | 82 variables that are placed at the beginning of the array of |
83 variables: PB->var[1, ..., SAFE_VARS]. PB->var[0] is not used, | 83 variables: PB->var[1, ..., SAFE_VARS]. PB->var[0] is not used, |
84 as PB->eqs[x]->coef[0] represents the constant of the equation. */ | 84 as PB->eqs[x]->coef[0] represents the constant of the equation. */ |
213 | 213 |
214 static inline eqn | 214 static inline eqn |
215 omega_alloc_eqns (int s, int n) | 215 omega_alloc_eqns (int s, int n) |
216 { | 216 { |
217 int i; | 217 int i; |
218 eqn res = (eqn) (xcalloc (n, sizeof (struct eqn))); | 218 eqn res = (eqn) (xcalloc (n, sizeof (struct eqn_d))); |
219 | 219 |
220 for (i = n - 1; i >= 0; i--) | 220 for (i = n - 1; i >= 0; i--) |
221 { | 221 { |
222 res[i].coef = (int *) (xcalloc (OMEGA_MAX_VARS + 1, sizeof (int))); | 222 res[i].coef = (int *) (xcalloc (OMEGA_MAX_VARS + 1, sizeof (int))); |
223 omega_init_eqn_zero (&res[i], s); | 223 omega_init_eqn_zero (&res[i], s); |