Mercurial > hg > truffle
comparison src/share/vm/opto/reg_split.cpp @ 2016:361783318e7e
7004940: CTW: assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG
Reviewed-by: kvn, twisti
author | never |
---|---|
date | Mon, 13 Dec 2010 22:41:03 -0800 |
parents | f95d63e2154a |
children | c7b60b601eb4 |
comparison
equal
deleted
inserted
replaced
2015:79d8657be916 | 2016:361783318e7e |
---|---|
1237 //----------Phi Node Splitting---------- | 1237 //----------Phi Node Splitting---------- |
1238 // Clean up a phi here, and assign a new live range number | 1238 // Clean up a phi here, and assign a new live range number |
1239 // Cycle through this block's predecessors, collecting Reaches | 1239 // Cycle through this block's predecessors, collecting Reaches |
1240 // info for each spilled LRG and update edges. | 1240 // info for each spilled LRG and update edges. |
1241 // Walk the phis list to patch inputs, split phis, and name phis | 1241 // Walk the phis list to patch inputs, split phis, and name phis |
1242 uint lrgs_before_phi_split = maxlrg; | |
1242 for( insidx = 0; insidx < phis->size(); insidx++ ) { | 1243 for( insidx = 0; insidx < phis->size(); insidx++ ) { |
1243 Node *phi = phis->at(insidx); | 1244 Node *phi = phis->at(insidx); |
1244 assert(phi->is_Phi(),"This list must only contain Phi Nodes"); | 1245 assert(phi->is_Phi(),"This list must only contain Phi Nodes"); |
1245 Block *b = _cfg._bbs[phi->_idx]; | 1246 Block *b = _cfg._bbs[phi->_idx]; |
1246 // Grab the live range number | 1247 // Grab the live range number |
1271 // Grab reaching def | 1272 // Grab reaching def |
1272 Node *def = Reaches[pidx][slidx]; | 1273 Node *def = Reaches[pidx][slidx]; |
1273 assert( def, "must have reaching def" ); | 1274 assert( def, "must have reaching def" ); |
1274 // If input up/down sense and reg-pressure DISagree | 1275 // If input up/down sense and reg-pressure DISagree |
1275 if( def->rematerialize() ) { | 1276 if( def->rematerialize() ) { |
1276 def = split_Rematerialize( def, pred, pred->end_idx(), maxlrg, splits, slidx, lrg2reach, Reachblock, false ); | 1277 // Place the rematerialized node above any MSCs created during |
1278 // phi node splitting. end_idx points at the insertion point | |
1279 // so look at the node before it. | |
1280 int insert = pred->end_idx(); | |
1281 while (insert >= 1 && | |
1282 pred->_nodes[insert - 1]->is_SpillCopy() && | |
1283 Find(pred->_nodes[insert - 1]) >= lrgs_before_phi_split) { | |
1284 insert--; | |
1285 } | |
1286 def = split_Rematerialize( def, pred, insert, maxlrg, splits, slidx, lrg2reach, Reachblock, false ); | |
1277 if( !def ) return 0; // Bail out | 1287 if( !def ) return 0; // Bail out |
1278 } | 1288 } |
1279 // Update the Phi's input edge array | 1289 // Update the Phi's input edge array |
1280 phi->set_req(i,def); | 1290 phi->set_req(i,def); |
1281 // Grab the UP/DOWN sense for the input | 1291 // Grab the UP/DOWN sense for the input |