This is an archive of the discontinued LLVM Phabricator instance.

[FPEnv] Make the strictfp attribute rules stricter.
AbandonedPublic

Authored by kpn on Aug 11 2023, 4:09 PM.

Details

Summary

This is mostly a revert of D148138 but with a twist. I discovered when working on tests so I can land Verifier changes from D146845 that the rules as they are after D148138 don't work.

Specifically, if a non-strictfp function calls a strictfp function, and we look through to the function being called for the strictfp attribute, then D146845 will reject the compile because it thinks we are mixing strictfp and non-strictfp in the same function. By reverting to the rule that the strictfp attribute is required on every single call in a strictfp function we avoid the issue.

However, having duplicate information in every call to a constrained intrinsic doesn't seem worthwhile. So, I added the twist that calls to intrinsics with the strictfp attribute attached to the intrinsic don't need it again on the call instruction. This avoids duplicate information while solving the problem at the boundary between non-strictfp and strictfp code.

Diff Detail

Event Timeline

kpn created this revision.Aug 11 2023, 4:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2023, 4:09 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
kpn requested review of this revision.Aug 11 2023, 4:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2023, 4:09 PM
arsenm added inline comments.Aug 14 2023, 2:20 PM
llvm/docs/LangRef.rst
23761–23764

I don't understand why you're specifically mentioning call sites Attribute behavior is always union of call site and declaration, so this should apply to all calls

arsenm requested changes to this revision.Sep 12 2023, 8:35 AM

Weirdly phrased in a special case sort of way. Attributes are a union of callsite and declaration

This revision now requires changes to proceed.Sep 12 2023, 8:35 AM
kpn abandoned this revision.Sep 13 2023, 7:03 AM

With the revised D146845 now approved this change is no longer needed.