[9] RFR(S): 8066312: Add new Node* Node::find_user(int opc) method
Zoltán Majó
zoltan.majo at oracle.com
Tue Jan 13 16:48:20 UTC 2015
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