RFR: 8332268: C2: Add missing optimizations for UDivI/L and UModI/L and unify the shared logic with the signed nodes [v2]

Quan Anh Mai qamai at openjdk.org
Mon Nov 25 13:21:17 UTC 2024


On Mon, 25 Nov 2024 13:14:21 GMT, theoweidmannoracle <duke at openjdk.org> wrote:

>> src/hotspot/share/opto/type.hpp line 2173:
>> 
>>> 2171: 
>>> 2172: template <>
>>> 2173: inline const TypeInt* Type::is<TypeInt>() const {
>> 
>> I think `cast` would be a better name
>
> I named it `is` for consistency with all the other `is_*` methods but, of course, `cast` would be much less confusing. I'm not sure if we should be consistent or give this a more understandable name.

Using `cast` would be more consistent with other kinds of casting such as `static_cast<T>` or `dynamic_cast<T>`, so I think `t.cast<TypeInt>()` fits into the scene more nicely.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22061#discussion_r1856603227


More information about the hotspot-compiler-dev mailing list