Remove use of snapshots
@@ -137,15 +137,16 @@ public class TornadoFeatureExtraction extends Phase {
if (opType == (JavaKind.Boolean) || (opType == JavaKind.Char) || (opType == JavaKind.Int) || (opType == JavaKind.Short) || (opType == JavaKind.Long)) {
updateCounter(irFeatures, ProfilerCodeFeatures.INTEGER_OPS);
} else if ((opType == (JavaKind.Double))) {
+ updateCounter(irFeatures, ProfilerCodeFeatures.FLOAT_OPS);
updateCounter(irFeatures, ProfilerCodeFeatures.DOUBLES);
} else if ((opType == JavaKind.Float)) {
+ updateCounter(irFeatures, ProfilerCodeFeatures.FLOAT_OPS);
updateCounter(irFeatures, ProfilerCodeFeatures.FP32);
}
}
private void updateMemoryAccesses(LinkedHashMap<ProfilerCodeFeatures, Integer> irFeatures, Node node, boolean isLoad) {
- for (Node memOpNode : node.inputs().snapshot()) {
- if (memOpNode instanceof AddressNode) {
+ for (Node memOpNode : node.inputs().filter(AddressNode.class)) {
for (Node addressInput : memOpNode.inputs()) {
if (addressInput instanceof MarkLocalArray) {
if (isLoad) {
@@ -167,4 +168,3 @@ public class TornadoFeatureExtraction extends Phase {
}
}
}
\ No newline at end of file
-}
\ No newline at end of file
