aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-12-03 22:57:15 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-12-03 21:57:15 +0000
commitbd04cddf10ff455c6798a4c6ee7bc6533ccf9391 (patch)
treea0e3d8b6f2fe134e8aa08d7498f3ad40d3b4c578 /gcc
parent5ec1ae3b8a6e8ae48f51c9345e91da560694fe1e (diff)
downloadgcc-bd04cddf10ff455c6798a4c6ee7bc6533ccf9391.zip
gcc-bd04cddf10ff455c6798a4c6ee7bc6533ccf9391.tar.gz
gcc-bd04cddf10ff455c6798a4c6ee7bc6533ccf9391.tar.bz2
* alias.c (alias_set_subset_of, alias_sets_must_conflict_p)
Short circuit for !flag_strict_aliasing (get_alias_set): Remove flag_strict_aliasing check. (new_alias_set): Likewise. From-SVN: r231239
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/alias.c30
2 files changed, 24 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8a7a4ec..900119a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2015-12-03 Jan Hubicka <hubicka@ucw.cz>
+
+ * alias.c (alias_set_subset_of, alias_sets_must_conflict_p)
+ Short circuit for !flag_strict_aliasing
+ (get_alias_set): Remove flag_strict_aliasing check.
+ (new_alias_set): Likewise.
+
2015-12-03 Evandro Menezes <e.menezes@samsung.com>
* config/aarch64/aarch64-cores.def: Use the Exynos M1 cost model.
diff --git a/gcc/alias.c b/gcc/alias.c
index 9a642dd..66aedce 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -405,6 +405,10 @@ alias_set_subset_of (alias_set_type set1, alias_set_type set2)
{
alias_set_entry *ase2;
+ /* Disable TBAA oracle with !flag_strict_aliasing. */
+ if (!flag_strict_aliasing)
+ return true;
+
/* Everything is a subset of the "aliases everything" set. */
if (set2 == 0)
return true;
@@ -537,6 +541,9 @@ alias_sets_conflict_p (alias_set_type set1, alias_set_type set2)
int
alias_sets_must_conflict_p (alias_set_type set1, alias_set_type set2)
{
+ /* Disable TBAA oracle with !flag_strict_aliasing. */
+ if (!flag_strict_aliasing)
+ return 1;
if (set1 == 0 || set2 == 0)
{
++alias_stats.num_alias_zero;
@@ -816,10 +823,12 @@ get_alias_set (tree t)
{
alias_set_type set;
- /* If we're not doing any alias analysis, just assume everything
- aliases everything else. Also return 0 if this or its type is
- an error. */
- if (! flag_strict_aliasing || t == error_mark_node
+ /* We can not give up with -fno-strict-aliasing because we need to build
+ proper type representation for possible functions which are build with
+ -fstirct-aliasing. */
+
+ /* return 0 if this or its type is an error. */
+ if (t == error_mark_node
|| (! TYPE_P (t)
&& (TREE_TYPE (t) == 0 || TREE_TYPE (t) == error_mark_node)))
return 0;
@@ -1085,15 +1094,10 @@ get_alias_set (tree t)
alias_set_type
new_alias_set (void)
{
- if (flag_strict_aliasing)
- {
- if (alias_sets == 0)
- vec_safe_push (alias_sets, (alias_set_entry *) NULL);
- vec_safe_push (alias_sets, (alias_set_entry *) NULL);
- return alias_sets->length () - 1;
- }
- else
- return 0;
+ if (alias_sets == 0)
+ vec_safe_push (alias_sets, (alias_set_entry *) NULL);
+ vec_safe_push (alias_sets, (alias_set_entry *) NULL);
+ return alias_sets->length () - 1;
}
/* Indicate that things in SUBSET can alias things in SUPERSET, but that