Hi,

the following patch replaces #define IPA_MAX_AFF_JF_ITEMS with a new
parameter PARAM_IPA_MAX_AGG_ITEMS (yeah, without the type).
Bootstrapped and tested on x86_64-linux, I consider it obvious enough
that I will commit it next week if there are no objections.

Thanks,

Martin


2012-09-05  Martin Jambor  <mjam...@suse.cz>

        * params.def (PARAM_IPA_MAX_AGG_ITEMS): New parameter.
        * ipa-prop.c: Include params.h.
        (IPA_MAX_AFF_JF_ITEMS): Removed.
        (determine_known_aggregate_parts): Use param value of
        PARAM_IPA_MAX_AGG_ITEMS instead of IPA_MAX_AFF_JF_ITEMS.
        * Makefile.in (ipa-prop.o): Add PARAMS_H dependency.

Index: src/gcc/Makefile.in
===================================================================
--- src.orig/gcc/Makefile.in
+++ src/gcc/Makefile.in
@@ -2851,7 +2851,7 @@ ipa-prop.o : ipa-prop.c $(CONFIG_H) $(SY
    $(TREE_FLOW_H) $(TM_H) $(TREE_PASS_H) $(FLAGS_H) $(TREE_H) \
    $(TREE_INLINE_H) $(GIMPLE_H) \
    $(GIMPLE_PRETTY_PRINT_H) $(LTO_STREAMER_H) \
-   $(DATA_STREAMER_H) $(TREE_STREAMER_H)
+   $(DATA_STREAMER_H) $(TREE_STREAMER_H) $(PARAMS_H)
 ipa-ref.o : ipa-ref.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    langhooks.h $(GGC_H) $(TARGET_H) $(CGRAPH_H)  $(TREE_H) $(TARGET_H) \
    $(TREE_FLOW_H) $(TM_H) $(TREE_PASS_H) $(FLAGS_H) $(TREE_H) $(GGC_H) 
Index: src/gcc/ipa-prop.c
===================================================================
--- src.orig/gcc/ipa-prop.c
+++ src/gcc/ipa-prop.c
@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3.
 #include "lto-streamer.h"
 #include "data-streamer.h"
 #include "tree-streamer.h"
+#include "params.h"
 
 
 /* Intermediate information about a parameter that is only useful during the
@@ -1145,9 +1146,6 @@ get_ssa_def_if_simple_copy (tree rhs)
   return rhs;
 }
 
-/* TODO: Turn this into a PARAM.  */
-#define IPA_MAX_AFF_JF_ITEMS 16
-
 /* Simple linked list, describing known contents of an aggregate beforere
    call.  */
 
@@ -1327,8 +1325,8 @@ determine_known_aggregate_parts (gimple
       *p = n;
 
       item_count++;
-      if (const_count == IPA_MAX_AFF_JF_ITEMS
-         || item_count == 2 * IPA_MAX_AFF_JF_ITEMS)
+      if (const_count == PARAM_VALUE (PARAM_IPA_MAX_AGG_ITEMS)
+         || item_count == 2 * PARAM_VALUE (PARAM_IPA_MAX_AGG_ITEMS))
        break;
     }
 
Index: src/gcc/params.def
===================================================================
--- src.orig/gcc/params.def
+++ src/gcc/params.def
@@ -885,6 +885,12 @@ DEFPARAM (PARAM_IPA_CP_EVAL_THRESHOLD,
          "beneficial to clone.",
          500, 0, 0)
 
+DEFPARAM (PARAM_IPA_MAX_AGG_ITEMS,
+         "ipa-max-agg-items",
+         "Maximum number of aggregate content items for a parameter in "
+         "jump functions and lattices",
+         16, 0, 0)
+
 /* WHOPR partitioning configuration.  */
 
 DEFPARAM (PARAM_LTO_PARTITIONS,

Reply via email to