Mercurial > hg > graal-compiler
changeset 16126:dbd32c5942e8
complain when deleting side effecting nodes from snippets
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 17 Jun 2014 12:48:20 -0700 |
parents | cc76575f485c |
children | 7c9cf1697845 |
files | graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Tue Jun 17 12:47:45 2014 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Tue Jun 17 12:48:20 2014 -0700 @@ -483,7 +483,10 @@ if (!SnippetTemplate.hasConstantParameter(method)) { NodeIntrinsificationVerificationPhase.verify(graph); } + int sideEffectCount = 0; + assert (sideEffectCount = graph.getNodes().filter(e -> e instanceof StateSplit && ((StateSplit) e).hasSideEffect()).count()) >= 0; new ConvertDeoptimizeToGuardPhase().apply(graph); + assert sideEffectCount == graph.getNodes().filter(e -> e instanceof StateSplit && ((StateSplit) e).hasSideEffect()).count() : "deleted side effecting node"; switch (frameStateProcessing) { case Removal: