https://gcc.gnu.org/g:56efa627cb435a7a2a18f1a86c89621001cc7e56

commit r15-4332-g56efa627cb435a7a2a18f1a86c89621001cc7e56
Author: Andrew Pinski <quic_apin...@quicinc.com>
Date:   Sun Oct 13 09:46:03 2024 -0700

    passes: Move #undef to pass-instances.def
    
    Like what was done r6-4608-g0aad01985747ab for builtins.def/DEF_BUILTIN,
    the same should be done for the defines that are used for 
pass-instances.def.
    
    Bootstrapped and tested on x86_64-linux-gnu.
    
    gcc/ChangeLog:
    
            * gen-pass-instances.awk: Print out the #undefs.
            * pass_manager.h: Don't #undef INSERT_PASSES_AFTER,
            PUSH_INSERT_PASSES_WITHIN, POP_INSERT_PASSES, NEXT_PASS,
            NEXT_PASS_WITH_ARG, and TERMINATE_PASS_LIST.
            * passes.cc: Likewise.
    
    Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>

Diff:
---
 gcc/gen-pass-instances.awk |  7 +++++++
 gcc/pass_manager.h         |  7 -------
 gcc/passes.cc              | 13 -------------
 3 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/gcc/gen-pass-instances.awk b/gcc/gen-pass-instances.awk
index 871ac0cdb52f..f56b8072ed5c 100644
--- a/gcc/gen-pass-instances.awk
+++ b/gcc/gen-pass-instances.awk
@@ -248,6 +248,13 @@ END {
 
       print lines[i];
     }
+  # print out the #undefs
+  print "#undef INSERT_PASSES_AFTER"
+  print "#undef PUSH_INSERT_PASSES_WITHIN"
+  print "#undef POP_INSERT_PASSES"
+  print "#undef NEXT_PASS"
+  print "#undef NEXT_PASS_WITH_ARG"
+  print "#undef TERMINATE_PASS_LIST"
 }
 
 # Local Variables:
diff --git a/gcc/pass_manager.h b/gcc/pass_manager.h
index edd775e9a9c3..5a78d3fe56b0 100644
--- a/gcc/pass_manager.h
+++ b/gcc/pass_manager.h
@@ -134,13 +134,6 @@ private:
 
 #include "pass-instances.def"
 
-#undef INSERT_PASSES_AFTER
-#undef PUSH_INSERT_PASSES_WITHIN
-#undef POP_INSERT_PASSES
-#undef NEXT_PASS
-#undef NEXT_PASS_WITH_ARG
-#undef TERMINATE_PASS_LIST
-
 }; // class pass_manager
 
 } // namespace gcc
diff --git a/gcc/passes.cc b/gcc/passes.cc
index 775c3e46302f..3abae971aceb 100644
--- a/gcc/passes.cc
+++ b/gcc/passes.cc
@@ -1591,12 +1591,6 @@ pass_manager::pass_manager (context *ctxt)
 #define NEXT_PASS_WITH_ARG(PASS, NUM, ARG) NEXT_PASS (PASS, NUM)
 #define TERMINATE_PASS_LIST(PASS)
 #include "pass-instances.def"
-#undef INSERT_PASSES_AFTER
-#undef PUSH_INSERT_PASSES_WITHIN
-#undef POP_INSERT_PASSES
-#undef NEXT_PASS
-#undef NEXT_PASS_WITH_ARG
-#undef TERMINATE_PASS_LIST
 
   /* Initialize the pass_lists array.  */
 #define DEF_PASS_LIST(LIST) pass_lists[PASS_LIST_NO_##LIST] = &LIST;
@@ -1643,13 +1637,6 @@ pass_manager::pass_manager (context *ctxt)
 
 #include "pass-instances.def"
 
-#undef INSERT_PASSES_AFTER
-#undef PUSH_INSERT_PASSES_WITHIN
-#undef POP_INSERT_PASSES
-#undef NEXT_PASS
-#undef NEXT_PASS_WITH_ARG
-#undef TERMINATE_PASS_LIST
-
   /* Register the passes with the tree dump code.  */
   register_dump_files (all_lowering_passes);
   register_dump_files (all_small_ipa_passes);

Reply via email to