Commit 0698a1d2 by Toon Moene Committed by Toon Moene

options.c (gfc_init_options): Initialize flag_argument_noalias to 3.

2006-03-21  Toon Moene  <toon@moene.indiv.nluug.nl>

	* fortran/options.c (gfc_init_options): Initialize
	flag_argument_noalias to 3.
	* doc/invoke.texi: Document new flag -fargument-noalias-anything.
	* tree-ssa-alias.c (may_alias_p): If flag_argument_noalias > 2,
	argument pointers may not alias any other storage.
	* common.opt: Define option -fargument-noalias-anything.
	* tree-ssa-structalias.c (intra_create_variable_infos): Fortran
	alias semantics is specified by flag_argument_noalias > 2.

From-SVN: r112243
parent e67c25c7
2006-03-21 Toon Moene <toon@moene.indiv.nluug.nl>
* doc/invoke.texi: Document new flag -fargument-noalias-anything.
* tree-ssa-alias.c (may_alias_p): If flag_argument_noalias > 2,
argument pointers may not alias any other storage.
* common.opt: Define option -fargument-noalias-anything.
* tree-ssa-structalias.c (intra_create_variable_infos): Fortran
alias semantics is specified by flag_argument_noalias > 2.
2006-03-20 Jeff Law <law@redhat.com> 2006-03-20 Jeff Law <law@redhat.com>
* tree-pass.h (pass_phi_only_copy_prop): Delete. * tree-pass.h (pass_phi_only_copy_prop): Delete.
......
...@@ -257,7 +257,9 @@ Common RejectNegative Joined UInteger ...@@ -257,7 +257,9 @@ Common RejectNegative Joined UInteger
; 1 if pointer arguments may not alias each other but may alias ; 1 if pointer arguments may not alias each other but may alias
; global variables. ; global variables.
; 2 if pointer arguments may not alias each other and may not ; 2 if pointer arguments may not alias each other and may not
; alias global variables. True in Fortran. ; alias global variables.
; 3 if pointer arguments may not alias anything. True in Fortran.
; Set by the front end.
fargument-alias fargument-alias
Common Report Var(flag_argument_noalias,0) Common Report Var(flag_argument_noalias,0)
Specify that arguments may alias each other and globals Specify that arguments may alias each other and globals
...@@ -270,6 +272,10 @@ fargument-noalias-global ...@@ -270,6 +272,10 @@ fargument-noalias-global
Common Report Var(flag_argument_noalias,2) VarExists Common Report Var(flag_argument_noalias,2) VarExists
Assume arguments alias neither each other nor globals Assume arguments alias neither each other nor globals
fargument-noalias-anything
Common Report Var(flag_argument_noalias,3) VarExists
Assume arguments alias no other storage
fasynchronous-unwind-tables fasynchronous-unwind-tables
Common Report Var(flag_asynchronous_unwind_tables) Common Report Var(flag_asynchronous_unwind_tables)
Generate unwind tables that are exact at each instruction boundary Generate unwind tables that are exact at each instruction boundary
......
...@@ -773,8 +773,8 @@ See S/390 and zSeries Options. ...@@ -773,8 +773,8 @@ See S/390 and zSeries Options.
-fverbose-asm -fpack-struct[=@var{n}] -fstack-check @gol -fverbose-asm -fpack-struct[=@var{n}] -fstack-check @gol
-fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol -fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol
-fargument-alias -fargument-noalias @gol -fargument-alias -fargument-noalias @gol
-fargument-noalias-global -fleading-underscore @gol -fargument-noalias-global -fargument-noalias-anything
-ftls-model=@var{model} @gol -fleading-underscore -ftls-model=@var{model} @gol
-ftrapv -fwrapv -fbounds-check @gol -ftrapv -fwrapv -fbounds-check @gol
-fvisibility -fopenmp} -fvisibility -fopenmp}
@end table @end table
...@@ -13332,9 +13332,11 @@ of 128KB@. Note that this may only work with the GNU linker. ...@@ -13332,9 +13332,11 @@ of 128KB@. Note that this may only work with the GNU linker.
@item -fargument-alias @item -fargument-alias
@itemx -fargument-noalias @itemx -fargument-noalias
@itemx -fargument-noalias-global @itemx -fargument-noalias-global
@itemx -fargument-noalias-anything
@opindex fargument-alias @opindex fargument-alias
@opindex fargument-noalias @opindex fargument-noalias
@opindex fargument-noalias-global @opindex fargument-noalias-global
@opindex fargument-noalias-anything
Specify the possible relationships among parameters and between Specify the possible relationships among parameters and between
parameters and global data. parameters and global data.
...@@ -13344,6 +13346,8 @@ alias each other and may alias global storage.@* ...@@ -13344,6 +13346,8 @@ alias each other and may alias global storage.@*
each other, but may alias global storage.@* each other, but may alias global storage.@*
@option{-fargument-noalias-global} specifies that arguments do not @option{-fargument-noalias-global} specifies that arguments do not
alias each other and do not alias global storage. alias each other and do not alias global storage.
@option{-fargument-noalias-anything} specifies that arguments do not
alias any other storage.
Each language will automatically use whatever option is required by Each language will automatically use whatever option is required by
the language standard. You should not need to use these options yourself. the language standard. You should not need to use these options yourself.
......
2006-03-21 Toon Moene <toon@moene.indiv.nluug.nl>
* options.c (gfc_init_options): Initialize
flag_argument_noalias to 3.
2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/20935 PR fortran/20935
......
...@@ -85,7 +85,10 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED, ...@@ -85,7 +85,10 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED,
gfc_option.fpe = 0; gfc_option.fpe = 0;
flag_argument_noalias = 2; /* Argument pointers cannot point to anything
but their argument. */
flag_argument_noalias = 3;
flag_errno_math = 0; flag_errno_math = 0;
gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL
......
...@@ -1804,8 +1804,17 @@ may_alias_p (tree ptr, HOST_WIDE_INT mem_alias_set, ...@@ -1804,8 +1804,17 @@ may_alias_p (tree ptr, HOST_WIDE_INT mem_alias_set,
alias_stats.simple_resolved++; alias_stats.simple_resolved++;
return false; return false;
} }
/* If -fargument-noalias-global is >1, pointer arguments may /* If -fargument-noalias-global is > 2, pointer arguments may
not point to anything else. */
if (flag_argument_noalias > 2 && TREE_CODE (ptr) == PARM_DECL)
{
alias_stats.alias_noalias++;
alias_stats.simple_resolved++;
return false;
}
/* If -fargument-noalias-global is > 1, pointer arguments may
not point to global variables. */ not point to global variables. */
if (flag_argument_noalias > 1 && is_global_var (var) if (flag_argument_noalias > 1 && is_global_var (var)
&& TREE_CODE (ptr) == PARM_DECL) && TREE_CODE (ptr) == PARM_DECL)
......
...@@ -4041,7 +4041,7 @@ intra_create_variable_infos (void) ...@@ -4041,7 +4041,7 @@ intra_create_variable_infos (void)
tree t; tree t;
/* For each incoming argument arg, ARG = &ANYTHING or a dummy variable if /* For each incoming argument arg, ARG = &ANYTHING or a dummy variable if
flag_argument_noalias > 1. */ flag_argument_noalias > 2. */
for (t = DECL_ARGUMENTS (current_function_decl); t; t = TREE_CHAIN (t)) for (t = DECL_ARGUMENTS (current_function_decl); t; t = TREE_CHAIN (t))
{ {
struct constraint_expr lhs; struct constraint_expr lhs;
...@@ -4051,11 +4051,11 @@ intra_create_variable_infos (void) ...@@ -4051,11 +4051,11 @@ intra_create_variable_infos (void)
lhs.type = SCALAR; lhs.type = SCALAR;
lhs.var = create_variable_info_for (t, alias_get_name (t)); lhs.var = create_variable_info_for (t, alias_get_name (t));
/* With flag_argument_noalias greater than one means that the incoming /* With flag_argument_noalias greater than two means that the incoming
argument cannot alias anything except for itself so create a HEAP argument cannot alias anything except for itself so create a HEAP
variable. */ variable. */
if (POINTER_TYPE_P (TREE_TYPE (t)) if (POINTER_TYPE_P (TREE_TYPE (t))
&& flag_argument_noalias > 1) && flag_argument_noalias > 2)
{ {
varinfo_t vi; varinfo_t vi;
struct constraint_expr rhs; struct constraint_expr rhs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment