summaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.c
diff options
context:
space:
mode:
authorPat Haugen <pthaugen@us.ibm.com>2004-08-06 17:20:53 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2004-08-06 13:20:53 -0400
commit12183e0fbcace8903ebcbec1ef38aa25f000764b (patch)
tree22bcce619fb410b79d31de6cd6807d0d595d1ea1 /gcc/cfgcleanup.c
parentfc90a8f2eeefbac428a73d6ea8c146f8e5446154 (diff)
downloadgcc-12183e0fbcace8903ebcbec1ef38aa25f000764b.tar.gz
params.def (PARAM_MIN_CROSSJUMP_INSNS): New.
2004-08-06 Pat Haugen <pthaugen@us.ibm.com> * params.def (PARAM_MIN_CROSSJUMP_INSNS): New. * cfgcleanup.c (try_crossjump_to_edge): Add minimum insn match threshhold. * doc/invoke.texi (param): Document min-crossjump-insns. From-SVN: r85646
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 517f0eddfb6..648c4a4f7c3 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -1507,7 +1507,13 @@ try_crossjump_to_edge (int mode, edge e1, edge e2)
/* ... and part the second. */
nmatch = flow_find_cross_jump (mode, src1, src2, &newpos1, &newpos2);
- if (!nmatch)
+
+ /* Don't proceed with the crossjump unless we found a sufficient number
+ of matching instructions or the 'from' block was totally matched
+ (such that its predecessors will hopefully be redirected and the
+ block removed). */
+ if ((nmatch < PARAM_VALUE (PARAM_MIN_CROSSJUMP_INSNS))
+ && (newpos1 != BB_HEAD (src1)))
return false;
#ifndef CASE_DROPS_THROUGH