aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-03-10 08:06:03 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-03-10 08:06:03 +0000
commit3a81a5941f88c3774e4b337ab275cd6c25508124 (patch)
tree23ea3926bf705306c1527d09670ca40e467760b8 /gcc/tree-ssa-structalias.c
parentac58dca5fa7ae3a1b97a612a26208cf566fdbeef (diff)
downloadgcc-3a81a5941f88c3774e4b337ab275cd6c25508124.zip
gcc-3a81a5941f88c3774e4b337ab275cd6c25508124.tar.gz
gcc-3a81a5941f88c3774e4b337ab275cd6c25508124.tar.bz2
re PR tree-optimization/70128 (Linux kernel div patching optimized away)
2016-03-10 Richard Biener <rguenther@suse.de> PR tree-optimization/70128 * tree-ssa-structalias.c (set_uids_in_ptset): Set vars_contains_nonlocal for any FUNCTION_DECL or LABEL_DECL. * gcc.dg/tree-ssa/alias-34.c: New testcase. * gcc.dg/tree-ssa/alias-35.c: Likewise. From-SVN: r234099
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index de12380..bad1ea1 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -6280,6 +6280,16 @@ set_uids_in_ptset (bitmap into, bitmap from, struct pt_solution *pt,
&& ! auto_var_in_fn_p (vi->decl, fndecl)))
pt->vars_contains_nonlocal = true;
}
+
+ else if (TREE_CODE (vi->decl) == FUNCTION_DECL
+ || TREE_CODE (vi->decl) == LABEL_DECL)
+ {
+ /* Nothing should read/write from/to code so we can
+ save bits by not including them in the points-to bitmaps.
+ Still mark the points-to set as containing global memory
+ to make code-patching possible - see PR70128. */
+ pt->vars_contains_nonlocal = true;
+ }
}
}