summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Muellner <christoph.muellner@theobroma-systems.com>2018-09-26 22:17:33 +0200
committerChristoph Muellner <christoph.muellner@theobroma-systems.com>2018-10-17 23:24:04 +0200
commit711a65c0fdc32ef286e785ec1959986490d1b2ef (patch)
tree9e1954ac428799f37f56a479485306724731c257
parent78caca250e79bce370a829122affd33dfb898d74 (diff)
cfgloopmanip: Allow forced creation of loop preheaders.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
-rw-r--r--gcc/cfgloopmanip.c3
-rw-r--r--gcc/cfgloopmanip.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c
index 979d9e64971f..80796cfce835 100644
--- a/gcc/cfgloopmanip.c
+++ b/gcc/cfgloopmanip.c
@@ -1544,6 +1544,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;
}
/* FIXME Use the flags in a more sensible way. */
if (! need_forwarder_block)
diff --git a/gcc/cfgloopmanip.h b/gcc/cfgloopmanip.h
index 7ad3bf5d7d4d..06f5c6b29109 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