< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Node.java
Print this page
rev 56282 : [mq]: graal
*** 1,7 ****
/*
! * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 934,943 ****
--- 934,949 ----
if (nodeClass.replaceFirstInput(this, oldInput, newInput)) {
updateUsages(oldInput, newInput);
}
}
+ public void replaceAllInputs(Node oldInput, Node newInput) {
+ while (nodeClass.replaceFirstInput(this, oldInput, newInput)) {
+ updateUsages(oldInput, newInput);
+ }
+ }
+
public void replaceFirstInput(Node oldInput, Node newInput, InputType type) {
for (Position pos : inputPositions()) {
if (pos.getInputType() == type && pos.get(this) == oldInput) {
pos.set(this, newInput);
}
< prev index next >