Commit f72c6b56 by David Edelsohn Committed by David Edelsohn

params.def (PARAM_MAX_SCHED_REGION_BLOCKS): New.

        * params.def (PARAM_MAX_SCHED_REGION_BLOCKS): New.
        (PARAM_MAX_SCHED_REGION_INSNS): New.
        * sched-rgn.c: Include params.h
        (MAX_RGN_BLOCKS): Delete.
        (MAX_RGN_INSNS): Delete.
        (too_large): Return bool.  Convert to PARAM_VALUE.
        * Makefile.in (sched-rgn): Depend on $(PARAMS_H).
        * doc/invoke.texi (param): Document max-sched-region-blocks and
        max-sched-region-insns.

From-SVN: r79839
parent d6672e91
2004-03-22 David Edelsohn <edelsohn@gnu.org>
* params.def (PARAM_MAX_SCHED_REGION_BLOCKS): New.
(PARAM_MAX_SCHED_REGION_INSNS): New.
* sched-rgn.c: Include params.h
(MAX_RGN_BLOCKS): Delete.
(MAX_RGN_INSNS): Delete.
(too_large): Return bool. Convert to PARAM_VALUE.
* Makefile.in (sched-rgn): Depend on $(PARAMS_H).
* doc/invoke.texi (param): Document max-sched-region-blocks and
max-sched-region-insns.
2004-03-22 Joel Brobecker <brobecker@gnat.com>
* dwarf2out.c (is_subrange_type): Do not emit a subrange_type DIE
......
......@@ -1816,7 +1816,7 @@ sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H)
$(INSN_ATTR_H) toplev.h $(RECOG_H) except.h cselib.h $(PARAMS_H) $(TM_P_H)
sched-rgn.o : sched-rgn.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
sched-int.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \
$(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(TARGET_H)
$(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(PARAMS_H) $(TM_P_H) $(TARGET_H)
sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
sched-int.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \
$(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(PARAMS_H)
......
......@@ -4887,6 +4887,14 @@ The @option{reorder-block-duplicate-feedback} is used only when profile
feedback is available and may be set to higher values than
@option{reorder-block-duplicate} since information about the hot spots is more
accurate.
@item max-sched-region-blocks
The maximum number of blocks in a region to be considered for
interblock scheduling. The default value is 10.
@item max-sched-region-insns",
The maximum number of insns in a region to be considered for
interblock scheduling. The default value is 100.
@end table
@end table
......
......@@ -293,6 +293,16 @@ DEFPARAM(PARAM_MAX_RELOAD_SEARCH_INSNS,
"The maximum number of instructions to search backward when looking for equivalent reload",
100)
DEFPARAM(PARAM_MAX_SCHED_REGION_BLOCKS,
"max-sched-region-blocks",
"The maximum number of blocks in a region to be considered for interblock scheduling",
10)
DEFPARAM(PARAM_MAX_SCHED_REGION_INSNS,
"max-sched-region-insns",
"The maximum number of insns in a region to be considered for interblock scheduling",
100)
/*
Local variables:
mode:c
......
......@@ -63,6 +63,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "toplev.h"
#include "recog.h"
#include "cfglayout.h"
#include "params.h"
#include "sched-int.h"
#include "target.h"
......@@ -83,9 +84,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define FED_BY_SPEC_LOAD(insn) (h_i_d[INSN_UID (insn)].fed_by_spec_load)
#define IS_LOAD_INSN(insn) (h_i_d[INSN_UID (insn)].is_load_insn)
#define MAX_RGN_BLOCKS 10
#define MAX_RGN_INSNS 100
/* nr_inter/spec counts interblock/speculative motion for the function. */
static int nr_inter, nr_spec;
......@@ -156,7 +154,7 @@ static int *containing_rgn;
void debug_regions (void);
static void find_single_block_region (void);
static void find_rgns (struct edge_list *);
static int too_large (int, int *, int *);
static bool too_large (int, int *, int *);
extern void debug_live (int, int);
......@@ -551,19 +549,18 @@ find_single_block_region (void)
}
/* Update number of blocks and the estimate for number of insns
in the region. Return 1 if the region is "too large" for interblock
scheduling (compile time considerations), otherwise return 0. */
in the region. Return true if the region is "too large" for interblock
scheduling (compile time considerations). */
static int
static bool
too_large (int block, int *num_bbs, int *num_insns)
{
(*num_bbs)++;
(*num_insns) += (INSN_LUID (BB_END (BASIC_BLOCK (block))) -
INSN_LUID (BB_HEAD (BASIC_BLOCK (block))));
if ((*num_bbs > MAX_RGN_BLOCKS) || (*num_insns > MAX_RGN_INSNS))
return 1;
else
return 0;
(*num_insns) += (INSN_LUID (BB_END (BASIC_BLOCK (block)))
- INSN_LUID (BB_HEAD (BASIC_BLOCK (block))));
return ((*num_bbs > PARAM_VALUE (PARAM_MAX_SCHED_REGION_BLOCKS))
|| (*num_insns > PARAM_VALUE (PARAM_MAX_SCHED_REGION_INSNS)));
}
/* Update_loop_relations(blk, hdr): Check if the loop headed by max_hdr[blk]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment