Skip to content

Commit

Permalink
Merge branch 'p4a-validation' into p4a-packages
Browse files Browse the repository at this point in the history
* p4a-validation:
  add some test case for ICM with declaration statement inside the loop
  modify placement of affectation of indices
  update vc check
  Semantics-New: for08 is no longer a but, for09 is analyzed but not precisely; same for update01, declared as a bug because of the lack of accuracy in the analysis in some code due to Nelson Lossing
  comment execution of dot to generate png
  new result permitted by improve cumulated_in_effect, pips:r22288
  add tpips file to handle __bswap_xx functions added by #include<stdlib.h>
  correct test case Effects/Live_Paths.sub/for03.c, to not access a negative cell of an array
  Semantics-New/for08.c: bug submitted by Nelson
  Transformations/Unroll.sub: derived entities now supported in unrolling (unroll20 and 21), but not their initializations (unroll22 and 23)
  Transformations/Unroll.sub: unroll19 no longer a bug; unroll20 and 21: new bugs dur to bad handling of struct declarations
  Transformations/Unroll.sub/unroll18,c: dependent type is detected and the loop is not unrolled
  Transformations/Unroll.sub/unroll18,c: dependent type is detected and the loop is not unrolled
  Transformations/Unroll.sub: perform renaming on typedef types
  Transformations/Flatten_code.sub: add cases requiring no renaming + updates for enum01, struct01 and union01
  Transformations/Flatten_code: vla01 added to check detection of variable length arrays
  Transformations/Flatten_code: enum01 and 02 added
  C_syntax/decl48: a typedef was not displayed in the symbol table
  Transformations/Faltten_code.sub: union01 and 02 added, better results for most recent cases; struct01.bug is more a feature than a bug...
  Transformations/Faltten_code.sub: struct01 and struct02 added as bugs; struct01 could be called a feature because the resulting code could still be compiled
  Transformations/Flatten_code.sub: typedef01 is no longer a bug (revision 22270); typedef02 is a new bug...
  add flatten code issue with dependent type
  flatten code issue for typedef
  modify Rice/for06.tpips, to generate dependence graph and not usedefchain (2 .png are create after the execution of the tpips in the result folder)
  Transformations/Unroll: unroll18 and 19; bugs with unrolling; similar to unroll16 and 17, but with a dependent type
  Transformations/Unroll: unroll16 and 17 to show bug(s) when typedef statements are unrolled; it would be safer to perform unrolling by adding an extra-level of braces and then by applying other passes to remove the braces; the current unroll passes are trying to do too much and do not do it well; this is linked to the paper prepared by Nelson and Pierre about source-to-source transformations in C
  Semantics-New: for07, bug found by Nelson Lossing; no core dump any more, but wrong result for loop distribution nevertheless; this new bug is for Nelson...
  add new exemple for that use DISTRIBUTER
  add another dependant_type example
  add a reduction + return value for exemple on dependant type
  add example for live path with dependant type
  Improve Transformations/feron test case.
  add a dead code elimination pass to Expressions/fs06
  Update Transformations/Scalarization.sub/sven04 output.
  Remove fs06.bug, add fs06.result/test
  add test case for MEMORY_EFFECTS_ONLY property in conjunction with forward substitution
  Fix MEMORY_EFFECTS_ONLY FALSE preventing partial evaluation for feron example
  Semantics-New: masse_vmcai_2014_06 test cases added for a bug with transformer lists
  Preprocessor: update for bug cominc
  Test case for ticket #748
  tpips and result for analyse of regionout01
  add an example for automatic distrib that can't be good for region out
  add some more examples for automatic generation of distributed code with what we want as result
  add some more examples for futur automatic generation of code distributed (for the second phase)
  add some example for futur automatic generation of code distributed
  update validation with modifiation done by r22214
  Semantics: give up some information in the transformers of while loops
  Semantics: give up some information in the transformers of while loops
  Semantics-New: give up some information in the transformers of while loops
  validation/Regions: comments updated for Old.sub/jacobi02 because of change in outlining
  validation/Pointers: two bugs related to (modified?) handling of call sites
  validation/Crough: implict output formatting replaced by explicit formatting; Fortran double precision or real*8 seems to be implented as real*4 both by f77 and gfortran...
  valildation/Preprocessor: improved line numbering, empty lines better preserved
  add an example of difference between old and new controlizer
  pragma: rename dir to add .result
  add examples with pragma
  Semantics-New: a few new test cases for Vivien
  flip-flop01.later added temporarily
  Semantics-New: Dilig test case from OOPSLA 2013 added
  validation: new comments linked to outlining
  Semantics-New/flip-flop02: the result expected for flip-flop01 is obtained with an external while loop; the issue seems to be linked to the analysis of DO loops vs the analysis of WHILE loops; all loops are assumed analyzed in a unified way, but DO loops are still processed with an older function that seemed to work well-enough to avoid a validation nightmare in case it were upgraded with the unified algorithm; also, flip-flop03 is added
  validation/Outlining: three bug files added for a unique underlying bug. See Ticket 746
  Task_parallelization/Instrumentation.sub: the validation is a joke; only one test case is defined; and a bug  is detected by gcc...; also we have to  think about rating the different passes automagically in pipsmake-rc.tex with the numbers of test cases and bugs...
  Task_parallelization/SPMDization.sub/communications01: the test file was empty; I have no idea if the out file is correct or not; this should be dealt with by Dounia...
  Gpu/matmul04: bug and internal error in kernel_load_store pass
  Demo/SC95.sub: improved accuracy due to a better approximation of a square by the semantics pass9es); the accuracy would improved even more if transformers were computed in context
  Effects/Old.sub/dereferencing03: I validate the new result because it is correct; the old result was correct too because it was an over-approximation; the source code is bugged wrt the standard; the execution should core dump; I do not know if the semantics of cumulated pointer effects is defined precisely enough in case of core dumps...; maybe we should not use too many buggy pieces of code in the validation; errors with pointers are not exploited by Pass control_simplification
  AcceleratorUtils/Isolate_statement.sub/isolate14: new bug declared; Serge might have forgotten a sort before code generation
  Scalopes/wcdma_original.bug: nobody to perform maintenance; not a recent bug on April 4th, 2014
  Fix a typo in Semantics-New/README


