diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-22 20:41:31 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-22 20:41:31 +0000 |
commit | 2a3ebafa45c591f2c37dcc249816c71c7930245b (patch) | |
tree | 591b8d105b3bc5fac1ff8aabd16a58458d55aece /gcc/doc | |
parent | 59082b2ef2ef2aa4ae3487861a6dc80e4ceab57a (diff) | |
download | gcc-2a3ebafa45c591f2c37dcc249816c71c7930245b.tar.gz |
2009-05-22 Richard Guenther <rguenther@suse.de>
PR middle-end/38964
* alias.c (write_dependence_p): Do not use TBAA for answering
anti-dependence or output-dependence.
* tree-ssa-structalias.c (set_uids_in_ptset): Remove TBAA pruning
code.
(emit_pointer_definition): Remove.
(emit_alias_warning): Likewise.
(find_what_var_points_to): Remove TBAA pruning code.
(find_what_p_points_to): Likewise. Do not warn about strict-aliasing
violations.
(compute_points_to_sets): Remove code computing the set of
dereferenced pointers.
* tree-data-ref.c (dr_may_alias_p): Properly use the split
oracle for querying anti and output dependencies.
* tree-ssa-alias.c (refs_may_alias_p_1): Add argument specifying
if TBAA may be applied.
(refs_anti_dependent_p): New function.
(refs_output_dependent_p): Likewise.
* tree-ssa-alias.h (refs_anti_dependent_p): Declare.
(refs_output_dependent_p): Likewise.
* doc/tree-ssa.texi (Memory model): New section.
testsuite/
* g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: XFAIL.
* gcc.dg/Wstrict-aliasing-converted-assigned.c: Likewise.
* gcc.dg/Wstrict-aliasing-float-ptr-int-obj.c: Likewise.
* doc/c-tree.texi (CHANGE_DYNAMIC_TYPE_EXPR): Remove.
* doc/gimple.texi (GIMPLE_CHANGE_DYNAMIC_TYPE): Remove.
* cfgexpand.c (expand_gimple_basic_block): Do not handle
GIMPLE_CHANGE_DYNAMIC_TYPE or CHANGE_DYNAMIC_TYPE_EXPR.
* expr.c (expand_expr_real_1): Likewise.
* gimple-low.c (lower_stmt): Likewise.
* gimple-pretty-print.c (dump_gimple_stmt): Likewise.
(dump_gimple_cdt): Remove.
* gimple.c (gss_for_code): Do not handle GIMPLE_CHANGE_DYNAMIC_TYPE.
(gimple_size): Likewise.
(walk_gimple_op): Likewise.
(is_gimple_stmt): Likewise.
(walk_stmt_load_store_addr_ops): Likewise.
(gimple_build_cdt): Remove.
* gimple.def (GIMPLE_CHANGE_DYNAMIC_TYPE): Remove.
* gimple.h (gimple_cdt_new_type): Remove.
(gimple_cdt_new_type_ptr): Likewise.
(gimple_cdt_set_new_type): Likewise.
(gimple_cdt_location): Likewise.
(gimple_cdt_location_ptr): Likewise.
(gimple_cdt_set_location): Likewise.
* gimplify.c (gimplify_expr): Do not handle CHANGE_DYNAMIC_TYPE_EXPR.
* tree-cfg.c (remove_useless_stmts_1): Do not handle
GIMPLE_CHANGE_DYNAMIC_TYPE.
(verify_types_in_gimple_stmt): Likewise.
* tree-inline.c (estimate_num_insns): Likewise.
(expand_call_inline): Do not copy DECL_NO_TBAA_P.
(copy_decl_to_var): Likewise.
(copy_result_decl_to_var): Likewise.
* tree-pretty-print.c (dump_generic_node): Do not handle
CHANGE_DYNAMIC_TYPE_EXPR.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
* tree-ssa-operands.c (get_expr_operands): Likewise.
* tree-ssa-structalias.c (struct variable_info): Remove
no_tbaa_pruning member.
(new_var_info): Do not set it based on DECL_NO_TBAA_P.
(unify_nodes): Do not copy it.
(find_func_aliases): Do not handle GIMPLE_CHANGE_DYNAMIC_TYPE.
(dump_solution_for_var): Do not dump no_tbaa_pruning state.
(set_uids_in_ptset): Do not check it.
(find_what_var_points_to): Likewise.
(compute_tbaa_pruning): Remove.
(compute_points_to_sets): Do not call it.
* tree.c (walk_tree_1): Do not handle CHANGE_DYNAMIC_TYPE_EXPR.
* tree.def (CHANGE_DYNAMIC_TYPE_EXPR): Remove.
* tree.h (CHANGE_DYNAMIC_TYPE_NEW_TYPE): Remove.
(CHANGE_DYNAMIC_TYPE_LOCATION): Likewise.
(DECL_NO_TBAA_P): Likewise.
(struct tree_decl_common): Move no_tbaa_flag to unused flags section.
* omp-low.c (copy_var_decl): Do not copy DECL_NO_TBAA_P.
(expand_omp_atomic_pipeline): Do not set it.
* print-tree.c (print_node): Do not dump it.
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Remove
redundant check.
cp/
* init.c (avoid_placement_new_aliasing): Remove.
(build_new_1): Do not call it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147805 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/c-tree.texi | 8 | ||||
-rw-r--r-- | gcc/doc/gimple.texi | 43 | ||||
-rw-r--r-- | gcc/doc/tree-ssa.texi | 29 |
3 files changed, 30 insertions, 50 deletions
diff --git a/gcc/doc/c-tree.texi b/gcc/doc/c-tree.texi index 117b700ec08..35498583ccd 100644 --- a/gcc/doc/c-tree.texi +++ b/gcc/doc/c-tree.texi @@ -1995,7 +1995,6 @@ This macro returns the attributes on the type @var{type}. @tindex TARGET_EXPR @tindex AGGR_INIT_EXPR @tindex VA_ARG_EXPR -@tindex CHANGE_DYNAMIC_TYPE_EXPR @tindex OMP_PARALLEL @tindex OMP_FOR @tindex OMP_SECTIONS @@ -2708,13 +2707,6 @@ mechanism. It represents expressions like @code{va_arg (ap, type)}. Its @code{TREE_TYPE} yields the tree representation for @code{type} and its sole argument yields the representation for @code{ap}. -@item CHANGE_DYNAMIC_TYPE_EXPR -Indicates the special aliasing required by C++ placement new. It has -two operands: a type and a location. It means that the dynamic type -of the location is changing to be the specified type. The alias -analysis code takes this into account when doing type based alias -analysis. - @item OMP_PARALLEL Represents @code{#pragma omp parallel [clause1 @dots{} clauseN]}. It diff --git a/gcc/doc/gimple.texi b/gcc/doc/gimple.texi index cc1e8903fdb..a78c52dcafc 100644 --- a/gcc/doc/gimple.texi +++ b/gcc/doc/gimple.texi @@ -332,14 +332,13 @@ union gimple_statement_d The following table briefly describes the GIMPLE instruction set. -@multitable {@code{GIMPLE_CHANGE_DYNAMIC_TYPE}} {High GIMPLE} {Low GIMPLE} +@multitable {@code{GIMPLE_OMP_SECTIONS_SWITCH}} {High GIMPLE} {Low GIMPLE} @item Instruction @tab High GIMPLE @tab Low GIMPLE @item @code{GIMPLE_ASM} @tab x @tab x @item @code{GIMPLE_ASSIGN} @tab x @tab x @item @code{GIMPLE_BIND} @tab x @tab @item @code{GIMPLE_CALL} @tab x @tab x @item @code{GIMPLE_CATCH} @tab x @tab -@item @code{GIMPLE_CHANGE_DYNAMIC_TYPE} @tab x @tab x @item @code{GIMPLE_COND} @tab x @tab x @item @code{GIMPLE_EH_FILTER} @tab x @tab @item @code{GIMPLE_GOTO} @tab x @tab x @@ -885,7 +884,6 @@ Return a deep copy of statement @code{STMT}. * @code{GIMPLE_BIND}:: * @code{GIMPLE_CALL}:: * @code{GIMPLE_CATCH}:: -* @code{GIMPLE_CHANGE_DYNAMIC_TYPE}:: * @code{GIMPLE_COND}:: * @code{GIMPLE_EH_FILTER}:: * @code{GIMPLE_LABEL}:: @@ -1295,45 +1293,6 @@ Set @code{T} to be the set of types handled by @code{GIMPLE_CATCH} @code{G}. Set @code{HANDLER} to be the body of @code{GIMPLE_CATCH} @code{G}. @end deftypefn -@node @code{GIMPLE_CHANGE_DYNAMIC_TYPE} -@subsection @code{GIMPLE_CHANGE_DYNAMIC_TYPE} -@cindex @code{GIMPLE_CHANGE_DYNAMIC_TYPE} - -@deftypefn {GIMPLE function} gimple gimple_build_cdt (tree type, tree ptr) -Build a @code{GIMPLE_CHANGE_DYNAMIC_TYPE} statement. @code{TYPE} is the new -type for the location @code{PTR}. -@end deftypefn - -@deftypefn {GIMPLE function} tree gimple_cdt_new_type (gimple g) -Return the new type set by @code{GIMPLE_CHANGE_DYNAMIC_TYPE} statement -@code{G}. -@end deftypefn - -@deftypefn {GIMPLE function} tree *gimple_cdt_new_type_ptr (gimple g) -Return a pointer to the new type set by -@code{GIMPLE_CHANGE_DYNAMIC_TYPE} statement @code{G}. -@end deftypefn - -@deftypefn {GIMPLE function} void gimple_cdt_set_new_type (gimple g, tree new_type) -Set @code{NEW_TYPE} to be the type returned by -@code{GIMPLE_CHANGE_DYNAMIC_TYPE} statement @code{G}. -@end deftypefn - -@deftypefn {GIMPLE function} tree gimple_cdt_location (gimple g) -Return the location affected by @code{GIMPLE_CHANGE_DYNAMIC_TYPE} -statement @code{G}. -@end deftypefn - -@deftypefn {GIMPLE function} tree *gimple_cdt_location_ptr (gimple g) -Return a pointer to the location affected by -@code{GIMPLE_CHANGE_DYNAMIC_TYPE} statement @code{G}. -@end deftypefn - -@deftypefn {GIMPLE function} void gimple_cdt_set_location (gimple g, tree ptr) -Set @code{PTR} to be the location affected by @code{GIMPLE_CHANGE_DYNAMIC_TYPE} -statement @code{G}. -@end deftypefn - @node @code{GIMPLE_COND} @subsection @code{GIMPLE_COND} diff --git a/gcc/doc/tree-ssa.texi b/gcc/doc/tree-ssa.texi index 1442ce6f5b5..ebb85a05769 100644 --- a/gcc/doc/tree-ssa.texi +++ b/gcc/doc/tree-ssa.texi @@ -41,6 +41,7 @@ passes for GIMPLE@. * SSA Operands:: SSA names referenced by GIMPLE statements. * SSA:: Static Single Assignment representation. * Alias analysis:: Representing aliased loads and stores. +* Memory model:: Memory model used by the middle-end. @end menu @node Annotations @@ -892,3 +893,31 @@ providing its aliasing VDEF. The walk stops if asked to. @end enumerate + +@node Memory model +@section Memory model +@cindex memory model + +The memory model used by the middle-end models that of the C/C++ +languages. The middle-end has the notion of an effective type +of a memory region which is used for type-based alias analysis. + +The following is a refinement of ISO C99 6.5/6, clarifying the block copy case +to follow common sense and extending the concept of a dynamic effective +type to objects with a declared type as required for C++. + +@smallexample +The effective type of an object for an access to its stored value is +the declared type of the object or the effective type determined by +a previous store to it. If a value is stored into an object through +an lvalue having a type that is not a character type, then the +type of the lvalue becomes the effective type of the object for that +access and for subsequent accesses that do not modify the stored value. +If a value is copied into an object using @code{memcpy} or @code{memmove}, +or is copied as an array of character type, then the effective type +of the modified object for that access and for subsequent accesses that +do not modify the value is undetermined. For all other accesses to an +object, the effective type of the object is simply the type of the +lvalue used for the access. +@end smallexample + |