diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-15 21:06:16 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-15 21:06:16 +0000 |
commit | 2a5b4716e2bb96fc20e9790a5e82d4ae4005054c (patch) | |
tree | d9e25ddc6c9d0b6ad9a565e5db34fc03dfed353b /gcc/cfgcleanup.c | |
parent | 56dddaad9575187a36a8af8dbd668c88cc5dff89 (diff) | |
download | gcc-2a5b4716e2bb96fc20e9790a5e82d4ae4005054c.tar.gz |
* cfgcleanup.c: Include params.h.
(try_crossjump_bb): Use PARAM_MAX_CROSSJUMP_EDGES. Fix test for
too many outgoing edges from a block.
* Makefile.in (cfgcleanup.o): Depend on PARAMS_H.
* params.def (max-crossjump-edges): New.
* doc/invoke.texi: Document it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 338281a6990..3607fc3fcdd 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -45,6 +45,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "recog.h" #include "toplev.h" #include "cselib.h" +#include "params.h" #include "tm_p.h" #include "target.h" @@ -1464,7 +1465,7 @@ try_crossjump_bb (mode, bb) { edge e, e2, nexte2, nexte, fallthru; bool changed; - int n = 0; + int n = 0, max; /* Nothing to do if there is not at least two incoming edges. */ if (!bb->pred || !bb->pred->pred_next) @@ -1473,11 +1474,13 @@ try_crossjump_bb (mode, bb) /* It is always cheapest to redirect a block that ends in a branch to a block that falls through into BB, as that adds no branches to the program. We'll try that combination first. */ - for (fallthru = bb->pred; fallthru; fallthru = fallthru->pred_next, n++) + fallthru = NULL; + max = PARAM_VALUE (PARAM_MAX_CROSSJUMP_EDGES); + for (e = bb->pred; e ; e = e->pred_next, n++) { - if (fallthru->flags & EDGE_FALLTHRU) - break; - if (n > 100) + if (e->flags & EDGE_FALLTHRU) + fallthru = e; + if (n > max) return false; } |