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

Method delDef

chapter06/src/main/java/com/seaofnodes/simple/node/Node.java:167–173  ·  view source on GitHub ↗
(int idx)

Source from the content-addressed store, hash-verified

165 // shuffles the order deterministically - which is suitable for Region and
166 // Phi, but not for every Node.
167 void delDef(int idx) {
168 Node old_def = in(idx);
169 if( old_def != null && // If the old def exists, remove a def->use edge
170 old_def.delUse(this) ) // If we removed the last use, the old def is now dead
171 old_def.kill(); // Kill old def
172 Utils.del(_inputs, idx);
173 }
174
175 /**
176 * Add a new def to an existing Node. Keep the edges correct by

Callers 2

idealizeMethod · 0.45
idealizeMethod · 0.45

Calls 4

inMethod · 0.95
delUseMethod · 0.95
killMethod · 0.95
delMethod · 0.95

Tested by

no test coverage detected