Pass log/exp/pow transcendentals through to targets that support them.

Currently, this is the generic targets.
This commit is contained in:
Matt Pharr
2012-05-03 13:46:56 -07:00
parent 7d7e99a92c
commit 0c1b206185
7 changed files with 172 additions and 8 deletions

View File

@@ -1333,6 +1333,11 @@ Module::execPreprocessor(const char* infilename, llvm::raw_string_ostream* ostre
else
opts.addMacroDef("ISPC_POINTER_SIZE=64");
if (g->target.hasHalf)
opts.addMacroDef("ISPC_TARGET_HAS_HALF");
if (g->target.hasTranscendentals)
opts.addMacroDef("ISPC_TARGET_HAS_TRANSCENDENTALS");
opts.addMacroDef("ISPC_MAJOR_VERSION=1");
opts.addMacroDef("ISPC_MINOR_VERSION=2");