This removes some of the redundant hash lookups for the decl aux info.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2012-08-02  Richard Guenther  <rguent...@suse.de>

        * tree-into-ssa.c (struct common_info_d): New struct.
        (struct var_info_d, struct ssa_name_info): Use it.
        (get_ssa_name_ann): Adjust.
        (get_phi_state, set_phi_state): Remove.
        (get_common_info): New function.
        (get_current_def, set_current_def): Adjust.
        (get_def_blocks_for): Take a common info as param.
        (set_def_block): Call get_common_info once.
        (set_livein_block): Likewise.
        (find_def_blocks_for): Adjust.
        (insert_phi_nodes): Likewise.
        (register_new_def): Call get_common_info once.
        (get_reaching_def): Likewise.
        (rewrite_debug_stmt_uses): Likewise.
        (rewrite_leave_block): Likewise.
        (dump_currdefs): Likewise.
        (debug_var_infos_r): Adjust.
        (register_new_update_single): Call get_common_info once.
        (maybe_replace_use_in_debug_stmt): Likewise.
        (rewrite_update_leave_block): Likewise.
        (mark_use_interesting): Adjust.
        (create_new_def_for): Likewise.
        (update_ssa): Likewise.

Index: trunk/gcc/tree-into-ssa.c
===================================================================
*** trunk.orig/gcc/tree-into-ssa.c      2012-08-02 13:39:40.000000000 +0200
--- trunk/gcc/tree-into-ssa.c   2012-08-02 14:04:23.127792695 +0200
*************** struct mark_def_sites_global_data
*** 126,150 ****
    bitmap kills;
  };
  
! 
! /* Information stored for decls.  */
! struct var_info_d
  {
-   /* The variable.  */
-   tree var;
- 
    /* This field indicates whether or not the variable may need PHI nodes.
       See the enum's definition for more detailed information about the
       states.  */
    ENUM_BITFIELD (need_phi_state) need_phi_state : 2;
  
!   /* The current reaching definition replacing this SSA name.  */
    tree current_def;
  
!   /* Definitions for this VAR.  */
    struct def_blocks_d def_blocks;
  };
  
  /* The information associated with decls.  */
  typedef struct var_info_d *var_info_p;
  
--- 126,159 ----
    bitmap kills;
  };
  
! /* Information stored for both SSA names and decls.  */
! struct common_info_d
  {
    /* This field indicates whether or not the variable may need PHI nodes.
       See the enum's definition for more detailed information about the
       states.  */
    ENUM_BITFIELD (need_phi_state) need_phi_state : 2;
  
!   /* The current reaching definition replacing this var.  */
    tree current_def;
  
!   /* Definitions for this var.  */
    struct def_blocks_d def_blocks;
  };
  
+ /* The information associated with decls and SSA names.  */
+ typedef struct common_info_d *common_info_p;
+ 
+ /* Information stored for decls.  */
+ struct var_info_d
+ {
+   /* The variable.  */
+   tree var;
+ 
+   /* Information stored for both SSA names and decls.  */
+   struct common_info_d info;
+ };
+ 
  /* The information associated with decls.  */
  typedef struct var_info_d *var_info_p;
  
*************** struct ssa_name_info
*** 164,182 ****
       are assumed to be null.  */
    unsigned age;
  
-   /* This field indicates whether or not the variable may need PHI nodes.
-      See the enum's definition for more detailed information about the
-      states.  */
-   ENUM_BITFIELD (need_phi_state) need_phi_state : 2;
- 
-   /* The current reaching definition replacing this SSA name.  */
-   tree current_def;
- 
    /* Replacement mappings, allocated from update_ssa_obstack.  */
    bitmap repl_set;
  
!   /* Definitions for this SSA name.  */
!   struct def_blocks_d def_blocks;
  };
  
  /* The information associated with names.  */
--- 173,183 ----
       are assumed to be null.  */
    unsigned age;
  
    /* Replacement mappings, allocated from update_ssa_obstack.  */
    bitmap repl_set;
  
