aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradlertz <none@none>2013-10-09 13:00:20 +0200
committeradlertz <none@none>2013-10-09 13:00:20 +0200
commit0ef60603c230a1e6429aad2030f9a76513e39d6c (patch)
treee0817c86e1d6bef8e6519b9924616365590c146d
parent7f51f706c8067621dca7f553937caea306fd8c13 (diff)
8013830: [parfait] Uninitialised pointer 'Reachblock' may be used as argument
Summary: Replace uninitialised pointer with NULL at argument. Reviewed-by: kvn, roland, twisti
-rw-r--r--src/share/vm/opto/reg_split.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/share/vm/opto/reg_split.cpp b/src/share/vm/opto/reg_split.cpp
index 2c4ad874f..f58a380ed 100644
--- a/src/share/vm/opto/reg_split.cpp
+++ b/src/share/vm/opto/reg_split.cpp
@@ -375,6 +375,7 @@ Node *PhaseChaitin::split_Rematerialize( Node *def, Block *b, uint insidx, uint
}
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 @@ uint PhaseChaitin::Split(uint maxlrg, ResourceArea* split_arena) {
_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
}