Mercurial > hg > CbC > CbC_gcc
comparison gcc/tree-ssa-live.h @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | 77e2b8dfacca |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
1 /* Routines for liveness in SSA trees. | 1 /* Routines for liveness in SSA trees. |
2 Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. | 2 Copyright (C) 2003, 2004, 2005, 2007, 2008, 2010 |
3 Free Software Foundation, Inc. | |
3 Contributed by Andrew MacLeod <amacleod@redhat.com> | 4 Contributed by Andrew MacLeod <amacleod@redhat.com> |
4 | 5 |
5 This file is part of GCC. | 6 This file is part of GCC. |
6 | 7 |
7 GCC is free software; you can redistribute it and/or modify | 8 GCC is free software; you can redistribute it and/or modify |
142 static inline int | 143 static inline int |
143 var_to_partition (var_map map, tree var) | 144 var_to_partition (var_map map, tree var) |
144 { | 145 { |
145 int part; | 146 int part; |
146 | 147 |
147 gcc_assert (TREE_CODE (var) == SSA_NAME); | |
148 part = partition_find (map->var_partition, SSA_NAME_VERSION (var)); | 148 part = partition_find (map->var_partition, SSA_NAME_VERSION (var)); |
149 if (map->partition_to_view) | 149 if (map->partition_to_view) |
150 part = map->partition_to_view[part]; | 150 part = map->partition_to_view[part]; |
151 return part; | 151 return part; |
152 } | 152 } |
170 /* Return the index into the basevar table for PARTITION's base in MAP. */ | 170 /* Return the index into the basevar table for PARTITION's base in MAP. */ |
171 | 171 |
172 static inline int | 172 static inline int |
173 basevar_index (var_map map, int partition) | 173 basevar_index (var_map map, int partition) |
174 { | 174 { |
175 gcc_assert (partition >= 0 | 175 gcc_checking_assert (partition >= 0 |
176 && partition <= (int) num_var_partitions (map)); | 176 && partition <= (int) num_var_partitions (map)); |
177 return map->partition_to_base_index[partition]; | 177 return map->partition_to_base_index[partition]; |
178 } | 178 } |
179 | 179 |
180 | 180 |
181 /* Return the number of different base variables in MAP. */ | 181 /* Return the number of different base variables in MAP. */ |
269 /* Return TRUE if P is marked as a global in LIVE. */ | 269 /* Return TRUE if P is marked as a global in LIVE. */ |
270 | 270 |
271 static inline int | 271 static inline int |
272 partition_is_global (tree_live_info_p live, int p) | 272 partition_is_global (tree_live_info_p live, int p) |
273 { | 273 { |
274 gcc_assert (live->global); | 274 gcc_checking_assert (live->global); |
275 return bitmap_bit_p (live->global, p); | 275 return bitmap_bit_p (live->global, p); |
276 } | 276 } |
277 | 277 |
278 | 278 |
279 /* Return the bitmap from LIVE representing the live on entry blocks for | 279 /* Return the bitmap from LIVE representing the live on entry blocks for |
280 partition P. */ | 280 partition P. */ |
281 | 281 |
282 static inline bitmap | 282 static inline bitmap |
283 live_on_entry (tree_live_info_p live, basic_block bb) | 283 live_on_entry (tree_live_info_p live, basic_block bb) |
284 { | 284 { |
285 gcc_assert (live->livein); | 285 gcc_checking_assert (live->livein |
286 gcc_assert (bb != ENTRY_BLOCK_PTR); | 286 && bb != ENTRY_BLOCK_PTR |
287 gcc_assert (bb != EXIT_BLOCK_PTR); | 287 && bb != EXIT_BLOCK_PTR); |
288 | 288 |
289 return live->livein[bb->index]; | 289 return live->livein[bb->index]; |
290 } | 290 } |
291 | 291 |
292 | 292 |
294 block BB. */ | 294 block BB. */ |
295 | 295 |
296 static inline bitmap | 296 static inline bitmap |
297 live_on_exit (tree_live_info_p live, basic_block bb) | 297 live_on_exit (tree_live_info_p live, basic_block bb) |
298 { | 298 { |
299 gcc_assert (live->liveout); | 299 gcc_checking_assert (live->liveout |
300 gcc_assert (bb != ENTRY_BLOCK_PTR); | 300 && bb != ENTRY_BLOCK_PTR |
301 gcc_assert (bb != EXIT_BLOCK_PTR); | 301 && bb != EXIT_BLOCK_PTR); |
302 | 302 |
303 return live->liveout[bb->index]; | 303 return live->liveout[bb->index]; |
304 } | 304 } |
305 | 305 |
306 | 306 |
317 the result into P1. Clear P2. */ | 317 the result into P1. Clear P2. */ |
318 | 318 |
319 static inline void | 319 static inline void |
320 live_merge_and_clear (tree_live_info_p live, int p1, int p2) | 320 live_merge_and_clear (tree_live_info_p live, int p1, int p2) |
321 { | 321 { |
322 gcc_assert (live->livein[p1]); | 322 gcc_checking_assert (live->livein[p1] && live->livein[p2]); |
323 gcc_assert (live->livein[p2]); | |
324 bitmap_ior_into (live->livein[p1], live->livein[p2]); | 323 bitmap_ior_into (live->livein[p1], live->livein[p2]); |
325 bitmap_zero (live->livein[p2]); | 324 bitmap_zero (live->livein[p2]); |
326 } | 325 } |
327 | 326 |
328 | 327 |