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.
( )
| 195 | if( obs != null ) obs.after(this, n == null && old == _type ? null : rez, false); |
| 196 | return rez; |
| 197 | } |
| 198 | |
| 199 | private Node peepholeOpt() { |
| 200 | // Compute initial or improved Type |
| 201 | Type type = _type = compute(); |
| 202 | |
| 203 | // Replace constant computations from non-constants with a constant node |
| 204 | if (!(this instanceof ConstantNode) && type.isConstant()) |
| 205 | return deadCodeElim(new ConstantNode(type).peephole()); |