diff options
author | Thomas Schwinge <tschwinge@baylibre.com> | 2024-06-28 16:04:18 +0200 |
---|---|---|
committer | Thomas Schwinge <tschwinge@baylibre.com> | 2024-09-04 12:29:45 +0200 |
commit | 438381ef759ee8b5b04c5723a8334354ba2a30e5 (patch) | |
tree | 59e57397396456dede477126f0e8ca767643c178 /gcc | |
parent | b9be3113a9365e8380397abb23abc71f049cf4f1 (diff) | |
download | gcc-438381ef759ee8b5b04c5723a8334354ba2a30e5.zip gcc-438381ef759ee8b5b04c5723a8334354ba2a30e5.tar.gz gcc-438381ef759ee8b5b04c5723a8334354ba2a30e5.tar.bz2 |
Document 'pass_postreload' vs. 'pass_late_compilation'
See Subversion r217124 (Git commit 433e4164339f18d0b8798968444a56b681b5232c)
"Reorganize post-ra pipeline for targets without register allocation".
gcc/
* passes.cc: Document 'pass_postreload' vs. 'pass_late_compilation'.
* passes.def: Likewise.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/passes.cc | 14 | ||||
-rw-r--r-- | gcc/passes.def | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/passes.cc b/gcc/passes.cc index 057850f4..e2a07eb 100644 --- a/gcc/passes.cc +++ b/gcc/passes.cc @@ -660,6 +660,10 @@ make_pass_rest_of_compilation (gcc::context *ctxt) namespace { +/* A container pass (only) for '!targetm.no_register_allocation' targets, for + passes to run if reload completed (..., but not run them if it failed, for + example for an invalid 'asm'). See also 'pass_late_compilation'. */ + const pass_data pass_data_postreload = { RTL_PASS, /* type */ @@ -681,7 +685,12 @@ public: {} /* opt_pass methods: */ - bool gate (function *) final override { return reload_completed; } + bool gate (function *) final override + { + if (reload_completed) + gcc_checking_assert (!targetm.no_register_allocation); + return reload_completed; + } }; // class pass_postreload @@ -695,6 +704,9 @@ make_pass_postreload (gcc::context *ctxt) namespace { +/* A container pass like 'pass_postreload', but for passes to run also for + 'targetm.no_register_allocation' targets. */ + const pass_data pass_data_late_compilation = { RTL_PASS, /* type */ diff --git a/gcc/passes.def b/gcc/passes.def index b06d6d4..6d98c3c 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -509,6 +509,9 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_early_remat); NEXT_PASS (pass_ira); NEXT_PASS (pass_reload); + /* In the following, some passes are tied to 'pass_postreload' and others + to 'pass_late_compilation'. The difference is that the latter also + run for 'targetm.no_register_allocation' targets. */ NEXT_PASS (pass_postreload); PUSH_INSERT_PASSES_WITHIN (pass_postreload) NEXT_PASS (pass_postreload_cse); |