[9] RFR(S): 8066312: Add new Node* Node::find_user(int opc) method

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Jan 15 18:12:02 UTC 2015


On 1/15/15 2:10 AM, Zoltán Majó wrote:
> Hi Vladimir,
>
>
> thank you for the review!
>
> On 01/13/2015 08:46 PM, Vladimir Kozlov wrote:
>> ifg.cpp: could be
>>
>> +       return !def->has_user(Op_SCMemProj);
>
> In ifg.cpp on lines 538-539 we return only if
> def->has_user(Op_SCMemProj) is true. If it is false, we don't return
> yet. So I think the code in webrev.01 is correct, but I might miss
> something.

Yes, you are correct. Sorry for noise.
The fix is good to go.

Thanks,
Vladimir

>
>> Otherwise looks good. I thought we have more cases.
>
> I hoped, too, that we have more cases.
>
> Thank you and best regards,
>
>
> Zoltan
>
>> Thanks,
>> Vladimir
>>
>> On 1/13/15 8:48 AM, Zoltán Majó wrote:
>>> Hi Albert,
>>>
>>>
>>> thank your for the feedback!
>>>
>>> On 01/13/2015 01:19 PM, Albert Noll wrote:
>>>> Hi Zoltan,
>>>>
>>>> What do you think about the following interface to find users?
>>>>
>>>> If we do not need the return value, we add the following function:
>>>>    bool find_user(int opcode);
>>>
>>> that is a good idea. I added the method.
>>>
>>>> If we look for more than 1 user like in this example:
>>>>
>>>>      if (n->find_user(Op_StoreP) != NULL || n->find_user(Op_LoadP) !=
>>>> NULL
>>>> 2014             || n->find_user(Op_StoreN) != NULL ||
>>>> n->find_user(Op_LoadN)) {
>>>>
>>>> would it make sense to have the following function?
>>>>
>>>>    bool find_user(int opc1, int opc2, int opc3, int opc4);
>>>
>>> I added that method as well.
>>>
>>> Here is the updated webrev:
>>> http://cr.openjdk.java.net/~zmajo/8066312/webrev.01/
>>>
>>> All JPRT tests pass.
>>>
>>> Thank you and best regards,
>>>
>>>
>>> Zoltan
>>>
>>>> Best,
>>>> Albert
>>>>
>>>> On 01/13/2015 12:41 PM, Zoltán Majó wrote:
>>>>> Hi,
>>>>>
>>>>>
>>>>> please review the following small patch.
>>>>>
>>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8066312
>>>>>
>>>>> Problem: There are some locations in the source code that search for
>>>>> users of a node of a particular type.
>>>>>
>>>>> Solution: To simplify the code, this patch adds a new method,
>>>>> Node::find_user(int opc) that can be used for searching. This patch
>>>>> also updates some comments in the source code.
>>>>>
>>>>> Webrev: http://cr.openjdk.java.net/~zmajo/8066312/webrev.00/
>>>>>
>>>>> Testing: JPRT
>>>>>
>>>>> Thank you and best regards,
>>>>>
>>>>>
>>>>> Zoltan
>>>>>
>>>>
>>>
>


More information about the hotspot-compiler-dev mailing list