[NVPTX] Read __CUDA_FTZ from module flags in NVVMReflect.
authorJustin Lebar <jlebar@google.com>
Fri, 1 Apr 2016 01:09:07 +0000 (01:09 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 1 Apr 2016 01:09:07 +0000 (01:09 +0000)
commitefcc81cbb4852faec3c0deb20e35225244c67fcb
tree523f824d063561e4417d931369b2bc7454304300
parent645c3014a12cc24b75556d93db2ecfa4b99f8635
[NVPTX] Read __CUDA_FTZ from module flags in NVVMReflect.

Summary:
Previously the NVVMReflect pass would read its configuration from
command-line flags or a static configuration given to the pass at
instantiation time.

This doesn't quite work for clang's use-case.  It needs to pass a value
for __CUDA_FTZ down on a per-module basis.  We use a module flag for
this, so the NVVMReflect pass needs to be updated to read said flag.

Reviewers: tra, rnk

Subscribers: cfe-commits, jholewinski

Differential Revision: http://reviews.llvm.org/D18672

llvm-svn: 265090
llvm/lib/Target/NVPTX/NVVMReflect.cpp
llvm/test/CodeGen/NVPTX/nvvm-reflect-module-flag.ll [new file with mode: 0644]