https://gcc.gnu.org/g:385004846dc6437bab9b3b7d8b071ce1c3418384

commit r15-2162-g385004846dc6437bab9b3b7d8b071ce1c3418384
Author: Thomas Schwinge <tschwi...@baylibre.com>
Date:   Fri Jun 28 14:05:04 2024 +0200

    Rewrite usage comment at the top of 'gcc/passes.def'
    
    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.

Diff:
---
 gcc/passes.def | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/gcc/passes.def b/gcc/passes.def
index 5e7f9395d84f..b06d6d45f631 100644
--- a/gcc/passes.def
+++ b/gcc/passes.def
@@ -17,14 +17,11 @@ You should have received a copy of the GNU General Public 
License
 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

Reply via email to