invoke.texi (-fargument-alias, [...]): Remove.

2010-04-07  Richard Guenther  <rguenther@suse.de>

	* doc/invoke.texi (-fargument-alias, -fargument-noalias,
	-fargument-noalias-global, -fargument-noalias-anything): Remove.
	* common.opt: Likewise.
	* tree-ssa-structalias.c (intra_create_variable_infos): Adjust
	comment.
	* alias.c (base_alias_check): Remove flag_argument_noalias
	handling.
	(nonoverlapping_memrefs_p): Likewise.
	* emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
	* opts.c (common_handle_option): Handle OPT_fargument_alias,
	OPT_fargument_noalias, OPT_fargument_noalias_anything and
	OPT_fargument_noalias_global for backward compatibility.

	fortran/
	* options.c (gfc_init_options): Do not set.

From-SVN: r158060
This commit is contained in:
Richard Guenther 2010-04-07 13:08:24 +00:00 committed by Richard Biener
parent 12bd5a1e9f
commit 0d3c82d66e
9 changed files with 35 additions and 87 deletions

View File

@ -1,3 +1,18 @@
2010-04-07 Richard Guenther <rguenther@suse.de>
* doc/invoke.texi (-fargument-alias, -fargument-noalias,
-fargument-noalias-global, -fargument-noalias-anything): Remove.
* common.opt: Likewise.
* tree-ssa-structalias.c (intra_create_variable_infos): Adjust
comment.
* alias.c (base_alias_check): Remove flag_argument_noalias
handling.
(nonoverlapping_memrefs_p): Likewise.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
* opts.c (common_handle_option): Handle OPT_fargument_alias,
OPT_fargument_noalias, OPT_fargument_noalias_anything and
OPT_fargument_noalias_global for backward compatibility.
2010-04-07 Richard Guenther <rguenther@suse.de> 2010-04-07 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43270 PR tree-optimization/43270

View File

@ -1691,14 +1691,7 @@ base_alias_check (rtx x, rtx y, enum machine_mode x_mode,
|| (GET_CODE (y_base) == ADDRESS && GET_MODE (y_base) == Pmode)) || (GET_CODE (y_base) == ADDRESS && GET_MODE (y_base) == Pmode))
return 0; return 0;
if (! flag_argument_noalias) return 1;
return 1;
if (flag_argument_noalias > 1)
return 0;
/* Weak noalias assertion (arguments are distinct, but may match globals). */
return ! (GET_MODE (x_base) == VOIDmode && GET_MODE (y_base) == VOIDmode);
} }
/* Convert the address X into something we can use. This is done by returning /* Convert the address X into something we can use. This is done by returning
@ -2189,13 +2182,6 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y)
exprx = t; exprx = t;
} }
} }
else if (INDIRECT_REF_P (exprx))
{
exprx = TREE_OPERAND (exprx, 0);
if (flag_argument_noalias < 2
|| TREE_CODE (exprx) != PARM_DECL)
return 0;
}
moffsety = MEM_OFFSET (y); moffsety = MEM_OFFSET (y);
if (TREE_CODE (expry) == COMPONENT_REF) if (TREE_CODE (expry) == COMPONENT_REF)
@ -2217,13 +2203,6 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y)
expry = t; expry = t;
} }
} }
else if (INDIRECT_REF_P (expry))
{
expry = TREE_OPERAND (expry, 0);
if (flag_argument_noalias < 2
|| TREE_CODE (expry) != PARM_DECL)
return 0;
}
if (! DECL_P (exprx) || ! DECL_P (expry)) if (! DECL_P (exprx) || ! DECL_P (expry))
return 0; return 0;

View File

@ -307,29 +307,21 @@ Align the start of loops
falign-loops= falign-loops=
Common RejectNegative Joined UInteger Common RejectNegative Joined UInteger
; This flag is only tested if alias checking is enabled.
; 0 if pointer arguments may alias each other. True in C.
; 1 if pointer arguments may not alias each other but may alias
; global variables.
; 2 if pointer arguments may not alias each other and may not
; 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) Optimization Common
Specify that arguments may alias each other and globals Does nothing. Preserved for backward compatibility.
fargument-noalias fargument-noalias
Common Report Var(flag_argument_noalias,1) VarExists Optimization Common
Assume arguments may alias globals but not each other Does nothing. Preserved for backward compatibility.
fargument-noalias-global fargument-noalias-global
Common Report Var(flag_argument_noalias,2) VarExists Optimization Common
Assume arguments alias neither each other nor globals Does nothing. Preserved for backward compatibility.
fargument-noalias-anything fargument-noalias-anything
Common Report Var(flag_argument_noalias,3) VarExists Optimization Common
Assume arguments alias no other storage Does nothing. Preserved for backward compatibility.
fasynchronous-unwind-tables fasynchronous-unwind-tables
Common Report Var(flag_asynchronous_unwind_tables) Optimization Common Report Var(flag_asynchronous_unwind_tables) Optimization

View File

@ -916,8 +916,7 @@ See S/390 and zSeries Options.
-fshort-double -fshort-wchar @gol -fshort-double -fshort-wchar @gol
-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
-fno-stack-limit -fargument-alias -fargument-noalias @gol -fno-stack-limit @gol
-fargument-noalias-global -fargument-noalias-anything @gol
-fleading-underscore -ftls-model=@var{model} @gol -fleading-underscore -ftls-model=@var{model} @gol
-ftrapv -fwrapv -fbounds-check @gol -ftrapv -fwrapv -fbounds-check @gol
-fvisibility} -fvisibility}
@ -17444,31 +17443,6 @@ and grows downwards, you can use the flags
@option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit @option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit
of 128KB@. Note that this may only work with the GNU linker. of 128KB@. Note that this may only work with the GNU linker.
@cindex aliasing of parameters
@cindex parameters, aliased
@item -fargument-alias
@itemx -fargument-noalias
@itemx -fargument-noalias-global
@itemx -fargument-noalias-anything
@opindex fargument-alias
@opindex fargument-noalias
@opindex fargument-noalias-global
@opindex fargument-noalias-anything
Specify the possible relationships among parameters and between
parameters and global data.
@option{-fargument-alias} specifies that arguments (parameters) may
alias each other and may alias global storage.@*
@option{-fargument-noalias} specifies that arguments do not alias
each other, but may alias global storage.@*
@option{-fargument-noalias-global} specifies that arguments do not
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
the language standard. You should not need to use these options yourself.
@item -fleading-underscore @item -fleading-underscore
@opindex fleading-underscore @opindex fleading-underscore
This option and its counterpart, @option{-fno-leading-underscore}, forcibly This option and its counterpart, @option{-fno-leading-underscore}, forcibly

View File

@ -1751,14 +1751,6 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
the size we got from the type? */ the size we got from the type? */
} }
else if (flag_argument_noalias > 1
&& (INDIRECT_REF_P (t2))
&& TREE_CODE (TREE_OPERAND (t2, 0)) == PARM_DECL)
{
expr = t2;
offset = NULL;
}
/* If this is an indirect reference, record it. */ /* If this is an indirect reference, record it. */
else if (TREE_CODE (t) == INDIRECT_REF else if (TREE_CODE (t) == INDIRECT_REF
|| TREE_CODE (t) == MISALIGNED_INDIRECT_REF) || TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
@ -1769,16 +1761,6 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
} }
} }
/* If this is a Fortran indirect argument reference, record the
parameter decl. */
else if (flag_argument_noalias > 1
&& (INDIRECT_REF_P (t))
&& TREE_CODE (TREE_OPERAND (t, 0)) == PARM_DECL)
{
expr = t;
offset = NULL;
}
/* If this is an indirect reference, record it. */ /* If this is an indirect reference, record it. */
else if (TREE_CODE (t) == INDIRECT_REF else if (TREE_CODE (t) == INDIRECT_REF
|| TREE_CODE (t) == MISALIGNED_INDIRECT_REF) || TREE_CODE (t) == MISALIGNED_INDIRECT_REF)

