Mercurial > hg > truffle
annotate graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetFrameStateCleanupPhase.java @ 11717:8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Remove InsertStateAfterPlaceholderPhase
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 17 Sep 2013 18:05:11 +0200 |
parents | 76c40c3f6bb7 |
children | 713a08116e97 |
rev | line source |
---|---|
7271
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
1 /* |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
4 * |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
8 * |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
14 * |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
18 * |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
21 * questions. |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
22 */ |
8415
2361bf148c06
rename packages: *snippets* -> *replacements*
Doug Simon <doug.simon@oracle.com>
parents:
7901
diff
changeset
|
23 package com.oracle.graal.replacements; |
7271
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
24 |
7901
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
25 import java.util.*; |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
26 |
7271
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
27 import com.oracle.graal.nodes.*; |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
28 import com.oracle.graal.nodes.util.*; |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
29 import com.oracle.graal.phases.*; |
7901
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
30 import com.oracle.graal.phases.graph.*; |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
31 import com.oracle.graal.phases.graph.ReentrantNodeIterator.LoopInfo; |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
32 import com.oracle.graal.phases.graph.ReentrantNodeIterator.NodeIteratorClosure; |
7271
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
33 |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
34 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7271
diff
changeset
|
35 * Removes frame states from {@linkplain StateSplit#hasSideEffect() non-side-effecting} nodes in a |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7271
diff
changeset
|
36 * snippet. |
7901
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
37 * |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
38 * The frame states of side-effecting nodes are replaced with |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
39 * {@linkplain FrameState#INVALID_FRAMESTATE_BCI invalid} frame states. Loops that contain invalid |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
40 * frame states are also assigned an invalid frame state. |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
41 * |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
42 * The invalid frame states ensure that no deoptimization to a snippet frame state will happen. |
7271
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
43 */ |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
44 public class SnippetFrameStateCleanupPhase extends Phase { |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
45 |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
46 @Override |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
47 protected void run(StructuredGraph graph) { |
11717
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
48 ReentrantNodeIterator.apply(new SnippetFrameStateCleanupClosure(), graph.start(), null, null); |
7901
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
49 } |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
50 |
11717
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
51 private static class SnippetFrameStateCleanupClosure extends NodeIteratorClosure<StateSplit> { |
7901
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
52 |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
53 @Override |
11717
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
54 protected StateSplit processNode(FixedNode node, StateSplit currentState) { |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
55 StateSplit state = currentState; |
7901
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
56 if (node instanceof StateSplit) { |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
57 StateSplit stateSplit = (StateSplit) node; |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
58 FrameState frameState = stateSplit.stateAfter(); |
7271
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
59 if (frameState != null) { |
7901
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
60 if (stateSplit.hasSideEffect()) { |
11717
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
61 stateSplit.setStateAfter(createInvalidFrameState(node)); |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
62 state = stateSplit; |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
63 } else if (hasInvalidState(state)) { |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
64 stateSplit.setStateAfter(createInvalidFrameState(node)); |
7901
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
65 } else { |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
66 stateSplit.setStateAfter(null); |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
67 } |
7271
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
68 if (frameState.usages().isEmpty()) { |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
69 GraphUtil.killWithUnusedFloatingInputs(frameState); |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
70 } |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
71 } |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
72 } |
11717
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
73 if (node instanceof ControlSinkNode && state != null) { |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
74 state.setStateAfter(node.graph().add(new FrameState(FrameState.AFTER_BCI))); |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
75 } |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
76 return state; |
7271
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
77 } |
7901
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
78 |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
79 @Override |
11717
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
80 protected StateSplit merge(MergeNode merge, List<StateSplit> states) { |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
81 return merge; |
7901
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
82 } |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
83 |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
84 @Override |
11717
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
85 protected StateSplit afterSplit(AbstractBeginNode node, StateSplit oldState) { |
9623
76c40c3f6bb7
let ReentrantNodeIterator.processNode return the next state
Lukas Stadler <lukas.stadler@jku.at>
parents:
9436
diff
changeset
|
86 return oldState; |
7901
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
87 } |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
88 |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
89 @Override |
11717
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
90 protected Map<LoopExitNode, StateSplit> processLoop(LoopBeginNode loop, StateSplit initialState) { |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
91 LoopInfo<StateSplit> info = ReentrantNodeIterator.processLoop(this, loop, initialState); |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
92 if (!hasInvalidState(initialState)) { |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
93 boolean isNowInvalid = false; |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
94 for (StateSplit endState : info.endStates.values()) { |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
95 isNowInvalid |= hasInvalidState(endState); |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
96 } |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
97 if (isNowInvalid) { |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
98 loop.setStateAfter(createInvalidFrameState(loop)); |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
99 info = ReentrantNodeIterator.processLoop(this, loop, loop); |
7901
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
100 } |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
101 } |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
102 return info.exitStates; |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
103 } |
93a133fc03ce
clear frame states in snippets and replace with sentries
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
104 |
11717
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
105 private static boolean hasInvalidState(StateSplit state) { |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
106 return state != null && state.stateAfter() != null && state.stateAfter().bci == FrameState.INVALID_FRAMESTATE_BCI; |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
107 } |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
108 |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
109 private static FrameState createInvalidFrameState(FixedNode node) { |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
110 return node.graph().add(new FrameState(FrameState.INVALID_FRAMESTATE_BCI)); |
8a3b59397044
The SnippetFrameStateCleanupPhase now sets invalid framestates on the paths of side effecting instruction except for the last one where an AFTER_BCI is used.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9623
diff
changeset
|
111 } |
7271
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
112 } |
9c06e8bd8769
added phase to remove unnecessary frame states from substitution snippets
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
113 } |