summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-06 17:20:53 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-06 17:20:53 +0000
commit43341e2fef3058d90fde0502230bef2abbc9ca85 (patch)
tree22bcce619fb410b79d31de6cd6807d0d595d1ea1 /gcc
parent4396343edfe9b1f9f9b29c19d73aa0e74be3f600 (diff)
downloadgcc-43341e2fef3058d90fde0502230bef2abbc9ca85.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85646 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/cfgcleanup.c8
-rw-r--r--gcc/doc/invoke.texi6
-rw-r--r--gcc/params.def6
4 files changed, 26 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0c189c61c95..1318c7cd2c2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2004-08-06 Richard Sandiford <rsandifo@redhat.com>
PR c/13282
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
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 154dc976fb2..f1988b0b856 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -5094,6 +5094,12 @@ the number of edges incoming to each block. Increasing values mean
more aggressive optimization, making the compile time increase with
probably small improvement in executable size.
+@item min-crossjump-insns
+The minimum number of instructions which must be matched at the end
+of two blocks before crossjumping will be performed on them. This
+value is ignored in the case where all instructions in the block being
+crossjumped from are matched. The default value is 5.
+
@item max-delay-slot-insn-search
The maximum number of instructions to consider when looking for an
instruction to fill a delay slot. If more than this arbitrary number of
diff --git a/gcc/params.def b/gcc/params.def
index 4b5a9ce7b93..aed7655c9a4 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -306,6 +306,12 @@ DEFPARAM(PARAM_MAX_CROSSJUMP_EDGES,
"The maximum number of incoming edges to consider for crossjumping",
100)
+/* The minimum number of matching instructions to consider for crossjumping. */
+DEFPARAM(PARAM_MIN_CROSSJUMP_INSNS,
+ "min-crossjump-insns",
+ "The minimum number of matching instructions to consider for crossjumping",
+ 5)
+
/* The maximum length of path considered in cse. */
DEFPARAM(PARAM_MAX_CSE_PATH_LENGTH,
"max-cse-path-length",