[PATCH] D99080: Normalize usage of StrBoolAttr
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 24 10:12:30 PDT 2021
nikic added a comment.
In D99080#2647980 <https://reviews.llvm.org/D99080#2647980>, @serge-sans-paille wrote:
> If I compiler this code with `-enable-unsafe-fp-math` from `llc`, it's equivalent to having the `"unsafe-fp-math"`, and that's fine too. But then with current design, there's no way to *force* that function into safe mode, whatever the CLI passed to `llc`.
>
> Stated otherwise, having three states for a str bool attribute indeed has one quality: the attribute can be in the *unset* state, where CLI argument can prevail.
My view on this is that all relevant information must be encoded in the IR (be it via FMF flags, attributes or module flags) for LTO reasons. opt/llc flags can only exist as a testing convenience, and it's okay if they force behavior without a way to opt-out. If you need to opt-out, don't pass the flag :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99080/new/
https://reviews.llvm.org/D99080
More information about the llvm-commits
mailing list