diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-06 17:20:53 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-06 17:20:53 +0000 |
commit | 43341e2fef3058d90fde0502230bef2abbc9ca85 (patch) | |
tree | 22bcce619fb410b79d31de6cd6807d0d595d1ea1 /gcc/cfgcleanup.c | |
parent | 4396343edfe9b1f9f9b29c19d73aa0e74be3f600 (diff) | |
download | gcc-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/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 8 |
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 |