I'd like to try out the
nvptx target, but I can't figure out how to build ISPC with NVPTX enabled. I pulled down the latest version of ISPC from GitHub (
9d9e46b8), installed the patched LLVM using the alloy.py script, and built with
NVPTX_ENABLED=1. I always wind up with errors like the following:
opt.cpp:817:27: error: no member named 'createTypeBasedAliasAnalysisPass' in
namespace 'llvm'; did you mean 'createTypeBasedAAWrapperPass'?
optPM.add(llvm::createTypeBasedAliasAnalysisPass());
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
createTypeBasedAAWrapperPass
/tmp/llvm-5.0.0-ispc-patched/bin-5.0/include/llvm/Analysis/TypeBasedAliasAnalysis.h:83:16: note:
'createTypeBasedAAWrapperPass' declared here
ImmutablePass *createTypeBasedAAWrapperPass();
opt.cpp:818:27: error: no member named 'createBasicAliasAnalysisPass' in
namespace 'llvm'; did you mean 'createCostModelAnalysisPass'?
optPM.add(llvm::createBasicAliasAnalysisPass());
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
createCostModelAnalysisPass
/tmp/llvm-5.0.0-ispc-patched/bin-5.0/include/llvm/Analysis/Passes.h:53:17: note:
'createCostModelAnalysisPass' declared here
FunctionPass *createCostModelAnalysisPass();
and a few more along those lines. I tried
- installing LLVM/Clang versions 3.8.1 and 5.0.0 and using those, and
- compiling with CXX set to either clang++ (above versions) or g++ (v6.3.0)
in all four combinations. (This is on an Ubuntu 17.04 system.) In all cases, I added the patched LLVM/Clang's bin-x.y/bin directory to the start of my PATH, pointed ISPC_HOME to the top-level ISPC directory, and pointed LLVM_HOME to the top level of the patched LLVM/Clang directory.
Without NVPTX_ENABLED=1, ISPC builds fine, although I did have to specify -D_GLIBCXX_USE_CXX11_ABI=1 to make the linker happy.
Any idea what the problem might be?
Thanks,
— Scott
P.S. I wasn't sure if build questions belong in the Users forum or the Developers forum. I guessed the latter, but please let me know if I picked the wrong one.