OSDN Git Service

[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)
commit8c5dadb1d8340b8bc32c55dd0ace16ad622aa303
treee4c62ba4840f75614c5ccda2855ba3b392f747d9
parent4d24c4a646c7b4f9e519f7c18f8b392b32b4275f
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265090 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/NVPTX/NVVMReflect.cpp
test/CodeGen/NVPTX/nvvm-reflect-module-flag.ll [new file with mode: 0644]