[llvm-commits] [polly] r161239 - in /polly/trunk: ./ autoconf/ include/polly/ include/polly/CodeGen/ include/polly/Config/ lib/CodeGen/ test/ test/CodeGen/GPGPU/
Tobias Grosser
grosser at fim.uni-passau.de
Tue Aug 21 05:32:26 PDT 2012
On 08/21/2012 07:24 AM, Sebastian Pop wrote:
>> --- polly/trunk/autoconf/configure.ac (original)
>> +++ polly/trunk/autoconf/configure.ac Fri Aug 3 07:50:07 2012
>> @@ -120,7 +120,20 @@
>> AC_SUBST(scoplib_rpath)
>>
>> dnl Check if CUDA lib there
>> +dnl Disable the build of polly, even if it is checked out into tools/polly.
>> +AC_ARG_ENABLE(polly_gpu_codegen,
>> + AS_HELP_STRING([--enable-polly-gpu-codegen],
>> + [Enable GPU code generation in Polly(default is NO)]),,
>> + enableval=default)
>> +case "$enableval" in
>> + yes) AC_DEFINE([GPU_CODEGEN],[1], [Define if gpu codegen is enabled]) ;;
>> + no) AC_DEFINE([GPU_CODEGEN],[0], [Define if gpu codegen is enabled]) ;;
>> + default) AC_DEFINE([GPU_CODEGEN],[0], [Define if gpu codegen is enabled]) ;;
>
> In all cases, you define GPU_CODEGEN to either 0 or 1.
> (By the way, the string description is accurate: it always enables GPU
> codegen...
> see below...)
>
[...]
>> +//===----------------------------------------------------------------------===//
>> +#ifndef POLLY_CODEGEN_PTXGENERATOR_H
>> +#define POLLY_CODEGEN_PTXGENERATOR_H
>> +
>> +#include "polly/Config/config.h"
>> +
>> +#ifdef GPU_CODEGEN
>
> And here you test whether GPU_CODEGEN is defined, that is always true:
> it is either 0 or 1.
> However in this code you do not test whether it is 0 or 1.
> This breaks compiles of Polly with configure and when the rest of the
> PTX toolchain is not available.
Fix committed in r162275. Thanks for the analysis.
Tobi
P.S.: No need to cite the entire patch. ;-)
More information about the llvm-commits
mailing list