提交 efb23ef7 编写于 作者: A adlertz

8026939: assert(Reachblock != NULL) failed: Reachblock must be non-NULL

Summary: We can reach this state from phi input rematerialization, so pass in the Reaches of the predecessor
Reviewed-by: roland, twisti
上级 6047e94f
...@@ -365,7 +365,6 @@ Node *PhaseChaitin::split_Rematerialize( Node *def, Block *b, uint insidx, uint ...@@ -365,7 +365,6 @@ Node *PhaseChaitin::split_Rematerialize( Node *def, Block *b, uint insidx, uint
} }
if (lidx < _lrg_map.max_lrg_id() && lrgs(lidx).reg() >= LRG::SPILL_REG) { 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]]; Node *rdef = Reachblock[lrg2reach[lidx]];
if (rdef) { if (rdef) {
spill->set_req(i, rdef); spill->set_req(i, rdef);
...@@ -476,7 +475,6 @@ uint PhaseChaitin::Split(uint maxlrg, ResourceArea* split_arena) { ...@@ -476,7 +475,6 @@ uint PhaseChaitin::Split(uint maxlrg, ResourceArea* split_arena) {
uint bidx, pidx, slidx, insidx, inpidx, twoidx; uint bidx, pidx, slidx, insidx, inpidx, twoidx;
uint non_phi = 1, spill_cnt = 0; uint non_phi = 1, spill_cnt = 0;
Node **Reachblock;
Node *n1, *n2, *n3; Node *n1, *n2, *n3;
Node_List *defs,*phis; Node_List *defs,*phis;
bool *UPblock; bool *UPblock;
...@@ -559,7 +557,7 @@ uint PhaseChaitin::Split(uint maxlrg, ResourceArea* split_arena) { ...@@ -559,7 +557,7 @@ uint PhaseChaitin::Split(uint maxlrg, ResourceArea* split_arena) {
b = _cfg.get_block(bidx); b = _cfg.get_block(bidx);
// Reaches & UP arrays for this block // Reaches & UP arrays for this block
Reachblock = Reaches[b->_pre_order]; Node** Reachblock = Reaches[b->_pre_order];
UPblock = UP[b->_pre_order]; UPblock = UP[b->_pre_order];
// Reset counter of start of non-Phi nodes in block // Reset counter of start of non-Phi nodes in block
non_phi = 1; non_phi = 1;
...@@ -1315,6 +1313,7 @@ uint PhaseChaitin::Split(uint maxlrg, ResourceArea* split_arena) { ...@@ -1315,6 +1313,7 @@ uint PhaseChaitin::Split(uint maxlrg, ResourceArea* split_arena) {
pidx = pred->_pre_order; pidx = pred->_pre_order;
// Grab reaching def // Grab reaching def
Node *def = Reaches[pidx][slidx]; Node *def = Reaches[pidx][slidx];
Node** Reachblock = Reaches[pidx];
assert( def, "must have reaching def" ); assert( def, "must have reaching def" );
// If input up/down sense and reg-pressure DISagree // If input up/down sense and reg-pressure DISagree
if (def->rematerialize()) { if (def->rematerialize()) {
...@@ -1327,8 +1326,7 @@ uint PhaseChaitin::Split(uint maxlrg, ResourceArea* split_arena) { ...@@ -1327,8 +1326,7 @@ uint PhaseChaitin::Split(uint maxlrg, ResourceArea* split_arena) {
_lrg_map.find(pred->get_node(insert - 1)) >= lrgs_before_phi_split) { _lrg_map.find(pred->get_node(insert - 1)) >= lrgs_before_phi_split) {
insert--; insert--;
} }
// 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, Reachblock, false);
def = split_Rematerialize(def, pred, insert, maxlrg, splits, slidx, lrg2reach, NULL, false);
if (!def) { if (!def) {
return 0; // Bail out return 0; // Bail out
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册