[PATCH] D38325: [AMDGPU] Set fast-math flags on functions given the options

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 11:37:32 PDT 2017


rampitec created this revision.
Herald added subscribers: eraman, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl.

We have a single library build without relaxation options.
When inlined library functions remove fast math attributes
from the functions they are integrated into.

This patch sets relaxation attributes on the functions after
linking provided corresponding relaxation options are given.
Math instructions inside the inlined functions remain to have
no fast flags, but inlining does not prevent fast math
transformations of a surrounding caller code anymore.


https://reviews.llvm.org/D38325

Files:
  lib/Target/AMDGPU/AMDGPU.h
  lib/Target/AMDGPU/AMDGPULibCalls.cpp
  lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  test/CodeGen/AMDGPU/inline-attr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38325.116851.patch
Type: text/x-patch
Size: 5896 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170927/c9be2448/attachment.bin>


More information about the llvm-commits mailing list