From 0d3c82d66efda2c9986612bd593097bdb2cd8c8f Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 7 Apr 2010 13:08:24 +0000 Subject: [PATCH] invoke.texi (-fargument-alias, [...]): Remove. 2010-04-07 Richard Guenther * 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 --- gcc/ChangeLog | 15 +++++++++++++++ gcc/alias.c | 23 +---------------------- gcc/common.opt | 24 ++++++++---------------- gcc/doc/invoke.texi | 28 +--------------------------- gcc/emit-rtl.c | 18 ------------------ gcc/fortran/ChangeLog | 4 ++++ gcc/fortran/options.c | 3 --- gcc/opts.c | 4 ++++ gcc/tree-ssa-structalias.c | 3 ++- 9 files changed, 35 insertions(+), 87 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ca2b7f6a4b6..af2e371faa8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2010-04-07 Richard Guenther + + * 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 PR tree-optimization/43270 diff --git a/gcc/alias.c b/gcc/alias.c index 19a8292b454..c10b971e3df 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -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)) return 0; - if (! flag_argument_noalias) - 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); + return 1; } /* 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; } } - 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); if (TREE_CODE (expry) == COMPONENT_REF) @@ -2217,13 +2203,6 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y) 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)) return 0; diff --git a/gcc/common.opt b/gcc/common.opt index cdb4e085d51..2b8b6d70620 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -307,29 +307,21 @@ Align the start of loops falign-loops= 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 -Common Report Var(flag_argument_noalias,0) Optimization -Specify that arguments may alias each other and globals +Common +Does nothing. Preserved for backward compatibility. fargument-noalias -Common Report Var(flag_argument_noalias,1) VarExists Optimization -Assume arguments may alias globals but not each other +Common +Does nothing. Preserved for backward compatibility. fargument-noalias-global -Common Report Var(flag_argument_noalias,2) VarExists Optimization -Assume arguments alias neither each other nor globals +Common +Does nothing. Preserved for backward compatibility. fargument-noalias-anything -Common Report Var(flag_argument_noalias,3) VarExists Optimization -Assume arguments alias no other storage +Common +Does nothing. Preserved for backward compatibility. fasynchronous-unwind-tables Common Report Var(flag_asynchronous_unwind_tables) Optimization diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 341d1b7ed26..76c424024e0 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -916,8 +916,7 @@ See S/390 and zSeries Options. -fshort-double -fshort-wchar @gol -fverbose-asm -fpack-struct[=@var{n}] -fstack-check @gol -fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol --fno-stack-limit -fargument-alias -fargument-noalias @gol --fargument-noalias-global -fargument-noalias-anything @gol +-fno-stack-limit @gol -fleading-underscore -ftls-model=@var{model} @gol -ftrapv -fwrapv -fbounds-check @gol -fvisibility} @@ -17444,31 +17443,6 @@ and grows downwards, you can use the flags @option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit 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 @opindex fleading-underscore This option and its counterpart, @option{-fno-leading-underscore}, forcibly diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index dda2b0f0f70..ab46195fcb9 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1751,14 +1751,6 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp, 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. */ else if (TREE_CODE (t) == 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. */ else if (TREE_CODE (t) == INDIRECT_REF || TREE_CODE (t) == MISALIGNED_INDIRECT_REF) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 9725d8e2f1d..2b1aa30b407 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2010-04-07 Richard Guenther + + * options.c (gfc_init_options): Do not set. + 2010-04-06 Tobias Burnus PR fortran/18918 diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index 676bbe125bd..bcbf69549b3 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -132,9 +132,6 @@ gfc_init_options (unsigned int argc, const char **argv) gfc_option.rtcheck = 0; gfc_option.coarray = GFC_FCOARRAY_NONE; - /* Argument pointers cannot point to anything but their argument. */ - flag_argument_noalias = 3; - flag_errno_math = 0; set_default_std_flags (); diff --git a/gcc/opts.c b/gcc/opts.c index 139cd269416..7c928bb4c03 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -2127,6 +2127,10 @@ common_handle_option (size_t scode, const char *arg, int value, case OPT_ftree_salias: case OPT_ftree_store_ccp: 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. */ break; diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 1ea7afca39b..1516634b871 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -4611,7 +4611,8 @@ intra_create_variable_infos (void) tree t; /* 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)) { varinfo_t p;