Since Subversion r201359 (Git commit
a167b052dfe9a8509bb23c374ffaeee953df0917)
"Introduce gen-pass-instances.awk and pass-instances.def", the usage comment at
the top of 'gcc/passes.def' no longer is accurate (even if that latter file
does continue to use the 'NEXT_PASS' form without 'NUM') -- and, worse, the
'NEXT_PASS' etc. in that usage comment are processed by the
'gcc/gen-pass-instances.awk' script:
--- source-gcc/gcc/passes.def 2024-06-24 18:55:15.
132561641 +0200
+++ build-gcc/gcc/pass-instances.def 2024-06-24 18:55:27.
768562714 +0200
[...]
@@ -20,546 +22,578 @@
/*
Macros that should be defined when using this file:
INSERT_PASSES_AFTER (PASS)
PUSH_INSERT_PASSES_WITHIN (PASS)
POP_INSERT_PASSES ()
- NEXT_PASS (PASS)
+ NEXT_PASS (PASS, 1)
TERMINATE_PASS_LIST (PASS)
*/
[...]
(That is, this is 'NEXT_PASS' for the first instance of pass 'PASS'.)
That's benign so far, but with another thing that I'll be extending, I'd
then run into an error while the script handles this comment block. ;-\
gcc/
* passes.def: Rewrite usage comment at the top.
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-/*
- Macros that should be defined when using this file:
- INSERT_PASSES_AFTER (PASS)
- PUSH_INSERT_PASSES_WITHIN (PASS)
- POP_INSERT_PASSES ()
- NEXT_PASS (PASS)
- TERMINATE_PASS_LIST (PASS)
- */
+/* Note that this file is processed by a simple parser:
+ 'gen-pass-instances.awk', so carefully verify the generated
+ 'pass-instances.def' if you deviate from the syntax otherwise used in
+ here. */
+
/* All passes needed to lower the function into shape optimizers can
operate on. These passes are always run first on the function, but