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

Method delDef

chapter14/src/main/java/com/seaofnodes/simple/node/Node.java:179–188  ·  view source on GitHub ↗
(int idx)

Source from the content-addressed store, hash-verified

177 // Phi, but not for every Node. If the def goes dead, it is recursively
178 // killed, which may include 'this' Node.
179 Node delDef(int idx) {
180 unlock();
181 Node old_def = in(idx);
182 if( old_def != null && // If the old def exists, remove a def->use edge
183 old_def.delUse(this) ) // If we removed the last use, the old def is now dead
184 old_def.kill(); // Kill old def
185 old_def.moveDepsToWorklist();
186 Utils.del(_inputs, idx);
187 return this;
188 }
189
190 /**
191 * Add a new def to an existing Node. Keep the edges correct by

Callers 2

idealizeMethod · 0.45
idealizeMethod · 0.45

Calls 6

unlockMethod · 0.95
inMethod · 0.95
delUseMethod · 0.95
killMethod · 0.95
moveDepsToWorklistMethod · 0.95
delMethod · 0.95

Tested by

no test coverage detected