[PATCH] D146845: [FPEnv] [WIP] Verify strictfp attribute correctness, first part, 2023 edition
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 24 13:13:38 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/IR/Verifier.cpp:3346
+ Check(CallHasStrictFP || CalledFHasStrictFP,
+ "Strictfp functions and their contained calls and invokes must "
+ "match in use of attribute strictfp!",
----------------
lowercase strictfp to match the name
================
Comment at: llvm/lib/IR/Verifier.cpp:3322-3325
+ Function *CalledF = Call.getCalledFunction();
+ bool ContainingFHasStrictFP = ContainingF->hasFnAttribute(Attribute::StrictFP);
+ AttributeSet CallAttrs = Attrs.getFnAttrs();
+ bool CallHasStrictFP = CallAttrs.hasAttribute(Attribute::StrictFP);
----------------
arsenm wrote:
> Should go through the CallBase queries? getCalledFunction doesn't work for aliases and indirect calls
Still should just use the CallBase queries to avoid doing the attribute set logic yourself
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146845/new/
https://reviews.llvm.org/D146845
More information about the llvm-commits
mailing list