!   /* Information stored for both SSA names and decls.  */
!   struct common_info_d info;
  };
  
  /* The information associated with names.  */
*************** get_ssa_name_ann (tree name)
*** 323,335 ****
    info = VEC_index (ssa_name_info_p, info_for_ssa_name, ver);
    if (info->age < current_info_for_ssa_name_age)
      {
-       info->need_phi_state = NEED_PHI_STATE_UNKNOWN;
-       info->current_def = NULL_TREE;
-       info->repl_set = NULL;
-       info->def_blocks.def_blocks = NULL;
-       info->def_blocks.phi_blocks = NULL;
-       info->def_blocks.livein_blocks = NULL;
        info->age = current_info_for_ssa_name_age;
      }
  
    return info;
--- 324,336 ----
    info = VEC_index (ssa_name_info_p, info_for_ssa_name, ver);
    if (info->age < current_info_for_ssa_name_age)
      {
        info->age = current_info_for_ssa_name_age;
+       info->repl_set = NULL;
+       info->info.need_phi_state = NEED_PHI_STATE_UNKNOWN;
+       info->info.current_def = NULL_TREE;
+       info->info.def_blocks.def_blocks = NULL;
+       info->info.def_blocks.phi_blocks = NULL;
+       info->info.def_blocks.livein_blocks = NULL;
      }
  
    return info;
*************** clear_ssa_name_info (void)
*** 368,394 ****
  }
  
  
! /* Get phi_state field for VAR.  */
  
! static inline enum need_phi_state
! get_phi_state (tree var)
! {
!   if (TREE_CODE (var) == SSA_NAME)
!     return get_ssa_name_ann (var)->need_phi_state;
!   else
!     return get_var_info (var)->need_phi_state;
! }
! 
! 
! /* Sets phi_state field for VAR to STATE.  */
! 
! static inline void
! set_phi_state (tree var, enum need_phi_state state)
  {
    if (TREE_CODE (var) == SSA_NAME)
!     get_ssa_name_ann (var)->need_phi_state = state;
    else
!     get_var_info (var)->need_phi_state = state;
  }
  
  
--- 369,383 ----
  }
  
  
! /* Get access to the auxiliar information stored per SSA name or decl.  */
  
! static inline common_info_p
! get_common_info (tree var)
  {
    if (TREE_CODE (var) == SSA_NAME)
!     return &get_ssa_name_ann (var)->info;
    else
!     return &get_var_info (var)->info;
  }
  
  
