RFR(L): 8186027: C2: loop strip mining

Roland Westrelin rwestrel at redhat.com
Tue Oct 24 08:37:01 UTC 2017


Hi Nils,

Thanks for going over the patch and testing it.
Here is an updated webrev:

http://cr.openjdk.java.net/~roland/8186027/webrev.01/

I also made the changes you suggested, except for:

> src/hotspot/share/opto/loopopts.cpp:
> @@ -1729,7 +1729,7 @@
>       Node* l = cl->outer_loop();
>       Node* tail = cl->outer_loop_tail();
>       IfNode* le = cl->outer_loop_end();
> -    Node* sfpt = cl->outer_safepoint();
> +    Node* sfpt = (Node*) cl->outer_safepoint();
>
> src/hotspot/share/opto/opaquenode.cpp
> @@ -144,7 +144,7 @@
>     assert(iter_estimate > 0, "broken");
>     if ((jlong)scaled_iters != scaled_iters_long || iter_estimate <= 
> short_scaled_iters) {
>       // Remove outer loop and safepoint (too few iterations)
> -    Node* outer_sfpt = inner_cl->outer_safepoint();
> +    Node* outer_sfpt = (Node*) inner_cl->outer_safepoint();

for which I used the patch below instead (I ran the build with
precompiled headers disabled to verify that change).

Roland.

diff --git a/src/hotspot/share/opto/loopopts.cpp b/src/hotspot/share/opto/loopopts.cpp
--- a/src/hotspot/share/opto/loopopts.cpp
+++ b/src/hotspot/share/opto/loopopts.cpp
@@ -26,6 +26,7 @@
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "opto/addnode.hpp"
+#include "opto/callnode.hpp"
 #include "opto/castnode.hpp"
 #include "opto/connode.hpp"
 #include "opto/castnode.hpp"
@@ -845,7 +846,6 @@
               assert(n_loop->_parent == outer_loop, "broken loop tree");
             }
 #endif
-            int count = phi->replace_edge(n, n->in(MemNode::Memory));
             assert(count > 0, "inconsistent phi");
 
             // Compute latest point this store can go
diff --git a/src/hotspot/share/opto/opaquenode.cpp b/src/hotspot/share/opto/opaquenode.cpp
--- a/src/hotspot/share/opto/opaquenode.cpp
+++ b/src/hotspot/share/opto/opaquenode.cpp
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "opto/addnode.hpp"
+#include "opto/callnode.hpp"
 #include "opto/cfgnode.hpp"
 #include "opto/connode.hpp"
 #include "opto/divnode.hpp"



More information about the hotspot-compiler-dev mailing list