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> | 2018-09-28 17:21:36 +0200 |
commit | b67a04233bfc1f711b72495fdd09391aeaf7af82 (patch) | |
tree | 232d67ae6f95d0b3192abeb2226bca5ba77d48b5 | |
parent | 516b7d1cd1015e45a0359aacfb3faa2a044e65fd (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 |