PIPS
|
As we create checks with stop error message who tell us there are bound violations for which array, on which dimension, which bound (lower or upper), the following typedef array_dimension_bound_test permits us to create a sequence of tests for each statement more easier. More...
Data Fields | |
list | arr |
list | dim |
list | bou |
list | exp |
As we create checks with stop error message who tell us there are bound violations for which array, on which dimension, which bound (lower or upper), the following typedef array_dimension_bound_test permits us to create a sequence of tests for each statement more easier.
BOTTOM-UP ARRAY BOUND CHECK VERSION
This program takes as input the current module, adds array range checks (lower and upper bound checks) to every statement that has one or more array accesses. The output is the module with those tests added.
Assumptions : there is no write effect on the array bound expression.
There was a test for write effect on bound here but I put it away (in effect_on_array_bound.c) because it takes time to calculate the effect but in fact this case is rare.
NN 20/03/2002: Attention: tests generated for array whose bounds are modified are not correct See Validation/ArrayBoundCheck/BU_Effect.f
Solution : reput the test effect_on_array_bound, instrument the code with SUBROUTINE EFFECT(A,N) REAL A(N) N_PIPS = N N = 2*N DO I =1,N IF (I. GT. N_PIPS .OR I. LT> 1) STOP A(I) = I ENNDO
Question : other analyses (regions,.. ) are correct ?
Version: change the structure of test: IF (I.LT.lower) THEN STOP "Bound violation ..." IF (I.GT.upper) THEN STOP "Bound violation ..." Add statistics Version : Modify the Implied-DO process
The functions bottom_up_abc_call, bottom_up_abc_reference, bottom_up_abc_expression return results of type array_dimension_bound_test
Definition at line 95 of file array_bound_check_bottom_up.c.
list array_dimension_bound_test::arr |
Definition at line 97 of file array_bound_check_bottom_up.c.
Referenced by add_array_dimension_bound_test(), make_array_dimension_bound_test(), make_bottom_up_abc_tests(), and make_true_array_dimension_bound_test().
list array_dimension_bound_test::bou |
Definition at line 99 of file array_bound_check_bottom_up.c.
Referenced by add_array_dimension_bound_test(), make_array_dimension_bound_test(), make_bottom_up_abc_tests(), and make_true_array_dimension_bound_test().
list array_dimension_bound_test::dim |
Definition at line 98 of file array_bound_check_bottom_up.c.
Referenced by add_array_dimension_bound_test(), make_array_dimension_bound_test(), make_bottom_up_abc_tests(), and make_true_array_dimension_bound_test().
list array_dimension_bound_test::exp |
Definition at line 100 of file array_bound_check_bottom_up.c.
Referenced by add_array_dimension_bound_test(), make_array_dimension_bound_test(), make_bottom_up_abc_tests(), and make_true_array_dimension_bound_test().