OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-operands.h
index a8d364d..ac195b5 100644 (file)
@@ -1,5 +1,6 @@
 /* SSA operand management for trees.
-   Copyright (C) 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005, 2006, 2007, 2008, 2010
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -42,7 +43,7 @@ struct def_optype_d
 typedef struct def_optype_d *def_optype_p;
 
 /* This represents the USE operands of a stmt.  */
-struct use_optype_d 
+struct use_optype_d
 {
   struct use_optype_d *next;
   struct ssa_use_operand_d use_ptr;
@@ -52,15 +53,14 @@ typedef struct use_optype_d *use_optype_p;
 /* This structure represents a variable sized buffer which is allocated by the
    operand memory manager.  Operands are suballocated out of this block.  The
    MEM array varies in size.  */
-   
-struct ssa_operand_memory_d GTY((chain_next("%h.next")))
-{
+
+struct GTY((chain_next("%h.next"), variable_size)) ssa_operand_memory_d {
   struct ssa_operand_memory_d *next;
   char mem[1];
 };
 
 /* Per-function operand caches.  */
-struct ssa_operands GTY(()) {
+struct GTY(()) ssa_operands {
    struct ssa_operand_memory_d *operand_memory;
    unsigned operand_memory_index;
    /* Current size of the operand memory buffer.  */
@@ -71,7 +71,7 @@ struct ssa_operands GTY(()) {
    struct def_optype_d * GTY ((skip (""))) free_defs;
    struct use_optype_d * GTY ((skip (""))) free_uses;
 };
-                                                                              
+
 #define USE_FROM_PTR(PTR)      get_use_from_ptr (PTR)
 #define DEF_FROM_PTR(PTR)      get_def_from_ptr (PTR)
 #define SET_USE(USE, V)                set_ssa_use_from_ptr (USE, V)
@@ -105,6 +105,7 @@ extern void fini_ssa_operands (void);
 extern void update_stmt_operands (gimple);
 extern void free_stmt_operands (gimple);
 extern bool verify_imm_links (FILE *f, tree var);
+extern bool verify_ssa_operands (gimple stmt);
 
 extern void dump_immediate_uses (FILE *file);
 extern void dump_immediate_uses_for (FILE *file, tree var);
@@ -115,10 +116,6 @@ extern void debug_decl_set (bitmap);
 
 extern bool ssa_operands_active (void);
 
-extern void push_stmt_changes (gimple *);
-extern void pop_stmt_changes (gimple *);
-extern void discard_stmt_changes (gimple *);
-
 extern void unlink_stmt_vdef (gimple);
 
 enum ssa_op_iter_type {
@@ -128,9 +125,9 @@ enum ssa_op_iter_type {
   ssa_op_iter_def
 };
 
-/* This structure is used in the operand iterator loops.  It contains the 
+/* This structure is used in the operand iterator loops.  It contains the
    items required to determine which operand is retrieved next.  During
-   optimization, this structure is scalarized, and any unused fields are 
+   optimization, this structure is scalarized, and any unused fields are
    optimized away, resulting in little overhead.  */
 
 typedef struct ssa_operand_iterator_d
@@ -144,7 +141,7 @@ typedef struct ssa_operand_iterator_d
   gimple phi_stmt;
 } ssa_op_iter;
 
-/* These flags are used to determine which operands are returned during 
+/* These flags are used to determine which operands are returned during
    execution of the loop.  */
 #define SSA_OP_USE             0x01    /* Real USE operands.  */
 #define SSA_OP_DEF             0x02    /* Real DEF operands.  */
@@ -159,24 +156,24 @@ typedef struct ssa_operand_iterator_d
 #define SSA_OP_ALL_DEFS                (SSA_OP_VIRTUAL_DEFS | SSA_OP_DEF)
 #define SSA_OP_ALL_OPERANDS    (SSA_OP_ALL_USES | SSA_OP_ALL_DEFS)
 
-/* This macro executes a loop over the operands of STMT specified in FLAG, 
+/* This macro executes a loop over the operands of STMT specified in FLAG,
    returning each operand as a 'tree' in the variable TREEVAR.  ITER is an
    ssa_op_iter structure used to control the loop.  */
 #define FOR_EACH_SSA_TREE_OPERAND(TREEVAR, STMT, ITER, FLAGS)  \
   for (TREEVAR = op_iter_init_tree (&(ITER), STMT, FLAGS);     \
        !op_iter_done (&(ITER));                                        \
-       TREEVAR = op_iter_next_tree (&(ITER)))
+       (void) (TREEVAR = op_iter_next_tree (&(ITER))))
 
-/* This macro executes a loop over the operands of STMT specified in FLAG, 
-   returning each operand as a 'use_operand_p' in the variable USEVAR.  
+/* This macro executes a loop over the operands of STMT specified in FLAG,
+   returning each operand as a 'use_operand_p' in the variable USEVAR.
    ITER is an ssa_op_iter structure used to control the loop.  */
 #define FOR_EACH_SSA_USE_OPERAND(USEVAR, STMT, ITER, FLAGS)    \
   for (USEVAR = op_iter_init_use (&(ITER), STMT, FLAGS);       \
        !op_iter_done (&(ITER));                                        \
        USEVAR = op_iter_next_use (&(ITER)))
 
-/* This macro executes a loop over the operands of STMT specified in FLAG, 
-   returning each operand as a 'def_operand_p' in the variable DEFVAR.  
+/* This macro executes a loop over the operands of STMT specified in FLAG,
+   returning each operand as a 'def_operand_p' in the variable DEFVAR.
    ITER is an ssa_op_iter structure used to control the loop.  */
 #define FOR_EACH_SSA_DEF_OPERAND(DEFVAR, STMT, ITER, FLAGS)    \
   for (DEFVAR = op_iter_init_def (&(ITER), STMT, FLAGS);       \
@@ -209,19 +206,19 @@ typedef struct ssa_operand_iterator_d
                   : op_iter_init_def (&(ITER), STMT, FLAGS));  \
        !op_iter_done (&(ITER));                                        \
        (DEFVAR) = op_iter_next_def (&(ITER)))
-  
+
 /* This macro returns an operand in STMT as a tree if it is the ONLY
    operand matching FLAGS.  If there are 0 or more than 1 operand matching
    FLAGS, then NULL_TREE is returned.  */
 #define SINGLE_SSA_TREE_OPERAND(STMT, FLAGS)                   \
   single_ssa_tree_operand (STMT, FLAGS)
-                                                                                
+
 /* This macro returns an operand in STMT as a use_operand_p if it is the ONLY
    operand matching FLAGS.  If there are 0 or more than 1 operand matching
    FLAGS, then NULL_USE_OPERAND_P is returned.  */
 #define SINGLE_SSA_USE_OPERAND(STMT, FLAGS)                    \
   single_ssa_use_operand (STMT, FLAGS)
-                                                                                
+
 /* This macro returns an operand in STMT as a def_operand_p if it is the ONLY
    operand matching FLAGS.  If there are 0 or more than 1 operand matching
    FLAGS, then NULL_DEF_OPERAND_P is returned.  */