On Fri, 18 Oct 2024 05:42:21 GMT, Jatin Bhateja <jbhat...@openjdk.org> wrote:

>>> The issue is that a node is not immutable.
>> 
>> I don't see any issues with mutability here. 
>> `MulVLNode::_mult_lower_double_word` is constant, so you have to allocate 
>> new node if you want to change its value. (And that's exactly what 
>> `MulVLNode::Ideal()` does.) But I agree with you that  a dedicated ideal 
>> node type (e.g., `MulVI2L`) is much cleaner than 
>> `MulVLNode::_mult_lower_double_word`. Still, I'd prefer to see the logic 
>> confined in matcher-related code instead.
>
> Hi @iwanowww , @merykitty , I am in process of addressing all your concerns.
> 
> I still feel idealization is the right place to execute this pattern 
> detection, we just need to re-wire the effective inputs bypassing doubleword 
> clearing logic to newly annotated MulVL node and allow clearing IR to 
> sweepout during successive passes, moving it to final graph reshaping just 
> before instruction selection will prevent dead IR cleanups.

@jatin-bhateja I think you can do it at the same place as 
`Compile::optimize_logic_cones`, we do perform IGVN there. Unless you think 
this information is needed early in the compiling process, currently I see it 
is used during matching only, which makes it unnecessary to repeatedly checking 
it in `Node::Ideal`

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

PR Comment: https://git.openjdk.org/jdk/pull/21244#issuecomment-2421519087

Reply via email to