annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSuitesProvider.java @ 20995:59e8737c06fd

Fix bug in LoadJavaMirrorWithKlassPhase.
author Roland Schatz <roland.schatz@oracle.com>
date Thu, 16 Apr 2015 18:52:25 +0200
parents 422e60a2f4b9
children 71af9afd7ff6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 /*
19778
09dfba3dbfb2 refactored HotSpot graph builder plugins into top level classes
Doug Simon <doug.simon@oracle.com>
parents: 19776
diff changeset
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
4 *
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 *
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 * accompanied this code).
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 *
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 *
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 * questions.
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 */
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
23 package com.oracle.graal.hotspot.meta;
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
24
15259
d90e5c22ba55 Move GraalOptions to graal.compiler.common.
Josef Eisl <josef.eisl@jku.at>
parents: 14991
diff changeset
25 import static com.oracle.graal.compiler.common.GraalOptions.*;
14991
64dcb92ee75a Truffle: Change signature for Truffle calls from (PackedFrame, Arguments) to (Object[]).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 13640
diff changeset
26
19883
4d33cd6e0c8f refactored GraphBuilderConfiguration (and its component classes) into a separate project
Doug Simon <doug.simon@oracle.com>
parents: 19882
diff changeset
27 import com.oracle.graal.graphbuilderconf.*;
4d33cd6e0c8f refactored GraphBuilderConfiguration (and its component classes) into a separate project
Doug Simon <doug.simon@oracle.com>
parents: 19882
diff changeset
28 import com.oracle.graal.graphbuilderconf.GraphBuilderConfiguration.*;
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
29 import com.oracle.graal.hotspot.*;
17153
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
30 import com.oracle.graal.hotspot.bridge.*;
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
31 import com.oracle.graal.hotspot.phases.*;
13585
f4f0a8a01ce0 remove PhasePlan
Lukas Stadler <lukas.stadler@jku.at>
parents: 13378
diff changeset
32 import com.oracle.graal.java.*;
19231
df89224ee04a Add LowLevelSuites to SuitesProvider.
Josef Eisl <josef.eisl@jku.at>
parents: 19132
diff changeset
33 import com.oracle.graal.lir.phases.*;
16871
e728b9d4905c Recompute phase suites when options are changed.
Roland Schatz <roland.schatz@oracle.com>
parents: 15909
diff changeset
34 import com.oracle.graal.options.*;
19196
75cf0899be47 Use serializable interface in DerivedOptionValue.
Roland Schatz <roland.schatz@oracle.com>
parents: 19132
diff changeset
35 import com.oracle.graal.options.DerivedOptionValue.OptionSupplier;
13585
f4f0a8a01ce0 remove PhasePlan
Lukas Stadler <lukas.stadler@jku.at>
parents: 13378
diff changeset
36 import com.oracle.graal.phases.*;
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
37 import com.oracle.graal.phases.tiers.*;
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
38
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
39 /**
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
40 * HotSpot implementation of {@link SuitesProvider}.
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
41 */
19237
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
42 public class HotSpotSuitesProvider implements SuitesProvider {
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
43
16871
e728b9d4905c Recompute phase suites when options are changed.
Roland Schatz <roland.schatz@oracle.com>
parents: 15909
diff changeset
44 protected final DerivedOptionValue<Suites> defaultSuites;
13585
f4f0a8a01ce0 remove PhasePlan
Lukas Stadler <lukas.stadler@jku.at>
parents: 13378
diff changeset
45 protected final PhaseSuite<HighTierContext> defaultGraphBuilderSuite;
19270
292442bed972 Rename LowLevelSuites to LIRSuites.
Josef Eisl <josef.eisl@jku.at>
parents: 19237
diff changeset
46 private final DerivedOptionValue<LIRSuites> defaultLIRSuites;
18525
c538c2c6b7e2 changed most references to HotSpotGraalRuntime to use HotSpotGraalRuntimeProvider instead
Doug Simon <doug.simon@oracle.com>
parents: 18126
diff changeset
47 protected final HotSpotGraalRuntimeProvider runtime;
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
48
19237
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
49 private class SuitesSupplier implements OptionSupplier<Suites> {
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
50
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
51 private static final long serialVersionUID = -3444304453553320390L;
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
52
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
53 public Suites get() {
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
54 return createSuites();
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
55 }
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
56
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
57 }
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
58
19270
292442bed972 Rename LowLevelSuites to LIRSuites.
Josef Eisl <josef.eisl@jku.at>
parents: 19237
diff changeset
59 private class LIRSuitesSupplier implements OptionSupplier<LIRSuites> {
19237
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
60
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
61 private static final long serialVersionUID = -1558586374095874299L;
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
62
19270
292442bed972 Rename LowLevelSuites to LIRSuites.
Josef Eisl <josef.eisl@jku.at>
parents: 19237
diff changeset
63 public LIRSuites get() {
292442bed972 Rename LowLevelSuites to LIRSuites.
Josef Eisl <josef.eisl@jku.at>
parents: 19237
diff changeset
64 return createLIRSuites();
19237
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
65 }
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
66
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
67 }
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
68
19882
0c29075aeafe graph builder plugins are created before GraphBuilderConfigurations and the process for deriving plugins from an existing configuration is simplified
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
69 public HotSpotSuitesProvider(HotSpotGraalRuntimeProvider runtime, Plugins plugins) {
12431
7080a96be216 rename: graalRuntime -> runtime, getGraalRuntime -> getRuntime
Doug Simon <doug.simon@oracle.com>
parents: 12429
diff changeset
70 this.runtime = runtime;
19882
0c29075aeafe graph builder plugins are created before GraphBuilderConfigurations and the process for deriving plugins from an existing configuration is simplified
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
71 this.defaultGraphBuilderSuite = createGraphBuilderSuite(plugins);
19237
9c921eb127ba SuitesProvider: use inner supplier classes.
Josef Eisl <josef.eisl@jku.at>
parents: 19235
diff changeset
72 this.defaultSuites = new DerivedOptionValue<>(new SuitesSupplier());
19270
292442bed972 Rename LowLevelSuites to LIRSuites.
Josef Eisl <josef.eisl@jku.at>
parents: 19237
diff changeset
73 this.defaultLIRSuites = new DerivedOptionValue<>(new LIRSuitesSupplier());
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
74 }
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
75
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
76 public Suites getDefaultSuites() {
16871
e728b9d4905c Recompute phase suites when options are changed.
Roland Schatz <roland.schatz@oracle.com>
parents: 15909
diff changeset
77 return defaultSuites.getValue();
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
78 }
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
79
13585
f4f0a8a01ce0 remove PhasePlan
Lukas Stadler <lukas.stadler@jku.at>
parents: 13378
diff changeset
80 public PhaseSuite<HighTierContext> getDefaultGraphBuilderSuite() {
f4f0a8a01ce0 remove PhasePlan
Lukas Stadler <lukas.stadler@jku.at>
parents: 13378
diff changeset
81 return defaultGraphBuilderSuite;
f4f0a8a01ce0 remove PhasePlan
Lukas Stadler <lukas.stadler@jku.at>
parents: 13378
diff changeset
82 }
f4f0a8a01ce0 remove PhasePlan
Lukas Stadler <lukas.stadler@jku.at>
parents: 13378
diff changeset
83
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
84 public Suites createSuites() {
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
85 Suites ret = Suites.createDefaultSuites();
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
86
13378
16d99e9d77ad Options: rename flag (AOTCompilation -> ImmutableCode)
Bernhard Urban <bernhard.urban@jku.at>
parents: 12431
diff changeset
87 if (ImmutableCode.getValue()) {
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
88 // lowering introduces class constants, therefore it must be after lowering
20995
59e8737c06fd Fix bug in LoadJavaMirrorWithKlassPhase.
Roland Schatz <roland.schatz@oracle.com>
parents: 20003
diff changeset
89 ret.getHighTier().appendPhase(new LoadJavaMirrorWithKlassPhase(runtime.getConfig().classMirrorOffset, runtime.getConfig().useCompressedOops ? runtime.getConfig().getOopEncoding() : null));
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
90 if (VerifyPhases.getValue()) {
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
91 ret.getHighTier().appendPhase(new AheadOfTimeVerificationPhase());
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
92 }
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
93 }
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
94
18531
cdb9c605051a removed some static accesses to HotSpotGraalRuntime from some tests
Doug Simon <doug.simon@oracle.com>
parents: 18525
diff changeset
95 ret.getMidTier().appendPhase(new WriteBarrierAdditionPhase(runtime.getConfig()));
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
96 if (VerifyPhases.getValue()) {
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
97 ret.getMidTier().appendPhase(new WriteBarrierVerificationPhase());
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
98 }
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
99
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
100 return ret;
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
101 }
13585
f4f0a8a01ce0 remove PhasePlan
Lukas Stadler <lukas.stadler@jku.at>
parents: 13378
diff changeset
102
19882
0c29075aeafe graph builder plugins are created before GraphBuilderConfigurations and the process for deriving plugins from an existing configuration is simplified
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
103 protected PhaseSuite<HighTierContext> createGraphBuilderSuite(Plugins plugins) {
13585
f4f0a8a01ce0 remove PhasePlan
Lukas Stadler <lukas.stadler@jku.at>
parents: 13378
diff changeset
104 PhaseSuite<HighTierContext> suite = new PhaseSuite<>();
19882
0c29075aeafe graph builder plugins are created before GraphBuilderConfigurations and the process for deriving plugins from an existing configuration is simplified
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
105 GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins);
17113
583bf03b3e1a apply CompilerToVM.shouldDebugNonSafepoints() to HotSpot Truffle compilations as well
Doug Simon <doug.simon@oracle.com>
parents: 16871
diff changeset
106 suite.appendPhase(new GraphBuilderPhase(config));
13585
f4f0a8a01ce0 remove PhasePlan
Lukas Stadler <lukas.stadler@jku.at>
parents: 13378
diff changeset
107 return suite;
f4f0a8a01ce0 remove PhasePlan
Lukas Stadler <lukas.stadler@jku.at>
parents: 13378
diff changeset
108 }
17153
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
109
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
110 /**
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
111 * Modifies the {@link GraphBuilderConfiguration} to build extra
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
112 * {@linkplain DebugInfoMode#Simple debug info} if the VM
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
113 * {@linkplain CompilerToVM#shouldDebugNonSafepoints() requests} it.
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
114 *
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
115 * @param gbs the current graph builder suite
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
116 * @return a possibly modified graph builder suite
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
117 */
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
118 public static PhaseSuite<HighTierContext> withSimpleDebugInfoIfRequested(PhaseSuite<HighTierContext> gbs) {
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
119 if (HotSpotGraalRuntime.runtime().getCompilerToVM().shouldDebugNonSafepoints()) {
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
120 PhaseSuite<HighTierContext> newGbs = gbs.copy();
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
121 GraphBuilderPhase graphBuilderPhase = (GraphBuilderPhase) newGbs.findPhase(GraphBuilderPhase.class).previous();
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
122 GraphBuilderConfiguration graphBuilderConfig = graphBuilderPhase.getGraphBuilderConfig();
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
123 GraphBuilderPhase newGraphBuilderPhase = new GraphBuilderPhase(graphBuilderConfig.withDebugInfoMode(DebugInfoMode.Simple));
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
124 newGbs.findPhase(GraphBuilderPhase.class).set(newGraphBuilderPhase);
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
125 return newGbs;
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
126 }
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
127 return gbs;
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
128 }
646ddd52d79a only generate extra debug info if on HotSpot *and* compiling for HotSpot execution
Doug Simon <doug.simon@oracle.com>
parents: 17113
diff changeset
129
19270
292442bed972 Rename LowLevelSuites to LIRSuites.
Josef Eisl <josef.eisl@jku.at>
parents: 19237
diff changeset
130 public LIRSuites getDefaultLIRSuites() {
292442bed972 Rename LowLevelSuites to LIRSuites.
Josef Eisl <josef.eisl@jku.at>
parents: 19237
diff changeset
131 return defaultLIRSuites.getValue();
19231
df89224ee04a Add LowLevelSuites to SuitesProvider.
Josef Eisl <josef.eisl@jku.at>
parents: 19132
diff changeset
132 }
df89224ee04a Add LowLevelSuites to SuitesProvider.
Josef Eisl <josef.eisl@jku.at>
parents: 19132
diff changeset
133
19270
292442bed972 Rename LowLevelSuites to LIRSuites.
Josef Eisl <josef.eisl@jku.at>
parents: 19237
diff changeset
134 public LIRSuites createLIRSuites() {
20003
422e60a2f4b9 Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 19883
diff changeset
135 LIRSuites suites = Suites.createDefaultLIRSuites();
422e60a2f4b9 Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 19883
diff changeset
136 String profileInstructions = HotSpotBackend.Options.ASMInstructionProfiling.getValue();
422e60a2f4b9 Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 19883
diff changeset
137 if (profileInstructions != null) {
422e60a2f4b9 Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 19883
diff changeset
138 suites.getPostAllocationOptimizationStage().appendPhase(new HotSpotInstructionProfiling(profileInstructions));
422e60a2f4b9 Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 19883
diff changeset
139 }
422e60a2f4b9 Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 19883
diff changeset
140 return suites;
19231
df89224ee04a Add LowLevelSuites to SuitesProvider.
Josef Eisl <josef.eisl@jku.at>
parents: 19132
diff changeset
141 }
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
142 }