Mercurial > hg > truffle
diff graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/InliningPhase.java @ 4411:cd2b68ef8e23
cleanup around filter and predicates :
remove duplicate compiler.util.NodeIterators
add contains to NodeIterable
support isNotA(Class).nor(Class) filtering
support filtering on interfaces
remove and/or(Class) from FilteredNodeIterable replace with isA(Class).or(Class)
lower the cost on extending NodeIterable (remove the until field)
NodeList is a NodeIterable
Use NodeIterable functions where possible
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Mon, 30 Jan 2012 13:06:11 +0100 |
parents | 2af849af1723 |
children | c8de52cc672a |
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/InliningPhase.java Fri Jan 27 00:40:26 2012 +0100 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/InliningPhase.java Mon Jan 30 13:06:11 2012 +0100 @@ -133,11 +133,8 @@ Invoke invoke = (Invoke) node; scanInvoke(invoke, level); } - for (Node usage : node.usages().snapshot()) { - if (usage instanceof Invoke) { - Invoke invoke = (Invoke) usage; - scanInvoke(invoke, level); - } + for (Node usage : node.usages().filterInterface(Invoke.class).snapshot()) { + scanInvoke((Invoke) usage, level); } } } @@ -149,7 +146,6 @@ if (GraalOptions.Meter) { currentContext.metrics.InlineConsidered++; } - inlineCandidates.add(info); } }