Index: gcc/gcc/doc/gimple.texi |
diff --git a/gcc/gcc/doc/gimple.texi b/gcc/gcc/doc/gimple.texi |
index 34b768949f1bbe384ecc54cba78f4b481fe08da8..505507b462715440ae9de7031db8099d9d23e574 100644 |
--- a/gcc/gcc/doc/gimple.texi |
+++ b/gcc/gcc/doc/gimple.texi |
@@ -1,4 +1,4 @@ |
-@c Copyright (c) 2008, 2009 Free Software Foundation, Inc. |
+@c Copyright (c) 2008, 2009, 2010 Free Software Foundation, Inc. |
@c Free Software Foundation, Inc. |
@c This is part of the GCC manual. |
@c For copying conditions, see the file gcc.texi. |
@@ -332,15 +332,15 @@ 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_DEBUG} @tab x @tab x |
@item @code{GIMPLE_EH_FILTER} @tab x @tab |
@item @code{GIMPLE_GOTO} @tab x @tab x |
@item @code{GIMPLE_LABEL} @tab x @tab x |
@@ -389,7 +389,7 @@ types, the associated handler code is executed. If the handler |
code falls off the bottom, execution continues after the original |
@code{GIMPLE_TRY_CATCH}. |
-@item An @code{GIMPLE_EH_FILTER} statement. This has a list of |
+@item A @code{GIMPLE_EH_FILTER} statement. This has a list of |
permitted exception types, and code to handle a match failure. If the |
thrown exception does not match one of the allowed types, the |
associated match failure code is executed. If the thrown exception |
@@ -680,8 +680,19 @@ the address of a function local variable). |
@end deftypefn |
@deftypefn {GIMPLE function} is_gimple_min_invariant_address (tree t) |
+Return true if t is an @code{ADDR_EXPR} that does not change once a |
+function is running. |
+@end deftypefn |
+ |
+@deftypefn {GIMPLE function} is_gimple_ip_invariant (tree t) |
+Return true if t is an interprocedural invariant. This means that t |
+is a valid invariant in all functions (e.g. it can be an address of a |
+global variable but not of a local one). |
+@end deftypefn |
+ |
+@deftypefn {GIMPLE function} is_gimple_ip_invariant_address (tree t) |
Return true if t is an @code{ADDR_EXPR} that does not change once the |
-program is running. |
+program is running (and which is valid in all functions). |
@end deftypefn |
@@ -692,12 +703,21 @@ Return true if the code of g is @code{GIMPLE_ASSIGN}. |
@end deftypefn |
@deftypefn {GIMPLE function} is_gimple_call (gimple g) |
-Return true if the code of g is @code{GIMPLE_CALL} |
+Return true if the code of g is @code{GIMPLE_CALL}. |
@end deftypefn |
+@deftypefn {GIMPLE function} is_gimple_debug (gimple g) |
+Return true if the code of g is @code{GIMPLE_DEBUG}. |
+@end deftypefn |
+ |
@deftypefn {GIMPLE function} gimple_assign_cast_p (gimple g) |
Return true if g is a @code{GIMPLE_ASSIGN} that performs a type cast |
-operation |
+operation. |
+@end deftypefn |
+ |
+@deftypefn {GIMPLE function} gimple_debug_bind_p (gimple g) |
+Return true if g is a @code{GIMPLE_DEBUG} that binds the value of an |
+expression to a variable. |
@end deftypefn |
@node Manipulating GIMPLE statements |
@@ -885,8 +905,8 @@ 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_DEBUG}:: |
* @code{GIMPLE_EH_FILTER}:: |
* @code{GIMPLE_LABEL}:: |
* @code{GIMPLE_NOP}:: |
@@ -1087,7 +1107,7 @@ statement @code{G}. |
@end deftypefn |
@deftypefn {GIMPLE function} bool gimple_assign_cast_p (gimple s) |
-Return true if @code{S} is an type-cast assignment. |
+Return true if @code{S} is a type-cast assignment. |
@end deftypefn |
@@ -1295,45 +1315,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} |
@@ -1411,6 +1392,83 @@ Set the conditional @code{COND_STMT} to be of the form 'if (1 == 0)'. |
Set the conditional @code{COND_STMT} to be of the form 'if (1 == 1)'. |
@end deftypefn |
+@node @code{GIMPLE_DEBUG} |
+@subsection @code{GIMPLE_DEBUG} |
+@cindex @code{GIMPLE_DEBUG} |
+@cindex @code{GIMPLE_DEBUG_BIND} |
+ |
+@deftypefn {GIMPLE function} gimple gimple_build_debug_bind (tree var, tree value, gimple stmt) |
+Build a @code{GIMPLE_DEBUG} statement with @code{GIMPLE_DEBUG_BIND} of |
+@code{subcode}. The effect of this statement is to tell debug |
+information generation machinery that the value of user variable |
+@code{var} is given by @code{value} at that point, and to remain with |
+that value until @code{var} runs out of scope, a |
+dynamically-subsequent debug bind statement overrides the binding, or |
+conflicting values reach a control flow merge point. Even if |
+components of the @code{value} expression change afterwards, the |
+variable is supposed to retain the same value, though not necessarily |
+the same location. |
+ |
+It is expected that @code{var} be most often a tree for automatic user |
+variables (@code{VAR_DECL} or @code{PARM_DECL}) that satisfy the |
+requirements for gimple registers, but it may also be a tree for a |
+scalarized component of a user variable (@code{ARRAY_REF}, |
+@code{COMPONENT_REF}), or a debug temporary (@code{DEBUG_EXPR_DECL}). |
+ |
+As for @code{value}, it can be an arbitrary tree expression, but it is |
+recommended that it be in a suitable form for a gimple assignment |
+@code{RHS}. It is not expected that user variables that could appear |
+as @code{var} ever appear in @code{value}, because in the latter we'd |
+have their @code{SSA_NAME}s instead, but even if they were not in SSA |
+form, user variables appearing in @code{value} are to be regarded as |
+part of the executable code space, whereas those in @code{var} are to |
+be regarded as part of the source code space. There is no way to |
+refer to the value bound to a user variable within a @code{value} |
+expression. |
+ |
+If @code{value} is @code{GIMPLE_DEBUG_BIND_NOVALUE}, debug information |
+generation machinery is informed that the variable @code{var} is |
+unbound, i.e., that its value is indeterminate, which sometimes means |
+it is really unavailable, and other times that the compiler could not |
+keep track of it. |
+ |
+Block and location information for the newly-created stmt are |
+taken from @code{stmt}, if given. |
+@end deftypefn |
+ |
+@deftypefn {GIMPLE function} tree gimple_debug_bind_get_var (gimple stmt) |
+Return the user variable @var{var} that is bound at @code{stmt}. |
+@end deftypefn |
+ |
+@deftypefn {GIMPLE function} tree gimple_debug_bind_get_value (gimple stmt) |
+Return the value expression that is bound to a user variable at |
+@code{stmt}. |
+@end deftypefn |
+ |
+@deftypefn {GIMPLE function} tree *gimple_debug_bind_get_value_ptr (gimple stmt) |
+Return a pointer to the value expression that is bound to a user |
+variable at @code{stmt}. |
+@end deftypefn |
+ |
+@deftypefn {GIMPLE function} void gimple_debug_bind_set_var (gimple stmt, tree var) |
+Modify the user variable bound at @code{stmt} to @var{var}. |
+@end deftypefn |
+ |
+@deftypefn {GIMPLE function} void gimple_debug_bind_set_value (gimple stmt, tree var) |
+Modify the value bound to the user variable bound at @code{stmt} to |
+@var{value}. |
+@end deftypefn |
+ |
+@deftypefn {GIMPLE function} void gimple_debug_bind_reset_value (gimple stmt) |
+Modify the value bound to the user variable bound at @code{stmt} so |
+that the variable becomes unbound. |
+@end deftypefn |
+ |
+@deftypefn {GIMPLE function} bool gimple_debug_bind_has_value_p (gimple stmt) |
+Return @code{TRUE} if @code{stmt} binds a user variable to a value, |
+and @code{FALSE} if it unbinds the variable. |
+@end deftypefn |
+ |
@node @code{GIMPLE_EH_FILTER} |
@subsection @code{GIMPLE_EH_FILTER} |
@cindex @code{GIMPLE_EH_FILTER} |