[PATCH] ScopDetection: Only detect scops that have at least one read and one write

Tobias Grosser tobias at grosser.es
Wed Feb 18 13:12:50 PST 2015


Hi jdoerfert, sebpop, dpeixott, simbuerg,

Scops that only read seem generally uninteresting and scops that only write are
most likely initializations where there is also little to optimize.  To not
waste compile time we bail early.

http://reviews.llvm.org/D7735

Files:
  include/polly/ScopDetection.h
  include/polly/ScopDetectionDiagnostic.h
  lib/Analysis/ScopDetection.cpp
  lib/Analysis/ScopDetectionDiagnostic.cpp
  test/CodePreparation/if_condition.ll
  test/CodePreparation/multiple_loops_trivial_phis.ll
  test/CodePreparation/single_loop_trivial_phi.ll
  test/DeadCodeElimination/chained_iterations.ll
  test/DeadCodeElimination/chained_iterations_2.ll
  test/DeadCodeElimination/computeout.ll
  test/DeadCodeElimination/dead_iteration_elimination.ll
  test/DeadCodeElimination/non-affine-affine-mix.ll
  test/DeadCodeElimination/non-affine.ll
  test/DeadCodeElimination/null_schedule.ll
  test/Dependences/computeout.ll
  test/Dependences/do_pluto_matmult.ll
  test/Dependences/reduction_complex_location.ll
  test/Dependences/reduction_dependences_equal_non_reduction_dependences.ll
  test/Dependences/reduction_mixed_reduction_and_non_reduction_dependences.ll
  test/Dependences/reduction_multiple_loops_array_sum.ll
  test/Dependences/reduction_multiple_loops_array_sum_2.ll
  test/Dependences/reduction_multiple_loops_array_sum_3.ll
  test/Dependences/reduction_multiple_reductions.ll
  test/Dependences/reduction_multiple_reductions_2.ll
  test/Dependences/reduction_only_reduction_like_access.ll
  test/Dependences/reduction_partially_escaping_intermediate_in_other_stmt.ll
  test/Dependences/reduction_privatization_deps.ll
  test/Dependences/reduction_privatization_deps_2.ll
  test/Dependences/reduction_privatization_deps_3.ll
  test/Dependences/reduction_privatization_deps_4.ll
  test/Dependences/reduction_privatization_deps_5.ll
  test/Dependences/reduction_simple_iv.ll
  test/Dependences/reduction_simple_iv_debug_wrapped_dependences.ll
  test/Dependences/reduction_simple_privatization_deps_2.ll
  test/Dependences/reduction_simple_privatization_deps_w_parameter.ll
  test/Dependences/reduction_two_reductions_different_rloops.ll
  test/Dependences/sequential_loops.ll
  test/IndependentBlocks/inter_bb_scalar_dep.ll
  test/IndependentBlocks/intra_and_inter_bb_scalar_dep.ll
  test/IndependentBlocks/intra_bb_scalar_dep.ll
  test/IndependentBlocks/phi_outside_scop.ll
  test/IndependentBlocks/scalar_to_array.ll
  test/IndependentBlocks/scev-invalidated.ll
  test/Isl/Ast/OpenMP/multiple_loops_outer_parallel.ll
  test/Isl/Ast/OpenMP/nested_loop_both_parallel.ll
  test/Isl/Ast/OpenMP/nested_loop_both_parallel_parametric.ll
  test/Isl/Ast/OpenMP/nested_loop_inner_parallel.ll
  test/Isl/Ast/OpenMP/nested_loop_outer_parallel.ll
  test/Isl/Ast/OpenMP/single_loop_param_non_parallel.ll
  test/Isl/Ast/OpenMP/single_loop_param_parallel.ll
  test/Isl/Ast/OpenMP/single_loop_param_parallel_computeout.ll
  test/Isl/Ast/alias_simple_1.ll
  test/Isl/Ast/alias_simple_2.ll
  test/Isl/Ast/alias_simple_3.ll
  test/Isl/Ast/aliasing_multiple_alias_groups.ll
  test/Isl/Ast/aliasing_parametric_simple_1.ll
  test/Isl/Ast/aliasing_parametric_simple_2.ll
  test/Isl/Ast/dependence_distance_constant.ll
  test/Isl/Ast/dependence_distance_multiple_constant.ll
  test/Isl/Ast/dependence_distance_parametric.ll
  test/Isl/Ast/dependence_distance_parametric_expr.ll
  test/Isl/Ast/dependence_distance_varying.ll
  test/Isl/Ast/dependence_distance_varying_in_outer_loop.ll
  test/Isl/Ast/dependence_distance_varying_multiple.ll
  test/Isl/Ast/reduction_clauses_multidimensional_access.ll
  test/Isl/Ast/reduction_clauses_onedimensional_access.ll
  test/Isl/Ast/reduction_dependences_equal_non_reduction_dependences.ll
  test/Isl/Ast/reduction_different_reduction_clauses.ll
  test/Isl/Ast/reduction_in_one_dimension.ll
  test/Isl/Ast/reduction_loop_reversal.ll
  test/Isl/Ast/reduction_modulo_and_loop_reversal_schedule.ll
  test/Isl/Ast/reduction_modulo_and_loop_reversal_schedule_2.ll
  test/Isl/Ast/reduction_modulo_schedule.ll
  test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions.ll
  test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_2.ll
  test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_3.ll
  test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_4.ll
  test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_5.ll
  test/Isl/Ast/reduction_multiple_dimensions.ll
  test/Isl/Ast/reduction_multiple_dimensions_2.ll
  test/Isl/Ast/reduction_multiple_dimensions_3.ll
  test/Isl/Ast/reduction_multiple_dimensions_4.ll
  test/Isl/Ast/run-time-condition.ll
  test/Isl/Ast/simple-run-time-condition.ll
  test/Isl/Ast/single_loop_strip_mine.ll
  test/Isl/CodeGen/20100617.ll
  test/Isl/CodeGen/20100622.ll
  test/Isl/CodeGen/20100707.ll
  test/Isl/CodeGen/20100707_2.ll
  test/Isl/CodeGen/20100708.ll
  test/Isl/CodeGen/20100708_2.ll
  test/Isl/CodeGen/20100713.ll
  test/Isl/CodeGen/20100713_2.ll
  test/Isl/CodeGen/20100717.ll
  test/Isl/CodeGen/20100718-DomInfo-2.ll
  test/Isl/CodeGen/20100718-DomInfo.ll
  test/Isl/CodeGen/20100720-MultipleConditions.ll
  test/Isl/CodeGen/20100809-IndependentBlock.ll
  test/Isl/CodeGen/20100811-ScalarDependencyBetweenBrAndCnd.ll
  test/Isl/CodeGen/20101030-Overflow.ll
  test/Isl/CodeGen/20101103-Overflow3.ll
  test/Isl/CodeGen/20101103-signmissmatch.ll
  test/Isl/CodeGen/20110226-Ignore-Dead-Code.ll
  test/Isl/CodeGen/20110226-PHI-Node-removed.ll
  test/Isl/CodeGen/20110312-Fail-without-basicaa.ll
  test/Isl/CodeGen/20120316-InvalidCast.ll
  test/Isl/CodeGen/20120403-RHS-type-mismatch.ll
  test/Isl/CodeGen/20130211-getNumberOfIterations.ll
  test/Isl/CodeGen/20130221.ll
  test/Isl/CodeGen/LoopParallelMD/do_not_mutate_debug_info.ll
  test/Isl/CodeGen/LoopParallelMD/loop_nest_param_parallel.ll
  test/Isl/CodeGen/LoopParallelMD/single_loop_param_parallel.ll
  test/Isl/CodeGen/MemAccess/bad_alignment.ll
  test/Isl/CodeGen/MemAccess/codegen_constant_offset.ll
  test/Isl/CodeGen/MemAccess/codegen_simple.ll
  test/Isl/CodeGen/MemAccess/codegen_simple_float.ll
  test/Isl/CodeGen/MemAccess/codegen_simple_md.ll
  test/Isl/CodeGen/MemAccess/codegen_simple_md_float.ll
  test/Isl/CodeGen/MemAccess/default_aligned_new_access_function.ll
  test/Isl/CodeGen/MemAccess/simple.ll
  test/Isl/CodeGen/MemAccess/simple_analyze.ll
  test/Isl/CodeGen/MemAccess/simple_stride_test.ll
  test/Isl/CodeGen/OpenMP/loop-body-references-outer-iv.ll
  test/Isl/CodeGen/OpenMP/loop-body-references-outer-values-2.ll
  test/Isl/CodeGen/OpenMP/loop-body-references-outer-values-3.ll
  test/Isl/CodeGen/OpenMP/loop-body-references-outer-values.ll
  test/Isl/CodeGen/OpenMP/loop-bounds-reference-outer-ids.ll
  test/Isl/CodeGen/OpenMP/reference-other-bb.ll
  test/Isl/CodeGen/OpenMP/reference-preceeding-loop.ll
  test/Isl/CodeGen/OpenMP/single_loop.ll
  test/Isl/CodeGen/OpenMP/single_loop_with_loop_invariant_baseptr.ll
  test/Isl/CodeGen/OpenMP/two-parallel-loops-reference-outer-indvar.ll
  test/Isl/CodeGen/PHIInExit.ll
  test/Isl/CodeGen/aliasing_different_base_and_access_type.ll
  test/Isl/CodeGen/aliasing_different_pointer_types.ll
  test/Isl/CodeGen/aliasing_multidimensional_access.ll
  test/Isl/CodeGen/aliasing_parametric_simple_1.ll
  test/Isl/CodeGen/aliasing_parametric_simple_2.ll
  test/Isl/CodeGen/aliasing_struct_element.ll
  test/Isl/CodeGen/alignment.ll
  test/Isl/CodeGen/annotated_alias_scopes.ll
  test/Isl/CodeGen/blas_sscal_simplified.ll
  test/Isl/CodeGen/constant_condition.ll
  test/Isl/CodeGen/create-conditional-scop.ll
  test/Isl/CodeGen/debug-intrinsics.ll
  test/Isl/CodeGen/intrinsics_lifetime.ll
  test/Isl/CodeGen/intrinsics_misc.ll
  test/Isl/CodeGen/loop_with_condition.ll
  test/Isl/CodeGen/loop_with_condition_2.ll
  test/Isl/CodeGen/loop_with_condition_ineq.ll
  test/Isl/CodeGen/loop_with_condition_nested.ll
  test/Isl/CodeGen/loop_with_conditional_entry_edge_splited_hard_case.ll
  test/Isl/CodeGen/multidim_2d_parametric_array_static_loop_bounds.ll
  test/Isl/CodeGen/multidim_alias_check.ll
  test/Isl/CodeGen/no_guard_bb.ll
  test/Isl/CodeGen/openmp_limit_threads.ll
  test/Isl/CodeGen/pointer-type-expressions-2.ll
  test/Isl/CodeGen/pointer-type-expressions.ll
  test/Isl/CodeGen/pointer-type-pointer-type-comparison.ll
  test/Isl/CodeGen/reduction.ll
  test/Isl/CodeGen/reduction_2.ll
  test/Isl/CodeGen/reduction_simple_binary.ll
  test/Isl/CodeGen/run-time-condition-with-scev-parameters.ll
  test/Isl/CodeGen/run-time-condition.ll
  test/Isl/CodeGen/scalar-references-used-in-scop-compute.ll
  test/Isl/CodeGen/scev.ll
  test/Isl/CodeGen/scop_never_executed_runtime_check_location.ll
  test/Isl/CodeGen/sequential_loops.ll
  test/Isl/CodeGen/simple_loop_non_single_exit.ll
  test/Isl/CodeGen/simple_loop_non_single_exit_2.ll
  test/Isl/CodeGen/simple_non_single_entry.ll
  test/Isl/CodeGen/simple_nonaffine_loop.ll
  test/Isl/CodeGen/simple_vec_assign_scalar.ll
  test/Isl/CodeGen/simple_vec_assign_scalar_2.ll
  test/Isl/CodeGen/simple_vec_call.ll
  test/Isl/CodeGen/simple_vec_call_2.ll
  test/Isl/CodeGen/simple_vec_cast.ll
  test/Isl/CodeGen/simple_vec_const.ll
  test/Isl/CodeGen/simple_vec_large_width.ll
  test/Isl/CodeGen/simple_vec_ptr_ptr_ty.ll
  test/Isl/CodeGen/simple_vec_stride_negative_one.ll
  test/Isl/CodeGen/simple_vec_stride_x.ll
  test/Isl/CodeGen/simple_vec_two_stmts.ll
  test/Isl/CodeGen/single_do_loop_int_max_iterations.ll
  test/Isl/CodeGen/single_do_loop_int_param_iterations.ll
  test/Isl/CodeGen/single_do_loop_ll_max_iterations.ll
  test/Isl/CodeGen/single_do_loop_one_iteration.ll
  test/Isl/CodeGen/single_do_loop_scev_replace.ll
  test/Isl/CodeGen/single_loop.ll
  test/Isl/CodeGen/single_loop_int_max_iterations.ll
  test/Isl/CodeGen/single_loop_ll_max_iterations.ll
  test/Isl/CodeGen/single_loop_one_iteration.ll
  test/Isl/CodeGen/single_loop_param.ll
  test/Isl/CodeGen/single_loop_zero_iterations.ll
  test/Isl/CodeGen/split_edges.ll
  test/Isl/CodeGen/split_edges_2.ll
  test/Isl/CodeGen/test-invalid-operands-for-select-2.ll
  test/Isl/CodeGen/test-invalid-operands-for-select.ll
  test/Isl/CodeGen/test.ll
  test/Isl/CodeGen/two-scops-in-row.ll
  test/Isl/single_loop_param_less_equal.ll
  test/Isl/single_loop_param_less_than.ll
  test/Isl/single_loop_uint_max_iterations.ll
  test/Isl/single_loop_ull_max_iterations.ll
  test/ScheduleOptimizer/2012-03-16-Empty-Domain.ll
  test/ScheduleOptimizer/2012-04-16-Trivially-vectorizable-loops.ll
  test/ScheduleOptimizer/2012-10-14-Zero-Bands.ll
  test/ScheduleOptimizer/2013-04-11-Empty-Domain-two.ll
  test/ScheduleOptimizer/computeout.ll
  test/ScheduleOptimizer/line-tiling-2.ll
  test/ScheduleOptimizer/line-tiling.ll
  test/ScheduleOptimizer/prevectorization.ll
  test/ScheduleOptimizer/rectangular-tiling.ll
  test/ScopDetect/aliasing_parametric_simple_1.ll
  test/ScopDetect/aliasing_parametric_simple_2.ll
  test/ScopDetect/aliasing_simple_1.ll
  test/ScopDetect/aliasing_simple_2.ll
  test/ScopDetect/base_pointer.ll
  test/ScopDetect/cross_loop_non_single_exit.ll
  test/ScopDetect/cross_loop_non_single_exit_2.ll
  test/ScopDetect/dependency_to_phi_node_outside_of_region.ll
  test/ScopDetect/indvars.ll
  test/ScopDetect/intrinsics_1.ll
  test/ScopDetect/intrinsics_2.ll
  test/ScopDetect/intrinsics_3.ll
  test/ScopDetect/invalidate_scalar_evolution.ll
  test/ScopDetect/keep_going_expansion.ll
  test/ScopDetect/multidim_two_accesses_different_delinearization.ll
  test/ScopDetect/nested_loop_single_exit.ll
  test/ScopDetect/parametric-multiply-in-scev.ll
  test/ScopDetect/remove_all_children.ll
  test/ScopDetect/report-scop-location.ll
  test/ScopDetect/run_time_alias_check.ll
  test/ScopDetect/sequential_loops.ll
  test/ScopDetect/simple_loop.ll
  test/ScopDetect/simple_loop_non_single_entry.ll
  test/ScopDetect/simple_loop_non_single_exit.ll
  test/ScopDetect/simple_loop_non_single_exit_2.ll
  test/ScopDetect/simple_loop_two_phi_nodes.ll
  test/ScopDetect/simple_loop_with_param.ll
  test/ScopDetect/simple_loop_with_param_2.ll
  test/ScopDetect/simple_non_single_entry.ll
  test/ScopDetect/skip_function_attribute.ll
  test/ScopDetectionDiagnostics/ReportAlias-01.ll
  test/ScopDetectionDiagnostics/ReportDifferentElementSize.ll
  test/ScopDetectionDiagnostics/ReportFuncCall-01.ll
  test/ScopDetectionDiagnostics/ReportLoopBound-01.ll
  test/ScopDetectionDiagnostics/ReportMultipleNonAffineAccesses.ll
  test/ScopDetectionDiagnostics/ReportNonAffineAccess-01.ll
  test/ScopDetectionDiagnostics/ReportUnprofitable.ll
  (91 more files...)

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7735.20215.patch
Type: text/x-patch
Size: 233688 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150218/14e39b96/attachment.bin>


More information about the llvm-commits mailing list