diff options
author | Ben Cheng <bccheng@google.com> | 2014-05-17 17:03:43 -0700 |
---|---|---|
committer | Ben Cheng <bccheng@google.com> | 2014-05-17 17:12:35 -0700 |
commit | 8c493ead6366b552adee796de296936b78f34c5a (patch) | |
tree | 4936e52fb9b84edbcd9293bd321027413d1835bf /gcc-4.9/gcc/tree-ssa-structalias.c | |
parent | 9750bde7e561731ce8a07cdbd0165a688e74a696 (diff) | |
download | toolchain_gcc-8c493ead6366b552adee796de296936b78f34c5a.tar.gz toolchain_gcc-8c493ead6366b552adee796de296936b78f34c5a.tar.bz2 toolchain_gcc-8c493ead6366b552adee796de296936b78f34c5a.zip |
[4.9] Refresh GCC 4.9 to the 20140514 snapshot.
For critical bug fixes including devirtualization and codegen.
Change-Id: I8138d3dc408fc12db5eecb01d2753d39219712f2
Diffstat (limited to 'gcc-4.9/gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc-4.9/gcc/tree-ssa-structalias.c | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/gcc-4.9/gcc/tree-ssa-structalias.c b/gcc-4.9/gcc/tree-ssa-structalias.c index 8201cb423..347dba3e9 100644 --- a/gcc-4.9/gcc/tree-ssa-structalias.c +++ b/gcc-4.9/gcc/tree-ssa-structalias.c @@ -7264,10 +7264,7 @@ ipa_pta_execute (void) tree ptr; struct function *fn; unsigned i; - varinfo_t fi; basic_block bb; - struct pt_solution uses, clobbers; - struct cgraph_edge *e; /* Nodes without a body are not interesting. */ if (!cgraph_function_with_gimple_body_p (node) || node->clone_of) @@ -7283,21 +7280,6 @@ ipa_pta_execute (void) find_what_p_points_to (ptr); } - /* Compute the call-use and call-clobber sets for all direct calls. */ - fi = lookup_vi_for_tree (node->decl); - gcc_assert (fi->is_fn_info); - clobbers - = find_what_var_points_to (first_vi_for_offset (fi, fi_clobbers)); - uses = find_what_var_points_to (first_vi_for_offset (fi, fi_uses)); - for (e = node->callers; e; e = e->next_caller) - { - if (!e->call_stmt) - continue; - - *gimple_call_clobber_set (e->call_stmt) = clobbers; - *gimple_call_use_set (e->call_stmt) = uses; - } - /* Compute the call-use and call-clobber sets for indirect calls and calls to external functions. */ FOR_EACH_BB_FN (bb, fn) @@ -7308,17 +7290,27 @@ ipa_pta_execute (void) { gimple stmt = gsi_stmt (gsi); struct pt_solution *pt; - varinfo_t vi; + varinfo_t vi, fi; tree decl; if (!is_gimple_call (stmt)) continue; - /* Handle direct calls to external functions. */ + /* Handle direct calls to functions with body. */ decl = gimple_call_fndecl (stmt); if (decl - && (!(fi = lookup_vi_for_tree (decl)) - || !fi->is_fn_info)) + && (fi = lookup_vi_for_tree (decl)) + && fi->is_fn_info) + { + *gimple_call_clobber_set (stmt) + = find_what_var_points_to + (first_vi_for_offset (fi, fi_clobbers)); + *gimple_call_use_set (stmt) + = find_what_var_points_to + (first_vi_for_offset (fi, fi_uses)); + } + /* Handle direct calls to external functions. */ + else if (decl) { pt = gimple_call_use_set (stmt); if (gimple_call_flags (stmt) & ECF_CONST) @@ -7362,10 +7354,9 @@ ipa_pta_execute (void) pt->nonlocal = 1; } } - /* Handle indirect calls. */ - if (!decl - && (fi = get_fi_for_callee (stmt))) + else if (!decl + && (fi = get_fi_for_callee (stmt))) { /* We need to accumulate all clobbers/uses of all possible callees. */ |