llvm-project/polly/test/ScopInfo
Tobias Grosser 7b50beebe4 Assume GetElementPtr offsets to be inbounds
In case a GEP instruction references into a fixed size array e.g., an access
A[i][j] into an array A[100x100], LLVM-IR does not guarantee that the subscripts
always compute values that are within array bounds. We now derive the set of
parameter values for which all accesses are within bounds and add the assumption
that the scop is only every executed with this set of parameter values.

Example:

void foo(float A[][20], long n, long m {
    for (long i = 0; i < n; i++)
      for (long j = 0; j < m; j++)
        A[i][j] = ...

This loop yields out-of-bound accesses if m is at least 20 and at the same time
at least one iteration of the outer loop is executed. Hence, we assume:

  n <= 0 or m <= 20.

Doing so simplifies the dependence analysis problem, allows us to perform
more optimizations and generate better code.

TODO: The location where the GEP instruction is executed is not necessarily the
location where the memory is actually accessed. As a result scanning for GEP[s]
is imprecise. Even though this is not a correctness problem, this imprecision
may result in missed optimizations or non-optimal run-time checks.

In polybench where this mismatch between parametric loop bounds and fixed size
arrays is common, we see with this patch significant reductions in compile time
(up to 50%) and execution time (up to 70%). We see two significant compile time
regressions (fdtd-2d, jacobi-2d-imper), and one execution time regression
(trmm).  Both regressions arise due to additional optimizations that have been
enabled by this patch. They can be addressed in subsequent commits.

http://reviews.llvm.org/D6369

llvm-svn: 222754
2014-11-25 10:51:12 +00:00
..
2012-03-16-Crash-because-of-unsigned-in-scev.ll Fix tests with broken datalayout strings. 2012-11-28 13:30:31 +00:00
20111108-Parameter-not-detected.ll test/ScopInfo: Remove %defaultOpts and list passes explicitly 2014-06-25 06:38:18 +00:00
Alias-0.ll [RTC] Runtime Alias Checks for the ISL backend 2014-09-18 11:17:17 +00:00
Alias-1.ll [RTC] Runtime Alias Checks for the ISL backend 2014-09-18 11:17:17 +00:00
Alias-2.ll [RTC] Runtime Alias Checks for the ISL backend 2014-09-18 11:17:17 +00:00
Alias-3.ll [RTC] Runtime Alias Checks for the ISL backend 2014-09-18 11:17:17 +00:00
Alias-4.ll [RTC] Runtime Alias Checks for the ISL backend 2014-09-18 11:17:17 +00:00
aliasing_conditional_alias_groups_1.ll [RTC] Use the domain to split alias groups. 2014-10-01 12:42:37 +00:00
aliasing_conditional_alias_groups_2.ll [RTC] Use the domain to split alias groups. 2014-10-01 12:42:37 +00:00
aliasing_dead_access.ll [Fix] Dead statements should not confuse the RTC generation 2014-10-06 17:43:00 +00:00
aliasing_many_parameters_not_all_involved.ll [RTC] Bail if too many parameters are involved in a RTC access. 2014-09-27 11:02:39 +00:00
aliasing_multiple_alias_groups.ll [RTC] Split alias groups according to read only base addresses 2014-10-01 12:40:46 +00:00
assume_gep_bounds.ll Assume GetElementPtr offsets to be inbounds 2014-11-25 10:51:12 +00:00
assume_gep_bounds_2.ll Assume GetElementPtr offsets to be inbounds 2014-11-25 10:51:12 +00:00
bug_2010_10_22.ll Remove executable bit on test files 2014-09-12 09:07:50 +00:00
bug_2011_1_5.ll Remove executable bit on test files 2014-09-12 09:07:50 +00:00
bug_scev_not_fully_eval.ll test/ScopInfo: Remove %defaultOpts and list passes explicitly 2014-06-25 06:38:18 +00:00
cond_constant_in_loop.ll ScopInfo: Correctly handle true/false conditions 2013-09-07 01:54:13 +00:00
cond_in_loop.ll test/ScopInfo: Remove %defaultOpts and list passes explicitly 2014-06-25 06:38:18 +00:00
constant_start_integer.ll only delinearize when the access function is not affine 2014-04-10 16:08:11 +00:00
delinearize-together-all-data-refs.ll Adjust another test case to not access out of bounds 2014-06-04 19:41:47 +00:00
independent-blocks-never-stop-on-big-scop.ll Always pipe in test files 2014-08-30 09:15:04 +00:00
integers.ll Correctly convert APInt to gmp values 2013-06-14 16:23:38 +00:00
isl_aff_out_of_bounds.ll Always pipe in test files 2014-08-30 09:15:04 +00:00
loop_affine_bound_0.ll Introduce reduction types 2014-07-01 20:52:51 +00:00
loop_affine_bound_1.ll Introduce reduction types 2014-07-01 20:52:51 +00:00
loop_affine_bound_2.ll Introduce reduction types 2014-07-01 20:52:51 +00:00
loop_carry.ll test/ScopInfo: Remove %defaultOpts and list passes explicitly 2014-06-25 06:38:18 +00:00
multi-scop.ll Change the RegionSet type to a SetVector 2014-10-22 20:39:07 +00:00
multidim_2d-diagonal-matrix.ll Derive run-time conditions for delinearization 2014-07-02 17:47:48 +00:00
multidim_2d_outer_parametric_offset.ll Do allow negative offsets in the outermost array dimension 2014-08-03 21:07:30 +00:00
multidim_2d_parametric_array_static_loop_bounds.ll Derive run-time conditions for delinearization 2014-07-02 17:47:48 +00:00
multidim_3d_parametric_array_static_loop_bounds.ll Derive run-time conditions for delinearization 2014-07-02 17:47:48 +00:00
multidim_ivs_and_integer_offsets_3d.ll Derive run-time conditions for delinearization 2014-07-02 17:47:48 +00:00
multidim_ivs_and_parameteric_offsets_3d.ll Do allow negative offsets in the outermost array dimension 2014-08-03 21:07:30 +00:00
multidim_nested_start_integer.ll Derive run-time conditions for delinearization 2014-07-02 17:47:48 +00:00
multidim_nested_start_share_parameter.ll Derive run-time conditions for delinearization 2014-07-02 17:47:48 +00:00
multidim_only_ivs_2d.ll Derive run-time conditions for delinearization 2014-07-02 17:47:48 +00:00
multidim_only_ivs_3d.ll Derive run-time conditions for delinearization 2014-07-02 17:47:48 +00:00
multidim_only_ivs_3d_cast.ll Derive run-time conditions for delinearization 2014-07-02 17:47:48 +00:00
multidim_only_ivs_3d_reverse.ll Derive run-time conditions for delinearization 2014-07-02 17:47:48 +00:00
multidim_single_and_multidim_array.ll Delinearize _all_ accesses to a multi-dimensional array 2014-09-13 14:47:55 +00:00
non_affine_access.ll Improve test coverage for non-affine access functions 2014-09-12 09:07:56 +00:00
non_affine_parametric_loop.ll Revert "Added support for modulo expressions" 2014-08-16 09:08:55 +00:00
parameter_product.ll SCEVValidator: Correctly store 'k * p' as a parameter 2013-04-14 13:15:59 +00:00
phi_not_grouped_at_top.ll Remove executable bit on test files 2014-09-12 09:07:50 +00:00
phi_with_invoke_edge.ll Remove executable bit on test files 2014-09-12 09:07:50 +00:00
reduction_alternating_base.ll Revert "Added support for modulo expressions" 2014-08-16 09:08:55 +00:00
reduction_chain_partially_outside_the_scop.ll Change the printing of reduction types 2014-08-01 08:13:25 +00:00
reduction_disabled_multiplicative.ll Change the printing of reduction types 2014-08-01 08:13:25 +00:00
reduction_escaping_intermediate.ll Introduce reduction types 2014-07-01 20:52:51 +00:00
reduction_escaping_intermediate_2.ll Introduce reduction types 2014-07-01 20:52:51 +00:00
reduction_invalid_different_operators.ll Change the printing of reduction types 2014-08-01 08:13:25 +00:00
reduction_invalid_overlapping_accesses.ll Change the printing of reduction types 2014-08-01 08:13:25 +00:00
reduction_multiple_loops_array_sum.ll Change the printing of reduction types 2014-08-01 08:13:25 +00:00
reduction_multiple_loops_array_sum_1.ll Change the printing of reduction types 2014-08-01 08:13:25 +00:00
reduction_multiple_simple_binary.ll Change the printing of reduction types 2014-08-01 08:13:25 +00:00
reduction_non_overlapping_chains.ll Change the printing of reduction types 2014-08-01 08:13:25 +00:00
reduction_only_reduction_like_access.ll Change the printing of reduction types 2014-08-01 08:13:25 +00:00
reduction_simple_fp.ll Change the printing of reduction types 2014-08-01 08:13:25 +00:00
reduction_simple_w_constant.ll Change the printing of reduction types 2014-08-01 08:13:25 +00:00
reduction_simple_w_iv.ll Change the printing of reduction types 2014-08-01 08:13:25 +00:00
reduction_two_identical_reads.ll Change the printing of reduction types 2014-08-01 08:13:25 +00:00
run-time-check-many-parameters.ll [RTC] Bail if too many parameters are involved in a RTC access. 2014-09-27 11:02:39 +00:00
run-time-check-read-only-arrays.ll [RTC] Split alias groups according to read only base addresses 2014-10-01 12:40:46 +00:00
scalar.ll ScopInfo: Scalar accesses are zero dimensional 2014-04-10 08:38:02 +00:00
simple_loop_1.ll Derive run-time conditions for delinearization 2014-07-02 17:47:48 +00:00
simple_nonaffine_loop_not.ll test/ScopInfo: Remove %defaultOpts and list passes explicitly 2014-06-25 06:38:18 +00:00
smax.ll ScopValidator: smax expressions are no parameters 2013-12-09 21:51:46 +00:00
undef_in_cond.ll test/ScopInfo: Remove %defaultOpts and list passes explicitly 2014-06-25 06:38:18 +00:00