]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
passes: Move #undef to pass-instances.def
authorAndrew Pinski <quic_apinski@quicinc.com>
Sun, 13 Oct 2024 16:46:03 +0000 (09:46 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Mon, 14 Oct 2024 14:32:28 +0000 (07:32 -0700)
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_apinski@quicinc.com>
gcc/gen-pass-instances.awk
gcc/pass_manager.h
gcc/passes.cc

index 871ac0cdb52fa7faf6bc92310df0435da3856e5e..f56b8072ed5c1c78d6ef1e1d856e728f8f432760 100644 (file)
@@ -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:
index edd775e9a9c307293f12bd1067e4a9a78bcf0b0c..5a78d3fe56b061f14bb6a9574069a732cb6d43e2 100644 (file)
@@ -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
index 775c3e46302f51d4f784ac9721f026d91a1d7601..3abae971aceb9fa450b7aca3edd48f6c2ee1fe4e 100644 (file)
@@ -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);