]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
params.def (PARAM_MAX_SCHED_REGION_BLOCKS): New.
authorDavid Edelsohn <edelsohn@gnu.org>
Mon, 22 Mar 2004 22:05:05 +0000 (22:05 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Mon, 22 Mar 2004 22:05:05 +0000 (17:05 -0500)
        * 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

gcc/ChangeLog
gcc/Makefile.in
gcc/doc/invoke.texi
gcc/params.def
gcc/sched-rgn.c

index daebc141599787bfff320cb4629b28aca628847f..7944ad02828afdb68e6d3245079eeea354707549 100644 (file)
@@ -1,3 +1,15 @@
+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
index 2b11c82a71ce499f56e90cfd25607c8629d8f799..c08d18b6738e6a80af50011758e78c02d72fd1f7 100644 (file)
@@ -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)
index 03aa5f827b734b011d30bdb2b177d2d774a94968..362898f8e9858d7e17aa42c9fcb5d7dec92597c7 100644 (file)
@@ -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
 
index 7be8ddc132295078ff41c5a932e87d9aa8e3b4f0..c406ab87ae9e9247be5397d69fb2e6d849ec64fa 100644 (file)
@@ -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
index 2cb89a40488a4a696ccb4246e81131c1dfddbe27..e02686d0194dcccf9569c607534eded3e80cdd67 100644 (file)
@@ -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]