]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree.h (DECL_CALL_CLOBBERED): Remove.
authorJan Hubicka <jh@suse.cz>
Sat, 30 Dec 2006 12:03:47 +0000 (13:03 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 30 Dec 2006 12:03:47 +0000 (12:03 +0000)
* tree.h (DECL_CALL_CLOBBERED): Remove.
(tree_decl_common): Remove call_clobbered flag.
* tree-flow.h (struct var_ann_d): Add call_clobbered flag.
* tree-ssa-alias.c (mark_non_addressable, reset_cc_flags): Update.
* tree-flow-inline.h (is_call_clobbered, mark_call_clobbered,
clear_call_clobbered): Update.
* tree-ssa.c (verify_call_clobbering): Update.

From-SVN: r120285

gcc/ChangeLog
gcc/tree-flow-inline.h
gcc/tree-flow.h
gcc/tree-ssa-alias.c
gcc/tree-ssa.c
gcc/tree.h

index 93be53d2592c983091c08174270721840b74979a..83440dd795bb8599abf217fd9eeabdb9d166fec8 100644 (file)
@@ -1,3 +1,13 @@
+2006-12-30  Jan Hubicka  <jh@suse.cz>
+
+       * tree.h (DECL_CALL_CLOBBERED): Remove.
+       (tree_decl_common): Remove call_clobbered flag.
+       * tree-flow.h (struct var_ann_d): Add call_clobbered flag.
+       * tree-ssa-alias.c (mark_non_addressable, reset_cc_flags): Update.
+       * tree-flow-inline.h (is_call_clobbered, mark_call_clobbered,
+       clear_call_clobbered): Update.
+       * tree-ssa.c (verify_call_clobbering): Update.
+
 2006-12-30  Jan Hubicka  <jh@suse.cz>
 
        * tree-ssa-alias.c (create_structure_vars): When in SSA, update operand
index 0695c6562939b991135a5bb3106f02bdd5427be7..a2d3e62d371a3dff4939f7f2cf79782701f3f73a 100644 (file)
@@ -919,7 +919,7 @@ static inline bool
 is_call_clobbered (tree var)
 {
   if (!MTAG_P (var))
-    return DECL_CALL_CLOBBERED (var);
+    return var_ann (var)->call_clobbered;
   else
     return bitmap_bit_p (gimple_call_clobbered_vars (cfun), DECL_UID (var)); 
 }
@@ -930,7 +930,7 @@ mark_call_clobbered (tree var, unsigned int escape_type)
 {
   var_ann (var)->escape_mask |= escape_type;
   if (!MTAG_P (var))
-    DECL_CALL_CLOBBERED (var) = true;
+    var_ann (var)->call_clobbered = true;
   bitmap_set_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var));
 }
 
@@ -943,7 +943,7 @@ clear_call_clobbered (tree var)
   if (MTAG_P (var) && TREE_CODE (var) != STRUCT_FIELD_TAG)
     MTAG_GLOBAL (var) = 0;
   if (!MTAG_P (var))
-    DECL_CALL_CLOBBERED (var) = false;
+    var_ann (var)->call_clobbered = false;
   bitmap_clear_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var));
 }
 
index 08e65c7469cb89feec70d07f3d9f5de2a9fb7041..82dae23110d6d9900497fab87f1f66707a39f6a6 100644 (file)
@@ -251,6 +251,9 @@ struct var_ann_d GTY(())
   /* True for HEAP and PARM_NOALIAS artificial variables.  */
   unsigned is_heapvar : 1;
 
+  /* True if the variable is call clobbered.  */
+  unsigned int call_clobbered : 1;
+
   /* Memory partition tag assigned to this symbol.  */
   tree mpt;
 
index 2ef529707cdff95a4cc6c21130ecb6cc72283d41..7aff7ee854dced0d17dfd08cf29a89506e35f3c5 100644 (file)
@@ -126,7 +126,7 @@ mark_non_addressable (tree var)
   mpt = memory_partition (var);
 
   if (!MTAG_P (var))
-    DECL_CALL_CLOBBERED (var) = false;
+    var_ann (var)->call_clobbered = false;
 
   bitmap_clear_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var));
   TREE_ADDRESSABLE (var) = 0;
@@ -3266,7 +3266,7 @@ struct tree_opt_pass pass_create_structure_vars =
   0                     /* letter */
 };
 
-/* Reset the DECL_CALL_CLOBBERED flags on our referenced vars.  In
+/* Reset the call_clobbered flags on our referenced vars.  In
    theory, this only needs to be done for globals.  */
 
 static unsigned int
@@ -3276,7 +3276,7 @@ reset_cc_flags (void)
   referenced_var_iterator rvi;
 
   FOR_EACH_REFERENCED_VAR (var, rvi)
-    DECL_CALL_CLOBBERED (var) = false;
+    var_ann (var)->call_clobbered = false;
   return 0;
 }
 
index 6ca8f031ac90ab3ae7c334061d1cd41b966768a0..644a7976402c80a7ef3e7e94b061a7829dc1e18e 100644 (file)
@@ -508,11 +508,11 @@ verify_call_clobbering (void)
   tree var;
   referenced_var_iterator rvi;
 
-  /* At all times, the result of the DECL_CALL_CLOBBERED flag should
+  /* At all times, the result of the call_clobbered flag should
      match the result of the call_clobbered_vars bitmap.  Verify both
      that everything in call_clobbered_vars is marked
-     DECL_CALL_CLOBBERED, and that everything marked
-     DECL_CALL_CLOBBERED is in call_clobbered_vars.  */
+     call_clobbered, and that everything marked
+     call_clobbered is in call_clobbered_vars.  */
   EXECUTE_IF_SET_IN_BITMAP (gimple_call_clobbered_vars (cfun), 0, i, bi)
     {
       var = referenced_var (i);
@@ -520,10 +520,10 @@ verify_call_clobbering (void)
       if (memory_partition (var))
        var = memory_partition (var);
 
-      if (!MTAG_P (var) && !DECL_CALL_CLOBBERED (var))
+      if (!MTAG_P (var) && !var_ann (var)->call_clobbered)
        {
          error ("variable in call_clobbered_vars but not marked "
-                "DECL_CALL_CLOBBERED");
+                "call_clobbered");
          debug_variable (var);
          goto err;
        }
@@ -538,10 +538,10 @@ verify_call_clobbering (void)
        var = memory_partition (var);
 
       if (!MTAG_P (var)
-         && DECL_CALL_CLOBBERED (var)
+         && var_ann (var)->call_clobbered
          && !bitmap_bit_p (gimple_call_clobbered_vars (cfun), DECL_UID (var)))
        {
-         error ("variable marked DECL_CALL_CLOBBERED but not in "
+         error ("variable marked call_clobbered but not in "
                 "call_clobbered_vars bitmap.");
          debug_variable (var);
          goto err;
index b7ec8035b3cb7966f7d79fc03fe7fa1b458e4def..0c9e02e91f5f936e58faa9f02e0c7dc8fc9a0294 100644 (file)
@@ -2607,12 +2607,6 @@ struct tree_memory_partition_tag GTY(())
 #define DECL_GIMPLE_REG_P(DECL) \
   DECL_COMMON_CHECK (DECL)->decl_common.gimple_reg_flag
 
-/* This is true if DECL is call clobbered in the current function.
-   The result of this flag should always be the same as
-   bitmap_bit_p (call_clobbered_vars, DECL_UID (decl)).  */
-#define DECL_CALL_CLOBBERED(DECL) \
-  DECL_COMMON_CHECK (DECL)->decl_common.call_clobbered_flag
-
 struct tree_decl_common GTY(())
 {
   struct tree_decl_minimal common;
@@ -2653,7 +2647,6 @@ struct tree_decl_common GTY(())
   /* Logically, these two would go in a theoretical base shared by var and
      parm decl. */
   unsigned gimple_reg_flag : 1;
-  unsigned call_clobbered_flag : 1;
 
   union tree_decl_u1 {
     /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is