RFR: 8320725: C2: Add "is_associative" flag for floating-point add-reduction [v3]
Bhavana Kilambi
bkilambi at openjdk.org
Thu Mar 21 10:59:22 UTC 2024
On Thu, 21 Mar 2024 10:23:19 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/vectornode.hpp line 240:
>>
>>> 238: //
>>> 239: // Other reductions are associative (do not need strict ordering).
>>> 240: virtual bool is_associative() const {
>>
>> I think this flag may be badly named. The idea you want to express is not so much associativity, but whether such nodes should be treated as strictly ordered. It would be much less confusing to pick a name like ordered() because that describes what you want to the node to do.
>
> I think you are right. Maybe we can use `ordered/unordered`. I just want to make sure we don't have too many synonyms (ordered, unordered, associative, strictly ordered, etc). But I guess associative and ordered is not exactly a synonym.
Hi, thank you for your comments on this. I personally also feel "is_associative" is a bit non-intuitive as in the reader might have to make the connection between "associativity" and "ordering" compared to the case where we directly use what we intend the variable to do, something like "is_ordered". Would it be okay if I revert this to "requires_strict_order" for the variable and method names that I used in my first commit?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18034#discussion_r1533656600
More information about the hotspot-compiler-dev
mailing list