[8u] RFF(S): 8164954: split_if creates empty phi and region nodes

Kevin Walls kevin.walls at oracle.com
Fri Oct 13 09:25:01 UTC 2017


I'd like to get a review of a backport to 8u.

bug: https://bugs.openjdk.java.net/browse/JDK-8164954

9 changeset: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/38f38c10a11d

Review thread: 

It doesn't hg import cleanly as the surrounding code is a little 
different: this change adds a condition in split_if() which may make 
that method return earlier, but 8u does not have the block after the 
change, beginning "if (nb_predicate_proj > 1) {", that comes in with 

The 8u change has been through jprt testing and also tested with the 
testsuite of a Java-based product which was seen hitting the same assert 
as in this bug.  hg diff of the proposed 8u change is below, I think 
that's enough but can offer a webrev if anybody needs one.


bash-4.2$ hg diff src/share/vm/opto/ifnode.cpp
diff -r c89173159237 src/share/vm/opto/ifnode.cpp
--- a/src/share/vm/opto/ifnode.cpp      Thu Sep 07 10:15:21 2017 -0400
+++ b/src/share/vm/opto/ifnode.cpp      Fri Oct 13 02:03:00 2017 -0700
@@ -234,6 +234,13 @@
        predicate_proj = proj;
+  // If all the defs of the phi are the same constant, we already have 
the desired end state.
+  // Skip the split that would create empty phi and region nodes.
+  if((r->req() - req_c) == 1) {
+    return NULL;
+  }
    Node* predicate_c = NULL;
    Node* predicate_x = NULL;
    bool counted_loop = r->is_CountedLoop();

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

More information about the hotspot-compiler-dev mailing list