OSDN Git Service

Add reference to PR middle-end/48660
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-live.h
index f49f065..8158577 100644 (file)
@@ -1,5 +1,6 @@
 /* Routines for liveness in SSA trees.
-   Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005, 2007, 2008, 2010
+   Free Software Foundation, Inc.
    Contributed by Andrew MacLeod  <amacleod@redhat.com>
 
 This file is part of GCC.
@@ -144,7 +145,6 @@ var_to_partition (var_map map, tree var)
 {
   int part;
 
-  gcc_assert (TREE_CODE (var) == SSA_NAME);
   part = partition_find (map->var_partition, SSA_NAME_VERSION (var));
   if (map->partition_to_view)
     part = map->partition_to_view[part];
@@ -172,8 +172,8 @@ var_to_partition_to_var (var_map map, tree var)
 static inline int
 basevar_index (var_map map, int partition)
 {
-  gcc_assert (partition >= 0
-             && partition <= (int) num_var_partitions (map));
+  gcc_checking_assert (partition >= 0
+                      && partition <= (int) num_var_partitions (map));
   return map->partition_to_base_index[partition];
 }
 
@@ -271,7 +271,7 @@ extern void dump_live_info (FILE *, tree_live_info_p, int);
 static inline int
 partition_is_global (tree_live_info_p live, int p)
 {
-  gcc_assert (live->global);
+  gcc_checking_assert (live->global);
   return bitmap_bit_p (live->global, p);
 }
 
@@ -282,9 +282,9 @@ partition_is_global (tree_live_info_p live, int p)
 static inline bitmap
 live_on_entry (tree_live_info_p live, basic_block bb)
 {
-  gcc_assert (live->livein);
-  gcc_assert (bb != ENTRY_BLOCK_PTR);
-  gcc_assert (bb != EXIT_BLOCK_PTR);
+  gcc_checking_assert (live->livein
+                      && bb != ENTRY_BLOCK_PTR
+                      && bb != EXIT_BLOCK_PTR);
 
   return live->livein[bb->index];
 }
@@ -296,9 +296,9 @@ live_on_entry (tree_live_info_p live, basic_block bb)
 static inline bitmap
 live_on_exit (tree_live_info_p live, basic_block bb)
 {
-  gcc_assert (live->liveout);
-  gcc_assert (bb != ENTRY_BLOCK_PTR);
-  gcc_assert (bb != EXIT_BLOCK_PTR);
+  gcc_checking_assert (live->liveout
+                      && bb != ENTRY_BLOCK_PTR
+                      && bb != EXIT_BLOCK_PTR);
 
   return live->liveout[bb->index];
 }
@@ -319,8 +319,7 @@ live_var_map (tree_live_info_p live)
 static inline void
 live_merge_and_clear (tree_live_info_p live, int p1, int p2)
 {
-  gcc_assert (live->livein[p1]);
-  gcc_assert (live->livein[p2]);
+  gcc_checking_assert (live->livein[p1] && live->livein[p2]);
   bitmap_ior_into (live->livein[p1], live->livein[p2]);
   bitmap_zero (live->livein[p2]);
 }