*************** set_phi_state (tree var, enum need_phi_s
*** 397,406 ****
  tree
  get_current_def (tree var)
  {
!   if (TREE_CODE (var) == SSA_NAME)
!     return get_ssa_name_ann (var)->current_def;
!   else
!     return get_var_info (var)->current_def;
  }
  
  
--- 386,392 ----
  tree
  get_current_def (tree var)
  {
!   return get_common_info (var)->current_def;
  }
  
  
*************** get_current_def (tree var)
*** 409,418 ****
  void
  set_current_def (tree var, tree def)
  {
!   if (TREE_CODE (var) == SSA_NAME)
!     get_ssa_name_ann (var)->current_def = def;
!   else
!     get_var_info (var)->current_def = def;
  }
  
  
--- 395,401 ----
  void
  set_current_def (tree var, tree def)
  {
!   get_common_info (var)->current_def = def;
  }
  
  
*************** mark_block_for_update (basic_block bb)
*** 512,526 ****
     DEF_BLOCKS, a new one is created and returned.  */
  
  static inline struct def_blocks_d *
! get_def_blocks_for (tree var)
  {
!   struct def_blocks_d *db_p;
! 
!   if (TREE_CODE (var) == SSA_NAME)
!     db_p = &get_ssa_name_ann (var)->def_blocks;
!   else
!     db_p = &get_var_info (var)->def_blocks;
! 
    if (!db_p->def_blocks)
      {
        db_p->def_blocks = BITMAP_ALLOC (&update_ssa_obstack);
--- 495,503 ----
     DEF_BLOCKS, a new one is created and returned.  */
  
  static inline struct def_blocks_d *
! get_def_blocks_for (common_info_p info)
  {
!   struct def_blocks_d *db_p = &info->def_blocks;
    if (!db_p->def_blocks)
      {
        db_p->def_blocks = BITMAP_ALLOC (&update_ssa_obstack);
*************** static void
*** 539,548 ****
  set_def_block (tree var, basic_block bb, bool phi_p)
  {
    struct def_blocks_d *db_p;
!   enum need_phi_state state;
  
!   state = get_phi_state (var);
!   db_p = get_def_blocks_for (var);
  
    /* Set the bit corresponding to the block where VAR is defined.  */
    bitmap_set_bit (db_p->def_blocks, bb->index);
--- 516,525 ----
  set_def_block (tree var, basic_block bb, bool phi_p)
  {
    struct def_blocks_d *db_p;
!   common_info_p info;
  
!   info = get_common_info (var);
!   db_p = get_def_blocks_for (info);
  
    /* Set the bit corresponding to the block where VAR is defined.  */
    bitmap_set_bit (db_p->def_blocks, bb->index);
*************** set_def_block (tree var, basic_block bb,
*** 561,570 ****
       variable which was not dominated by the block containing the
       definition(s).  In this case we may need a PHI node, so enter
       state NEED_PHI_STATE_MAYBE.  */
!   if (state == NEED_PHI_STATE_UNKNOWN)
!     set_phi_state (var, NEED_PHI_STATE_NO);
    else
!     set_phi_state (var, NEED_PHI_STATE_MAYBE);
  }
  
  
--- 538,547 ----
       variable which was not dominated by the block containing the
       definition(s).  In this case we may need a PHI node, so enter
       state NEED_PHI_STATE_MAYBE.  */
!   if (info->need_phi_state == NEED_PHI_STATE_UNKNOWN)
!     info->need_phi_state = NEED_PHI_STATE_NO;
    else
!     info->need_phi_state = NEED_PHI_STATE_MAYBE;
  }
  
  
*************** set_def_block (tree var, basic_block bb,
*** 573,582 ****
  static void
  set_livein_block (tree var, basic_block bb)
  {
    struct def_blocks_d *db_p;
-   enum need_phi_state state = get_phi_state (var);
  
!   db_p = get_def_blocks_for (var);
  
    /* Set the bit corresponding to the block where VAR is live in.  */
    bitmap_set_bit (db_p->livein_blocks, bb->index);
--- 550,560 ----
  static void
  set_livein_block (tree var, basic_block bb)
  {
+   common_info_p info;
    struct def_blocks_d *db_p;
  
!   info = get_common_info (var);
!   db_p = get_def_blocks_for (info);
  
    /* Set the bit corresponding to the block where VAR is live in.  */
    bitmap_set_bit (db_p->livein_blocks, bb->index);
*************** set_livein_block (tree var, basic_block
*** 587,603 ****
       by the single block containing the definition(s) of this variable.  If
       it is, then we remain in NEED_PHI_STATE_NO, otherwise we transition to
       NEED_PHI_STATE_MAYBE.  */
!   if (state == NEED_PHI_STATE_NO)
      {
        int def_block_index = bitmap_first_set_bit (db_p->def_blocks);
  
        if (def_block_index == -1
          || ! dominated_by_p (CDI_DOMINATORS, bb,
                               BASIC_BLOCK (def_block_index)))
!       set_phi_state (var, NEED_PHI_STATE_MAYBE);
      }
    else
!     set_phi_state (var, NEED_PHI_STATE_MAYBE);
  }
  
  
--- 565,581 ----
       by the single block containing the definition(s) of this variable.  If
       it is, then we remain in NEED_PHI_STATE_NO, otherwise we transition to
       NEED_PHI_STATE_MAYBE.  */
!   if (info->need_phi_state == NEED_PHI_STATE_NO)
      {
        int def_block_index = bitmap_first_set_bit (db_p->def_blocks);
  
        if (def_block_index == -1
          || ! dominated_by_p (CDI_DOMINATORS, bb,
                               BASIC_BLOCK (def_block_index)))
!       info->need_phi_state = NEED_PHI_STATE_MAYBE;
      }
    else
!     info->need_phi_state = NEED_PHI_STATE_MAYBE;
  }
  
  
*************** prune_unused_phi_nodes (bitmap phis, bit
*** 976,986 ****
  static inline struct def_blocks_d *
  find_def_blocks_for (tree var)
  {
!   def_blocks_p p;
!   if (TREE_CODE (var) == SSA_NAME)
!     p = &get_ssa_name_ann (var)->def_blocks;
!   else
!     p = &get_var_info (var)->def_blocks;
    if (!p->def_blocks)
      return NULL;
    return p;
--- 954,960 ----
  static inline struct def_blocks_d *
  find_def_blocks_for (tree var)
  {
!   def_blocks_p p = &get_common_info (var)->def_blocks;
    if (!p->def_blocks)
      return NULL;
    return p;
*************** insert_phi_nodes (bitmap_head *dfs)
*** 1133,1139 ****
  
    vars = VEC_alloc (var_info_p, heap, htab_elements (var_infos));
    FOR_EACH_HTAB_ELEMENT (var_infos, info, var_info_p, hi)
!     if (info->need_phi_state != NEED_PHI_STATE_NO)
        VEC_quick_push (var_info_p, vars, info);
  
    /* Do two stages to avoid code generation differences for UID
--- 1107,1113 ----
  
    vars = VEC_alloc (var_info_p, heap, htab_elements (var_infos));
    FOR_EACH_HTAB_ELEMENT (var_infos, info, var_info_p, hi)
!     if (info->info.need_phi_state != NEED_PHI_STATE_NO)
        VEC_quick_push (var_info_p, vars, info);
  
    /* Do two stages to avoid code generation differences for UID
*************** insert_phi_nodes (bitmap_head *dfs)
*** 1142,1148 ****
  
    FOR_EACH_VEC_ELT (var_info_p, vars, i, info)
      {
!       bitmap idf = compute_idf (info->def_blocks.def_blocks, dfs);
        insert_phi_nodes_for (info->var, idf, false);
        BITMAP_FREE (idf);
      }
--- 1116,1122 ----
  
    FOR_EACH_VEC_ELT (var_info_p, vars, i, info)
      {
!       bitmap idf = compute_idf (info->info.def_blocks.def_blocks, dfs);
        insert_phi_nodes_for (info->var, idf, false);
        BITMAP_FREE (idf);
      }
*************** insert_phi_nodes (bitmap_head *dfs)
*** 1159,1164 ****
--- 1133,1139 ----
  static void
  register_new_def (tree def, tree sym)
  {
+   common_info_p info = get_common_info (sym);
    tree currdef;
  
    /* If this variable is set in a single basic block and all uses are
*************** register_new_def (tree def, tree sym)
*** 1169,1181 ****
       This is the same test to prune the set of variables which may
       need PHI nodes.  So we just use that information since it's already
       computed and available for us to use.  */
!   if (get_phi_state (sym) == NEED_PHI_STATE_NO)
      {
!       set_current_def (sym, def);
        return;
      }
  
!   currdef = get_current_def (sym);
  
    /* If SYM is not a GIMPLE register, then CURRDEF may be a name whose
       SSA_NAME_VAR is not necessarily SYM.  In this case, also push SYM
--- 1144,1156 ----
       This is the same test to prune the set of variables which may
       need PHI nodes.  So we just use that information since it's already
       computed and available for us to use.  */
!   if (info->need_phi_state == NEED_PHI_STATE_NO)
      {
!       info->current_def = def;
        return;
      }
  
!   currdef = info->current_def;
  
    /* If SYM is not a GIMPLE register, then CURRDEF may be a name whose
       SSA_NAME_VAR is not necessarily SYM.  In this case, also push SYM
*************** register_new_def (tree def, tree sym)
*** 1193,1199 ****
    VEC_safe_push (tree, heap, block_defs_stack, currdef ? currdef : sym);
  
    /* Set the current reaching definition for SYM to be DEF.  */
!   set_current_def (sym, def);
  }
  
  
--- 1168,1174 ----
    VEC_safe_push (tree, heap, block_defs_stack, currdef ? currdef : sym);
  
    /* Set the current reaching definition for SYM to be DEF.  */
!   info->current_def = def;
  }
  
  
*************** register_new_def (tree def, tree sym)
*** 1226,1235 ****
  static tree
  get_reaching_def (tree var)
  {
    tree currdef;
  
    /* Lookup the current reaching definition for VAR.  */
!   currdef = get_current_def (var);
  
    /* If there is no reaching definition for VAR, create and register a
       default definition for it (if needed).  */
--- 1201,1211 ----
  static tree
  get_reaching_def (tree var)
  {
+   common_info_p info = get_common_info (var);
    tree currdef;
  
    /* Lookup the current reaching definition for VAR.  */
!   currdef = info->current_def;
  
    /* If there is no reaching definition for VAR, create and register a
       default definition for it (if needed).  */
*************** get_reaching_def (tree var)
*** 1237,1243 ****
      {
        tree sym = DECL_P (var) ? var : SSA_NAME_VAR (var);
        currdef = get_or_create_ssa_default_def (cfun, sym);
-       set_current_def (var, currdef);
      }
  
    /* Return the current reaching definition for VAR, or the default
--- 1213,1218 ----
*************** rewrite_debug_stmt_uses (gimple stmt)
*** 1258,1265 ****
    FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE)
      {
        tree var = USE_FROM_PTR (use_p), def;
        gcc_assert (DECL_P (var));
!       def = get_current_def (var);
        if (!def)
        {
          if (TREE_CODE (var) == PARM_DECL && single_succ_p (ENTRY_BLOCK_PTR))
--- 1233,1241 ----
    FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE)
      {
        tree var = USE_FROM_PTR (use_p), def;
+       common_info_p info = get_common_info (var);
        gcc_assert (DECL_P (var));
!       def = info->current_def;
        if (!def)
        {
          if (TREE_CODE (var) == PARM_DECL && single_succ_p (ENTRY_BLOCK_PTR))
*************** rewrite_debug_stmt_uses (gimple stmt)
*** 1302,1308 ****
        }
        else
        {
!         /* Check if get_current_def can be trusted.  */
          basic_block bb = gimple_bb (stmt);
          basic_block def_bb
              = SSA_NAME_IS_DEFAULT_DEF (def)
--- 1278,1284 ----
        }
        else
        {
!         /* Check if info->current_def can be trusted.  */
          basic_block bb = gimple_bb (stmt);
          basic_block def_bb
              = SSA_NAME_IS_DEFAULT_DEF (def)
*************** rewrite_debug_stmt_uses (gimple stmt)
*** 1317,1327 ****
            def = NULL;
          /* If there is just one definition and dominates the current
             bb, it is fine.  */
!         else if (get_phi_state (var) == NEED_PHI_STATE_NO)
            ;
          else
            {
!             struct def_blocks_d *db_p = get_def_blocks_for (var);
  
              /* If there are some non-debug uses in the current bb,
                 it is fine.  */
--- 1293,1303 ----
            def = NULL;
          /* If there is just one definition and dominates the current
             bb, it is fine.  */
!         else if (info->need_phi_state == NEED_PHI_STATE_NO)
            ;
          else
            {
!             struct def_blocks_d *db_p = get_def_blocks_for (info);
  
              /* If there are some non-debug uses in the current bb,
                 it is fine.  */
*************** rewrite_leave_block (struct dom_walk_dat
*** 1515,1521 ****
          var = tmp;
        }
  
!       set_current_def (var, saved_def);
      }
  }
  
--- 1491,1497 ----
          var = tmp;
        }
  
!       get_common_info (var)->current_def = saved_def;
      }
  }
  
*************** dump_currdefs (FILE *file)
*** 1639,1649 ****
    fprintf (file, "\n\nCurrent reaching definitions\n\n");
    FOR_EACH_VEC_ELT (tree, symbols_to_rename, i, var)
      {
        fprintf (file, "CURRDEF (");
        print_generic_expr (file, var, 0);
        fprintf (file, ") = ");
!       if (get_current_def (var))
!       print_generic_expr (file, get_current_def (var), 0);
        else
        fprintf (file, "<NIL>");
        fprintf (file, "\n");
--- 1615,1626 ----
    fprintf (file, "\n\nCurrent reaching definitions\n\n");
    FOR_EACH_VEC_ELT (tree, symbols_to_rename, i, var)
      {
+       common_info_p info = get_common_info (var);
        fprintf (file, "CURRDEF (");
        print_generic_expr (file, var, 0);
        fprintf (file, ") = ");
!       if (info->current_def)
!       print_generic_expr (file, info->current_def, 0);
        else
        fprintf (file, "<NIL>");
        fprintf (file, "\n");
*************** static int
*** 1744,1756 ****
  debug_var_infos_r (void **slot, void *data)
  {
    FILE *file = (FILE *) data;
!   struct var_info_d *db_p = (struct var_info_d *) *slot;
  
    fprintf (file, "VAR: ");
!   print_generic_expr (file, db_p->var, dump_flags);
!   bitmap_print (file, db_p->def_blocks.def_blocks, ", DEF_BLOCKS: { ", "}");
!   bitmap_print (file, db_p->def_blocks.livein_blocks, ", LIVEIN_BLOCKS: { ", 
"}");
!   bitmap_print (file, db_p->def_blocks.phi_blocks, ", PHI_BLOCKS: { ", "}\n");
  
    return 1;
  }
--- 1721,1736 ----
  debug_var_infos_r (void **slot, void *data)
  {
    FILE *file = (FILE *) data;
!   struct var_info_d *info = (struct var_info_d *) *slot;
  
    fprintf (file, "VAR: ");
!   print_generic_expr (file, info->var, dump_flags);
!   bitmap_print (file, info->info.def_blocks.def_blocks,
!               ", DEF_BLOCKS: { ", "}");
!   bitmap_print (file, info->info.def_blocks.livein_blocks,
!               ", LIVEIN_BLOCKS: { ", "}");
!   bitmap_print (file, info->info.def_blocks.phi_blocks,
!               ", PHI_BLOCKS: { ", "}\n");
  
    return 1;
  }
*************** debug_var_infos (void)
*** 1781,1787 ****
  static inline void
  register_new_update_single (tree new_name, tree old_name)
  {
!   tree currdef = get_current_def (old_name);
  
    /* Push the current reaching definition into BLOCK_DEFS_STACK.
       This stack is later used by the dominator tree callbacks to
--- 1761,1768 ----
  static inline void
  register_new_update_single (tree new_name, tree old_name)
  {
!   common_info_p info = get_common_info (old_name);
!   tree currdef = info->current_def;
  
    /* Push the current reaching definition into BLOCK_DEFS_STACK.
       This stack is later used by the dominator tree callbacks to
*************** register_new_update_single (tree new_nam
*** 1794,1800 ****
  
    /* Set the current reaching definition for OLD_NAME to be
       NEW_NAME.  */
!   set_current_def (old_name, new_name);
  }
  
  
--- 1775,1781 ----
  
    /* Set the current reaching definition for OLD_NAME to be
       NEW_NAME.  */
!   info->current_def = new_name;
  }
  
  
*************** maybe_replace_use_in_debug_stmt (use_ope
*** 1846,1855 ****
    tree sym = DECL_P (use) ? use : SSA_NAME_VAR (use);
  
    if (marked_for_renaming (sym))
!     rdef = get_current_def (sym);
    else if (is_old_name (use))
      {
!       rdef = get_current_def (use);
        /* We can't assume that, if there's no current definition, the
         default one should be used.  It could be the case that we've
         rearranged blocks so that the earlier definition no longer
--- 1827,1836 ----
    tree sym = DECL_P (use) ? use : SSA_NAME_VAR (use);
  
    if (marked_for_renaming (sym))
!     rdef = get_var_info (sym)->info.current_def;
    else if (is_old_name (use))
      {
!       rdef = get_ssa_name_ann (use)->info.current_def;
        /* We can't assume that, if there's no current definition, the
         default one should be used.  It could be the case that we've
         rearranged blocks so that the earlier definition no longer
*************** rewrite_update_leave_block (struct dom_w
*** 2202,2208 ****
        return;
  
        saved_def = VEC_pop (tree, block_defs_stack);
!       set_current_def (var, saved_def);
      }
  }
  
--- 2183,2189 ----
        return;
  
        saved_def = VEC_pop (tree, block_defs_stack);
!       get_common_info (var)->current_def = saved_def;
      }
  }
  
*************** mark_use_interesting (tree var, gimple s
*** 2515,2521 ****
       replace it).  */
    if (insert_phi_p)
      {
!       struct def_blocks_d *db_p = get_def_blocks_for (var);
        if (!bitmap_bit_p (db_p->def_blocks, bb->index))
        set_livein_block (var, bb);
      }
--- 2496,2502 ----
       replace it).  */
    if (insert_phi_p)
      {
!       struct def_blocks_d *db_p = get_def_blocks_for (get_common_info (var));
        if (!bitmap_bit_p (db_p->def_blocks, bb->index))
        set_livein_block (var, bb);
      }
*************** create_new_def_for (tree old_name, gimpl
*** 2898,2904 ****
    /* For the benefit of passes that will be updating the SSA form on
       their own, set the current reaching definition of OLD_NAME to be
       NEW_NAME.  */
!   set_current_def (old_name, new_name);
  
    return new_name;
  }
--- 2879,2885 ----
    /* For the benefit of passes that will be updating the SSA form on
       their own, set the current reaching definition of OLD_NAME to be
       NEW_NAME.  */
!   get_ssa_name_ann (old_name)->info.current_def = new_name;
  
    return new_name;
  }
*************** update_ssa (unsigned update_flags)
*** 3281,3290 ****
    /* Reset the current definition for name and symbol before renaming
       the sub-graph.  */
    EXECUTE_IF_SET_IN_SBITMAP (old_ssa_names, 0, i, sbi)
!     set_current_def (ssa_name (i), NULL_TREE);
  
    FOR_EACH_VEC_ELT (tree, symbols_to_rename, i, sym)
!     set_current_def (sym, NULL_TREE);
  
    /* Now start the renaming process at START_BB.  */
    interesting_blocks = sbitmap_alloc (last_basic_block);
--- 3262,3271 ----
    /* Reset the current definition for name and symbol before renaming
       the sub-graph.  */
    EXECUTE_IF_SET_IN_SBITMAP (old_ssa_names, 0, i, sbi)
!     get_ssa_name_ann (ssa_name (i))->info.current_def = NULL_TREE;
  
    FOR_EACH_VEC_ELT (tree, symbols_to_rename, i, sym)
!     get_var_info (sym)->info.current_def = NULL_TREE;
  
    /* Now start the renaming process at START_BB.  */
    interesting_blocks = sbitmap_alloc (last_basic_block);

Reply via email to