AMDGPU: Stop setting attributes based on TargetOptions
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 5 Dec 2019 09:45:32 +0000 (15:15 +0530)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 27 Mar 2020 20:13:43 +0000 (13:13 -0700)
commit348735b723048411167b2244ebf5e2cd19bd869b
tree96a30a32a56c1cc1af1f7305101d03c6198abeb3
parent470e82cd06062a3fc3c142782b4d46d711b7c19c
AMDGPU: Stop setting attributes based on TargetOptions

Having arbitrary passes looking at the TargetOptions is pretty
messy. This was also disregarding if a function already had an
explicit attribute setting on it. opt/llc now add the attributes to
functions that don't specify the attribute. clang and lld do not call
the function to do this, which they maybe should.

This was also treating unsafe-fp-math as implying the others, and
setting the other attributes based on it. This is not done anywhere
else, and I'm not sure is correct based on the current description of
the option bit.

Effectively reverts 1d8cf2be89087a2babc1dc38b16040fad0a555e2
llvm/lib/Target/AMDGPU/AMDGPU.h
llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
llvm/test/CodeGen/AMDGPU/inline-attr.ll