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

Albert Noll albert.noll at oracle.com
Tue Jan 13 12:19:15 UTC 2015

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);

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);


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20150113/a5603845/attachment.html>

More information about the hotspot-compiler-dev mailing list