[PATCH] D33688: [Polly] Heap allocation for new arrays

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 07:52:23 PDT 2017


Meinersbur added a comment.

Once you extract the new ImportArrays test case (either create another review or ask Andreas to commit directly), IMHO this is ready to be committed as well.



================
Comment at: test/Isl/CodeGen/MemAccess/create_arrays_heap.ll:33-38
+; CODEGEN: %malloccall = tail call i8* @malloc(i64 2162688)
+; CODEGEN: %D = bitcast i8* %malloccall to double*
+; CODEGEN: %malloccall1 = tail call i8* @malloc(i64 432537600000)
+; CODEGEN: %E = bitcast i8* %malloccall1 to double*
+; CODEGEN: %malloccall2 = tail call i8* @malloc(i64 2162688)
+; CODEGEN: %F = bitcast i8* %malloccall2 to i64*
----------------
Since we had a discussion about this, could you also CHECK for the name of the basic block this is inserted to (such as
```
CODEGEN: polly.start:
```
)


================
Comment at: test/Isl/CodeGen/MemAccess/create_arrays_heap.ll:42-47
+; CODEGEN: %12 = bitcast double* %D to i8*
+; CODEGEN: tail call void @free(i8* %12)
+; CODEGEN: %13 = bitcast double* %E to i8*
+; CODEGEN: tail call void @free(i8* %13)
+; CODEGEN: %14 = bitcast i64* %F to i8*
+; CODEGEN: tail call void @free(i8* %14)
----------------
Here as well, e.g.,
```
CODEGEN: polly.exiting:
```



================
Comment at: test/JSONExporter/ImportArrays/create_arrays_heap___%for.cond1.preheader---%for.end18.jscop.transformed:15
+         "name" : "D",
+         "sizes" : [ "-270336" ],
+         "type" : "double",
----------------
Coul you clean-up the test case by only reducing the size (I think only this line is relevant. the others can be removed by also removing theit accesses in the .ll file)
Also, try to give it a more meaningful name (e.g. rename the function to "ImportArrays_Negative_size") and add the original, unmodified .jscop file as written by -export-jscop.


https://reviews.llvm.org/D33688





More information about the llvm-commits mailing list