Former-commit-id: 327e1404e9488e977c0e67b0689fe66ca94b6bb5
  • Loading branch information
keryell committed Dec 6, 2014
2 parents 6baa384 + 338ed8c commit 43d568c
Show file tree
Hide file tree
Showing 310 changed files with 15,824 additions and 1,205 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FI: it looks to me like a non-deterministic code generation. A list of variables or a hash-code based set is probably not sorted before code generation.
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ void get_data(char filename[])
}
void kernel1(float_t save[64][64], float_t space[64][64], int i)
{
//PIPS generated variable
// Declared by Pass Outlining
int j;
for(j = 1; j <= 62; j += 1)
save[i][j] = 0.25*(space[i-1][j]+space[i+1][j]+space[i][j-1]+space[i][j+1]);
}
void launch_kernel1(float_t save[64][64], float_t space[64][64])
{
//PIPS generated variable
// Declared by Pass Outlining
int i;

/* Use 2 array in flip-flop to have dataparallel forall semantics. I
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ l99999: parteeeeeez(n, i, result, src0, src1);
}
void parteeeeeez(int n, unsigned int i, short result[n][n], short src0[n][n], short src1[n][n])
{
//PIPS generated variable
// Declared by Pass Outlining
unsigned int j;
l99999:
for(j = 0; j <= n-1; j += 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ kernel: run_kernel(a, b, c);

void run_kernel(int a[100], int b[100], int c[100])
{
//PIPS generated variable
// Declared by Pass Outlining
int i;

// <a[PHI1]-R-MAY-{0<=PHI1, PHI1<=99}>
Expand Down
4 changes: 4 additions & 0 deletions packages/PIPS/validation/C_syntax/decl48.result/test
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Derived entities:

Variable "decl48!flat_color_z_triangle:0`1`#_PIPS_STRUCT_1" kind = struct

Typedef entities:

Typedef "decl48!flat_color_z_triangle:0`1`$EdgeT" with type "variable" "struct {int v0;}"

Layouts for memory areas:

Layout for memory area "TOP-LEVEL:*STATIC*" of size 0:
Expand Down
11 changes: 11 additions & 0 deletions packages/PIPS/validation/Control/for03.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


void for03()
{
int c;
float a[10];

for(c = 0; c<10; c++)
a[c]=0.;

}
45 changes: 45 additions & 0 deletions packages/PIPS/validation/Control/for03.result/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

Parsed code

void for03()
{
// BEGIN BLOCK
{{
int c;
float a[10];

for (c = 0;c<10;c++)
a[c] = 0.;
}}
// END BLOCK
}

Old controlized code

void for03()
{
// BEGIN BLOCK
{{
int c;
float a[10];

for(c = 0; c <= 9; c += 1)
a[c] = 0.;
}}
// END BLOCK
}

New controlized code

void for03()
{
// BEGIN BLOCK
{{
int c;
float a[10];

for(c = 0; c <= 9; c += 1)
a[c] = 0.;
}}
// END BLOCK
}
35 changes: 35 additions & 0 deletions packages/PIPS/validation/Control/for03.tpips
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
setenv WSPACE=for03
delete $WSPACE
create $WSPACE $WSPACE.c

setproperty ABORT_ON_USER_ERROR TRUE

setproperty PRETTYPRINT_BLOCKS TRUE
setproperty PRETTYPRINT_ALL_C_BLOCKS TRUE

echo
echo Parsed code
echo

display PARSED_PRINTED_FILE

echo
echo Old controlized code
echo

display PRINTED_FILE


activate NEW_CONTROLIZER

#setenv CONTROL_DEBUG_LEVEL 9

echo
echo New controlized code
echo

display PRINTED_FILE

close
delete $WSPACE
quit
4 changes: 1 addition & 3 deletions packages/PIPS/validation/Control/for_loop03.result/test
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ int main()
{
int i;

for(i = 0; i <= 9; i += 1) {

for(i = 0; i <= 9; i += 1)
i;
}
}
4 changes: 1 addition & 3 deletions packages/PIPS/validation/Control/for_loop04.result/test
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ int main()
{
int i;

for(i = 0; i <= 9; i += 1) {

for(i = 0; i <= 9; i += 1)
printf("%d\n", i);
}
}
4 changes: 1 addition & 3 deletions packages/PIPS/validation/Control/for_loop05.result/test
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ int main()
{
int i;

for(i = 0; i <= 9; i += 1) {

for(i = 0; i <= 9; i += 1)
printf("%d\n", i);
}
}
2 changes: 0 additions & 2 deletions packages/PIPS/validation/Control/jpeg-6a.result/test
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ int decode_mcu()
{
// BEGIN BLOCK
int blkn;
// BEGIN BLOCK

for(blkn = 0; blkn <= 63; blkn += 1) {
//: BEGIN UNSTRUCTURED
Expand All @@ -27,7 +26,6 @@ l99999: ;

//: END UNSTRUCTURED
}
// END BLOCK
return 1;
// END BLOCK
}
4 changes: 4 additions & 0 deletions packages/PIPS/validation/Control/pragma.sub/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# $Id$

PARALLEL_VALIDATION = 1
include ../../validate.mk
14 changes: 14 additions & 0 deletions packages/PIPS/validation/Control/pragma.sub/pragma03.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
int main() {
int i;

#pragma toto
{
i=0;
i++;
}
#pragma X
i=0;

return i;
}

32 changes: 32 additions & 0 deletions packages/PIPS/validation/Control/pragma.sub/pragma03.result/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

Parsed code

int main()
{
int i;
#pragma toto
{
i = 0;
i++;
}
#pragma X
i = 0;

return i;
}

Controlized code

int main()
{
int i;
#pragma toto
{
i = 0;
i++;
}
#pragma X
i = 0;

return i;
}
25 changes: 25 additions & 0 deletions packages/PIPS/validation/Control/pragma.sub/pragma03.tpips
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
setenv WSPACE=pragma03
delete $WSPACE
create $WSPACE $WSPACE.c

setproperty ABORT_ON_USER_ERROR TRUE

#activate C_PARSER
#activate C_SYMBOL_TABLE
setproperty PRETTYPRINT_LANGUAGE "C"

echo
echo Parsed code
echo
display PARSED_PRINTED_FILE[main]

echo
echo Controlized code
echo
#setenv CONTROL_DEBUG_LEVEL=8
activate NEW_CONTROLIZER
display PRINTED_FILE[main]

close
delete $WSPACE
quit
12 changes: 12 additions & 0 deletions packages/PIPS/validation/Control/pragma.sub/pragma04.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
int main() {
int i;

#pragma toto
{
i=0;
}
#pragma X
i=0;

return i;
}
30 changes: 30 additions & 0 deletions packages/PIPS/validation/Control/pragma.sub/pragma04.result/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

Parsed code

int main()
{
int i;
#pragma toto
{
i = 0;
}
#pragma X
i = 0;

return i;
}

Controlized code

int main()
{
int i;
#pragma toto
{
i = 0;
}
#pragma X
i = 0;

return i;
}
25 changes: 25 additions & 0 deletions packages/PIPS/validation/Control/pragma.sub/pragma04.tpips
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
setenv WSPACE=pragma04
delete $WSPACE
create $WSPACE $WSPACE.c

setproperty ABORT_ON_USER_ERROR TRUE

#activate C_PARSER
#activate C_SYMBOL_TABLE
setproperty PRETTYPRINT_LANGUAGE "C"

echo
echo Parsed code
echo
display PARSED_PRINTED_FILE[main]

echo
echo Controlized code
echo
#setenv CONTROL_DEBUG_LEVEL=8
activate NEW_CONTROLIZER
display PRINTED_FILE[main]

close
delete $WSPACE
quit
14 changes: 14 additions & 0 deletions packages/PIPS/validation/Control/pragma.sub/pragma05.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
int main() {
int i;

#pragma toto
{
int i;
i=0;
i++;
}
#pragma X
i=0;

return i;
}
34 changes: 34 additions & 0 deletions packages/PIPS/validation/Control/pragma.sub/pragma05.result/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

Parsed code

int main()
{
int i;
#pragma toto
{
int i;
i = 0;
i++;
}
#pragma X
i = 0;

return i;
}

Controlized code

int main()
{
int i;
#pragma toto
{
int i;
i = 0;
i++;
}
#pragma X
i = 0;

return i;
}
Loading

0 comments on commit 43d568c

Please sign in to comment.