8013830: [parfait] Uninitialised pointer 'Reachblock' may be used as argument
authoradlertz
Wed, 09 Oct 2013 13:00:20 +0200
changeset 20699 1ee18362a1ce
parent 20694 2b8425bb18c2
child 20700 fce01c85d004
8013830: [parfait] Uninitialised pointer 'Reachblock' may be used as argument Summary: Replace uninitialised pointer with NULL at argument. Reviewed-by: kvn, roland, twisti
hotspot/src/share/vm/opto/reg_split.cpp
--- a/hotspot/src/share/vm/opto/reg_split.cpp	Mon Oct 07 14:13:28 2013 +0400
+++ b/hotspot/src/share/vm/opto/reg_split.cpp	Wed Oct 09 13:00:20 2013 +0200
@@ -375,6 +375,7 @@
       }
 
       if (lidx < _lrg_map.max_lrg_id() && lrgs(lidx).reg() >= LRG::SPILL_REG) {
+        assert(Reachblock != NULL, "Reachblock must be non-NULL");
         Node *rdef = Reachblock[lrg2reach[lidx]];
         if (rdef) {
           spill->set_req(i, rdef);
@@ -1336,7 +1337,8 @@
                _lrg_map.find(pred->get_node(insert - 1)) >= lrgs_before_phi_split) {
           insert--;
         }
-        def = split_Rematerialize(def, pred, insert, maxlrg, splits, slidx, lrg2reach, Reachblock, false);
+        // since the def cannot contain any live range input, we can pass in NULL as Reachlock parameter
+        def = split_Rematerialize(def, pred, insert, maxlrg, splits, slidx, lrg2reach, NULL, false);
         if (!def) {
           return 0;    // Bail out
         }