View File

@ -1,3 +1,7 @@
2010-04-07 Richard Guenther <rguenther@suse.de>
* options.c (gfc_init_options): Do not set.
2010-04-06 Tobias Burnus <burnus@net-b.de> 2010-04-06 Tobias Burnus <burnus@net-b.de>
PR fortran/18918 PR fortran/18918

View File

@ -132,9 +132,6 @@ gfc_init_options (unsigned int argc, const char **argv)
gfc_option.rtcheck = 0; gfc_option.rtcheck = 0;
gfc_option.coarray = GFC_FCOARRAY_NONE; gfc_option.coarray = GFC_FCOARRAY_NONE;
/* Argument pointers cannot point to anything but their argument. */
flag_argument_noalias = 3;
flag_errno_math = 0; flag_errno_math = 0;
set_default_std_flags (); set_default_std_flags ();

View File

@ -2127,6 +2127,10 @@ common_handle_option (size_t scode, const char *arg, int value,
case OPT_ftree_salias: case OPT_ftree_salias:
case OPT_ftree_store_ccp: case OPT_ftree_store_ccp:
case OPT_Wunreachable_code: case OPT_Wunreachable_code:
case OPT_fargument_alias:
case OPT_fargument_noalias:
case OPT_fargument_noalias_anything:
case OPT_fargument_noalias_global:
/* These are no-ops, preserved for backward compatibility. */ /* These are no-ops, preserved for backward compatibility. */
break; break;

View File

@ -4611,7 +4611,8 @@ intra_create_variable_infos (void)
tree t; tree t;
/* For each incoming pointer argument arg, create the constraint ARG /* For each incoming pointer argument arg, create the constraint ARG
= NONLOCAL or a dummy variable if flag_argument_noalias is set. */ = NONLOCAL or a dummy variable if it is a restrict qualified
passed-by-reference argument. */
for (t = DECL_ARGUMENTS (current_function_decl); t; t = TREE_CHAIN (t)) for (t = DECL_ARGUMENTS (current_function_decl); t; t = TREE_CHAIN (t))
{ {
varinfo_t p; varinfo_t p;