diff options
author | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2018-09-26 22:17:33 +0200 |
---|---|---|
committer | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2019-08-30 20:10:54 +0200 |
commit | 92dc66e53a10808290509ea6997d0f93bc927924 (patch) | |
tree | 6d7e78ed34690411bc1e764165f7d62257132bdd | |
parent | fa497e3548e0dc0d11b259d299ee39c11db0d98f (diff) |
cfgloopmanip: Allow forced creation of loop preheaders.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
-rw-r--r-- | gcc/cfgloopmanip.c | 3 | ||||
-rw-r--r-- | gcc/cfgloopmanip.h | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index 74c39dbe8faa..8da92335269b 100644 --- a/gcc/cfgloopmanip.c +++ b/gcc/cfgloopmanip.c @@ -1509,6 +1509,9 @@ create_preheader (struct loop *loop, int flags) && (JUMP_P (BB_END (single_entry->src)) || has_preds_from_loop (single_entry->src, loop))) need_forwarder_block = true; + /* If we really want it, we get it. */ + else if (flags & CP_FORCE_PREHEADERS) + need_forwarder_block = true; } if (! need_forwarder_block) return NULL; diff --git a/gcc/cfgloopmanip.h b/gcc/cfgloopmanip.h index d73c0c53d4ee..f36d118bbc1a 100644 --- a/gcc/cfgloopmanip.h +++ b/gcc/cfgloopmanip.h @@ -23,7 +23,8 @@ along with GCC; see the file COPYING3. If not see enum { CP_SIMPLE_PREHEADERS = 1, - CP_FALLTHRU_PREHEADERS = 2 + CP_FALLTHRU_PREHEADERS = 2, + CP_FORCE_PREHEADERS = 4 }; #define DLTHE_FLAG_UPDATE_FREQ 1 /* Update frequencies in |