+2015-09-03 Tom de Vries <tom@codesourcery.com>
+
+ * doc/invoke.texi (parloops-chunk-size): Add item.
+ * params.def (PARAM_PARLOOPS_CHUNK_SIZE): Add DEFPARAM.
+ * tree-parloops.c: Include params.h.
+ (create_parallel_loop): Set chunk-size of schedule of omp-for loop, if
+ param parloops-chunk-size is used.
+
2015-09-03 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
PR middle-end/67351
Maximum number of new jump thread paths to create for a finite state
automaton. The default is 50.
+@item parloops-chunk-size
+Chunk size of omp schedule for loops parallelized by parloops. The default
+is 0.
+
@end table
@end table
"max-fsm-thread-paths",
"Maximum number of new jump thread paths to create for a finite state automaton",
50, 1, 999999)
+
+DEFPARAM (PARAM_PARLOOPS_CHUNK_SIZE,
+ "parloops-chunk-size",
+ "Chunk size of omp schedule for loops parallelized by parloops",
+ 0, 0, 0)
/*
Local variables:
#include "tree-nested.h"
#include "cgraph.h"
#include "tree-ssa.h"
+#include "params.h"
/* This pass tries to distribute iterations of loops into several threads.
The implementation is straightforward -- for each loop we test whether its
type = TREE_TYPE (cvar);
t = build_omp_clause (loc, OMP_CLAUSE_SCHEDULE);
OMP_CLAUSE_SCHEDULE_KIND (t) = OMP_CLAUSE_SCHEDULE_STATIC;
+ int chunk_size = PARAM_VALUE (PARAM_PARLOOPS_CHUNK_SIZE);
+ if (chunk_size != 0)
+ OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (t)
+ = build_int_cst (integer_type_node, chunk_size);
for_stmt = gimple_build_omp_for (NULL, GF_OMP_FOR_KIND_FOR, t, 1, NULL);
gimple_set_location (for_stmt, loc);