[PATCH] D69798: Implement inlining of strictfp functions
Andy Kaylor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 11 15:50:34 PST 2019
andrew.w.kaylor added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/CloneFunction.cpp:312
+ if (HostFuncIsStrictFP) {
+ Intrinsic::ID CIID = getConstrainedIntrinsicID(OldInst);
+ if (CIID != Intrinsic::not_intrinsic) {
----------------
After further investigation, I think it is going to be necessary to attach the strictfp attribute to all callsites. In the call to cloneBlock() below, we're calling SimplifyInstruction after a call has been cloned but before it is inserted into a function. Consequently, if we don't attach the strictfp attribute to library calls, SimplifyInstruction may constant fold them away. That's not so bad for the case where we're inlining a no-strictfp function into a strictfp function, but for the case where both functions are strictfp it's a problem.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69798/new/
https://reviews.llvm.org/D69798
More information about the llvm-commits
mailing list