llvm-project/polly/test/JSONExporter/ImportArrays/ia___%bb9---%bb26.jscop.tra...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.2 KiB
Plaintext
Raw Normal View History

[JSONImporter] misses checks whether the data it imports makes sense. Without this patch, the JSONImporter did not verify if the data it loads were correct or not (Bug llvm.org/PR32543). I add some checks in the JSONImporter class and some test cases. Here are the checks (and test cases) I added : JSONImporter::importContext - The "context" key does not exist. - The context was not parsed successfully by ISL. - The isl_set has the wrong number of parameters. - The isl_set is not a parameter set. JSONImporter::importSchedule - The "statements" key does not exist. - There is not the right number of statement in the file. - The "schedule" key does not exist. - The schedule was not parsed successfully by ISL. JSONImporter::importAccesses - The "statements" key does not exist. - There is not the right number of statement in the file. - The "accesses" key does not exist. - There is not the right number of memory accesses in the file. - The "relation" key does not exist. - The memory access was not parsed successfully by ISL. JSONImporter::areArraysEqual - The "type" key does not exist. - The "sizes" key does not exist. - The "name" key does not exist. JSONImporter::importArrays /!\ Do not check if there is an key name "arrays" because it is not considered as an error. All checks are already in place or implemented in JSONImporter::areArraysEqual. Contributed-by: Nicolas Bonfante <nicolas.bonfante@insa-lyon.fr> Differential Revision: https://reviews.llvm.org/D32739 llvm-svn: 303759
2017-05-24 23:09:35 +08:00
{
"arrays" : [
{
"name" : "MemRef_B",
"sizes" : [ "*", "1024" ]
},
{
"name" : "MemRef_A",
"sizes" : [ "*", "1056" ],
"type" : "double"
},
{
"name" : "D",
"sizes" : [ "270336" ],
"type" : "double"
},
{
"name" : "E",
"sizes" : [ "270336", "200000" ],
"type" : "double"
},
{
"name" : "F",
"sizes" : [ "270336" ],
"type" : "i64"
}
],
"context" : "{ : }",
"name" : "%bb9---%bb26",
"statements" : [
{
"accesses" : [
{
"kind" : "read",
"relation" : "{ Stmt_bb12[i0, i1, i2] -> E[i2, i0] }"
},
{
"kind" : "read",
"relation" : "{ Stmt_bb12[i0, i1, i2] -> MemRef_beta[] }"
},
{
"kind" : "write",
"relation" : "{ Stmt_bb12[i0, i1, i2] -> MemRef_A[i0, i1] }"
}
],
"domain" : "{ Stmt_bb12[i0, i1, i2] : 0 <= i0 <= 1055 and 0 <= i1 <= 1055 and 0 <= i2 <= 1023 }",
"name" : "Stmt_bb12",
"schedule" : "{ Stmt_bb12[i0, i1, i2] -> [i0, i1, i2] }"
}
]
}