Mercurial > hg > truffle
annotate graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java @ 15108:b6711b514576
Remove LoopBeginNode loopBegin() from Loop.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Wed, 09 Apr 2014 17:38:16 +0200 |
parents | 1bf700e19e84 |
children | df2ef5204f2b |
rev | line source |
---|---|
8207
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
1 /* |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
2 * Copyright (c) 2013, 2013, Oracle and/or its affiliates. All rights reserved. |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
4 * |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
8 * |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
13 * accompanied this code). |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
14 * |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
18 * |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
21 * questions. |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
22 */ |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
23 package com.oracle.graal.phases.common; |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
24 |
9864
063a712fe8d8
converted remaining options in GraalOptions to new system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9646
diff
changeset
|
25 import static com.oracle.graal.phases.GraalOptions.*; |
063a712fe8d8
converted remaining options in GraalOptions to new system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9646
diff
changeset
|
26 |
8207
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
27 import java.util.*; |
8295
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
28 import java.util.Map.Entry; |
8207
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
29 |
13723
1834ae0bc965
GuardLowering: do not use trapping accesses for guards with a speculation
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13641
diff
changeset
|
30 import com.oracle.graal.api.meta.*; |
13323
48e821e409eb
Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13290
diff
changeset
|
31 import com.oracle.graal.debug.*; |
8207
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
32 import com.oracle.graal.graph.*; |
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
33 import com.oracle.graal.nodes.*; |
11626
340e67bf1758
Rename GuardsPhase to GuardsStage to avoid confusion with existing Phases
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11579
diff
changeset
|
34 import com.oracle.graal.nodes.StructuredGraph.GuardsStage; |
8295
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
35 import com.oracle.graal.nodes.calc.*; |
8207
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
36 import com.oracle.graal.nodes.cfg.*; |
8295
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
37 import com.oracle.graal.nodes.extended.*; |
8299
22cab6e509a3
Remove orphaned condition in implicit null check detection
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8296
diff
changeset
|
38 import com.oracle.graal.nodes.util.*; |
8207
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
39 import com.oracle.graal.phases.*; |
10081
20fd8760cb34
pull ScheduledNodeIterator into separate class
Lukas Stadler <lukas.stadler@jku.at>
parents:
9864
diff
changeset
|
40 import com.oracle.graal.phases.graph.*; |
8207
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
41 import com.oracle.graal.phases.schedule.*; |
11719
0b1f0763bb18
Use earliest schedule for guards
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11715
diff
changeset
|
42 import com.oracle.graal.phases.schedule.SchedulePhase.SchedulingStrategy; |
9268
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
43 import com.oracle.graal.phases.tiers.*; |
8207
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
44 |
11396
a268b0de65d6
Add some javadoc for GuardLoweringPhase, ConvertDeoptimizeToGuardPhase and DeoptimizeNode
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10081
diff
changeset
|
45 /** |
a268b0de65d6
Add some javadoc for GuardLoweringPhase, ConvertDeoptimizeToGuardPhase and DeoptimizeNode
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10081
diff
changeset
|
46 * This phase lowers {@link GuardNode GuardNodes} into corresponding control-flow structure and |
a268b0de65d6
Add some javadoc for GuardLoweringPhase, ConvertDeoptimizeToGuardPhase and DeoptimizeNode
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10081
diff
changeset
|
47 * {@link DeoptimizeNode DeoptimizeNodes}. |
14976
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
48 * |
11627
1ca5e39d0433
Add javadoc to GuardsStage and FrameStateAssignmentPhase
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11626
diff
changeset
|
49 * This allow to enter the {@link GuardsStage#FIXED_DEOPTS FIXED_DEOPTS} stage of the graph where |
1ca5e39d0433
Add javadoc to GuardsStage and FrameStateAssignmentPhase
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11626
diff
changeset
|
50 * all node that may cause deoptimization are fixed. |
1ca5e39d0433
Add javadoc to GuardsStage and FrameStateAssignmentPhase
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11626
diff
changeset
|
51 * <p> |
11396
a268b0de65d6
Add some javadoc for GuardLoweringPhase, ConvertDeoptimizeToGuardPhase and DeoptimizeNode
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10081
diff
changeset
|
52 * It first makes a schedule in order to know where the control flow should be placed. Then, for |
a268b0de65d6
Add some javadoc for GuardLoweringPhase, ConvertDeoptimizeToGuardPhase and DeoptimizeNode
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10081
diff
changeset
|
53 * each block, it applies two passes. The first one tries to replace null-check guards with implicit |
a268b0de65d6
Add some javadoc for GuardLoweringPhase, ConvertDeoptimizeToGuardPhase and DeoptimizeNode
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10081
diff
changeset
|
54 * null checks performed by access to the objects that need to be null checked. The second phase |
a268b0de65d6
Add some javadoc for GuardLoweringPhase, ConvertDeoptimizeToGuardPhase and DeoptimizeNode
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10081
diff
changeset
|
55 * does the actual control-flow expansion of the remaining {@link GuardNode GuardNodes}. |
a268b0de65d6
Add some javadoc for GuardLoweringPhase, ConvertDeoptimizeToGuardPhase and DeoptimizeNode
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10081
diff
changeset
|
56 */ |
9268
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
57 public class GuardLoweringPhase extends BasePhase<MidTierContext> { |
14713
c8fb80093621
metric for number of implicit null checks in GuardLoweringPhase
Lukas Stadler <lukas.stadler@oracle.com>
parents:
13723
diff
changeset
|
58 |
c8fb80093621
metric for number of implicit null checks in GuardLoweringPhase
Lukas Stadler <lukas.stadler@oracle.com>
parents:
13723
diff
changeset
|
59 private static final DebugMetric metricImplicitNullCheck = Debug.metric("ImplicitNullCheck"); |
c8fb80093621
metric for number of implicit null checks in GuardLoweringPhase
Lukas Stadler <lukas.stadler@oracle.com>
parents:
13723
diff
changeset
|
60 |
9268
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
61 private static class UseImplicitNullChecks extends ScheduledNodeIterator { |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
62 |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
63 private final IdentityHashMap<ValueNode, GuardNode> nullGuarded = new IdentityHashMap<>(); |
9268
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
64 private final int implicitNullCheckLimit; |
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
65 |
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
66 UseImplicitNullChecks(int implicitNullCheckLimit) { |
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
67 this.implicitNullCheckLimit = implicitNullCheckLimit; |
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
68 } |
8295
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
69 |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
70 @Override |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
71 protected void processNode(Node node) { |
8295
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
72 if (node instanceof GuardNode) { |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
73 processGuard(node); |
8295
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
74 } else if (node instanceof Access) { |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
75 processAccess((Access) node); |
8295
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
76 } |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
77 if (node instanceof StateSplit && ((StateSplit) node).stateAfter() != null) { |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
78 nullGuarded.clear(); |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
79 } else { |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
80 Iterator<Entry<ValueNode, GuardNode>> it = nullGuarded.entrySet().iterator(); |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
81 while (it.hasNext()) { |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
82 Entry<ValueNode, GuardNode> entry = it.next(); |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
83 GuardNode guard = entry.getValue(); |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
84 if (guard.usages().contains(node)) { |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
85 it.remove(); |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
86 } |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
87 } |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
88 } |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
89 } |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
90 |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
91 private void processAccess(Access access) { |
14976
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
92 if (access.canNullCheck()) { |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
93 GuardNode guard = nullGuarded.get(access.object()); |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
94 if (guard != null && isImplicitNullCheck(access.accessLocation())) { |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
95 metricImplicitNullCheck.increment(); |
15008
01fdabd19cd5
new AnchoringNode interface
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14976
diff
changeset
|
96 access.setGuard(null); |
14976
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
97 FixedAccessNode fixedAccess; |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
98 if (access instanceof FloatingAccessNode) { |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
99 fixedAccess = ((FloatingAccessNode) access).asFixedNode(); |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
100 replaceCurrent(fixedAccess); |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
101 } else { |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
102 fixedAccess = (FixedAccessNode) access; |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
103 } |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
104 fixedAccess.setNullCheck(true); |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
105 LogicNode condition = guard.condition(); |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
106 guard.replaceAndDelete(fixedAccess); |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
107 if (condition.usages().isEmpty()) { |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
108 GraphUtil.killWithUnusedFloatingInputs(condition); |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
109 } |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14713
diff
changeset
|
110 nullGuarded.remove(fixedAccess.object()); |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
111 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
112 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
113 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
114 |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
115 private void processGuard(Node node) { |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
116 GuardNode guard = (GuardNode) node; |
13723
1834ae0bc965
GuardLowering: do not use trapping accesses for guards with a speculation
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13641
diff
changeset
|
117 if (guard.negated() && guard.condition() instanceof IsNullNode && (guard.getSpeculation() == null || guard.getSpeculation().equals(Constant.NULL_OBJECT))) { |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
118 ValueNode obj = ((IsNullNode) guard.condition()).object(); |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
119 nullGuarded.put(obj, guard); |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
120 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
121 } |
9268
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
122 |
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
123 private boolean isImplicitNullCheck(LocationNode location) { |
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
124 if (location instanceof ConstantLocationNode) { |
9525
038fa65cbd8d
Consistent naming of accessor methods in the LocationNode class hierarchy
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9512
diff
changeset
|
125 return ((ConstantLocationNode) location).getDisplacement() < implicitNullCheckLimit; |
9268
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
126 } else { |
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
127 return false; |
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
128 } |
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
129 } |
8295
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
130 } |
60f90b4b6a12
Implement implicit null check on HIR during guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8221
diff
changeset
|
131 |
9268
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
132 private static class LowerGuards extends ScheduledNodeIterator { |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
133 |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
134 private final Block block; |
13641
5a9afbf72714
Add a speculation oop for uncommon trap deoptimization. Save it in the SpeculationLog during deoptimization.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13323
diff
changeset
|
135 private boolean useGuardIdAsDebugId; |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
136 |
13641
5a9afbf72714
Add a speculation oop for uncommon trap deoptimization. Save it in the SpeculationLog during deoptimization.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13323
diff
changeset
|
137 public LowerGuards(Block block, boolean useGuardIdAsDebugId) { |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
138 this.block = block; |
13641
5a9afbf72714
Add a speculation oop for uncommon trap deoptimization. Save it in the SpeculationLog during deoptimization.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13323
diff
changeset
|
139 this.useGuardIdAsDebugId = useGuardIdAsDebugId; |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
140 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
141 |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
142 @Override |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
143 protected void processNode(Node node) { |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
144 if (node instanceof GuardNode) { |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
145 GuardNode guard = (GuardNode) node; |
13154
1e22792abdbc
Make GuardNode extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
12719
diff
changeset
|
146 FixedWithNextNode lowered = guard.lowerGuard(); |
1e22792abdbc
Make GuardNode extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
12719
diff
changeset
|
147 if (lowered != null) { |
1e22792abdbc
Make GuardNode extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
12719
diff
changeset
|
148 replaceCurrent(lowered); |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
149 } else { |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
150 lowerToIf(guard); |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
151 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
152 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
153 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
154 |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
155 private void lowerToIf(GuardNode guard) { |
9602
19c5a07c7843
Introduce a graph() method that returns a StructuredGraph, to make many explicit casts unnecessary
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9525
diff
changeset
|
156 StructuredGraph graph = guard.graph(); |
9436
ae815a4c112a
Rename BeginNode => AbstractBeginNode and make abstract. Introduce concrete subclass BeginNode.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
9268
diff
changeset
|
157 AbstractBeginNode fastPath = graph.add(new BeginNode()); |
12699
38b84d5a66fd
Start passing down a 'speculation id' to deoptimizations.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11719
diff
changeset
|
158 @SuppressWarnings("deprecation") |
13641
5a9afbf72714
Add a speculation oop for uncommon trap deoptimization. Save it in the SpeculationLog during deoptimization.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13323
diff
changeset
|
159 DeoptimizeNode deopt = graph.add(new DeoptimizeNode(guard.action(), guard.reason(), useGuardIdAsDebugId ? guard.getId() : 0, guard.getSpeculation())); |
9436
ae815a4c112a
Rename BeginNode => AbstractBeginNode and make abstract. Introduce concrete subclass BeginNode.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
9268
diff
changeset
|
160 AbstractBeginNode deoptBranch = AbstractBeginNode.begin(deopt); |
ae815a4c112a
Rename BeginNode => AbstractBeginNode and make abstract. Introduce concrete subclass BeginNode.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
9268
diff
changeset
|
161 AbstractBeginNode trueSuccessor; |
ae815a4c112a
Rename BeginNode => AbstractBeginNode and make abstract. Introduce concrete subclass BeginNode.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
9268
diff
changeset
|
162 AbstractBeginNode falseSuccessor; |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
163 insertLoopExits(deopt); |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
164 if (guard.negated()) { |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
165 trueSuccessor = deoptBranch; |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
166 falseSuccessor = fastPath; |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
167 } else { |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
168 trueSuccessor = fastPath; |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
169 falseSuccessor = deoptBranch; |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
170 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
171 IfNode ifNode = graph.add(new IfNode(guard.condition(), trueSuccessor, falseSuccessor, trueSuccessor == fastPath ? 1 : 0)); |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
172 guard.replaceAndDelete(fastPath); |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
173 insert(ifNode, fastPath); |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
174 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
175 |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
176 private void insertLoopExits(DeoptimizeNode deopt) { |
15108
b6711b514576
Remove LoopBeginNode loopBegin() from Loop.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
177 Loop<Block> loop = block.getLoop(); |
9602
19c5a07c7843
Introduce a graph() method that returns a StructuredGraph, to make many explicit casts unnecessary
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9525
diff
changeset
|
178 StructuredGraph graph = deopt.graph(); |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
179 while (loop != null) { |
15108
b6711b514576
Remove LoopBeginNode loopBegin() from Loop.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
180 LoopExitNode exit = graph.add(new LoopExitNode((LoopBeginNode) loop.header.getBeginNode())); |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
181 graph.addBeforeFixed(deopt, exit); |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
182 loop = loop.parent; |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
183 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
184 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
185 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
186 |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
187 @Override |
9268
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
188 protected void run(StructuredGraph graph, MidTierContext context) { |
13283
17c9afa0bfcb
Allow GuardLoweringPhase, FrameStateAssignementPhase and the different lowerings to work with graph at any valid guards stage
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13154
diff
changeset
|
189 if (graph.getGuardsStage().ordinal() < GuardsStage.FIXED_DEOPTS.ordinal()) { |
17c9afa0bfcb
Allow GuardLoweringPhase, FrameStateAssignementPhase and the different lowerings to work with graph at any valid guards stage
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13154
diff
changeset
|
190 SchedulePhase schedule = new SchedulePhase(SchedulingStrategy.EARLIEST); |
17c9afa0bfcb
Allow GuardLoweringPhase, FrameStateAssignementPhase and the different lowerings to work with graph at any valid guards stage
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13154
diff
changeset
|
191 schedule.apply(graph); |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
192 |
13283
17c9afa0bfcb
Allow GuardLoweringPhase, FrameStateAssignementPhase and the different lowerings to work with graph at any valid guards stage
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13154
diff
changeset
|
193 for (Block block : schedule.getCFG().getBlocks()) { |
13284
a3500d145fe1
make GuardLoweringPhase work even when no context can provide an implicitNullCheckLimit
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13283
diff
changeset
|
194 processBlock(block, schedule, context != null ? context.getTarget().implicitNullCheckLimit : 0); |
13283
17c9afa0bfcb
Allow GuardLoweringPhase, FrameStateAssignementPhase and the different lowerings to work with graph at any valid guards stage
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13154
diff
changeset
|
195 } |
17c9afa0bfcb
Allow GuardLoweringPhase, FrameStateAssignementPhase and the different lowerings to work with graph at any valid guards stage
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13154
diff
changeset
|
196 graph.setGuardsStage(GuardsStage.FIXED_DEOPTS); |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
197 } |
11579
ae619d70bf4b
Rename LoweringType to GuardsPhase and make it an attribute of StructuredGraphs
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11396
diff
changeset
|
198 |
13283
17c9afa0bfcb
Allow GuardLoweringPhase, FrameStateAssignementPhase and the different lowerings to work with graph at any valid guards stage
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13154
diff
changeset
|
199 assert graph.getNodes(GuardNode.class).isEmpty(); |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
200 } |
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
201 |
9268
2d80e5f17bf8
Make GuardLoweringPhase reentrant.
Roland Schatz <roland.schatz@oracle.com>
parents:
9203
diff
changeset
|
202 private static void processBlock(Block block, SchedulePhase schedule, int implicitNullCheckLimit) { |
9864
063a712fe8d8
converted remaining options in GraalOptions to new system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9646
diff
changeset
|
203 if (OptImplicitNullChecks.getValue() && implicitNullCheckLimit > 0) { |
11715
100e196f8728
ScheduledNodeIterator needs to be able to reconnect even if something is inserted after the last fixed node of a block when there is only one successor
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11705
diff
changeset
|
204 new UseImplicitNullChecks(implicitNullCheckLimit).processNodes(block, schedule); |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
205 } |
13323
48e821e409eb
Add Debug.isDumpEnabledForMethod() and Debug.isLogEnabledForMethod() use it to diable graph compression and enable guard-id-as-debug-id
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
13290
diff
changeset
|
206 new LowerGuards(block, Debug.isDumpEnabledForMethod() || Debug.isLogEnabledForMethod()).processNodes(block, schedule); |
8404
24ddd568aa0c
Refactor GuardLoweringPhase: use the same iterator code for implict null checks and guard lowering
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8403
diff
changeset
|
207 } |
8207
ed880b9992b4
Add GuardLoweringPhase which transforms floating guards into fixed if+deopt
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
208 } |