aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-01-12 13:34:27 +0100
committerMartin Liska <mliska@suse.cz>2022-01-12 13:34:27 +0100
commit6ab1963fc8f70a07dc8566f8b6ad317b40ab379d (patch)
treeea1dbe49ef56bcc858c0ee042ba776d70fc5b42c /gcc/doc
parent013d1573ab19ea3e168441c71b539ba3df6310af (diff)
parent03a1a86b5ee40d4e2402516cbcdf39d981e433b3 (diff)
downloadgcc-6ab1963fc8f70a07dc8566f8b6ad317b40ab379d.zip
gcc-6ab1963fc8f70a07dc8566f8b6ad317b40ab379d.tar.gz
gcc-6ab1963fc8f70a07dc8566f8b6ad317b40ab379d.tar.bz2
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/analyzer.texi18
-rw-r--r--gcc/doc/extend.texi4
-rw-r--r--gcc/doc/invoke.texi4
-rw-r--r--gcc/doc/tm.texi31
-rw-r--r--gcc/doc/tm.texi.in4
5 files changed, 56 insertions, 5 deletions
diff --git a/gcc/doc/analyzer.texi b/gcc/doc/analyzer.texi
index 6577981..06eb98f 100644
--- a/gcc/doc/analyzer.texi
+++ b/gcc/doc/analyzer.texi
@@ -487,6 +487,14 @@ will emit a warning describing the capacity of the base region of
the region pointed to by the 1st argument.
@smallexample
+extern void __analyzer_dump_escaped (void);
+@end smallexample
+
+will emit a warning giving the number of decls that have escaped on this
+analysis path, followed by a comma-separated list of their names,
+in alphabetical order.
+
+@smallexample
__analyzer_dump_path ();
@end smallexample
@@ -545,3 +553,13 @@ and the exploded graph in compressed JSON form.
One approach when tracking down where a particular bogus state is
introduced into the @code{exploded_graph} is to add custom code to
@code{program_state::validate}.
+
+The debug function @code{region::is_named_decl_p} can be used when debugging,
+such as for assertions and conditional breakpoints. For example, when
+tracking down a bug in handling a decl called @code{yy_buffer_stack}, I
+temporarily added a:
+@smallexample
+ gcc_assert (!m_base_region->is_named_decl_p ("yy_buffer_stack"));
+@end smallexample
+to @code{binding_cluster::mark_as_escaped} to trap a point where
+@code{yy_buffer_stack} was mistakenly being treated as having escaped.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 9bf486c..db19e28 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -12452,9 +12452,7 @@ This built-in function implements an atomic exchange operation. It writes
@var{val} into @code{*@var{ptr}}, and returns the previous contents of
@code{*@var{ptr}}.
-The valid memory order variants are
-@code{__ATOMIC_RELAXED}, @code{__ATOMIC_SEQ_CST}, @code{__ATOMIC_ACQUIRE},
-@code{__ATOMIC_RELEASE}, and @code{__ATOMIC_ACQ_REL}.
+All memory order variants are valid.
@end deftypefn
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 8568e30..f27ff86 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -32466,8 +32466,8 @@ Force indirect call and jump via register.
@opindex mharden-sls
Generate code to mitigate against straight line speculation (SLS) with
@var{choice}. The default is @samp{none} which disables all SLS
-hardening. @samp{return} enables SLS hardening for function return.
-@samp{indirect-branch} enables SLS hardening for indirect branch.
+hardening. @samp{return} enables SLS hardening for function returns.
+@samp{indirect-jmp} enables SLS hardening for indirect jumps.
@samp{all} enables all SLS hardening.
@item -mindirect-branch-cs-prefix
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 34a949e..eaa5f59 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -11435,6 +11435,37 @@ specific target options and the caller does not use the same options.
@end deftypefn
@c hook-end
+@deftypefn {Target Hook} bool TARGET_UPDATE_IPA_FN_TARGET_INFO (unsigned int& @var{info}, const gimple* @var{stmt})
+Allow target to analyze all gimple statements for the given function to
+record and update some target specific information for inlining. A typical
+example is that a caller with one isa feature disabled is normally not
+allowed to inline a callee with that same isa feature enabled even which is
+attributed by always_inline, but with the conservative analysis on all
+statements of the callee if we are able to guarantee the callee does not
+exploit any instructions from the mismatch isa feature, it would be safe to
+allow the caller to inline the callee.
+@var{info} is one @code{unsigned int} value to record information in which
+one set bit indicates one corresponding feature is detected in the analysis,
+@var{stmt} is the statement being analyzed. Return true if target still
+need to analyze the subsequent statements, otherwise return false to stop
+subsequent analysis.
+The default version of this hook returns false.
+@end deftypefn
+
+@deftypefn {Target Hook} bool TARGET_NEED_IPA_FN_TARGET_INFO (const_tree @var{decl}, unsigned int& @var{info})
+Allow target to check early whether it is necessary to analyze all gimple
+statements in the given function to update target specific information for
+inlining. See hook @code{update_ipa_fn_target_info} for usage example of
+target specific information. This hook is expected to be invoked ahead of
+the iterating with hook @code{update_ipa_fn_target_info}.
+@var{decl} is the function being analyzed, @var{info} is the same as what
+in hook @code{update_ipa_fn_target_info}, target can do one time update
+into @var{info} without iterating for some case. Return true if target
+decides to analyze all gimple statements to collect information, otherwise
+return false.
+The default version of this hook returns false.
+@end deftypefn
+
@deftypefn {Target Hook} void TARGET_RELAYOUT_FUNCTION (tree @var{fndecl})
@c hook-start:TARGET_RELAYOUT_FUNCTION
This target hook fixes function @var{fndecl} after attributes are processed.
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index d401bd4..d6359aa 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -7191,6 +7191,10 @@ on this implementation detail.
@hook TARGET_CAN_INLINE_P
+@hook TARGET_UPDATE_IPA_FN_TARGET_INFO
+
+@hook TARGET_NEED_IPA_FN_TARGET_INFO
+
@hook TARGET_RELAYOUT_FUNCTION
@node Emulated TLS