diff options
author | Andrew Pinski <andrew.pinski@oss.qualcomm.com> | 2025-09-06 15:24:00 -0700 |
---|---|---|
committer | Andrew Pinski <andrew.pinski@oss.qualcomm.com> | 2025-09-06 15:29:16 -0700 |
commit | 7b8c45d48f7fca3c10d43ca3f95e28b64458cf2b (patch) | |
tree | 4a85dc440bfd97e67a5d7d7bab2805325438cd43 | |
parent | 41b0c7a674e87074fdc8088479cb93f6fe1e070f (diff) | |
download | gcc-7b8c45d48f7fca3c10d43ca3f95e28b64458cf2b.zip gcc-7b8c45d48f7fca3c10d43ca3f95e28b64458cf2b.tar.gz gcc-7b8c45d48f7fca3c10d43ca3f95e28b64458cf2b.tar.bz2 |
dep_fusion: Fix if target does not have macro fusion [PR121835]
This new pass will ICE if the target does not define the macro_fusion_pair_p
pass. The pass will not be useful in that case so it is best to return
early.
Pushed as obvious after a bootstrap on x86_64-linux-gnu.
PR rtl-optimization/121835
gcc/ChangeLog:
* dep-fusion.cc (pass_dep_fusion::execute): Return early if
macro_fusion_pair_p is null.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
-rw-r--r-- | gcc/dep-fusion.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/dep-fusion.cc b/gcc/dep-fusion.cc index 1e69e68..d040af6 100644 --- a/gcc/dep-fusion.cc +++ b/gcc/dep-fusion.cc @@ -75,6 +75,10 @@ pass_dep_fusion::gate (function *) unsigned int pass_dep_fusion::execute (function *fn) { + // If the target has no macro fusion, there is nothing to be done. + if (!targetm.sched.macro_fusion_pair_p) + return 0; + // Initialization. calculate_dominance_info (CDI_DOMINATORS); df_analyze (); |