-2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
-
- * graphite-blocking.c
- (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
- * graphite-clast-to-gimple.c
- (clast_to_gcc_expression): Same.
- (precision_for_value): Same.
- (precision_for_interval): Same.
- (gcc_type_for_interval): Same.
- (graphite_create_new_guard): Same.
- (compute_bounds_for_level): Same.
- (graphite_create_new_loop_guard): Same.
- * graphite-interchange.c
- (build_linearized_memory_access): Same.
- (pdr_stride_in_loop): Same.
- (memory_strides_in_loop_1): Same.
- (memory_strides_in_loop): Same.
- (extend_scattering): Same.
- (psct_scattering_dim_for_loop_depth): Same.
- (pbb_number_of_iterations): Same.
- * graphite-poly.h
- (debug_iteration_domains): Same.
- * graphite-ppl.c
- (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
- (ppl_set_inhomogeneous_gmp): Same.
- (ppl_strip_loop): Same.
- (ppl_lexico_compare_linear_expressions): Same.
- (ppl_read_polyhedron_matrix): Same.
- (ppl_max_for_le_pointset): Same.
- * graphite-ppl.h
- (ppl_read_polyhedron_matrix): Same.
- (tree_int_to_gmp): Same.
- (gmp_cst_to_tree): Same.
- (ppl_set_inhomogeneous): Same.
- (ppl_set_inhomogeneous_tree): Same.
- (ppl_set_coef): Same.
- (ppl_set_coef_tree): Same.
- * graphite-sese-to-poly.c
- (build_pbb_scattering_polyhedrons): Same.
- (build_scop_scattering): Same.
- (scan_tree_for_params_right_scev): Same.
- (scan_tree_for_params): Same.
- (find_params_in_bb): Same.
- (find_scop_parameters): Same.
- (add_upper_bounds_from_estimated_nit): Same.
- (build_loop_iteration_domains): Same.
- (add_condition_to_domain): Same.
- (pdr_add_memory_accesses): Same.
-
-2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
-
- * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
- CLooG's value_* macros to their respective mpz_* counterparts.
- * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
- (graphite_create_new_loop_guard): Same.
- * graphite-interchange.c (build_linearized_memory_access): Same.
- (pdr_stride_in_loop): Same.
- (memory_strides_in_loop_1): Same.
- (1st_interchange_profitable_p): Same.
- * graphite-poly.c (extend_scattering): Same.
- (psct_scattering_dim_for_loop_depth): Same.
- (pbb_number_of_iterations): Same.
- (pbb_number_of_iterations_at_time): Same.
- * graphite-poly.h (new_1st_loop): Same.
- * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
- (oppose_constraint): Same.
- (insert_constraint_into_matrix): Same.
- (ppl_set_inhomogeneous_gmp): Same.
- (ppl_set_coef_gmp): Same.
- (ppl_strip_loop): Same.
- (ppl_lexico_compare_linear_expressions): Same.
- (ppl_max_for_le_pointset): Same.
- (ppl_min_for_le_pointset): Same.
- (ppl_build_realtion): Same.
- * graphite-ppl.h (gmp_cst_to_tree): Same.
- (ppl_set_inhomogeneous): Same.
- (ppl_set_inhomogeneous_tree): Same.
- (ppl_set_coef): Same.
- (ppl_set_coef_tree): Same.
- * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
- (build_scop_scattering): Same.
- (add_value_to_dim): Same.
- (scan_tree_for_params_right_scev): Same.
- (scan_tree_for_params_int): Same.
- (scan_tree_for_params): Same.
- (find_params_in_bb): Same.
- (find_scop_parameters): Same.
- (add_upper_bounds_from_estimated_nit): Same.
- (build_loop_iteration_domains): Same.
- (create_linear_expr_from_tree): Same.
- (add_condition_to_domain): Same.
- (pdr_add_memory_accesses): Same.
-
-2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
-
- PR middle-end/43519
- * graphite-clast-to-gimple.c (max_signed_precision_type): Use
- lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
- When converting an unsigned type to signed, double its precision.
- (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
- (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
- (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
-
-2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
-
- PR middle-end/43519
- * graphite-clast-to-gimple.c (max_signed_precision_type): Use
- build_nonstandard_integer_type.
- (gcc_type_for_interval): Same.
-
-2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
-
- PR middle-end/43519
- * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
- POINTER_PLUS_EXPR for pointer types.
-
- * gcc.dg/graphite/id-19.c: New.
-
-2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
-
- PR middle-end/43519
- * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
- * graphite-clast-to-gimple.c: Include langhooks.h.
- (max_signed_precision_type): New.
- (max_precision_type): Takes two types as arguments.
- (precision_for_value): New.
- (precision_for_interval): New.
- (gcc_type_for_interval): New.
- (gcc_type_for_value): New.
- (gcc_type_for_clast_term): New.
- (gcc_type_for_clast_red): New.
- (gcc_type_for_clast_bin): New.
- (gcc_type_for_clast_expr): Split up into several functions.
- (gcc_type_for_clast_eq): Rewritten.
- (compute_bounds_for_level): New.
- (compute_type_for_level_1): New.
- (compute_type_for_level): New.
- (gcc_type_for_cloog_iv): Removed.
- (gcc_type_for_iv_of_clast_loop): Rewritten.
- (graphite_create_new_loop): Compute the lower and upper bound types
- with gcc_type_for_clast_expr.
- (graphite_create_new_loop_guard): Same.
- (find_cloog_iv_in_expr): Removed.
- (compute_cloog_iv_types_1): Removed.
- (compute_cloog_iv_types): Removed.
- (gloog): Do not call compute_cloog_iv_types.
- * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
- GBB_CLOOG_IV_TYPES.
- (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
- * sese.h (struct gimple_bb): Removed field cloog_iv_types.
- (GBB_CLOOG_IV_TYPES): Removed.
-
- * gcc.dg/graphite/run-id-pr42644.c: Call abort.
-
-2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
-
- Reverted this commit: as at this point the loop closed SSA form
- is under a canonical form respecting the single argument condition.
- * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
- close phi nodes may have more than one argument.
-
-2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
-
- * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
- gimple_phi_num_args of the loop close SSA phi node is equal to 1.
- (detect_commutative_reduction): Same.
-
-2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
-
- * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
- close phi nodes may have more than one argument.
-
-2010-03-30 Richard Guenther <rguenther@suse.de>
- Zdenek Dvorak <ook@ucw.cz>
- Sebastian Pop <sebastian.pop@amd.com>
-
- PR middle-end/43464
- * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
- with multiple arguments.
- (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
-
-2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
-
- * graphite-dependences.c (print_pddr): Call print_pdr with an
- extra argument.
- * graphite-poly.c (debug_pdr): Add an extra argument for the
- verbosity level.
- (print_pdr): Same.
- (print_pbb_domain): Same.
- (print_pbb): Same.
- (print_scop_context): Same.
- (print_scop): Same.
- (print_cloog): Same.
- (debug_pbb_domain): Same.
- (debug_pbb): Same.
- (print_pdrs): Same.
- (debug_pdrs): Same.
- (debug_scop_context): Same.
- (debug_scop): Same.
- (debug_cloog): Same.
- (print_scop_params): Same.
- (debug_scop_params): Same.
- (print_iteration_domain): Same.
- (print_iteration_domains): Same.
- (debug_iteration_domain): Same.
- (debug_iteration_domains): Same.
- (print_scattering_function): Same.
- (print_scattering_functions): Same.
- (debug_scattering_function): Same.
- (debug_scattering_functions): Same.
- * graphite-poly.h (debug_pdr): Update declaration.
- (print_pdr): Same.
- (print_pbb_domain): Same.
- (print_pbb): Same.
- (print_scop_context): Same.
- (print_scop): Same.
- (print_cloog): Same.
- (debug_pbb_domain): Same.
- (debug_pbb): Same.
- (print_pdrs): Same.
- (debug_pdrs): Same.
- (debug_scop_context): Same.
- (debug_scop): Same.
- (debug_cloog): Same.
- (print_scop_params): Same.
- (debug_scop_params): Same.
- (print_iteration_domain): Same.
- (print_iteration_domains): Same.
- (debug_iteration_domain): Same.
- (debug_iteration_domains): Same.
- (print_scattering_function): Same.
- (print_scattering_functions): Same.
- (debug_scattering_function): Same.
- (debug_scattering_functions): Same.
-
-2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
-
- * graphite-poly.c (print_scattering_function_1): New.
- (print_scattering_function): Call it.
- (print_scop_params): Remove spaces at the end of lines.
- (print_cloog): New.
- (debug_cloog): New.
- * graphite-poly.h (print_cloog): Declared.
- (debug_cloog): Declared.
-
-2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
-
- * tree-ssa-copy.c: Revert this previous change:
- (init_copy_prop): Loop closed phi nodes cancontain more than one
- argument.
- (execute_copy_prop): Revert the previous change: do not call
- rewrite_into_loop_closed_ssa.
-
-2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
- Richard Guenther <rguenther@suse.de>
-
- PR middle-end/43464
- * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
- contain more than one argument.
- (execute_copy_prop): Revert the previous change: do not call
- rewrite_into_loop_closed_ssa.
-
- * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
- * gcc.dg/graphite/id-pr43464-1.c: New.
-
-2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
-
- PR middle-end/43464
- * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
- and verify_loop_closed_ssa when copy prop is executed in the LNO.
-
- * gcc.dg/graphite/id-pr43464.c: New.
-
-2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
-
- * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
- in loop->header.
- * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
- * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
- * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
- to switch between adding the IV bump in loop->latch or in loop->header.
-
-2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
-
- * passes.c (init_optimization_passes): Add pass_copy_prop
- after Graphite.
-
-2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
-
- * graphite-poly.c (print_scattering_function): Pretty print following
- the scoplib format.
- (print_pdr): Same.
- (print_pbb_domain): Same.
- (dump_gbb_cases): Same.
- (dump_gbb_conditions): Same.
- (print_pdrs): Same.
- (print_pbb): Same.
- (print_scop_params): Same.
- (print_scop_context): Same.
- (print_scop): Same.
- (print_pbb_body): New.
- (lst_indent_to): New.
- (print_lst): Start new lines with a #.
- * graphite-poly.h (pbb_bb): New.
- (pbb_index): Use pbb_bb.
- * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
- disjuncts.
- * tree-data-ref.c (dump_data_reference): Start new lines with a #.
-
-2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
-
- PR middle-end/43351
- * gcc.dg/graphite/id-pr43351.c
-
-2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
-
- PR middle-end/43354
- * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
- call insert_out_of_ssa_copy for default definitions.
- * gfortran.dg/graphite/id-pr43354.f: New.
-
-2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
-
- PR middle-end/43349
- * gfortran.dg/graphite/pr43349.f: New.
-
-2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
-
- * graphite-clast-to-gimple.c (my_long_long): Defined.
- (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
- * graphite-sese-to-poly.c (my_long_long): Defined.
- (scop_ivs_can_be_represented): Use it.
-
-2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
-
- * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
- graphite-max-bbs-per-function, and loop-block-tile-size.
- * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
- with "maximum".
- (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
-
-2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
-
- * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
- forward declaration.
- * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
- (add_upper_bounds_from_estimated_nit): New.
- (build_loop_iteration_domains): Use it.
-
-2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
-
- * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
-
-2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
-
- PR middle-end/43306
- * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
- should be an INTEGER_CST. Also handle CASE_CONVERT.
- * gcc.dg/graphite/pr43306.c: New.
-
-2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
-
- * graphite.c (graphite_initialize): To bound the number of bbs per
- function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
- * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
- * doc/invoke.texi: Document it.
-
-2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
-
- * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
- * graphite-sese-to-poly.h (build_poly_scop): Same.
-
2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (build_poly_scop): Limit scops following
-fno-implicit-templates @gol
-fno-implicit-inline-templates @gol
-fno-implement-inlines -fms-extensions @gol
--fno-nonansi-builtins -fnothrow-opt -fno-operator-names @gol
+-fno-nonansi-builtins -fno-operator-names @gol
-fno-optional-diags -fpermissive @gol
-fno-pretty-templates @gol
-frepo -fno-rtti -fstats -ftemplate-depth=@var{n} @gol
-Wno-attributes -Wno-builtin-macro-redefined @gol
-Wc++-compat -Wc++0x-compat -Wcast-align -Wcast-qual @gol
-Wchar-subscripts -Wclobbered -Wcomment @gol
--Wconversion -Wcoverage-mismatch -Wcpp -Wno-deprecated @gol
+-Wconversion -Wcoverage-mismatch -Wno-deprecated @gol
-Wno-deprecated-declarations -Wdisabled-optimization @gol
-Wno-div-by-zero -Wempty-body -Wenum-compare -Wno-endif-labels @gol
-Werror -Werror=* @gol
-Wsign-compare -Wsign-conversion -Wstack-protector @gol
-Wstrict-aliasing -Wstrict-aliasing=n @gol
-Wstrict-overflow -Wstrict-overflow=@var{n} @gol
--Wsuggest-attribute=@r{[}const@r{|}pure@r{]} @gol
-Wswitch -Wswitch-default -Wswitch-enum -Wsync-nand @gol
-Wsystem-headers -Wtrigraphs -Wtype-limits -Wundef -Wuninitialized @gol
-Wunknown-pragmas -Wno-pragmas @gol
-Wunsuffixed-float-constants -Wunused -Wunused-function @gol
-Wunused-label -Wunused-parameter -Wno-unused-result -Wunused-value -Wunused-variable @gol
--Wunused-but-set-parameter -Wunused-but-set-variable -Wvariadic-macros -Wvla @gol
+-Wvariadic-macros -Wvla @gol
-Wvolatile-register-var -Wwrite-strings}
@item C and Objective-C-only Warning Options
-fgcse-sm -fif-conversion -fif-conversion2 -findirect-inlining @gol
-finline-functions -finline-functions-called-once -finline-limit=@var{n} @gol
-finline-small-functions -fipa-cp -fipa-cp-clone -fipa-matrix-reorg -fipa-pta @gol
--fipa-profile -fipa-pure-const -fipa-reference -fipa-struct-reorg @gol
--fira-algorithm=@var{algorithm} @gol
+-fipa-pure-const -fipa-reference -fipa-struct-reorg @gol
+-fipa-type-escape -fira-algorithm=@var{algorithm} @gol
-fira-region=@var{region} -fira-coalesce @gol
-fira-loop-pressure -fno-ira-share-save-slots @gol
-fno-ira-share-spill-slots -fira-verbose=@var{n} @gol
-funit-at-a-time -funroll-all-loops -funroll-loops @gol
-funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol
-fvariable-expansion-in-unroller -fvect-cost-model -fvpt -fweb @gol
--fwhole-program -fwhopr[=@var{n}] -fwpa -fuse-linker-plugin @gol
+-fwhole-program -fwhopr -fwpa -fuse-linker-plugin @gol
--param @var{name}=@var{value}
-O -O0 -O1 -O2 -O3 -Os}
@item Directory Options
@xref{Directory Options,,Options for Directory Search}.
-@gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir}}
--iquote@var{dir} -L@var{dir} -specs=@var{file} -I-
---sysroot=@var{dir}
+@gccoptlist{-B@var{prefix} -I@var{dir} -iquote@var{dir} -L@var{dir}
+-specs=@var{file} -I- --sysroot=@var{dir}}
+
+@item Target Options
+@c I wrote this xref this way to avoid overfull hbox. -- rms
+@xref{Target Options}.
+@gccoptlist{-V @var{version} -b @var{machine}}
@item Machine Dependent Options
@xref{Submodel Options,,Hardware Models and Configurations}.
-mprefergot -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
-mdivsi3_libfunc=@var{name} -mfixed-range=@var{register-range} @gol
-madjust-unroll -mindexed-addressing -mgettrcost=@var{number} -mpt-fixed @gol
--maccumulate-outgoing-args -minvalid-symbols}
+-minvalid-symbols}
@emph{SPARC Options}
@gccoptlist{-mcpu=@var{cpu-type} @gol
-fshort-double -fshort-wchar @gol
-fverbose-asm -fpack-struct[=@var{n}] -fstack-check @gol
-fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol
--fno-stack-limit @gol
+-fno-stack-limit -fargument-alias -fargument-noalias @gol
+-fargument-noalias-global -fargument-noalias-anything @gol
-fleading-underscore -ftls-model=@var{model} @gol
-ftrapv -fwrapv -fbounds-check @gol
-fvisibility}
@item -###
@opindex ###
-Like @option{-v} except the commands are not executed and arguments
-are quoted unless they contain only alphanumeric characters or @code{./-_}.
-This is useful for shell scripts to capture the driver-generated command lines.
+Like @option{-v} except the commands are not executed and all command
+arguments are quoted. This is useful for shell scripts to capture the
+driver-generated command lines.
@item -pipe
@opindex pipe
@w{@uref{http://gcc.gnu.org/c99status.html}} for more information. The
names @samp{c9x} and @samp{iso9899:199x} are deprecated.
-@item c1x
-ISO C1X, the draft of the next revision of the ISO C standard.
-Support is limited and experimental and features enabled by this
-option may be changed or removed if changed in or removed from the
-standard draft.
-
@item gnu90
@itemx gnu89
GNU dialect of ISO C90 (including some C99 features). This
GNU dialect of ISO C99. When ISO C99 is fully implemented in GCC,
this will become the default. The name @samp{gnu9x} is deprecated.
-@item gnu1x
-GNU dialect of ISO C1X. Support is limited and experimental and
-features enabled by this option may be changed or removed if changed
-in or removed from the standard draft.
-
@item c++98
The 1998 ISO C++ standard plus amendments. Same as @option{-ansi} for
C++ code.
ANSI/ISO C@. These include @code{ffs}, @code{alloca}, @code{_exit},
@code{index}, @code{bzero}, @code{conjf}, and other related functions.
-@item -fnothrow-opt
-@opindex fnothrow-opt
-Treat a @code{throw()} exception specification as though it were a
-@code{noexcept} specification to reduce or eliminate the text size
-overhead relative to a function with no exception specification. If
-the function has local variables of types with non-trivial
-destructors, the exception specification will actually make the
-function smaller because the EH cleanups for those variables can be
-optimized away. The semantic effect is that an exception thrown out of
-a function with such an exception specification will result in a call
-to @code{terminate} rather than @code{unexpected}.
-
@item -fno-operator-names
@opindex fno-operator-names
Do not treat the operator name keywords @code{and}, @code{bitand},
Emit statistics about front-end processing at the end of the compilation.
This information is generally only useful to the G++ development team.
-@item -fstrict-enums
-@opindex fstrict-enums
-Allow the compiler to optimize using the assumption that a value of
-enumeration type can only be one of the values of the enumeration (as
-defined in the C++ standard; basically, a value which can be
-represented in the minimum number of bits needed to represent all the
-enumerators). This assumption may not be valid if the program uses a
-cast to convert an arbitrary integer value to the enumeration type.
-
@item -ftemplate-depth=@var{n}
@opindex ftemplate-depth
Set the maximum instantiation depth for template classes to @var{n}.
If a source file was changed between @option{-fprofile-gen} and
@option{-fprofile-use}, the files with the profile feedback can fail
to match the source file and GCC can not use the profile feedback
-information. By default, this warning is enabled and is treated as an
-error. @option{-Wno-coverage-mismatch} can be used to disable the
-warning or @option{-Wno-error=coverage-mismatch} can be used to
-disable the error. Disable the error for this warning can result in
-poorly optimized code, so disabling the error is useful only in the
-case of very minor changes such as bug fixes to an existing code-base.
-Completely disabling the warning is not recommended.
+information. By default, GCC emits an error message in this case.
+The option @option{-Wcoverage-mismatch} emits a warning instead of an
+error. GCC does not use appropriate feedback profiles, so using this
+option can result in poorly optimized code. This option is useful
+only in the case of very minor changes such as bug fixes to an
+existing code-base.
@end table
language-specific options also refer to @ref{C++ Dialect Options} and
@ref{Objective-C and Objective-C++ Dialect Options}.
-When an unrecognized warning label is requested (e.g.,
-@option{-Wunknown-warning}), GCC will emit a diagnostic stating
-that the option is not recognized. However, if the @samp{-Wno-} form
-is used, the behavior is slightly different: No diagnostic will be
-produced for @option{-Wno-unknown-warning} unless other diagnostics
-are being produced. This allows the use of new @option{-Wno-} options
-with old compilers, but if something goes wrong, the compiler will
-warn that an unrecognized option was used.
-
@table @gcctabopt
@item -pedantic
@opindex pedantic
-Wc++0x-compat @gol
-Wchar-subscripts @gol
-Wenum-compare @r{(in C/Objc; this is on by default in C++)} @gol
--Wimplicit-int @r{(C and Objective-C only)} @gol
--Wimplicit-function-declaration @r{(C and Objective-C only)} @gol
+-Wimplicit-int @gol
+-Wimplicit-function-declaration @gol
-Wcomment @gol
-Wformat @gol
-Wmain @r{(only for C/ObjC and unless} @option{-ffreestanding}@r{)} @gol
-Wsign-compare @gol
-Wtype-limits @gol
-Wuninitialized @gol
--Wunused-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)} @gol
--Wunused-but-set-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)} @gol
+-Wunused-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)} @gol
}
The option @option{-Wextra} also prints warning messages for the
comment, or whenever a Backslash-Newline appears in a @samp{//} comment.
This warning is enabled by @option{-Wall}.
-@item -Wno-cpp \
-@r{(C, Objective-C, C++, Objective-C++ and Fortran only)}
-
-Suppress warning messages emitted by @code{#warning} directives.
-
@item -Wformat
@opindex Wformat
@opindex Wno-format
@option{-pedantic-errors}. This warning is also enabled by
@option{-Wall}.
-@item -Wimplicit @r{(C and Objective-C only)}
+@item -Wimplicit
@opindex Wimplicit
@opindex Wno-implicit
Same as @option{-Wimplicit-int} and @option{-Wimplicit-function-declaration}.
the program (trigraphs within comments are not warned about).
This warning is enabled by @option{-Wall}.
-@item -Wunused-but-set-parameter
-@opindex Wunused-but-set-parameter
-@opindex Wno-unused-but-set-parameter
-Warn whenever a function parameter is assigned to, but otherwise unused
-(aside from its declaration).
-
-To suppress this warning use the @samp{unused} attribute
-(@pxref{Variable Attributes}).
-
-This warning is also enabled by @option{-Wunused} together with
-@option{-Wextra}.
-
-@item -Wunused-but-set-variable
-@opindex Wunused-but-set-variable
-@opindex Wno-unused-but-set-variable
-Warn whenever a local variable is assigned to, but otherwise unused
-(aside from its declaration).
-This warning is enabled by @option{-Wall}.
-
-To suppress this warning use the @samp{unused} attribute
-(@pxref{Variable Attributes}).
-
-This warning is also enabled by @option{-Wunused}, which is enabled
-by @option{-Wall}.
-
@item -Wunused-function
@opindex Wunused-function
@opindex Wno-unused-function
false positives.
@end table
-@item -Wsuggest-attribute=@r{[}const@r{|}pure@r{]}
-@opindex Wsuggest-attribute=
-@opindex Wno-suggest-attribute=
-Warn for cases where adding an attribute may be beneficial. The
-attributes currently supported are listed below.
-
-@table @gcctabopt
-@item -Wsuggest-attribute=pure
-@itemx -Wsuggest-attribute=const
-@opindex Wsuggest-attribute=pure
-@opindex Wno-suggest-attribute=pure
-@opindex Wsuggest-attribute=const
-@opindex Wno-suggest-attribute=const
-
-Warn about functions which might be candidates for attributes
-@code{pure} or @code{const}. The compiler only warns for functions
-visible in other compilation units or if it cannot prove that the
-function returns normally. A function returns normally if it doesn't
-contain an infinite loop nor returns abnormally by throwing, calling
-@code{abort()} or trapping. This analysis requires option
-@option{-fipa-pure-const}, which is enabled by default at @option{-O}
-and higher. Higher optimization levels improve the accuracy of the
-analysis.
-@end table
-
@item -Warray-bounds
@opindex Wno-array-bounds
@opindex Warray-bounds
This option is only active when @option{-ftree-vrp} is active
-(default for @option{-O2} and above). It warns about subscripts to arrays
+(default for -O2 and above). It warns about subscripts to arrays
that are always out of bounds. This warning is enabled by @option{-Wall}.
@item -Wno-div-by-zero
The restrictions on @samp{offsetof} may be relaxed in a future version
of the C++ standard.
-@item -Wno-int-to-pointer-cast
+@item -Wno-int-to-pointer-cast @r{(C and Objective-C only)}
@opindex Wno-int-to-pointer-cast
@opindex Wint-to-pointer-cast
Suppress warnings from casts to pointer type of an integer of a
-different size. In C++, casting to a pointer type of smaller size is
-an error. @option{Wint-to-pointer-cast} is enabled by default.
-
+different size.
@item -Wno-pointer-to-int-cast @r{(C and Objective-C only)}
@opindex Wno-pointer-to-int-cast
-fif-conversion2 @gol
-fif-conversion @gol
-fipa-pure-const @gol
--fipa-profile @gol
-fipa-reference @gol
-fmerge-constants
-fsplit-wide-types @gol
layout in order to better utilize spatial locality. This transformation is
affective for programs containing arrays of structures. Available in two
compilation modes: profile-based (enabled with @option{-fprofile-generate})
-or static (which uses built-in heuristics). It works only in whole program
+or static (which uses built-in heuristics). Require @option{-fipa-type-escape}
+to provide the safety of this transformation. It works only in whole program
mode, so it requires @option{-fwhole-program} and @option{-combine} to be
enabled. Structures considered @samp{cold} by this transformation are not
affected (see @option{--param struct-reorg-cold-struct-ratio=@var{value}}).
@item -fipa-pta
@opindex fipa-pta
-Perform interprocedural pointer analysis and interprocedural modification
-and reference analysis. This option can cause excessive memory and
-compile-time usage on large compilation units. It is not enabled by
-default at any optimization level.
-
-@item -fipa-profile
-@opindex fipa-profile
-Perform interprocedural profile propagation. The functions called only from
-cold functions are marked as cold. Also functions executed once (such as
-@code{cold}, @code{noreturn}, static constructors or destructors) are identified. Cold
-functions and loop less parts of functions executed once are then optimized for
-size.
-Enabled by default at @option{-O} and higher.
+Perform interprocedural pointer analysis. This option is experimental
+and does not affect generated code.
@item -fipa-cp
@opindex fipa-cp
Perform loop strip mining transformations on loops. Strip mining
splits a loop into two nested loops. The outer loop has strides
equal to the strip size and the inner loop has strides of the
-original loop within a strip. The strip length can be changed
-using the @option{loop-block-tile-size} parameter. For example,
-given a loop like:
+original loop within a strip. For example, given a loop like:
@smallexample
DO I = 1, N
A(I) = A(I) + C
@end smallexample
loop strip mining will transform the loop as if the user had written:
@smallexample
-DO II = 1, N, 51
- DO I = II, min (II + 50, N)
+DO II = 1, N, 4
+ DO I = II, min (II + 3, N)
A(I) = A(I) + C
ENDDO
ENDDO
@item -floop-block
Perform loop blocking transformations on loops. Blocking strip mines
each loop in the loop nest such that the memory accesses of the
-element loops fit inside caches. The strip length can be changed
-using the @option{loop-block-tile-size} parameter. For example, given
-a loop like:
+element loops fit inside caches. For example, given a loop like:
@smallexample
DO I = 1, N
DO J = 1, M
@end smallexample
loop blocking will transform the loop as if the user had written:
@smallexample
-DO II = 1, N, 51
- DO JJ = 1, M, 51
- DO I = II, min (II + 50, N)
- DO J = JJ, min (JJ + 50, M)
+DO II = 1, N, 64
+ DO JJ = 1, M, 64
+ DO I = II, min (II + 63, N)
+ DO J = JJ, min (JJ + 63, M)
A(J, I) = B(I) + C(J)
ENDDO
ENDDO
was mixing languages before, all you need to add is @option{-flto} to
all the compile and link commands.
-If LTO encounters objects with C linkage declared with incompatible
-types in separate translation units to be linked together (undefined
-behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be
-issued. The behavior is still undefined at runtime.
-
If object files containing GIMPLE bytecode are stored in a library
archive, say @file{libfoo.a}, it is possible to extract and use them
in an LTO link if you are using @command{gold} as the linker (which,
This option is disabled by default.
-@item -fwhopr[=@var{n}]
+@item -fwhopr
@opindex fwhopr
This option is identical in functionality to @option{-flto} but it
differs in how the final link stage is executed. Instead of loading
that otherwise would not fit in memory. This option enables
@option{-fwpa} and @option{-fltrans} automatically.
-If you specify the optional @var{n} the link stage is executed in
-parallel using @var{n} parallel jobs by utilizing an installed
-@code{make} program.
-
Disabled by default.
+This option is experimental.
+
@item -fwpa
@opindex fwpa
This is an internal option used by GCC when compiling with
@item min-insn-to-prefetch-ratio
The minimum ratio between the number of instructions and the
-number of prefetches to enable prefetching in a loop.
+number of prefetches to enable prefetching in a loop with an
+unknown trip count.
@item prefetch-min-insn-to-mem-ratio
The minimum ratio between the number of instructions and the
@item graphite-max-nb-scop-params
To avoid exponential effects in the Graphite loop transforms, the
-number of parameters in a Static Control Part (SCoP) is bounded. The
-default value is 10 parameters. A variable whose value is unknown at
-compile time and defined outside a SCoP is a parameter of the SCoP.
-
-@item graphite-max-bbs-per-function
-To avoid exponential effects in the detection of SCoPs, the size of
-the functions analyzed by Graphite is bounded. The default value is
-100 basic blocks.
-
-@item loop-block-tile-size
-Loop blocking or strip mining transforms, enabled with
-@option{-floop-block} or @option{-floop-strip-mine}, strip mine each
-loop in the loop nest by a given number of iterations. The strip
-length can be changed using the @option{loop-block-tile-size}
-parameter. The default value is 51 iterations.
+number of parameters in a SCoP is bounded by 10.
@end table
@end table
If you really need to change the search order for system directories,
use the @option{-nostdinc} and/or @option{-isystem} options.
-@item -iplugindir=@var{dir}
-Set the directory to search for plugins which are passed
-by @option{-fplugin=@var{name}} instead of
-@option{-fplugin=@var{path}/@var{name}.so}. This option is not meant
-to be used by the user, but only passed by the driver.
-
@item -iquote@var{dir}
@opindex iquote
Add the directory @var{dir} to the head of the list of directories to
The usual way to run GCC is to run the executable called @file{gcc}, or
@file{<machine>-gcc} when cross-compiling, or
@file{<machine>-gcc-<version>} to run a version other than the one that
-was installed last.
+was installed last. Sometimes this is inconvenient, so GCC provides
+options that will switch to another cross-compiler or version.
+
+@table @gcctabopt
+@item -b @var{machine}
+@opindex b
+The argument @var{machine} specifies the target machine for compilation.
+
+The value to use for @var{machine} is the same as was specified as the
+machine type when configuring GCC as a cross-compiler. For
+example, if a cross-compiler was configured with @samp{configure
+arm-elf}, meaning to compile for an arm processor with elf binaries,
+then you would specify @option{-b arm-elf} to run that cross compiler.
+Because there are other options beginning with @option{-b}, the
+configuration must contain a hyphen, or @option{-b} alone should be one
+argument followed by the configuration in the next argument.
+
+@item -V @var{version}
+@opindex V
+The argument @var{version} specifies which version of GCC to run.
+This is useful when multiple versions are installed. For example,
+@var{version} might be @samp{4.0}, meaning to run GCC version 4.0.
+@end table
+
+The @option{-V} and @option{-b} options work by running the
+@file{<machine>-gcc-<version>} executable, so there's no real reason to
+use them if you can just run that directly.
@node Submodel Options
@section Hardware Models and Configurations
@cindex hardware models and configurations, specifying
@cindex machine dependent options
-Each target machine types can have its own
+Earlier we discussed the standard option @option{-b} which chooses among
+different installed compilers for completely different target
+machines, such as VAX vs.@: 68000 vs.@: 80386.
+
+In addition, each of these target machine types can have its own
special options, starting with @samp{-m}, to choose among various
hardware models or configurations---for example, 68010 vs 68020,
floating coprocessor or none. A single installed version of the
by default. This can be overridden with the @code{section} attribute.
@xref{Variable Attributes}.
+@item -mfix-cortex-m3-ldrd
+@opindex mfix-cortex-m3-ldrd
+Some Cortex-M3 cores can cause data corruption when @code{ldrd} instructions
+with overlapping destination and base registers are used. This option avoids
+generating these instructions. This option is enabled by default when
+@option{-mcpu=cortex-m3} is specified.
+
@end table
@node ARM Options
loader imposes this restriction, and when @option{-fpic} or @option{-fPIC}
is specified.
-@item -mfix-cortex-m3-ldrd
-@opindex mfix-cortex-m3-ldrd
-Some Cortex-M3 cores can cause data corruption when @code{ldrd} instructions
-with overlapping destination and base registers are used. This option avoids
-generating these instructions. This option is enabled by default when
-@option{-mcpu=cortex-m3} is specified.
-
@end table
@node AVR Options
slows down the case of larger dividends. inv20u assumes the case of a such
a small dividend to be unlikely, and inv20l assumes it to be likely.
-@item -maccumulate-outgoing-args
-@opindex maccumulate-outgoing-args
-Reserve space once for outgoing arguments in the function prologue rather
-than around each call. Generally beneficial for performance and size. Also
-needed for unwinding to avoid changing the stack frame around conditional code.
-
@item -mdivsi3_libfunc=@var{name}
@opindex mdivsi3_libfunc=@var{name}
Set the name of the library function used for 32 bit signed division to
@option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit
of 128KB@. Note that this may only work with the GNU linker.
+@cindex aliasing of parameters
+@cindex parameters, aliased
+@item -fargument-alias
+@itemx -fargument-noalias
+@itemx -fargument-noalias-global
+@itemx -fargument-noalias-anything
+@opindex fargument-alias
+@opindex fargument-noalias
+@opindex fargument-noalias-global
+@opindex fargument-noalias-anything
+Specify the possible relationships among parameters and between
+parameters and global data.
+
+@option{-fargument-alias} specifies that arguments (parameters) may
+alias each other and may alias global storage.@*
+@option{-fargument-noalias} specifies that arguments do not alias
+each other, but may alias global storage.@*
+@option{-fargument-noalias-global} specifies that arguments do not
+alias each other and do not alias global storage.
+@option{-fargument-noalias-anything} specifies that arguments do not
+alias any other storage.
+
+Each language will automatically use whatever option is required by
+the language standard. You should not need to use these options yourself.
+
@item -fleading-underscore
@opindex fleading-underscore
This option and its counterpart, @option{-fno-leading-underscore}, forcibly
/* Conversion of SESE regions to Polyhedra.
- Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2009 Free Software Foundation, Inc.
Contributed by Sebastian Pop <sebastian.pop@amd.com>.
This file is part of GCC.
if (simple_copy_phi_p (phi))
{
- /* PRE introduces phi nodes like these, for an example,
+ /* FIXME: PRE introduces phi nodes like these, for an example,
see id-5.f in the fortran graphite testsuite:
# prephitmp.85_265 = PHI <prephitmp.85_258(33), prephitmp.85_265(18)>
GBB_DATA_REFS (gbb) = drs;
GBB_CONDITIONS (gbb) = NULL;
GBB_CONDITION_CASES (gbb) = NULL;
+ GBB_CLOOG_IV_TYPES (gbb) = NULL;
return gbb;
}
static void
free_gimple_bb (struct gimple_bb *gbb)
{
+ if (GBB_CLOOG_IV_TYPES (gbb))
+ htab_delete (GBB_CLOOG_IV_TYPES (gbb));
+
free_data_refs_aux (GBB_DATA_REFS (gbb));
free_data_refs (GBB_DATA_REFS (gbb));
int nb_params = scop_nb_params (scop);
ppl_Coefficient_t c;
ppl_dimension_type dim = scattering_dimensions + nb_iterators + nb_params;
- mpz_t v;
+ Value v;
gcc_assert (scattering_dimensions >= used_scattering_dimensions);
- mpz_init (v);
+ value_init (v);
ppl_new_Coefficient (&c);
PBB_TRANSFORMED (pbb) = poly_scattering_new ();
ppl_new_C_Polyhedron_from_space_dimension
ppl_Linear_Expression_t expr;
ppl_new_Linear_Expression_with_dimension (&expr, dim);
- mpz_set_si (v, 1);
+ value_set_si (v, 1);
ppl_assign_Coefficient_from_mpz_t (c, v);
ppl_Linear_Expression_add_to_coefficient (expr, i, c);
{
ppl_Linear_Expression_coefficient (static_schedule, i / 2, c);
ppl_Coefficient_to_mpz_t (c, v);
- mpz_neg (v, v);
+ value_oppose (v, v);
ppl_assign_Coefficient_from_mpz_t (c, v);
ppl_Linear_Expression_add_to_inhomogeneous (expr, c);
}
{
int loop = (i - 1) / 2;
- mpz_set_si (v, -1);
+ value_set_si (v, -1);
ppl_assign_Coefficient_from_mpz_t (c, v);
ppl_Linear_Expression_add_to_coefficient
(expr, scattering_dimensions + loop, c);
ppl_delete_Constraint (cstr);
}
- mpz_clear (v);
+ value_clear (v);
ppl_delete_Coefficient (c);
PBB_ORIGINAL (pbb) = poly_scattering_copy (PBB_TRANSFORMED (pbb));
gimple_bb_p previous_gbb = NULL;
ppl_Linear_Expression_t static_schedule;
ppl_Coefficient_t c;
- mpz_t v;
+ Value v;
- mpz_init (v);
+ value_init (v);
ppl_new_Coefficient (&c);
ppl_new_Linear_Expression (&static_schedule);
because we cannot compare_prefix_loops against a previous loop,
prefix will be equal to zero, and that index will be
incremented before copying. */
- mpz_set_si (v, -1);
+ value_set_si (v, -1);
ppl_assign_Coefficient_from_mpz_t (c, v);
ppl_Linear_Expression_add_to_coefficient (static_schedule, 0, c);
ppl_assign_Linear_Expression_from_Linear_Expression (common,
static_schedule);
- mpz_set_si (v, 1);
+ value_set_si (v, 1);
ppl_assign_Coefficient_from_mpz_t (c, v);
ppl_Linear_Expression_add_to_coefficient (common, prefix, c);
ppl_assign_Linear_Expression_from_Linear_Expression (static_schedule,
ppl_delete_Linear_Expression (common);
}
- mpz_clear (v);
+ value_clear (v);
ppl_delete_Coefficient (c);
ppl_delete_Linear_Expression (static_schedule);
}
static void
add_value_to_dim (ppl_dimension_type d, ppl_Linear_Expression_t expr,
- mpz_t k)
+ Value k)
{
- mpz_t val;
+ Value val;
ppl_Coefficient_t coef;
ppl_new_Coefficient (&coef);
ppl_Linear_Expression_coefficient (expr, d, coef);
- mpz_init (val);
+ value_init (val);
ppl_Coefficient_to_mpz_t (coef, val);
- mpz_add (val, val, k);
+ value_addto (val, val, k);
ppl_assign_Coefficient_from_mpz_t (coef, val);
ppl_Linear_Expression_add_to_coefficient (expr, d, coef);
- mpz_clear (val);
+ value_clear (val);
ppl_delete_Coefficient (coef);
}
{
loop_p loop = get_loop (var);
ppl_dimension_type l = sese_loop_depth (s, loop) - 1;
- mpz_t val;
+ Value val;
/* Scalar evolutions should happen in the sese region. */
gcc_assert (sese_loop_depth (s, loop) > 0);
| a [i * p] = ... */
gcc_assert (TREE_CODE (e) == INTEGER_CST);
- mpz_init (val);
- mpz_set_si (val, int_cst_value (e));
+ value_init (val);
+ value_set_si (val, int_cst_value (e));
add_value_to_dim (l, expr, val);
- mpz_clear (val);
+ value_clear (val);
}
}
linear expression EXPR. K is the multiplier of the constant. */
static void
-scan_tree_for_params_int (tree cst, ppl_Linear_Expression_t expr, mpz_t k)
+scan_tree_for_params_int (tree cst, ppl_Linear_Expression_t expr, Value k)
{
- mpz_t val;
+ Value val;
ppl_Coefficient_t coef;
int v = int_cst_value (cst);
- mpz_init (val);
- mpz_set_si (val, 0);
+ value_init (val);
+ value_set_si (val, 0);
/* Necessary to not get "-1 = 2^n - 1". */
if (v < 0)
- mpz_sub_ui (val, val, -v);
+ value_sub_int (val, val, -v);
else
- mpz_add_ui (val, val, v);
+ value_add_int (val, val, v);
- mpz_mul (val, val, k);
+ value_multiply (val, val, k);
ppl_new_Coefficient (&coef);
ppl_assign_Coefficient_from_mpz_t (coef, val);
ppl_Linear_Expression_add_to_inhomogeneous (expr, coef);
- mpz_clear (val);
+ value_clear (val);
ppl_delete_Coefficient (coef);
}
static void
scan_tree_for_params (sese s, tree e, ppl_Linear_Expression_t c,
- mpz_t k)
+ Value k)
{
if (e == chrec_dont_know)
return;
{
if (c)
{
- mpz_t val;
+ Value val;
gcc_assert (host_integerp (TREE_OPERAND (e, 1), 0));
- mpz_init (val);
- mpz_set_si (val, int_cst_value (TREE_OPERAND (e, 1)));
- mpz_mul (val, val, k);
+ value_init (val);
+ value_set_si (val, int_cst_value (TREE_OPERAND (e, 1)));
+ value_multiply (val, val, k);
scan_tree_for_params (s, TREE_OPERAND (e, 0), c, val);
- mpz_clear (val);
+ value_clear (val);
}
else
scan_tree_for_params (s, TREE_OPERAND (e, 0), c, k);
{
if (c)
{
- mpz_t val;
+ Value val;
gcc_assert (host_integerp (TREE_OPERAND (e, 0), 0));
- mpz_init (val);
- mpz_set_si (val, int_cst_value (TREE_OPERAND (e, 0)));
- mpz_mul (val, val, k);
+ value_init (val);
+ value_set_si (val, int_cst_value (TREE_OPERAND (e, 0)));
+ value_multiply (val, val, k);
scan_tree_for_params (s, TREE_OPERAND (e, 1), c, val);
- mpz_clear (val);
+ value_clear (val);
}
else
scan_tree_for_params (s, TREE_OPERAND (e, 1), c, k);
if (c)
{
ppl_Coefficient_t coef;
- mpz_t minus_one;
+ Value minus_one;
ppl_subtract_Linear_Expression_from_Linear_Expression (c,
tmp_expr);
ppl_delete_Linear_Expression (tmp_expr);
- mpz_init (minus_one);
- mpz_set_si (minus_one, -1);
+ value_init (minus_one);
+ value_set_si (minus_one, -1);
ppl_new_Coefficient_from_mpz_t (&coef, minus_one);
ppl_Linear_Expression_add_to_inhomogeneous (c, coef);
- mpz_clear (minus_one);
+ value_clear (minus_one);
ppl_delete_Coefficient (coef);
}
data_reference_p dr;
gimple stmt;
loop_p loop = GBB_BB (gbb)->loop_father;
- mpz_t one;
+ Value one;
- mpz_init (one);
- mpz_set_si (one, 1);
+ value_init (one);
+ value_set_si (one, 1);
/* Find parameters in the access functions of data references. */
for (i = 0; VEC_iterate (data_reference_p, GBB_DATA_REFS (gbb), i, dr); i++)
scan_tree_for_params (region, rhs, NULL, one);
}
- mpz_clear (one);
+ value_clear (one);
}
/* Record the parameters used in the SCOP. A variable is a parameter
unsigned i;
sese region = SCOP_REGION (scop);
struct loop *loop;
- mpz_t one;
+ Value one;
- mpz_init (one);
- mpz_set_si (one, 1);
+ value_init (one);
+ value_set_si (one, 1);
/* Find the parameters used in the loop bounds. */
for (i = 0; VEC_iterate (loop_p, SESE_LOOP_NEST (region), i, loop); i++)
scan_tree_for_params (region, nb_iters, NULL, one);
}
- mpz_clear (one);
+ value_clear (one);
/* Find the parameters used in data accesses. */
for (i = 0; VEC_iterate (poly_bb_p, SCOP_BBS (scop), i, pbb); i++)
return (gimple_bb_p) bb->aux;
}
-/* Insert in the SCOP context constraints from the estimation of the
- number of iterations. UB_EXPR is a linear expression describing
- the number of iterations in a loop. This expression is bounded by
- the estimation NIT. */
-
-static void
-add_upper_bounds_from_estimated_nit (scop_p scop, double_int nit,
- ppl_dimension_type dim,
- ppl_Linear_Expression_t ub_expr)
-{
- mpz_t val;
- ppl_Linear_Expression_t nb_iters_le;
- ppl_Polyhedron_t pol;
- ppl_Coefficient_t coef;
- ppl_Constraint_t ub;
-
- ppl_new_Linear_Expression_with_dimension (&ub_expr, dim);
- ppl_new_C_Polyhedron_from_space_dimension (&pol, dim, 0);
- ppl_new_Linear_Expression_from_Linear_Expression (&nb_iters_le,
- ub_expr);
-
- /* Construct the negated number of last iteration in VAL. */
- mpz_init (val);
- mpz_set_double_int (val, nit, false);
- mpz_sub_ui (val, val, 1);
- mpz_neg (val, val);
-
- /* NB_ITERS_LE holds the number of last iteration in
- parametrical form. Subtract estimated number of last
- iteration and assert that result is not positive. */
- ppl_new_Coefficient_from_mpz_t (&coef, val);
- ppl_Linear_Expression_add_to_inhomogeneous (nb_iters_le, coef);
- ppl_delete_Coefficient (coef);
- ppl_new_Constraint (&ub, nb_iters_le,
- PPL_CONSTRAINT_TYPE_LESS_OR_EQUAL);
- ppl_Polyhedron_add_constraint (pol, ub);
-
- /* Remove all but last GDIM dimensions from POL to obtain
- only the constraints on the parameters. */
- {
- graphite_dim_t gdim = scop_nb_params (scop);
- ppl_dimension_type *dims = XNEWVEC (ppl_dimension_type, dim - gdim);
- graphite_dim_t i;
-
- for (i = 0; i < dim - gdim; i++)
- dims[i] = i;
-
- ppl_Polyhedron_remove_space_dimensions (pol, dims, dim - gdim);
- XDELETEVEC (dims);
- }
-
- /* Add the constraints on the parameters to the SCoP context. */
- {
- ppl_Pointset_Powerset_C_Polyhedron_t constraints_ps;
-
- ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron
- (&constraints_ps, pol);
- ppl_Pointset_Powerset_C_Polyhedron_intersection_assign
- (SCOP_CONTEXT (scop), constraints_ps);
- ppl_delete_Pointset_Powerset_C_Polyhedron (constraints_ps);
- }
-
- ppl_delete_Polyhedron (pol);
- ppl_delete_Linear_Expression (nb_iters_le);
- ppl_delete_Constraint (ub);
- mpz_clear (val);
-}
-
/* Builds the constraint polyhedra for LOOP in SCOP. OUTER_PH gives
the constraints for the surrounding loops. */
}
else if (!chrec_contains_undetermined (nb_iters))
{
- mpz_t one;
+ Value one;
ppl_Constraint_t ub;
ppl_Linear_Expression_t ub_expr;
double_int nit;
- mpz_init (one);
- mpz_set_si (one, 1);
+ value_init (one);
+ value_set_si (one, 1);
ppl_new_Linear_Expression_with_dimension (&ub_expr, dim);
nb_iters = scalar_evolution_in_region (region, loop, nb_iters);
scan_tree_for_params (SCOP_REGION (scop), nb_iters, ub_expr, one);
- mpz_clear (one);
+ value_clear (one);
+
+ /* N <= estimated_nb_iters
+ FIXME: This is a workaround that should go away once we will
+ have the PIP algorithm. */
if (estimated_loop_iterations (loop, true, &nit))
- add_upper_bounds_from_estimated_nit (scop, nit, dim, ub_expr);
+ {
+ Value val;
+ ppl_Linear_Expression_t nb_iters_le;
+ ppl_Polyhedron_t pol;
+ graphite_dim_t n = scop_nb_params (scop);
+ ppl_Coefficient_t coef;
+
+ ppl_new_C_Polyhedron_from_space_dimension (&pol, dim, 0);
+ ppl_new_Linear_Expression_from_Linear_Expression (&nb_iters_le,
+ ub_expr);
+
+ /* Construct the negated number of last iteration in VAL. */
+ value_init (val);
+ mpz_set_double_int (val, nit, false);
+ value_sub_int (val, val, 1);
+ value_oppose (val, val);
+
+ /* NB_ITERS_LE holds number of last iteration in parametrical form.
+ Subtract estimated number of last iteration and assert that result
+ is not positive. */
+ ppl_new_Coefficient_from_mpz_t (&coef, val);
+ ppl_Linear_Expression_add_to_inhomogeneous (nb_iters_le, coef);
+ ppl_delete_Coefficient (coef);
+ ppl_new_Constraint (&ub, nb_iters_le,
+ PPL_CONSTRAINT_TYPE_LESS_OR_EQUAL);
+ ppl_Polyhedron_add_constraint (pol, ub);
+
+ /* Remove all but last N dimensions from POL to obtain constraints
+ on parameters. */
+ {
+ ppl_dimension_type *dims = XNEWVEC (ppl_dimension_type, dim - n);
+ graphite_dim_t i;
+ for (i = 0; i < dim - n; i++)
+ dims[i] = i;
+ ppl_Polyhedron_remove_space_dimensions (pol, dims, dim - n);
+ XDELETEVEC (dims);
+ }
+
+ /* Add constraints on parameters to SCoP context. */
+ {
+ ppl_Pointset_Powerset_C_Polyhedron_t constraints_ps;
+ ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron
+ (&constraints_ps, pol);
+ ppl_Pointset_Powerset_C_Polyhedron_intersection_assign
+ (SCOP_CONTEXT (scop), constraints_ps);
+ ppl_delete_Pointset_Powerset_C_Polyhedron (constraints_ps);
+ }
+
+ ppl_delete_Polyhedron (pol);
+ ppl_delete_Linear_Expression (nb_iters_le);
+ ppl_delete_Constraint (ub);
+ value_clear (val);
+ }
/* loop_i <= expr_nb_iters */
ppl_set_coef (ub_expr, nb, -1);
static ppl_Linear_Expression_t
create_linear_expr_from_tree (poly_bb_p pbb, tree t)
{
- mpz_t one;
+ Value one;
ppl_Linear_Expression_t res;
ppl_dimension_type dim;
sese region = SCOP_REGION (PBB_SCOP (pbb));
t = scalar_evolution_in_region (region, loop, t);
gcc_assert (!automatically_generated_chrec_p (t));
- mpz_init (one);
- mpz_set_si (one, 1);
+ value_init (one);
+ value_set_si (one, 1);
scan_tree_for_params (region, t, res, one);
- mpz_clear (one);
+ value_clear (one);
return res;
}
add_condition_to_domain (ppl_Pointset_Powerset_C_Polyhedron_t ps, gimple stmt,
poly_bb_p pbb, enum tree_code code)
{
- mpz_t v;
+ Value v;
ppl_Coefficient_t c;
ppl_Linear_Expression_t left, right;
ppl_Constraint_t cstr;
the left or the right side of the expression. */
if (code == LT_EXPR)
{
- mpz_init (v);
- mpz_set_si (v, 1);
+ value_init (v);
+ value_set_si (v, 1);
ppl_new_Coefficient (&c);
ppl_assign_Coefficient_from_mpz_t (c, v);
ppl_Linear_Expression_add_to_inhomogeneous (left, c);
ppl_delete_Coefficient (c);
- mpz_clear (v);
+ value_clear (v);
code = LE_EXPR;
}
else if (code == GT_EXPR)
{
- mpz_init (v);
- mpz_set_si (v, 1);
+ value_init (v);
+ value_set_si (v, 1);
ppl_new_Coefficient (&c);
ppl_assign_Coefficient_from_mpz_t (c, v);
ppl_Linear_Expression_add_to_inhomogeneous (right, c);
ppl_delete_Coefficient (c);
- mpz_clear (v);
+ value_clear (v);
code = GE_EXPR;
}
poly_bb_p pbb)
{
int i, nb_subscripts = DR_NUM_DIMENSIONS (dr);
- mpz_t v;
+ Value v;
scop_p scop = PBB_SCOP (pbb);
sese region = SCOP_REGION (scop);
- mpz_init (v);
+ value_init (v);
for (i = 0; i < nb_subscripts; i++)
{
ppl_new_Linear_Expression_with_dimension (&fn, dom_nb_dims);
ppl_new_Linear_Expression_with_dimension (&access, accessp_nb_dims);
- mpz_set_si (v, 1);
+ value_set_si (v, 1);
scan_tree_for_params (region, afn, fn, v);
ppl_assign_Linear_Expression_from_Linear_Expression (access, fn);
ppl_delete_Constraint (cstr);
}
- mpz_clear (v);
+ value_clear (v);
}
/* Add constrains representing the size of the accessed data to the
|| !is_gimple_reg (gimple_phi_result (phi)))
return false;
- /* Note that loop close phi nodes should have a single argument
- because we translated the representation into a canonical form
- before Graphite: see canonicalize_loop_closed_ssa_form. */
return (gimple_phi_num_args (phi) == 1);
}
gimple stmt = gimple_build_assign (res, zero_dim_array);
tree arg = gimple_phi_arg_def (phi, 0);
- /* Note that loop close phi nodes should have a single argument
- because we translated the representation into a canonical form
- before Graphite: see canonicalize_loop_closed_ssa_form. */
- gcc_assert (gimple_phi_num_args (phi) == 1);
-
- if (TREE_CODE (arg) == SSA_NAME
- && !SSA_NAME_IS_DEFAULT_DEF (arg))
+ if (TREE_CODE (arg) == SSA_NAME)
insert_out_of_ssa_copy (zero_dim_array, arg);
else
insert_out_of_ssa_copy_on_edge (single_pred_edge (gimple_bb (phi)),
FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, def)
if (def_bb != gimple_bb (use_stmt)
- && gimple_code (use_stmt) != GIMPLE_PHI
- && !is_gimple_debug (use_stmt))
+ && gimple_code (use_stmt) != GIMPLE_PHI)
{
if (!zero_dim_array)
{
update_ssa (TODO_update_ssa);
#ifdef ENABLE_CHECKING
- verify_loop_closed_ssa (true);
+ verify_ssa (false);
+ verify_loop_closed_ssa ();
#endif
FOR_EACH_BB (bb)
update_ssa (TODO_update_ssa);
#ifdef ENABLE_CHECKING
- verify_loop_closed_ssa (true);
+ verify_ssa (false);
+ verify_loop_closed_ssa ();
#endif
}
split_block (bb, stmt);
- if (gsi_one_before_end_p (gsi_start_nondebug_bb (bb)))
+ if (gsi_one_before_end_p (gsi_start_bb (bb)))
return bb;
gsi = gsi_last_bb (bb);
if (TREE_CODE (arg) != SSA_NAME)
return NULL;
- /* Note that loop close phi nodes should have a single argument
- because we translated the representation into a canonical form
- before Graphite: see canonicalize_loop_closed_ssa_form. */
- gcc_assert (gimple_phi_num_args (stmt) == 1);
-
def = SSA_NAME_DEF_STMT (arg);
loop_phi = detect_commutative_reduction (def, in, out);
{
unsigned int i;
gimple loop_phi;
- tree red = NULL_TREE;
+ tree red;
for (i = 0; VEC_iterate (gimple, in, i, loop_phi); i++)
{
gsi_commit_edge_inserts ();
update_ssa (TODO_update_ssa);
#ifdef ENABLE_CHECKING
- verify_loop_closed_ssa (true);
+ verify_ssa (false);
+ verify_loop_closed_ssa ();
#endif
}
bool known_niter = number_of_iterations_exit (loop, exit, &niter, false);
- /* At this point we should know the number of iterations. */
+ /* At this point we should know the number of iterations, */
gcc_assert (known_niter);
nit = force_gimple_operand (unshare_expr (niter.niter), &stmts, true,
if (stmts)
gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts);
- loop->single_iv = canonicalize_loop_ivs (loop, &nit, false);
+ loop->single_iv = canonicalize_loop_ivs (loop, &nit);
}
/* Rewrite all the loops of SCOP in normal form: one induction
graphite_loop_normal_form (loop);
}
-/* Java does not initialize long_long_integer_type_node. */
-#define my_long_long (long_long_integer_type_node ? long_long_integer_type_node : ssizetype)
-
/* Can all ivs be represented by a signed integer?
As CLooG might generate negative values in its expressions, signed loop ivs
are required in the backend. */
precision = TYPE_PRECISION (type);
if (TYPE_UNSIGNED (type)
- && precision >= TYPE_PRECISION (my_long_long))
+ && precision >= TYPE_PRECISION (long_long_integer_type_node))
return false;
}
return true;
}
-#undef my_long_long
/* Builds the polyhedral representation for a SESE region. */
-void
+bool
build_poly_scop (scop_p scop)
{
sese region = SCOP_REGION (scop);
sense to optimize a scop containing only PBBs that do not belong
to any loops. */
if (nb_pbbs_in_loops (scop) == 0)
- return;
+ return false;
scop_canonicalize_loops (scop);
+
if (!scop_ivs_can_be_represented (scop))
- return;
+ return false;
build_sese_loop_nests (region);
build_sese_conditions (region);
max_dim = PARAM_VALUE (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS);
if (scop_nb_params (scop) > max_dim)
- return;
+ return false;
build_scop_iteration_domain (scop);
build_scop_context (scop);
scop_to_lst (scop);
build_scop_scattering (scop);
build_scop_drs (scop);
-
- /* This SCoP has been translated to the polyhedral
- representation. */
POLY_SCOP_P (scop) = true;
+
+ return true;
}
/* Always return false. Exercise the scop_to_clast function. */
/* params.def - Run-time parameters.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Written by Mark Mitchell <mark@codesourcery.com>.
DEFPARAM (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS,
"graphite-max-nb-scop-params",
- "maximum number of parameters in a SCoP",
+ "maximal number of parameters in a SCoP",
10, 0, 0)
-/* Maximal number of basic blocks in the functions analyzed by Graphite. */
-
-DEFPARAM (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION,
- "graphite-max-bbs-per-function",
- "maximum number of basic blocks per function to be analyzed by Graphite",
- 100, 0, 0)
-
/* Avoid doing loop invariant motion on very large loops. */
DEFPARAM (PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP,