ScopDetection: Only detect scops that have at least one read and one write
authorTobias Grosser <tobias@grosser.es>
Thu, 19 Feb 2015 05:31:07 +0000 (05:31 +0000)
committerTobias Grosser <tobias@grosser.es>
Thu, 19 Feb 2015 05:31:07 +0000 (05:31 +0000)
commitd1e33e7061126d181f63b3e1019cf3f11269deff
tree9f4b995f03b9cdea2228cd1c755000014926d0f8
parent3e1551c96f5ca7217ba850dd77c6f3702004c07a
ScopDetection: Only detect scops that have at least one read and one write

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.

Differential Revision: http://reviews.llvm.org/D7735

llvm-svn: 229820
341 files changed:
polly/include/polly/ScopDetection.h
polly/include/polly/ScopDetectionDiagnostic.h
polly/lib/Analysis/ScopDetection.cpp
polly/lib/Analysis/ScopDetectionDiagnostic.cpp
polly/test/CodePreparation/if_condition.ll
polly/test/CodePreparation/multiple_loops_trivial_phis.ll
polly/test/CodePreparation/single_loop_trivial_phi.ll
polly/test/DeadCodeElimination/chained_iterations.ll
polly/test/DeadCodeElimination/chained_iterations_2.ll
polly/test/DeadCodeElimination/computeout.ll
polly/test/DeadCodeElimination/dead_iteration_elimination.ll
polly/test/DeadCodeElimination/non-affine-affine-mix.ll
polly/test/DeadCodeElimination/non-affine.ll
polly/test/DeadCodeElimination/null_schedule.ll
polly/test/Dependences/computeout.ll
polly/test/Dependences/do_pluto_matmult.ll
polly/test/Dependences/reduction_complex_location.ll
polly/test/Dependences/reduction_dependences_equal_non_reduction_dependences.ll
polly/test/Dependences/reduction_mixed_reduction_and_non_reduction_dependences.ll
polly/test/Dependences/reduction_multiple_loops_array_sum.ll
polly/test/Dependences/reduction_multiple_loops_array_sum_2.ll
polly/test/Dependences/reduction_multiple_loops_array_sum_3.ll
polly/test/Dependences/reduction_multiple_reductions.ll
polly/test/Dependences/reduction_multiple_reductions_2.ll
polly/test/Dependences/reduction_only_reduction_like_access.ll
polly/test/Dependences/reduction_partially_escaping_intermediate_in_other_stmt.ll
polly/test/Dependences/reduction_privatization_deps.ll
polly/test/Dependences/reduction_privatization_deps_2.ll
polly/test/Dependences/reduction_privatization_deps_3.ll
polly/test/Dependences/reduction_privatization_deps_4.ll
polly/test/Dependences/reduction_privatization_deps_5.ll
polly/test/Dependences/reduction_simple_iv.ll
polly/test/Dependences/reduction_simple_iv_debug_wrapped_dependences.ll
polly/test/Dependences/reduction_simple_privatization_deps_2.ll
polly/test/Dependences/reduction_simple_privatization_deps_w_parameter.ll
polly/test/Dependences/reduction_two_reductions_different_rloops.ll
polly/test/Dependences/sequential_loops.ll
polly/test/IndependentBlocks/inter_bb_scalar_dep.ll
polly/test/IndependentBlocks/intra_and_inter_bb_scalar_dep.ll
polly/test/IndependentBlocks/intra_bb_scalar_dep.ll
polly/test/IndependentBlocks/phi_outside_scop.ll
polly/test/IndependentBlocks/scalar_to_array.ll
polly/test/IndependentBlocks/scev-invalidated.ll
polly/test/Isl/Ast/OpenMP/multiple_loops_outer_parallel.ll
polly/test/Isl/Ast/OpenMP/nested_loop_both_parallel.ll
polly/test/Isl/Ast/OpenMP/nested_loop_both_parallel_parametric.ll
polly/test/Isl/Ast/OpenMP/nested_loop_inner_parallel.ll
polly/test/Isl/Ast/OpenMP/nested_loop_outer_parallel.ll
polly/test/Isl/Ast/OpenMP/single_loop_param_non_parallel.ll
polly/test/Isl/Ast/OpenMP/single_loop_param_parallel.ll
polly/test/Isl/Ast/OpenMP/single_loop_param_parallel_computeout.ll
polly/test/Isl/Ast/alias_simple_1.ll
polly/test/Isl/Ast/alias_simple_2.ll
polly/test/Isl/Ast/alias_simple_3.ll
polly/test/Isl/Ast/aliasing_multiple_alias_groups.ll
polly/test/Isl/Ast/aliasing_parametric_simple_1.ll
polly/test/Isl/Ast/aliasing_parametric_simple_2.ll
polly/test/Isl/Ast/dependence_distance_constant.ll
polly/test/Isl/Ast/dependence_distance_multiple_constant.ll
polly/test/Isl/Ast/dependence_distance_parametric.ll
polly/test/Isl/Ast/dependence_distance_parametric_expr.ll
polly/test/Isl/Ast/dependence_distance_varying.ll
polly/test/Isl/Ast/dependence_distance_varying_in_outer_loop.ll
polly/test/Isl/Ast/dependence_distance_varying_multiple.ll
polly/test/Isl/Ast/reduction_clauses_multidimensional_access.ll
polly/test/Isl/Ast/reduction_clauses_onedimensional_access.ll
polly/test/Isl/Ast/reduction_dependences_equal_non_reduction_dependences.ll
polly/test/Isl/Ast/reduction_different_reduction_clauses.ll
polly/test/Isl/Ast/reduction_in_one_dimension.ll
polly/test/Isl/Ast/reduction_loop_reversal.ll
polly/test/Isl/Ast/reduction_modulo_and_loop_reversal_schedule.ll
polly/test/Isl/Ast/reduction_modulo_and_loop_reversal_schedule_2.ll
polly/test/Isl/Ast/reduction_modulo_schedule.ll
polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions.ll
polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_2.ll
polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_3.ll
polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_4.ll
polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_5.ll
polly/test/Isl/Ast/reduction_multiple_dimensions.ll
polly/test/Isl/Ast/reduction_multiple_dimensions_2.ll
polly/test/Isl/Ast/reduction_multiple_dimensions_3.ll
polly/test/Isl/Ast/reduction_multiple_dimensions_4.ll
polly/test/Isl/Ast/run-time-condition.ll
polly/test/Isl/Ast/simple-run-time-condition.ll
polly/test/Isl/Ast/single_loop_strip_mine.ll
polly/test/Isl/CodeGen/20100617.ll
polly/test/Isl/CodeGen/20100622.ll
polly/test/Isl/CodeGen/20100707.ll
polly/test/Isl/CodeGen/20100707_2.ll
polly/test/Isl/CodeGen/20100708.ll
polly/test/Isl/CodeGen/20100708_2.ll
polly/test/Isl/CodeGen/20100713.ll
polly/test/Isl/CodeGen/20100713_2.ll
polly/test/Isl/CodeGen/20100717.ll
polly/test/Isl/CodeGen/20100718-DomInfo-2.ll
polly/test/Isl/CodeGen/20100718-DomInfo.ll
polly/test/Isl/CodeGen/20100720-MultipleConditions.ll
polly/test/Isl/CodeGen/20100809-IndependentBlock.ll
polly/test/Isl/CodeGen/20100811-ScalarDependencyBetweenBrAndCnd.ll
polly/test/Isl/CodeGen/20101030-Overflow.ll
polly/test/Isl/CodeGen/20101103-Overflow3.ll
polly/test/Isl/CodeGen/20101103-signmissmatch.ll
polly/test/Isl/CodeGen/20110226-Ignore-Dead-Code.ll
polly/test/Isl/CodeGen/20110226-PHI-Node-removed.ll
polly/test/Isl/CodeGen/20110312-Fail-without-basicaa.ll
polly/test/Isl/CodeGen/20120316-InvalidCast.ll
polly/test/Isl/CodeGen/20120403-RHS-type-mismatch.ll
polly/test/Isl/CodeGen/20130211-getNumberOfIterations.ll
polly/test/Isl/CodeGen/20130221.ll
polly/test/Isl/CodeGen/LoopParallelMD/do_not_mutate_debug_info.ll
polly/test/Isl/CodeGen/LoopParallelMD/loop_nest_param_parallel.ll
polly/test/Isl/CodeGen/LoopParallelMD/single_loop_param_parallel.ll
polly/test/Isl/CodeGen/MemAccess/bad_alignment.ll
polly/test/Isl/CodeGen/MemAccess/codegen_constant_offset.ll
polly/test/Isl/CodeGen/MemAccess/codegen_simple.ll
polly/test/Isl/CodeGen/MemAccess/codegen_simple_float.ll
polly/test/Isl/CodeGen/MemAccess/codegen_simple_md.ll
polly/test/Isl/CodeGen/MemAccess/codegen_simple_md_float.ll
polly/test/Isl/CodeGen/MemAccess/default_aligned_new_access_function.ll
polly/test/Isl/CodeGen/MemAccess/simple.ll
polly/test/Isl/CodeGen/MemAccess/simple_analyze.ll
polly/test/Isl/CodeGen/MemAccess/simple_stride_test.ll
polly/test/Isl/CodeGen/OpenMP/loop-body-references-outer-iv.ll
polly/test/Isl/CodeGen/OpenMP/loop-body-references-outer-values-2.ll
polly/test/Isl/CodeGen/OpenMP/loop-body-references-outer-values-3.ll
polly/test/Isl/CodeGen/OpenMP/loop-body-references-outer-values.ll
polly/test/Isl/CodeGen/OpenMP/loop-bounds-reference-outer-ids.ll
polly/test/Isl/CodeGen/OpenMP/reference-other-bb.ll
polly/test/Isl/CodeGen/OpenMP/reference-preceeding-loop.ll
polly/test/Isl/CodeGen/OpenMP/single_loop.ll
polly/test/Isl/CodeGen/OpenMP/single_loop_with_loop_invariant_baseptr.ll
polly/test/Isl/CodeGen/OpenMP/two-parallel-loops-reference-outer-indvar.ll
polly/test/Isl/CodeGen/PHIInExit.ll
polly/test/Isl/CodeGen/aliasing_different_base_and_access_type.ll
polly/test/Isl/CodeGen/aliasing_different_pointer_types.ll
polly/test/Isl/CodeGen/aliasing_multidimensional_access.ll
polly/test/Isl/CodeGen/aliasing_parametric_simple_1.ll
polly/test/Isl/CodeGen/aliasing_parametric_simple_2.ll
polly/test/Isl/CodeGen/aliasing_struct_element.ll
polly/test/Isl/CodeGen/alignment.ll
polly/test/Isl/CodeGen/annotated_alias_scopes.ll
polly/test/Isl/CodeGen/blas_sscal_simplified.ll
polly/test/Isl/CodeGen/constant_condition.ll
polly/test/Isl/CodeGen/create-conditional-scop.ll
polly/test/Isl/CodeGen/debug-intrinsics.ll
polly/test/Isl/CodeGen/intrinsics_lifetime.ll
polly/test/Isl/CodeGen/intrinsics_misc.ll
polly/test/Isl/CodeGen/loop_with_condition.ll
polly/test/Isl/CodeGen/loop_with_condition_2.ll
polly/test/Isl/CodeGen/loop_with_condition_ineq.ll
polly/test/Isl/CodeGen/loop_with_condition_nested.ll
polly/test/Isl/CodeGen/loop_with_conditional_entry_edge_splited_hard_case.ll
polly/test/Isl/CodeGen/multidim_2d_parametric_array_static_loop_bounds.ll
polly/test/Isl/CodeGen/multidim_alias_check.ll
polly/test/Isl/CodeGen/no_guard_bb.ll
polly/test/Isl/CodeGen/openmp_limit_threads.ll
polly/test/Isl/CodeGen/pointer-type-expressions-2.ll
polly/test/Isl/CodeGen/pointer-type-expressions.ll
polly/test/Isl/CodeGen/pointer-type-pointer-type-comparison.ll
polly/test/Isl/CodeGen/reduction.ll
polly/test/Isl/CodeGen/reduction_2.ll
polly/test/Isl/CodeGen/reduction_simple_binary.ll
polly/test/Isl/CodeGen/run-time-condition-with-scev-parameters.ll
polly/test/Isl/CodeGen/run-time-condition.ll
polly/test/Isl/CodeGen/scalar-references-used-in-scop-compute.ll
polly/test/Isl/CodeGen/scev.ll
polly/test/Isl/CodeGen/scop_never_executed_runtime_check_location.ll
polly/test/Isl/CodeGen/sequential_loops.ll
polly/test/Isl/CodeGen/simple_loop_non_single_exit.ll
polly/test/Isl/CodeGen/simple_loop_non_single_exit_2.ll
polly/test/Isl/CodeGen/simple_non_single_entry.ll
polly/test/Isl/CodeGen/simple_nonaffine_loop.ll
polly/test/Isl/CodeGen/simple_vec_assign_scalar.ll
polly/test/Isl/CodeGen/simple_vec_assign_scalar_2.ll
polly/test/Isl/CodeGen/simple_vec_call.ll
polly/test/Isl/CodeGen/simple_vec_call_2.ll
polly/test/Isl/CodeGen/simple_vec_cast.ll
polly/test/Isl/CodeGen/simple_vec_const.ll
polly/test/Isl/CodeGen/simple_vec_large_width.ll
polly/test/Isl/CodeGen/simple_vec_ptr_ptr_ty.ll
polly/test/Isl/CodeGen/simple_vec_stride_negative_one.ll
polly/test/Isl/CodeGen/simple_vec_stride_x.ll
polly/test/Isl/CodeGen/simple_vec_two_stmts.ll
polly/test/Isl/CodeGen/single_do_loop_int_max_iterations.ll
polly/test/Isl/CodeGen/single_do_loop_int_param_iterations.ll
polly/test/Isl/CodeGen/single_do_loop_ll_max_iterations.ll
polly/test/Isl/CodeGen/single_do_loop_one_iteration.ll
polly/test/Isl/CodeGen/single_do_loop_scev_replace.ll
polly/test/Isl/CodeGen/single_loop.ll
polly/test/Isl/CodeGen/single_loop_int_max_iterations.ll
polly/test/Isl/CodeGen/single_loop_ll_max_iterations.ll
polly/test/Isl/CodeGen/single_loop_one_iteration.ll
polly/test/Isl/CodeGen/single_loop_param.ll
polly/test/Isl/CodeGen/single_loop_zero_iterations.ll
polly/test/Isl/CodeGen/split_edges.ll
polly/test/Isl/CodeGen/split_edges_2.ll
polly/test/Isl/CodeGen/test-invalid-operands-for-select-2.ll
polly/test/Isl/CodeGen/test-invalid-operands-for-select.ll
polly/test/Isl/CodeGen/test.ll
polly/test/Isl/CodeGen/two-scops-in-row.ll
polly/test/Isl/single_loop_param_less_equal.ll
polly/test/Isl/single_loop_param_less_than.ll
polly/test/Isl/single_loop_uint_max_iterations.ll
polly/test/Isl/single_loop_ull_max_iterations.ll
polly/test/ScheduleOptimizer/2012-03-16-Empty-Domain.ll
polly/test/ScheduleOptimizer/2012-04-16-Trivially-vectorizable-loops.ll
polly/test/ScheduleOptimizer/2012-10-14-Zero-Bands.ll
polly/test/ScheduleOptimizer/2013-04-11-Empty-Domain-two.ll
polly/test/ScheduleOptimizer/computeout.ll
polly/test/ScheduleOptimizer/line-tiling-2.ll
polly/test/ScheduleOptimizer/line-tiling.ll
polly/test/ScheduleOptimizer/prevectorization.ll
polly/test/ScheduleOptimizer/rectangular-tiling.ll
polly/test/ScopDetect/aliasing_parametric_simple_1.ll
polly/test/ScopDetect/aliasing_parametric_simple_2.ll
polly/test/ScopDetect/aliasing_simple_1.ll
polly/test/ScopDetect/aliasing_simple_2.ll
polly/test/ScopDetect/base_pointer.ll
polly/test/ScopDetect/cross_loop_non_single_exit.ll
polly/test/ScopDetect/cross_loop_non_single_exit_2.ll
polly/test/ScopDetect/dependency_to_phi_node_outside_of_region.ll
polly/test/ScopDetect/indvars.ll
polly/test/ScopDetect/intrinsics_1.ll
polly/test/ScopDetect/intrinsics_2.ll
polly/test/ScopDetect/intrinsics_3.ll
polly/test/ScopDetect/invalidate_scalar_evolution.ll
polly/test/ScopDetect/keep_going_expansion.ll
polly/test/ScopDetect/multidim_two_accesses_different_delinearization.ll
polly/test/ScopDetect/nested_loop_single_exit.ll
polly/test/ScopDetect/parametric-multiply-in-scev.ll
polly/test/ScopDetect/remove_all_children.ll
polly/test/ScopDetect/report-scop-location.ll
polly/test/ScopDetect/run_time_alias_check.ll
polly/test/ScopDetect/sequential_loops.ll
polly/test/ScopDetect/simple_loop.ll
polly/test/ScopDetect/simple_loop_non_single_entry.ll
polly/test/ScopDetect/simple_loop_non_single_exit.ll
polly/test/ScopDetect/simple_loop_non_single_exit_2.ll
polly/test/ScopDetect/simple_loop_two_phi_nodes.ll
polly/test/ScopDetect/simple_loop_with_param.ll
polly/test/ScopDetect/simple_loop_with_param_2.ll
polly/test/ScopDetect/simple_non_single_entry.ll
polly/test/ScopDetect/skip_function_attribute.ll
polly/test/ScopDetectionDiagnostics/ReportAlias-01.ll
polly/test/ScopDetectionDiagnostics/ReportDifferentElementSize.ll
polly/test/ScopDetectionDiagnostics/ReportFuncCall-01.ll
polly/test/ScopDetectionDiagnostics/ReportLoopBound-01.ll
polly/test/ScopDetectionDiagnostics/ReportMultipleNonAffineAccesses.ll
polly/test/ScopDetectionDiagnostics/ReportNonAffineAccess-01.ll
polly/test/ScopDetectionDiagnostics/ReportUnprofitable.ll [new file with mode: 0644]
polly/test/ScopDetectionDiagnostics/ReportVariantBasePtr-01.ll
polly/test/ScopInfo/20111108-Parameter-not-detected.ll
polly/test/ScopInfo/2012-03-16-Crash-because-of-unsigned-in-scev.ll
polly/test/ScopInfo/Alias-0.ll
polly/test/ScopInfo/Alias-1.ll
polly/test/ScopInfo/Alias-2.ll
polly/test/ScopInfo/Alias-3.ll
polly/test/ScopInfo/Alias-4.ll
polly/test/ScopInfo/NonAffine/non_affine_but_sdiv.ll
polly/test/ScopInfo/aliasing_conditional_alias_groups_1.ll
polly/test/ScopInfo/aliasing_conditional_alias_groups_2.ll
polly/test/ScopInfo/aliasing_dead_access.ll
polly/test/ScopInfo/aliasing_many_parameters_not_all_involved.ll
polly/test/ScopInfo/aliasing_multiple_alias_groups.ll
polly/test/ScopInfo/assume_gep_bounds.ll
polly/test/ScopInfo/assume_gep_bounds_2.ll
polly/test/ScopInfo/bug_2010_10_22.ll
polly/test/ScopInfo/bug_2011_1_5.ll
polly/test/ScopInfo/bug_scev_not_fully_eval.ll
polly/test/ScopInfo/cond_constant_in_loop.ll
polly/test/ScopInfo/cond_in_loop.ll
polly/test/ScopInfo/constant_start_integer.ll
polly/test/ScopInfo/delinearize-together-all-data-refs.ll
polly/test/ScopInfo/escaping_empty_scop.ll
polly/test/ScopInfo/independent-blocks-never-stop-on-big-scop.ll
polly/test/ScopInfo/integers.ll
polly/test/ScopInfo/isl_aff_out_of_bounds.ll
polly/test/ScopInfo/loop_affine_bound_0.ll
polly/test/ScopInfo/loop_affine_bound_1.ll
polly/test/ScopInfo/loop_affine_bound_2.ll
polly/test/ScopInfo/loop_carry.ll
polly/test/ScopInfo/max-loop-depth.ll
polly/test/ScopInfo/multi-scop.ll
polly/test/ScopInfo/multidim_2d-diagonal-matrix.ll
polly/test/ScopInfo/multidim_2d_outer_parametric_offset.ll
polly/test/ScopInfo/multidim_2d_parametric_array_static_loop_bounds.ll
polly/test/ScopInfo/multidim_3d_parametric_array_static_loop_bounds.ll
polly/test/ScopInfo/multidim_ivs_and_integer_offsets_3d.ll
polly/test/ScopInfo/multidim_ivs_and_parameteric_offsets_3d.ll
polly/test/ScopInfo/multidim_nested_start_integer.ll
polly/test/ScopInfo/multidim_nested_start_share_parameter.ll
polly/test/ScopInfo/multidim_only_ivs_2d.ll
polly/test/ScopInfo/multidim_only_ivs_3d.ll
polly/test/ScopInfo/multidim_only_ivs_3d_cast.ll
polly/test/ScopInfo/multidim_only_ivs_3d_reverse.ll
polly/test/ScopInfo/multidim_single_and_multidim_array.ll
polly/test/ScopInfo/non_affine_access.ll
polly/test/ScopInfo/non_affine_parametric_loop.ll
polly/test/ScopInfo/parameter_product.ll
polly/test/ScopInfo/phi_condition_modeling_1.ll
polly/test/ScopInfo/phi_condition_modeling_2.ll
polly/test/ScopInfo/phi_conditional_simple_1.ll
polly/test/ScopInfo/phi_loop_carried_float.ll
polly/test/ScopInfo/phi_not_grouped_at_top.ll
polly/test/ScopInfo/phi_scalar_simple_1.ll
polly/test/ScopInfo/phi_scalar_simple_2.ll
polly/test/ScopInfo/phi_with_invoke_edge.ll
polly/test/ScopInfo/pointer-type-expressions.ll
polly/test/ScopInfo/reduction_alternating_base.ll
polly/test/ScopInfo/reduction_chain_partially_outside_the_scop.ll
polly/test/ScopInfo/reduction_disabled_multiplicative.ll
polly/test/ScopInfo/reduction_escaping_intermediate.ll
polly/test/ScopInfo/reduction_escaping_intermediate_2.ll
polly/test/ScopInfo/reduction_invalid_different_operators.ll
polly/test/ScopInfo/reduction_invalid_overlapping_accesses.ll
polly/test/ScopInfo/reduction_multiple_loops_array_sum.ll
polly/test/ScopInfo/reduction_multiple_loops_array_sum_1.ll
polly/test/ScopInfo/reduction_multiple_simple_binary.ll
polly/test/ScopInfo/reduction_non_overlapping_chains.ll
polly/test/ScopInfo/reduction_only_reduction_like_access.ll
polly/test/ScopInfo/reduction_simple_fp.ll
polly/test/ScopInfo/reduction_simple_w_constant.ll
polly/test/ScopInfo/reduction_simple_w_iv.ll
polly/test/ScopInfo/reduction_two_identical_reads.ll
polly/test/ScopInfo/run-time-check-many-parameters.ll
polly/test/ScopInfo/run-time-check-read-only-arrays.ll
polly/test/ScopInfo/scalar.ll
polly/test/ScopInfo/scalar_dependence_cond_br.ll
polly/test/ScopInfo/simple_loop_1.ll
polly/test/ScopInfo/simple_nonaffine_loop_not.ll
polly/test/ScopInfo/smax.ll
polly/test/ScopInfo/undef_in_cond.ll
polly/test/ScopInfo/unsigned-condition.ll
polly/test/TempScop/inter_bb_scalar_dep.ll
polly/test/TempScop/intra_and_inter_bb_scalar_dep.ll
polly/test/TempScop/intra_bb_scalar_dep.ll
polly/test/TempScop/nested-loops.ll
polly/test/TempScop/not-a-reduction.ll
polly/test/TempScop/scalar_to_array.ll
polly/test/TempScop/tempscop-printing.ll
polly/test/polly.ll