* 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.
From-SVN: r62942
+2003-02-15 Richard Henderson <rth@redhat.com>
+
+ * 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.
+
2003-02-15 Richard Henderson <rth@redhat.com>
* recog.c (split_all_insns): Include new blocks in life update;
cfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \
insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
function.h except.h $(GGC_H)
-cfgcleanup.o : cfgcleanup.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(TIMEVAR_H) $(BASIC_BLOCK_H) hard-reg-set.h output.h flags.h $(RECOG_H) toplev.h \
- $(GGC_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H)
+cfgcleanup.o : cfgcleanup.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) $(TIMEVAR_H) $(BASIC_BLOCK_H) hard-reg-set.h output.h flags.h \
+ $(RECOG_H) toplev.h $(GGC_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H) \
+ $(PARAMS_H)
cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) coretypes.h $(TM_H) \
$(BASIC_BLOCK_H) hard-reg-set.h cfgloop.h flags.h
cfgloopanal.o : cfgloopanal.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
#include "recog.h"
#include "toplev.h"
#include "cselib.h"
+#include "params.h"
#include "tm_p.h"
#include "target.h"
{
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)
/* 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;
}
@var{name} are given in the following table:
@table @gcctabopt
+@item max-crossjump-edges
+The maximum number of incoming edges to consider for crossjumping.
+The algorithm used by @option(-fcrossjumping) is @math{O(N^2)} in
+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 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
this threshold (in percents). Used when profile feedback is not available",
50)
+/* The maximum number of incoming edges to consider for crossjumping. */
+DEFPARAM(PARAM_MAX_CROSSJUMP_EDGES,
+ "max-crossjump-edges",
+ "The maximum number of incoming edges to consider for crossjumping",
+ 100)
+
#ifdef ENABLE_GC_ALWAYS_COLLECT
# define GGC_MIN_EXPAND_DEFAULT 0
# define GGC_MIN_HEAPSIZE_DEFAULT 0