Handle restrict pointer references as restrict in AA

2015-09-22  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/67671
	* tree-ssa-structalias.c (create_variable_info_for_1): Handle restrict
	pointer references as restrict.

	* g++.dg/pr67671.C: New test.

From-SVN: r228015
This commit is contained in:
Tom de Vries 2015-09-22 14:14:56 +00:00 committed by Tom de Vries
parent 0854c7f115
commit 8013b816cc
4 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2015-09-22 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/67671
* tree-ssa-structalias.c (create_variable_info_for_1): Handle restrict
pointer references as restrict.
2015-09-22 Chung-Lin Tang <cltang@codesourcery.com>
* config/nios2/nios2.c (nios2_legitimize_address): When handling

View File

@ -1,3 +1,8 @@
2015-09-22 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/67671
* g++.dg/pr67671.C: New test.
2015-09-22 Alexander Fomin <alexander.fomin@intel.com>
PR target/67480

View File

@ -0,0 +1,12 @@
// { dg-do compile }
// { dg-options "-O2 -fdump-tree-ealias-all" }
void
f (int *__restrict__ &__restrict__ p)
{
*p = 1;
}
// { dg-final { scan-tree-dump-times "clique 1 base 1" 1 "ealias" } }
// { dg-final { scan-tree-dump-times "clique 1 base 2" 1 "ealias" } }
// { dg-final { scan-tree-dump-times "(?n)clique .* base .*" 2 "ealias" } }

View File

@ -5684,6 +5684,9 @@ create_variable_info_for_1 (tree decl, const char *name)
vi->fullsize = tree_to_uhwi (declsize);
vi->size = vi->fullsize;
vi->is_full_var = true;
if (POINTER_TYPE_P (TREE_TYPE (decl))
&& TYPE_RESTRICT (TREE_TYPE (decl)))
vi->only_restrict_pointers = 1;
fieldstack.release ();
return vi;
}