Set some fast math attributes in setFunctionAttributes
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 5 Dec 2019 09:37:27 +0000 (15:07 +0530)
committerMatt Arsenault <arsenm2@gmail.com>
Thu, 16 Jan 2020 03:23:18 +0000 (22:23 -0500)
commitc378e52cb9d1197bd828008ffdeaf3cebdca1506
tree23a2a72b852cd4d4ae0e1f8cea4c78f4b4afe631
parentb54a50f52e9427f250c192a8618b881732e5d7a4
Set some fast math attributes in setFunctionAttributes

This will provide a more consistent view to codegen for these
attributes. The current system is somewhat awkward, and the fields in
TargetOptions are reset based on the command line flag if the
attribute isn't set. By forcing these attributes with the flag, there
can never be an inconsistency in the behavior if code directly
inspects the attribute on the function without considering the command
line flags.
llvm/include/llvm/CodeGen/CommandFlags.inc
llvm/lib/Target/TargetMachine.cpp