GPGPU: Add dummy implementation for ast expression construction
authorTobias Grosser <tobias@grosser.es>
Thu, 14 Jul 2016 15:51:32 +0000 (15:51 +0000)
committerTobias Grosser <tobias@grosser.es>
Thu, 14 Jul 2016 15:51:32 +0000 (15:51 +0000)
commit60c60025701177df9c369af9195fba0067d4379e
tree6068d54dbdef06cf27b1fefad191218b4b9a6120
parent1b5cf6217e8e829bd6af02dad408d30f553897b5
GPGPU: Add dummy implementation for ast expression construction

Instead of calling to a pet function that does not return anything, we pass
our own dummy implementation to ppcg that always returns a nullptr. This
ensures that the list of ast expressions always contains a nullptr and we do
not accidentally free a random (uninitalized) pointer. This resolves the
last valgrind warning we see.

We provide an implementation for this function, when the generated AST
expressions can be used and consequently can be tested.

llvm-svn: 275435
polly/lib/CodeGen/PPCGCodeGeneration.cpp
polly/lib/External/ppcg/gpu.c
polly/lib/External/ppcg/gpu.h