[FPEnv] Teach the IRBuilder about correct use of the strictfp attribute.
authorKevin P. Neal <kevin.neal@sas.com>
Tue, 22 Oct 2019 17:07:15 +0000 (13:07 -0400)
committerKevin P. Neal <kevin.neal@sas.com>
Fri, 25 Oct 2019 16:57:52 +0000 (12:57 -0400)
commitde79836312e02b3b4a6d322ced971afee6d4ba4d
tree1df145696d7bb1b28411271ef29938de584f5482
parenta153233caf6f789a825b0d66342af20042b702f1
[FPEnv] Teach the IRBuilder about correct use of the strictfp attribute.

The IRBuilder needs to add the strictfp attribute to function
definitions and calls when constrained floating point is enabled.

Since so far all front ends have had to do is flip the constrained
switch, I've made this patch always add the required attributes
when said constrained switch is enabled. This continues to keep
changes to front ends minimal.

Differential Revision: D69312
llvm/include/llvm/IR/IRBuilder.h
llvm/unittests/IR/IRBuilderTest.cpp