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-15 11:06:39 +0200
commit66d7d833bece61e58998ad53a609cd32e3ee4fad (patch)
tree4c48898207ab715960058d2c8663462296a2a9c5
parent1ac2485a2fced091a5cce6343fe6a6337f850e73 (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 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