diff options
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 835edd1..d4864ae 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -849,6 +849,24 @@ is_parm (tree decl) return (TREE_CODE (decl) == PARM_DECL); } +/* Remap the dependence CLIQUE from the source to the destination function + as specified in ID. */ + +static unsigned short +remap_dependence_clique (copy_body_data *id, unsigned short clique) +{ + if (clique == 0) + return 0; + if (!id->dependence_map) + id->dependence_map + = new hash_map<unsigned short, unsigned short, dependence_hasher>; + bool existed; + unsigned short &newc = id->dependence_map->get_or_insert (clique, &existed); + if (!existed) + newc = ++cfun->last_clique; + return newc; +} + /* Remap the GIMPLE operand pointed to by *TP. DATA is really a 'struct walk_stmt_info *'. DATA->INFO is a 'copy_body_data *'. WALK_SUBTREES is used to indicate walk_gimple_op whether to keep @@ -947,6 +965,12 @@ remap_gimple_op_r (tree *tp, int *walk_subtrees, void *data) TREE_THIS_VOLATILE (*tp) = TREE_THIS_VOLATILE (old); TREE_SIDE_EFFECTS (*tp) = TREE_SIDE_EFFECTS (old); TREE_NO_WARNING (*tp) = TREE_NO_WARNING (old); + if (MR_DEPENDENCE_CLIQUE (old) != 0) + { + MR_DEPENDENCE_CLIQUE (*tp) + = remap_dependence_clique (id, MR_DEPENDENCE_CLIQUE (old)); + MR_DEPENDENCE_BASE (*tp) = MR_DEPENDENCE_BASE (old); + } /* We cannot propagate the TREE_THIS_NOTRAP flag if we have remapped a parameter as the property might be valid only for the parameter itself. */ @@ -1198,6 +1222,12 @@ copy_tree_body_r (tree *tp, int *walk_subtrees, void *data) TREE_THIS_VOLATILE (*tp) = TREE_THIS_VOLATILE (old); TREE_SIDE_EFFECTS (*tp) = TREE_SIDE_EFFECTS (old); TREE_NO_WARNING (*tp) = TREE_NO_WARNING (old); + if (MR_DEPENDENCE_CLIQUE (old) != 0) + { + MR_DEPENDENCE_CLIQUE (*tp) + = remap_dependence_clique (id, MR_DEPENDENCE_CLIQUE (old)); + MR_DEPENDENCE_BASE (*tp) = MR_DEPENDENCE_BASE (old); + } /* We cannot propagate the TREE_THIS_NOTRAP flag if we have remapped a parameter as the property might be valid only for the parameter itself. */ @@ -2762,6 +2792,11 @@ copy_cfg_body (copy_body_data * id, gcov_type count, int frequency_scale, delete id->eh_map; id->eh_map = NULL; } + if (id->dependence_map) + { + delete id->dependence_map; + id->dependence_map = NULL; + } return new_fndecl; } @@ -5147,6 +5182,11 @@ copy_gimple_seq_and_replace_locals (gimple_seq seq) delete id.decl_map; if (id.debug_map) delete id.debug_map; + if (id.dependence_map) + { + delete id.dependence_map; + id.dependence_map = NULL; + } return copy; } |