Mercurial > hg > graal-compiler
comparison src/share/vm/opto/reg_split.cpp @ 10395:b274ac1dbe11
8005956: C2: assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG defined in this block
Summary: Disable re-materialization of reaching definitions (which have live inputs) for phi nodes when spilling.
Reviewed-by: twisti, kvn
author | adlertz |
---|---|
date | Mon, 03 Jun 2013 12:39:33 -0700 |
parents | 8373c19be854 |
children | d1034bd8cefc |
comparison
equal
deleted
inserted
replaced
10394:813f26e34135 | 10395:b274ac1dbe11 |
---|---|
48 // | 48 // |
49 // As a side effect, unlink from (hence make dead) coalesced copies. | 49 // As a side effect, unlink from (hence make dead) coalesced copies. |
50 // | 50 // |
51 | 51 |
52 static const char out_of_nodes[] = "out of nodes during split"; | 52 static const char out_of_nodes[] = "out of nodes during split"; |
53 | |
54 static bool contains_no_live_range_input(const Node* def) { | |
55 for (uint i = 1; i < def->req(); ++i) { | |
56 if (def->in(i) != NULL && def->in_RegMask(i).is_NotEmpty()) { | |
57 return false; | |
58 } | |
59 } | |
60 return true; | |
61 } | |
53 | 62 |
54 //------------------------------get_spillcopy_wide----------------------------- | 63 //------------------------------get_spillcopy_wide----------------------------- |
55 // Get a SpillCopy node with wide-enough masks. Use the 'wide-mask', the | 64 // Get a SpillCopy node with wide-enough masks. Use the 'wide-mask', the |
56 // wide ideal-register spill-mask if possible. If the 'wide-mask' does | 65 // wide ideal-register spill-mask if possible. If the 'wide-mask' does |
57 // not cover the input (or output), use the input (or output) mask instead. | 66 // not cover the input (or output), use the input (or output) mask instead. |
1310 pidx = pred->_pre_order; | 1319 pidx = pred->_pre_order; |
1311 // Grab reaching def | 1320 // Grab reaching def |
1312 Node *def = Reaches[pidx][slidx]; | 1321 Node *def = Reaches[pidx][slidx]; |
1313 assert( def, "must have reaching def" ); | 1322 assert( def, "must have reaching def" ); |
1314 // If input up/down sense and reg-pressure DISagree | 1323 // If input up/down sense and reg-pressure DISagree |
1315 if( def->rematerialize() ) { | 1324 if (def->rematerialize() && contains_no_live_range_input(def)) { |
1316 // Place the rematerialized node above any MSCs created during | 1325 // Place the rematerialized node above any MSCs created during |
1317 // phi node splitting. end_idx points at the insertion point | 1326 // phi node splitting. end_idx points at the insertion point |
1318 // so look at the node before it. | 1327 // so look at the node before it. |
1319 int insert = pred->end_idx(); | 1328 int insert = pred->end_idx(); |
1320 while (insert >= 1 && | 1329 while (insert >= 1 && |