forked from OSchip/llvm-project
df8e140349
This patch removes the heuristic in - Polly :: lib/Support/ScopHelper.cpp The heuristic forces blocks that directly follow a loop header to not to be considered error blocks. It was introduced in r249611 with the following commit message: > This replaces the support for user defined error functions by a > heuristic that tries to determine if a call to a non-pure function > should be considered "an error". If so the block is assumed not to be > executed at runtime. While treating all non-pure function calls as > errors will allow a lot more regions to be analyzed, it will also > cause us to dismiss a lot again due to an infeasible runtime context. > This patch tries to limit that effect. A non-pure function call is > considered an error if it is executed only in conditionally with > regards to a cheap but simple heuristic. In the code below `CCK_Abort2()` would be considered as an error block, but not `CCK_Abort1()` due to this heuristic. ``` for (int i = 0; i < n; i+=1) { if (ErrorCondition1) CCK_Abort1(); // No __attribute__((noreturn)) if (ErrorCondition2) CCK_Abort2(); // No __attribute__((noreturn)) } ``` This does not seem useful. Checking error conditions in the beginning of some work is quite common. It causes a switch default-case to be not considered an error block in SPEC's cactuBSSN. The comment justifying the heuristic mentions a "load", which does not seem to be applicable here. It has been proposed to remove the heuristic. In addition, the patch fixes the following test cases: - Polly :: ScopDetect/mod_ref_read_pointer.ll - Polly :: ScopInfo/max-loop-depth.ll - Polly :: ScopInfo/mod_ref_access_pointee_arguments.ll - Polly :: ScopInfo/mod_ref_read_pointee_arguments.ll - Polly :: ScopInfo/mod_ref_read_pointer.ll - Polly :: ScopInfo/mod_ref_read_pointers.ll The test cases failed after removing the heuristic. Differential Revision: https://reviews.llvm.org/D45274 Contributed-by: Lorenzo Chelini <l.chelini@icloud.com> llvm-svn: 329548 |
||
---|---|---|
.. | ||
aliasing_parametric_simple_1.ll | ||
aliasing_parametric_simple_2.ll | ||
aliasing_simple_1.ll | ||
aliasing_simple_2.ll | ||
base_pointer.ll | ||
base_pointer_is_inst_inside_invariant_1___%for.i---%exit.jscop | ||
base_pointer_load_is_inst_inside_invariant_1___%for.i---%exit.jscop | ||
base_pointer_load_setNewAccessRelation.ll | ||
base_pointer_setNewAccessRelation.ll | ||
cross_loop_non_single_exit.ll | ||
cross_loop_non_single_exit_2.ll | ||
dependency_to_phi_node_outside_of_region.ll | ||
dot-scops.ll | ||
error-block-always-executed.ll | ||
error-block-referenced-from-scop.ll | ||
error-block-unreachable.ll | ||
expand-region-correctly-2.ll | ||
expand-region-correctly.ll | ||
ignore_func_flag_regex.ll | ||
index_from_unpredictable_loop.ll | ||
index_from_unpredictable_loop2.ll | ||
indvars.ll | ||
intrinsics_1.ll | ||
intrinsics_2.ll | ||
intrinsics_3.ll | ||
invalid-latch-conditions.ll | ||
invalidate_scalar_evolution.ll | ||
invariant-load-before-scop.ll | ||
keep_going_expansion.ll | ||
mod_ref_read_pointer.ll | ||
more-than-one-loop.ll | ||
multidim-with-undef-size.ll | ||
multidim.ll | ||
multidim_indirect_access.ll | ||
multidim_two_accesses_different_delinearization.ll | ||
nested_loop_single_exit.ll | ||
non-affine-conditional.ll | ||
non-affine-float-compare.ll | ||
non-affine-loop-condition-dependent-access.ll | ||
non-affine-loop-condition-dependent-access_2.ll | ||
non-affine-loop-condition-dependent-access_3.ll | ||
non-affine-loop.ll | ||
non-beneficial-loops-small-trip-count.ll | ||
non-constant-add-rec-start-expr.ll | ||
non-simple-memory-accesses.ll | ||
non_affine_loop_condition.ll | ||
only-one-affine-loop.ll | ||
only_func_flag.ll | ||
only_func_flag_regex.ll | ||
parametric-multiply-in-scev-2.ll | ||
parametric-multiply-in-scev.ll | ||
phi_with_multi_exiting_edges.ll | ||
profitability-large-basic-blocks.ll | ||
profitability-two-nested-loops.ll | ||
remove_all_children.ll | ||
report-scop-location.ll | ||
restrict-undef-size-scopdetect.ll | ||
run_time_alias_check.ll | ||
scev_remove_max.ll | ||
sequential_loops.ll | ||
simple_loop.ll | ||
simple_loop_non_single_entry.ll | ||
simple_loop_non_single_exit.ll | ||
simple_loop_non_single_exit_2.ll | ||
simple_loop_two_phi_nodes.ll | ||
simple_loop_with_param.ll | ||
simple_loop_with_param_2.ll | ||
simple_non_single_entry.ll | ||
skip_function_attribute.ll | ||
srem_with_parametric_divisor.ll | ||
statistics.ll | ||
switch-in-loop-patch.ll | ||
tlr_is_hoistable_load.ll |