On 7/3/26 12:17, Léo Hardt wrote:

gcc/ChangeLog:

* doc/tm.texi: Update refs to previous global vars that no longer exist.
* doc/tm.texi.in: Likewise.

I'm not sure if your mailer mangled this, but this isn't proper formatting for the ChangeLog. The "*" lines should start with a tab.

More critically, for this change you are supposed to edit only tm.texi.in and regenerate tm.texi (IIRC this happens automatically when building the documentation). The description in the ChangeLog for regenerated files should only say "regenerated".

For Texinfo files, it's helpful to use the containing @node name as the "part changed" thing for each line in the ChangeLog instead of just referring to the file as a whole. And here it would be helpful to actually name the variables that no longer exist.

diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 0944563c9..621d3f11d 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -1963,17 +1963,19 @@ treatment of leaf functions, and registers need to be
renumbered to do
 this.
 @end defmac

-@findex current_function_is_leaf
-@findex current_function_uses_only_leaf_regs
+@findex is_leaf
+@findex crtl->is_leaf
+@findex uses_only_leaf_regs
+@findex crtl->uses_only_leaf_regs
 @code{TARGET_ASM_FUNCTION_PROLOGUE} and
 @code{TARGET_ASM_FUNCTION_EPILOGUE} must usually treat leaf functions
-specially.  They can test the C variable @code{current_function_is_leaf}
-which is nonzero for leaf functions.  @code{current_function_is_leaf} is
+specially.  They can test the C variable @code{crtl->is_leaf}
+which is nonzero for leaf functions.  @code{crtl->is_leaf} is

crtl->is_leaf isn't a C variable, it's an expression. How about changing "C variable" to "flag" here.

 set prior to local register allocation and is valid for the remaining
 compiler passes.  They can also test the C variable

...and similarly here.

-@code{current_function_uses_only_leaf_regs} which is nonzero for leaf
+@code{crtl->uses_only_leaf_regs} which is nonzero for leaf
 functions which only use leaf registers.

While you're at it, please change "which only..." to "that only...", since this is restrictive rather than descriptive.

-@code{current_function_uses_only_leaf_regs} is valid after all passes
+@code{crtl->uses_only_leaf_regs} is valid after all passes
 that modify the instructions have been run and is only useful if
 @code{LEAF_REGISTERS} is defined.
 @c changed this to fix overfull.  ALSO:  why the "it" at the beginning
--
2.39.5

-Sandra

Reply via email to