Implement inlining of strictfp functions
authorSerge Pavlov <sepavloff@gmail.com>
Fri, 1 Nov 2019 13:49:35 +0000 (20:49 +0700)
committerSerge Pavlov <sepavloff@gmail.com>
Thu, 31 Mar 2022 12:15:52 +0000 (19:15 +0700)
commit47b3b76825dc89d4ee37408f26b458f61f86fbf5
tree5e6584bf65150bfeea7a45d09fb485633d3327eb
parentb4417075dc1cbfac0a3f777850ba77c031d7db3c
Implement inlining of strictfp functions

According to the current design, if a floating point operation is
represented by a constrained intrinsic somewhere in a function, all
floating point operations in the function must be represented by
constrained intrinsics. It imposes additional requirements to inlining
mechanism. If non-strictfp function is inlined into strictfp function,
all ordinary FP operations must be replaced with their constrained
counterparts.

Inlining strictfp function into non-strictfp is not implemented as it
would require replacement of all FP operations in the host function,
which now is undesirable due to expected performance loss.

Differential Revision: https://reviews.llvm.org/D69798
llvm/lib/Transforms/Utils/CloneFunction.cpp
llvm/lib/Transforms/Utils/InlineFunction.cpp
llvm/test/Transforms/CodeExtractor/PartialInlineAttributes.ll
llvm/test/Transforms/Inline/inline-strictfp.ll [new file with mode: 0644]