| 200 | // *must* avoid this register, so instead of interfering we remove the |
| 201 | // single register from the other rmask. |
| 202 | private static void kills( RegAlloc alloc, MachNode m ) { |
| 203 | RegMask killMask = m.killmap(); |
| 204 | if( killMask==null ) return; |
| 205 | // Kill registers with all live |
| 206 | for( LRG tlrg : TMP.keySet() ) { |
| 207 | assert tlrg.leader(); |
| 208 | // Always, tlrg cannot use kills |
| 209 | if( tlrg._mask.overlap(killMask) ) { |
| 210 | // Disallow clone-ables from killing registers. Just fail |
| 211 | // them and re-clone closer to target... so no kill. |
| 212 | // Special case for Intel XOR used to zero. |
| 213 | Node n = (Node)m; |
| 214 | CFGNode effUseBlk = n.out(0) instanceof PhiNode phi ? phi.region().cfg(phi._inputs.find(n)) : n.out(0).cfg0(); |
| 215 | if( m.isClone() && // Must be clonable |
| 216 | (n.nOuts()>1 || // Has many users OR |
| 217 | // Only 1 user but effective use is remote block |
| 218 | effUseBlk != n.cfg0() )) |
| 219 | // Then fail the clonable; it should split or move |
| 220 | alloc.fail(alloc.lrg((Node)m)); |
| 221 | // Else clonable cannot move |
| 222 | else if( !tlrg.sub(killMask) ) |
| 223 | alloc.fail(tlrg); |
| 224 | } |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | // Check for self-conflict live ranges. These must split, and only happens |
| 229 | // during the first round a particular LRG splits. |