This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL][AMDGPU] Add support for -cl-denorms-are-zero
ClosedPublic

Authored by yaxunl on Jul 26 2016, 9:12 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

yaxunl updated this revision to Diff 65533.Jul 26 2016, 9:12 AM
yaxunl retitled this revision from to [OpenCL][AMDGPU] Add support for -cl-denorms-are-zero.
yaxunl updated this object.
yaxunl added a subscriber: cfe-commits.
Anastasia accepted this revision.Aug 5 2016, 10:48 AM
Anastasia edited edge metadata.

LGTM!

This revision is now accepted and ready to land.Aug 5 2016, 10:48 AM
This revision was automatically updated to reflect the committed changes.