MCPcopy Create free account
hub / github.com/SeaOfNodes/Simple / kills

Method kills

chapter24/src/main/java/com/seaofnodes/simple/codegen/IFG.java:202–226  ·  view source on GitHub ↗
( RegAlloc alloc, MachNode m )

Source from the content-addressed store, hash-verified

200 // Single-register defines *must* have their register; other live ranges
201 // *must* avoid this register, so instead of interfering we remove the
202 // single register from the other rmask.
203 private static void kills( RegAlloc alloc, MachNode m ) {
204 RegMask killMask = m.killmap();
205 if( killMask==null ) return;
206 // Kill registers with all live
207 for( LRG tlrg : TMP.keySet() ) {
208 assert tlrg.leader();
209 // Always, tlrg cannot use kills
210 if( tlrg._mask.overlap(killMask) ) {
211 if( !tlrg.sub(killMask) ) alloc.fail(tlrg);
212 }
213 }
214 }
215
216 // Check for self-conflict live ranges. These must split, and only happens
217 // during the first round a particular LRG splits.
218 private static void selfConflict(RegAlloc alloc, Node n, LRG lrg) {
219 selfConflict(alloc,n,lrg,TMP.get(lrg));
220 }
221 private static void selfConflict(RegAlloc alloc, Node n, LRG lrg, Node prior) {
222 if( prior!=null && prior != n ) {
223 lrg.selfConflict(prior);
224 lrg.selfConflict(n);
225 alloc.fail(lrg); // 2 unrelated values live at once same live range; self-conflict
226 }
227 }
228
229 // Merge TMP into bb's live-out set; if changes put bb on WORK

Callers 2

do_blockMethod · 0.95
do_nodeMethod · 0.95

Calls 13

outMethod · 0.95
cfg0Method · 0.95
nOutsMethod · 0.95
killmapMethod · 0.65
isCloneMethod · 0.65
leaderMethod · 0.45
overlapMethod · 0.45
cfgMethod · 0.45
regionMethod · 0.45
findMethod · 0.45
failMethod · 0.45
lrgMethod · 0.45

Tested by

no test coverage detected