2008-05-08 Richard Guenther <rguenther@suse.de>
* doc/invoke.texi (-fdump-tree-salias): Remove documentation.
(-ftree-salias): Likewise.
(salias-max-implicit-fields): Remove param documentation.
(salias-max-array-elements): Likewise.
* tree-pass.h (pass_create_structure_vars): Remove.
* params.h (SALIAS_MAX_IMPLICIT_FIELDS): Remove.
(SALIAS_MAX_ARRAY_ELEMENTS): Likewise.
* tree-ssa-alias.c (create_structure_vars): Remove.
(gate_structure_vars): Likewise.
(pass_create_structure_vars): Likewise.
(gate_build_alias): Likewise.
(pass_build_alias): Adjust to run always and dump the function.
* common.opt (ftree-salias): Hide.
* passes.c (init_optimization_passes): Remove
pass_create_structure_vars, adjust comment.
* params.def (PARAM_SALIAS_MAX_IMPLICIT_FIELDS): Remove.
(PARAM_SALIAS_MAX_ARRAY_ELEMENTS): Likewise.
* opts.c (decode_options): Do not set flag_tree_salias.
(common_handle_option): Add OPT_ftree_salias to the backward
compatibility section.
* gcc.dg/tree-ssa/
20040911-1.c: Adjust.
* gcc.dg/tree-ssa/
20040517-1.c: Likewise.
* gcc.dg/tree-ssa/pr26421.c: Likewise.
* gcc.dg/tree-ssa/pr23382.c: Likewise.
* gcc.dg/tree-ssa/alias-15.c: Likewise.
* gcc.dg/tree-ssa/inline_asm-1.c: Likewise.
* gcc.dg/tree-ssa/inline_asm-2.c: Likewise.
* gcc.dg/tree-ssa/pta-fp.c: Likewise.
* gcc.dg/tree-ssa/
20031015-1.c: Likewise.
* gcc.dg/tree-ssa/alias-12.c: Likewise.
From-SVN: r135111
+2008-05-08 Richard Guenther <rguenther@suse.de>
+
+ * doc/invoke.texi (-fdump-tree-salias): Remove documentation.
+ (-ftree-salias): Likewise.
+ (salias-max-implicit-fields): Remove param documentation.
+ (salias-max-array-elements): Likewise.
+ * tree-pass.h (pass_create_structure_vars): Remove.
+ * params.h (SALIAS_MAX_IMPLICIT_FIELDS): Remove.
+ (SALIAS_MAX_ARRAY_ELEMENTS): Likewise.
+ * tree-ssa-alias.c (create_structure_vars): Remove.
+ (gate_structure_vars): Likewise.
+ (pass_create_structure_vars): Likewise.
+ (gate_build_alias): Likewise.
+ (pass_build_alias): Adjust to run always and dump the function.
+ * common.opt (ftree-salias): Hide.
+ * passes.c (init_optimization_passes): Remove
+ pass_create_structure_vars, adjust comment.
+ * params.def (PARAM_SALIAS_MAX_IMPLICIT_FIELDS): Remove.
+ (PARAM_SALIAS_MAX_ARRAY_ELEMENTS): Likewise.
+ * opts.c (decode_options): Do not set flag_tree_salias.
+ (common_handle_option): Add OPT_ftree_salias to the backward
+ compatibility section.
+
2008-05-08 Richard Guenther <rguenther@suse.de>
* tree-flow-inline.h (var_can_have_subvars): Move ...
Enable reassociation on tree level
ftree-salias
-Common Report Var(flag_tree_salias) Optimization
-Perform structural alias analysis
+Common
+Does nothing. Preserved for backward compatibility.
ftree-sink
Common Report Var(flag_tree_sink) Optimization
-fdump-tree-nrv -fdump-tree-vect @gol
-fdump-tree-sink @gol
-fdump-tree-sra@r{[}-@var{n}@r{]} @gol
--fdump-tree-salias @gol
-fdump-tree-fre@r{[}-@var{n}@r{]} @gol
-fdump-tree-vrp@r{[}-@var{n}@r{]} @gol
-ftree-vectorizer-verbose=@var{n} @gol
-ftree-dominator-opts -ftree-dse -ftree-fre -ftree-loop-im @gol
-ftree-loop-distribution @gol
-ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol
--ftree-parallelize-loops=@var{n} -ftree-pre -ftree-reassoc -ftree-salias @gol
+-ftree-parallelize-loops=@var{n} -ftree-pre -ftree-reassoc @gol
-ftree-sink -ftree-sra -ftree-store-ccp -ftree-ter @gol
-ftree-vect-loop-version -ftree-vectorize -ftree-vrp -funit-at-a-time @gol
-funroll-all-loops -funroll-loops -funsafe-loop-optimizations @gol
Dump SSA related information to a file. The file name is made by appending
@file{.ssa} to the source file name.
-@item salias
-@opindex fdump-tree-salias
-Dump structure aliasing variable information to a file. This file name
-is made by appending @file{.salias} to the source file name.
-
@item alias
@opindex fdump-tree-alias
Dump aliasing information for each function. The file name is made by
copy operations. This flag is enabled by default at @option{-O} and
higher.
-@item -ftree-salias
-@opindex ftree-salias
-Perform structural alias analysis on trees. This flag
-is enabled by default at @option{-O} and higher.
-
@item -fipa-pure-const
@opindex fipa-pure-const
Discover which functions are pure or constant.
@var{name} are given in the following table:
@table @gcctabopt
-@item salias-max-implicit-fields
-The maximum number of fields in a variable without direct
-structure accesses for which structure aliasing will consider trying
-to track each field. The default is 5
-
-@item salias-max-array-elements
-The maximum number of elements an array can have and its elements
-still be tracked individually by structure aliasing. The default is 4
-
@item sra-max-structure-size
The maximum structure size, in bytes, at which the scalar replacement
of aggregates (SRA) optimization will perform block copies. The
flag_tree_fre = 1;
flag_tree_copy_prop = 1;
flag_tree_sink = 1;
- flag_tree_salias = 1;
if (!no_unit_at_a_time_default)
flag_unit_at_a_time = 1;
case OPT_fstrength_reduce:
case OPT_ftree_store_copy_prop:
case OPT_fforce_addr:
+ case OPT_ftree_salias:
/* These are no-ops, preserved for backward compatibility. */
break;
Be sure to add an entry to invoke.texi summarizing the parameter. */
-/* The maximum number of fields in a variable with only implicit uses
- for which structure aliasing will consider trying to track each
- field. The default is 5. */
-DEFPARAM (PARAM_SALIAS_MAX_IMPLICIT_FIELDS,
- "salias-max-implicit-fields",
- "The maximum number of fields in a structure variable without direct structure accesses that GCC will attempt to track separately",
- 5, 0, 0)
-
-/* The maximum number of array elements structure aliasing will decompose
- an array for. The default is 4. */
-DEFPARAM (PARAM_SALIAS_MAX_ARRAY_ELEMENTS,
- "salias-max-array-elements",
- "The maximum number of elements in an array for wich we track its elements separately",
- 4, 0, 0)
-
/* The maximum structure size at which the scalar replacement of
aggregates (SRA) pass will perform block copies. The default
value, 0, implies that GCC will select the most appropriate size
(compiler_params[(int) ENUM].set)
/* Macros for the various parameters. */
-#define SALIAS_MAX_IMPLICIT_FIELDS \
- PARAM_VALUE (PARAM_SALIAS_MAX_IMPLICIT_FIELDS)
-#define SALIAS_MAX_ARRAY_ELEMENTS \
- PARAM_VALUE (PARAM_SALIAS_MAX_ARRAY_ELEMENTS)
#define SRA_MAX_STRUCTURE_SIZE \
PARAM_VALUE (PARAM_SRA_MAX_STRUCTURE_SIZE)
#define SRA_MAX_STRUCTURE_COUNT \
NEXT_PASS (pass_all_optimizations);
{
struct opt_pass **p = &pass_all_optimizations.pass.sub;
- NEXT_PASS (pass_create_structure_vars);
- /* ??? pass_build_alias is a dummy pass that ensures that we
- execute TODO_rebuild_alias at this point even if
- pass_create_structure_vars was disabled. */
+ /* pass_build_alias is a dummy pass that ensures that we
+ execute TODO_rebuild_alias at this point. */
NEXT_PASS (pass_build_alias);
NEXT_PASS (pass_return_slot);
NEXT_PASS (pass_rename_ssa_copies);
+2008-05-08 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/20040911-1.c: Adjust.
+ * gcc.dg/tree-ssa/20040517-1.c: Likewise.
+ * gcc.dg/tree-ssa/pr26421.c: Likewise.
+ * gcc.dg/tree-ssa/pr23382.c: Likewise.
+ * gcc.dg/tree-ssa/alias-15.c: Likewise.
+ * gcc.dg/tree-ssa/inline_asm-1.c: Likewise.
+ * gcc.dg/tree-ssa/inline_asm-2.c: Likewise.
+ * gcc.dg/tree-ssa/pta-fp.c: Likewise.
+ * gcc.dg/tree-ssa/20031015-1.c: Likewise.
+ * gcc.dg/tree-ssa/alias-12.c: Likewise.
+
2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/36162
/* With tree-ssa, gcc.dg/20000724-1.c failed because we missed
a VOP of x in the asm statement. */
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-salias-vops" } */
+/* { dg-options "-O1 -fdump-tree-alias-vops" } */
struct s { int a; };
}
/* The VDEF comes from the initial assignment and the asm. */
-/* { dg-final { scan-tree-dump-times "DEF" 2 "salias" } } */
-/* { dg-final { cleanup-tree-dump "salias" } } */
+/* { dg-final { scan-tree-dump-times "DEF" 2 "alias" } } */
+/* { dg-final { cleanup-tree-dump "alias" } } */
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-salias-vops" } */
+/* { dg-options "-O1 -fdump-tree-alias-vops" } */
extern void abort (void);
int a;
malloc functions may clobber global memory. Only the function result
does not alias any other pointer.
Hence, we must have a VDEF for a before and after the call to foo(). */
-/* { dg-final { scan-tree-dump-times "VDEF" 2 "salias"} } */
-/* { dg-final { cleanup-tree-dump "salias" } } */
+/* { dg-final { scan-tree-dump-times "VDEF" 2 "alias"} } */
+/* { dg-final { cleanup-tree-dump "alias" } } */
/* Verify that points-to information is handled properly for PTR + OFFSET
pointer arithmetics. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-salias-vops" } */
+/* { dg-options "-O2 -fdump-tree-alias-vops" } */
char buf[4], *q;
int foo (int i)
return *p;
}
-/* { dg-final { scan-tree-dump-not "VUSE <c" "salias" } } */
-/* { dg-final { cleanup-tree-dump "salias" } } */
+/* { dg-final { scan-tree-dump-not "VUSE <c" "alias" } } */
+/* { dg-final { cleanup-tree-dump "alias" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-salias-vops" } */
+/* { dg-options "-O2 -fdump-tree-alias-vops" } */
struct {
int i;
return a.x[i];
}
-/* { dg-final { scan-tree-dump "VDEF" "salias" } } */
-/* { dg-final { cleanup-tree-dump "salias" } } */
+/* { dg-final { scan-tree-dump "VDEF" "alias" } } */
+/* { dg-final { cleanup-tree-dump "alias" } } */
/* { dg-do compile } */
-/* { dg-options "-O -fno-early-inlining -fdump-tree-salias-vops-details" } */
+/* { dg-options "-O -fno-early-inlining -fdump-tree-alias-vops-details" } */
struct foo {
int a;
return p->b[3] - m.b.b[3];
}
-/* { dg-final { scan-tree-dump-times "VUSE <m_.\\\(D\\\)>" 2 "salias" } } */
-/* { dg-final { cleanup-tree-dump "salias" } } */
+/* { dg-final { scan-tree-dump-times "VUSE <m_.\\\(D\\\)>" 2 "alias" } } */
+/* { dg-final { cleanup-tree-dump "alias" } } */
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-optimized -fdump-tree-salias-vops" } */
-/* Test to make sure that inline-asm causes a V_MAY_DEF and that we call test_function twice. */
+/* { dg-options "-O1 -fdump-tree-optimized -fdump-tree-alias-vops" } */
+/* Test to make sure that inline-asm causes a VDEF and that we call test_function twice. */
char test_function(void ) __attribute__((__pure__));
char f(char *a)
/* { dg-final { cleanup-tree-dump "optimized" } } */
/* There should a VDEF for the inline-asm. */
-/* { dg-final { scan-tree-dump-times "VDEF" 1 "salias"} } */
-/* { dg-final { cleanup-tree-dump "salias" } } */
+/* { dg-final { scan-tree-dump-times "VDEF" 1 "alias"} } */
+/* { dg-final { cleanup-tree-dump "alias" } } */
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-salias-vops" } */
-/* Test to make sure that inline-asm causes a V_MAY_DEF. */
+/* { dg-options "-O1 -fdump-tree-alias-vops" } */
+/* Test to make sure that inline-asm causes a VDEF. */
void link_error();
}
/* There should a VDEF for the inline-asm and one for the link_error. */
-/* { dg-final { scan-tree-dump-times "VDEF" 2 "salias"} } */
-/* { dg-final { cleanup-tree-dump "salias" } } */
+/* { dg-final { scan-tree-dump-times "VDEF" 2 "alias"} } */
+/* { dg-final { cleanup-tree-dump "alias" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-salias-vops" } */
+/* { dg-options "-O2 -fdump-tree-alias-vops" } */
struct a
{
int length;
struct a *a = malloc(sizeof(struct a));
return a->length;
}
-/* { dg-final { scan-tree-dump-times "VDEF <HEAP" 1 "salias"} } */
-/* { dg-final { cleanup-tree-dump "salias" } } */
+/* { dg-final { scan-tree-dump-times "VDEF <HEAP" 1 "alias"} } */
+/* { dg-final { cleanup-tree-dump "alias" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-salias-vops" } */
+/* { dg-options "-O2 -fdump-tree-alias-vops" } */
typedef struct {
int i;
/* Verify the call clobbers all of a. */
-/* { dg-final { scan-tree-dump-times "VDEF <a_" 2 "salias" } } */
-/* { dg-final { cleanup-tree-dump "salias" } } */
+/* { dg-final { scan-tree-dump-times "VDEF <a_" 2 "alias" } } */
+/* { dg-final { cleanup-tree-dump "alias" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-salias" } */
+/* { dg-options "-O2 -fdump-tree-alias" } */
extern double cos (double);
extern double sin (double);
double f(double a)
}
/* The points-to set of the final function pointer should be "sin cos" */
-/* { dg-final { scan-tree-dump-times "{ sin cos }" 1 "salias"} } */
-/* { dg-final { cleanup-tree-dump "salias" } } */
+/* { dg-final { scan-tree-dump-times "{ sin cos }" 1 "alias"} } */
+/* { dg-final { cleanup-tree-dump "alias" } } */
extern struct gimple_opt_pass pass_copy_prop;
extern struct gimple_opt_pass pass_store_ccp;
extern struct gimple_opt_pass pass_vrp;
-extern struct gimple_opt_pass pass_create_structure_vars;
extern struct gimple_opt_pass pass_uncprop;
extern struct gimple_opt_pass pass_return_slot;
extern struct gimple_opt_pass pass_reassoc;
MTAG_GLOBAL (tag) = is_global_var (var);
}
-/* ??? Stub. */
-
-static unsigned int
-create_structure_vars (void)
-{
- return TODO_rebuild_alias;
-}
-
-static bool
-gate_structure_vars (void)
-{
- return flag_tree_salias != 0;
-}
-
-struct gimple_opt_pass pass_create_structure_vars =
-{
- {
- GIMPLE_PASS,
- "salias", /* name */
- gate_structure_vars, /* gate */
- create_structure_vars, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- 0, /* tv_id */
- PROP_cfg, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- TODO_dump_func /* todo_flags_finish */
- }
-};
/* Reset the call_clobbered flags on our referenced vars. In
theory, this only needs to be done for globals. */
}
};
-static bool
-gate_build_alias (void)
-{
- return !gate_structure_vars();
-}
+/* A dummy pass to cause aliases to be computed via TODO_rebuild_alias. */
struct gimple_opt_pass pass_build_alias =
{
{
GIMPLE_PASS,
- "build_alias", /* name */
- gate_build_alias, /* gate */
+ "alias", /* name */
+ NULL, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */
PROP_alias, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_rebuild_alias /* todo_flags_finish */
+ TODO_rebuild_alias | TODO_dump_func /* todo_flags_finish */
}
};