RFR: 8350578: Refactor useless Parse and Template Assertion Predicate elimination code by using a PredicateVisitor [v2]

Christian Hagedorn chagedorn at openjdk.org
Fri Mar 14 10:32:02 UTC 2025


On Fri, 14 Mar 2025 10:00:05 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Can you add `predicates.inline.hpp` for this?
>
> Do you mean the enum definition for `PredicateState`? That could work, so I can just include that header when I need to use the enum. Should I then rather name the `hpp`  file something like `predicates_enums.hpp`? IIUC, `xyz.inline.hpp` should be used primarily for inline methods.
> 
> Having the separate enum header also allows us to put this one there which makes things cleaner:
> https://github.com/openjdk/jdk/blob/e3c29c9e6cff7648952c0ba359b0763a0ea8da18/src/hotspot/share/opto/predicates.hpp#L203-L211

I've pushed an update introducing `predicates_enums.hpp` and also moving some typedefs for predicates in there. Let me know if that's what you had in mind. I could now move almost all definitions back to the header file except for `mark_useless()` which uses `PhaseIterGVN` which is not a complete type in the header file - I guess that's okay to just move this one to the source file.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24013#discussion_r1995305281


More information about the hotspot-compiler-dev mailing list