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

Method kill

chapter03/src/main/java/com/seaofnodes/simple/node/Node.java:206–211  ·  view source on GitHub ↗

Kill a Node with no uses , by setting all of its defs to null. This may recursively kill more Nodes and is basically dead code elimination. This function is co-recursive with #popN.

( )

Source from the content-addressed store, hash-verified

204 return null; // No progress
205 }
206
207 /**
208 * This function needs to be
209 * <a href="https://en.wikipedia.org/wiki/Monotonic_function">Monotonic</a>
210 * as it is part of a Monotone Analysis Framework.
211 * <a href="https://www.cse.psu.edu/~gxt29/teaching/cse597s21/slides/08monotoneFramework.pdf">See for example this set of slides</a>.
212 * <p>
213 * For Chapter 2, all our Types are really integer constants, and so all
214 * the needed properties are trivially true, and we can ignore the high

Callers 3

setDefMethod · 0.95
popNMethod · 0.95
peepholeMethod · 0.95

Calls 4

isUnusedMethod · 0.95
popNMethod · 0.95
nInsMethod · 0.95
isDeadMethod · 0.95

Tested by

no test coverage detected