use of org.graalvm.compiler.nodes.PiNode.Placeholder in project graal by oracle.
the class SnippetTemplate method updateStamps.
private void updateStamps(ValueNode replacee, UnmodifiableEconomicMap<Node, Node> duplicates) {
for (ValueNode node : placeholderStampedNodes) {
ValueNode dup = (ValueNode) duplicates.get(node);
Stamp replaceeStamp = replacee.stamp(NodeView.DEFAULT);
if (node instanceof Placeholder) {
Placeholder placeholderDup = (Placeholder) dup;
placeholderDup.makeReplacement(replaceeStamp);
} else {
dup.setStamp(replaceeStamp);
}
}
for (ParameterNode paramNode : snippet.getNodes(ParameterNode.TYPE)) {
for (Node usage : paramNode.usages()) {
Node usageDup = duplicates.get(usage);
propagateStamp(usageDup);
}
}
}
Aggregations