[PATCH] D146845: [FPEnv] [WIP] Verify strictfp attribute correctness, first part, 2023 edition
Kevin P. Neal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 13:52:21 PDT 2023
kpn created this revision.
kpn added reviewers: craig.topper, andrew.w.kaylor, cameron.mcinally, arsenm, uweigand, kbarton.
Herald added a project: All.
kpn requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This is a rewrite of D68233 <https://reviews.llvm.org/D68233>. Enough of the patch has been rewritten in the two years that I think it makes sense to just open a new review. I've copied over the reviewers and subscribers, and arsenm had a blocking request on D68233 <https://reviews.llvm.org/D68233> that I've brought over here.
The strictfp attribute is now defined to require that function definitions be marked strictfp if they contain a strictfp call or a strictfp constrained intrinsic. This patch verifies that all function calls or called functions agree with their contained function about the strictfp attribute. It also enforces the attribute if a constrained fp intrinsic is used in a function.
Notably, the attribute is now allowed to be omitted from a call site if it is present on the declaration for the function being called. This is a change from the current Language Reference and the Langref should be changed in a subsequent patch if this change is accepted here.
This patch does _not_ require that all FP instructions in a function be strict if any of this is. That's a later patch.
Note that this patch _cannot_ yet go in the tree because quite a few tests break with this check in place. I'm working on fixing or getting those fixed, and having this patch visible is part of that.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146845
Files:
llvm/lib/IR/Verifier.cpp
llvm/test/Verifier/fp-intrinsics.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146845.508207.patch
Type: text/x-patch
Size: 4975 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230324/3c54fa46/attachment-0001.bin>
More information about the llvm-commits
mailing list