RFR: 8342662: C2: Add new phase for backend-specific lowering [v3]
Quan Anh Mai
qamai at openjdk.org
Thu Oct 31 02:50:31 UTC 2024
On Thu, 31 Oct 2024 02:19:44 GMT, Jasmine Karthikeyan <jkarthikeyan at openjdk.org> wrote:
>> src/hotspot/share/opto/phaseX.cpp line 2273:
>>
>>> 2271:
>>> 2272: Node* PhaseLowering::apply_ideal(Node* k, bool can_reshape) {
>>> 2273: // Run the lowered Ideal method to continue doing transformations on the node, while avoiding existing transforms
>>
>> Can you call `lower(k)` here and as a result, you can simply do `lower.optimize()` as the main entry?
>
> I would prefer to keep it as-is because `PhaseIterGVN::optimize` does a lot of logic that may not be relevant here (such as IGVN verification and IGV printing). This way we can avoid changes to IGVN in the future accidentally impacting lowering in unexpected ways.
I actually think it is a good idea to have verification and printing. Since Lowering does IGVN-like transformations, they should behave in generally the same way. If it turns out that we actually need a separate entry then we can create it then.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21599#discussion_r1823709719
More information about the hotspot-compiler-dev
mailing list