[PATCH] D22815: [OpenCL][AMDGPU] Add support for -cl-denorms-are-zero

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 26 09:12:37 PDT 2016


yaxunl created this revision.
yaxunl added reviewers: tstellarAMD, arsenm, nhaustov, Anastasia, rsmith.
yaxunl added a subscriber: cfe-commits.
Herald added a subscriber: kzhuravl.

Adjust target features for amdgcn target when -cl-denorms-are-zero is set.

Denormal support is controlled by feature strings fp32-denormals fp64-denormals in amdgcn target. If -cl-denorms-are-zero is not set and the command line does not set fp32/64-denormals feature string, +fp32-denormals +fp64-denormals will be on for GPU's supporting them.

A new virtual function `virtual void TargetInfo::adjustTargetOptions(const CodeGenOptions &CGOpts,                                    TargetOptions &TargetOpts) const` is introduced to allow adjusting target option by codegen option. 



https://reviews.llvm.org/D22815

Files:
  include/clang/Basic/TargetInfo.h
  include/clang/Frontend/CodeGenOptions.def
  lib/Basic/Targets.cpp
  lib/Frontend/CompilerInstance.cpp
  lib/Frontend/CompilerInvocation.cpp
  test/CodeGenOpenCL/denorms-are-zero.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22815.65533.patch
Type: text/x-patch
Size: 6594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160726/925b79bd/attachment.bin>


More information about the cfe-commits mailing list