Mercurial > hg > graal-jvmci-8
annotate graal/com.oracle.graal.baseline/src/com/oracle/graal/baseline/BaselineBytecodeParser.java @ 15192:644dfe49c0f4
Move packages com.oracle.graal.cfg to com.oracle.graal.compiler.common.cfg.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Thu, 17 Apr 2014 13:18:18 +0200 |
parents | f4e31f06b019 |
children | 96bb07a5d667 |
rev | line source |
---|---|
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
1 /* |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
2 * Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved. |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
4 * |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
8 * |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
13 * accompanied this code). |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
14 * |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
18 * |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
21 * questions. |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
22 */ |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
23 package com.oracle.graal.baseline; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
24 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
25 import static com.oracle.graal.phases.GraalOptions.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
26 import static java.lang.reflect.Modifier.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
27 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
28 import java.util.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
29 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
30 import com.oracle.graal.alloc.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
31 import com.oracle.graal.api.code.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
32 import com.oracle.graal.api.meta.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
33 import com.oracle.graal.api.meta.ResolvedJavaType.Representation; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
34 import com.oracle.graal.bytecode.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
35 import com.oracle.graal.compiler.alloc.*; |
15192
644dfe49c0f4
Move packages com.oracle.graal.cfg to com.oracle.graal.compiler.common.cfg.
Josef Eisl <josef.eisl@jku.at>
parents:
15157
diff
changeset
|
36 import com.oracle.graal.compiler.common.cfg.*; |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
37 import com.oracle.graal.compiler.gen.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
38 import com.oracle.graal.compiler.target.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
39 import com.oracle.graal.debug.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
40 import com.oracle.graal.debug.Debug.Scope; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
41 import com.oracle.graal.graph.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
42 import com.oracle.graal.java.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
43 import com.oracle.graal.java.BciBlockMapping.BciBlock; |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
44 import com.oracle.graal.java.BciBlockMapping.LocalLiveness; |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
45 import com.oracle.graal.lir.*; |
15157
f4e31f06b019
Create com.oracle.graal.cfg project and move CFG related files.
Josef Eisl <josef.eisl@jku.at>
parents:
15128
diff
changeset
|
46 import com.oracle.graal.lir.StandardOp.BlockEndOp; |
14947
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
47 import com.oracle.graal.nodes.calc.*; |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
48 import com.oracle.graal.nodes.calc.FloatConvertNode.FloatConvert; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
49 import com.oracle.graal.nodes.cfg.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
50 import com.oracle.graal.phases.*; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
51 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
52 public class BaselineBytecodeParser extends AbstractBytecodeParser<Value, LIRFrameStateBuilder> implements BytecodeParserTool { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
53 private Backend backend; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
54 protected LIRGenerator gen; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
55 private LIRGenerationResult lirGenRes; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
56 private BytecodeLIRBuilder lirBuilder; |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
57 @SuppressWarnings("unused") private BciBlock[] loopHeaders; |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
58 private LocalLiveness liveness; |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
59 private BciBlockBitMap blockVisited; |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
60 |
15127
dc774fe9d0e0
BaselineCompiler: use PhiResolver.
Josef Eisl <josef.eisl@jku.at>
parents:
15112
diff
changeset
|
61 private static class BciBlockBitMap { |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
62 BitSet bitSet; |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
63 |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
64 public BciBlockBitMap(BciBlockMapping blockMap) { |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
65 bitSet = new BitSet(blockMap.blocks.size()); |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
66 } |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
67 |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
68 public boolean get(BciBlock block) { |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
69 return bitSet.get(block.getId()); |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
70 } |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
71 |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
72 public void set(BciBlock block) { |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
73 bitSet.set(block.getId()); |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
74 } |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
75 } |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
76 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
77 public BaselineBytecodeParser(MetaAccessProvider metaAccess, ResolvedJavaMethod method, GraphBuilderConfiguration graphBuilderConfig, OptimisticOptimizations optimisticOpts, |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
78 LIRFrameStateBuilder frameState, BytecodeStream stream, ProfilingInfo profilingInfo, ConstantPool constantPool, int entryBCI, Backend backend) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
79 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
80 super(metaAccess, method, graphBuilderConfig, optimisticOpts, frameState, stream, profilingInfo, constantPool, entryBCI); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
81 this.backend = backend; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
82 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
83 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
84 public LIRGenerationResult getLIRGenerationResult() { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
85 return lirGenRes; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
86 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
87 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
88 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
89 protected void build() { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
90 if (PrintProfilingInformation.getValue()) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
91 TTY.println("Profiling info for " + MetaUtil.format("%H.%n(%p)", method)); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
92 TTY.println(MetaUtil.indent(MetaUtil.profileToString(profilingInfo, method, CodeUtil.NEW_LINE), " ")); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
93 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
94 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
95 try (Indent indent = Debug.logAndIndent("build graph for %s", method)) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
96 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
97 // compute the block map, setup exception handlers and get the entrypoint(s) |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
98 BciBlockMapping blockMap = BciBlockMapping.create(method); |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
99 loopHeaders = blockMap.loopHeaders; |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
100 liveness = blockMap.liveness; |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
101 blockVisited = new BciBlockBitMap(blockMap); |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
102 // add predecessors |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
103 for (BciBlock block : blockMap.blocks) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
104 for (BciBlock successor : block.getSuccessors()) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
105 successor.getPredecessors().add(block); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
106 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
107 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
108 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
109 if (isSynchronized(method.getModifiers())) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
110 throw GraalInternalError.unimplemented("Handle synchronized methods"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
111 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
112 |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
113 frameState = new LIRFrameStateBuilder(method); |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
114 frameState.clearNonLiveLocals(blockMap.startBlock, liveness, true); |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
115 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
116 currentBlock = blockMap.startBlock; |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
117 blockMap.startBlock.entryState = frameState; |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
118 if (blockMap.startBlock.isLoopHeader) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
119 throw GraalInternalError.unimplemented("Handle start block as loop header"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
120 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
121 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
122 // add loops ? how do we add looks when we haven't parsed the bytecode? |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
123 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
124 // create the control flow graph |
15112
257ec29335cf
BaselineCompiler: add basic loop support.
Josef Eisl <josef.eisl@jku.at>
parents:
15110
diff
changeset
|
125 LIRControlFlowGraph cfg = new LIRControlFlowGraph(blockMap); |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
126 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
127 BlocksToDoubles blockProbabilities = new BlocksToDoubles(blockMap.blocks.size()); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
128 for (BciBlock b : blockMap.blocks) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
129 blockProbabilities.put(b, 1); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
130 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
131 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
132 // create the LIR |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
133 List<? extends AbstractBlock<?>> linearScanOrder = ComputeBlockOrder.computeLinearScanOrder(blockMap.blocks.size(), blockMap.startBlock, blockProbabilities); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
134 List<? extends AbstractBlock<?>> codeEmittingOrder = ComputeBlockOrder.computeCodeEmittingOrder(blockMap.blocks.size(), blockMap.startBlock, blockProbabilities); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
135 LIR lir = new LIR(cfg, linearScanOrder, codeEmittingOrder); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
136 |
15011
c8e575742f36
allow compilation with custom RegisterConfig
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14973
diff
changeset
|
137 FrameMap frameMap = backend.newFrameMap(null); |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
138 TargetDescription target = backend.getTarget(); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
139 CallingConvention cc = CodeUtil.getCallingConvention(backend.getProviders().getCodeCache(), CallingConvention.Type.JavaCallee, method, false); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
140 this.lirGenRes = backend.newLIRGenerationResult(lir, frameMap, null); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
141 this.gen = backend.newLIRGenerator(cc, lirGenRes); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
142 this.lirBuilder = backend.newBytecodeLIRBuilder(gen, this); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
143 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
144 try (Scope ds = Debug.scope("BackEnd", lir)) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
145 try (Scope s = Debug.scope("LIRGen", gen)) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
146 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
147 // possibly add all the arguments to slots in the local variable array |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
148 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
149 for (BciBlock block : blockMap.blocks) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
150 emitBlock(block); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
151 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
152 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
153 gen.beforeRegisterAllocation(); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
154 Debug.dump(lir, "After LIR generation"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
155 } catch (Throwable e) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
156 throw Debug.handle(e); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
157 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
158 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
159 try (Scope s = Debug.scope("Allocator")) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
160 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
161 if (backend.shouldAllocateRegisters()) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
162 new LinearScan(target, lir, frameMap).allocate(); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
163 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
164 } catch (Throwable e) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
165 throw Debug.handle(e); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
166 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
167 } catch (Throwable e) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
168 throw Debug.handle(e); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
169 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
170 } catch (Throwable e) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
171 throw Debug.handle(e); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
172 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
173 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
174 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
175 private void emitBlock(BciBlock b) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
176 if (lirGenRes.getLIR().getLIRforBlock(b) == null) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
177 for (BciBlock pred : b.getPredecessors()) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
178 if (!b.isLoopHeader() || !pred.isLoopEnd()) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
179 emitBlock(pred); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
180 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
181 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
182 processBlock(b); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
183 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
184 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
185 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
186 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
187 protected void handleUnresolvedLoadConstant(JavaType type) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
188 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
189 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
190 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
191 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
192 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
193 protected void handleUnresolvedCheckCast(JavaType type, Value object) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
194 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
195 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
196 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
197 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
198 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
199 protected void handleUnresolvedInstanceOf(JavaType type, Value object) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
200 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
201 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
202 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
203 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
204 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
205 protected void handleUnresolvedNewInstance(JavaType type) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
206 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
207 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
208 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
209 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
210 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
211 protected void handleUnresolvedNewObjectArray(JavaType type, Value length) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
212 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
213 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
214 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
215 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
216 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
217 protected void handleUnresolvedNewMultiArray(JavaType type, List<Value> dims) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
218 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
219 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
220 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
221 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
222 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
223 protected void handleUnresolvedLoadField(JavaField field, Value receiver) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
224 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
225 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
226 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
227 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
228 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
229 protected void handleUnresolvedStoreField(JavaField field, Value value, Value receiver) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
230 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
231 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
232 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
233 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
234 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
235 protected void handleUnresolvedExceptionType(Representation representation, JavaType type) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
236 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
237 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
238 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
239 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
240 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
241 protected Value genLoadIndexed(Value index, Value array, Kind kind) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
242 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
243 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
244 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
245 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
246 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
247 protected Value genStoreIndexed(Value array, Value index, Kind kind, Value value) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
248 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
249 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
250 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
251 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
252 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
253 protected Value genIntegerAdd(Kind kind, Value x, Value y) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
254 return gen.emitAdd(x, y); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
255 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
256 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
257 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
258 protected Value genIntegerSub(Kind kind, Value x, Value y) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
259 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
260 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
261 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
262 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
263 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
264 protected Value genIntegerMul(Kind kind, Value x, Value y) { |
15110
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
265 return gen.emitMul(x, y); |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
266 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
267 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
268 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
269 protected Value genFloatAdd(Kind kind, Value x, Value y, boolean isStrictFP) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
270 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
271 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
272 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
273 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
274 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
275 protected Value genFloatSub(Kind kind, Value x, Value y, boolean isStrictFP) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
276 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
277 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
278 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
279 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
280 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
281 protected Value genFloatMul(Kind kind, Value x, Value y, boolean isStrictFP) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
282 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
283 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
284 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
285 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
286 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
287 protected Value genFloatDiv(Kind kind, Value x, Value y, boolean isStrictFP) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
288 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
289 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
290 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
291 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
292 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
293 protected Value genFloatRem(Kind kind, Value x, Value y, boolean isStrictFP) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
294 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
295 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
296 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
297 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
298 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
299 protected Value genIntegerDiv(Kind kind, Value x, Value y) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
300 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
301 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
302 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
303 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
304 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
305 protected Value genIntegerRem(Kind kind, Value x, Value y) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
306 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
307 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
308 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
309 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
310 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
311 protected Value genNegateOp(Value x) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
312 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
313 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
314 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
315 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
316 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
317 protected Value genLeftShift(Kind kind, Value x, Value y) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
318 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
319 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
320 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
321 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
322 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
323 protected Value genRightShift(Kind kind, Value x, Value y) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
324 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
325 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
326 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
327 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
328 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
329 protected Value genUnsignedRightShift(Kind kind, Value x, Value y) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
330 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
331 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
332 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
333 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
334 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
335 protected Value genAnd(Kind kind, Value x, Value y) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
336 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
337 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
338 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
339 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
340 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
341 protected Value genOr(Kind kind, Value x, Value y) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
342 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
343 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
344 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
345 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
346 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
347 protected Value genXor(Kind kind, Value x, Value y) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
348 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
349 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
350 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
351 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
352 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
353 protected Value genNormalizeCompare(Value x, Value y, boolean isUnorderedLess) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
354 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
355 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
356 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
357 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
358 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
359 protected Value genFloatConvert(FloatConvert op, Value input) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
360 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
361 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
362 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
363 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
364 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
365 protected Value genNarrow(Value input, int bitCount) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
366 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
367 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
368 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
369 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
370 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
371 protected Value genSignExtend(Value input, int bitCount) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
372 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
373 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
374 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
375 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
376 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
377 protected Value genZeroExtend(Value input, int bitCount) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
378 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
379 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
380 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
381 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
382 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
383 protected Value genObjectEquals(Value x, Value y) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
384 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
385 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
386 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
387 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
388 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
389 protected Value genIntegerEquals(Value x, Value y) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
390 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
391 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
392 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
393 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
394 @Override |
14948
bc72e5ed9752
AbstractBytecodeParser: rename ifNode to genIf.
Josef Eisl <josef.eisl@jku.at>
parents:
14947
diff
changeset
|
395 protected void genIf(Value x, Condition cond, Value y) { |
14947
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
396 assert currentBlock.getSuccessors().size() == 2; |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
397 BciBlock trueBlock = currentBlock.getSuccessors().get(0); |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
398 BciBlock falseBlock = currentBlock.getSuccessors().get(1); |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
399 if (trueBlock == falseBlock) { |
15030
e098038093d5
AbstractBytecodeParser: move createTarget to GraphBuilderPhase.
Josef Eisl <josef.eisl@jku.at>
parents:
15029
diff
changeset
|
400 genGoto(); |
14947
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
401 return; |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
402 } |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
403 |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
404 double probability = profilingInfo.getBranchTakenProbability(bci()); |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
405 if (probability < 0) { |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
406 assert probability == -1 : "invalid probability"; |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
407 Debug.log("missing probability in %s at bci %d", method, bci()); |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
408 probability = 0.5; |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
409 } |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
410 |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
411 if (!optimisticOpts.removeNeverExecutedCode()) { |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
412 if (probability == 0) { |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
413 probability = 0.0000001; |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
414 } else if (probability == 1) { |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
415 probability = 0.999999; |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
416 } |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
417 } |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
418 |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
419 LabelRef trueDestination = getSuccessor(0); |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
420 LabelRef falseDestination = getSuccessor(1); |
14947
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
421 |
14971
63bc517c3543
BaselineCompiler: implement genIf.
Josef Eisl <josef.eisl@jku.at>
parents:
14962
diff
changeset
|
422 gen.emitCompareBranch(x.getKind(), x, y, cond, false, trueDestination, falseDestination, probability); |
14947
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
423 } |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
424 |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
425 @Override |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
426 protected Value genIntegerLessThan(Value x, Value y) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
427 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
428 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
429 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
430 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
431 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
432 protected Value genUnique(Value x) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
433 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
434 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
435 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
436 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
437 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
438 protected void genThrow() { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
439 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
440 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
441 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
442 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
443 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
444 protected Value genCheckCast(ResolvedJavaType type, Value object, JavaTypeProfile profileForTypeCheck, boolean b) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
445 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
446 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
447 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
448 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
449 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
450 protected Value genInstanceOf(ResolvedJavaType type, Value object, JavaTypeProfile profileForTypeCheck) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
451 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
452 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
453 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
454 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
455 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
456 protected Value genConditional(Value x) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
457 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
458 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
459 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
460 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
461 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
462 protected Value createNewInstance(ResolvedJavaType type, boolean fillContents) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
463 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
464 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
465 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
466 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
467 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
468 protected Value createNewArray(ResolvedJavaType elementType, Value length, boolean fillContents) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
469 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
470 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
471 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
472 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
473 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
474 protected Value createNewMultiArray(ResolvedJavaType type, List<Value> dims) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
475 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
476 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
477 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
478 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
479 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
480 protected Value genLoadField(Value receiver, ResolvedJavaField field) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
481 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
482 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
483 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
484 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
485 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
486 protected void emitNullCheck(Value receiver) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
487 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
488 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
489 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
490 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
491 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
492 protected void emitBoundsCheck(Value index, Value length) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
493 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
494 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
495 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
496 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
497 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
498 protected Value genArrayLength(Value x) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
499 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
500 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
501 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
502 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
503 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
504 protected Value genStoreField(Value receiver, ResolvedJavaField field, Value value) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
505 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
506 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
507 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
508 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
509 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
510 protected void genInvokeStatic(JavaMethod target) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
511 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
512 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
513 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
514 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
515 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
516 protected void genInvokeInterface(JavaMethod target) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
517 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
518 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
519 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
520 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
521 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
522 protected void genInvokeDynamic(JavaMethod target) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
523 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
524 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
525 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
526 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
527 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
528 protected void genInvokeVirtual(JavaMethod target) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
529 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
530 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
531 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
532 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
533 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
534 protected void genInvokeSpecial(JavaMethod target) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
535 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
536 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
537 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
538 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
539 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
540 protected void genReturn(Value x) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
541 gen.emitReturn(x); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
542 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
543 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
544 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
545 protected Value genMonitorEnter(Value x) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
546 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
547 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
548 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
549 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
550 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
551 protected Value genMonitorExit(Value x, Value returnValue) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
552 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
553 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
554 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
555 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
556 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
557 protected void genJsr(int dest) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
558 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
559 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
560 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
561 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
562 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
563 protected void genRet(int localIndex) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
564 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
565 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
566 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
567 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
568 @Override |
15028
7ee9decb2784
AbstractBytecodeParser: rework genIntegerSwitch.
Josef Eisl <josef.eisl@jku.at>
parents:
15027
diff
changeset
|
569 protected void genIntegerSwitch(Value value, ArrayList<BciBlock> actualSuccessors, int[] keys, double[] keyProbabilities, int[] keySuccessors) { |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
570 // TODO Auto-generated method stub |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
571 throw GraalInternalError.unimplemented("Auto-generated method stub"); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
572 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
573 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
574 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
575 protected Value appendConstant(Constant constant) { |
14947
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
576 if (gen.canInlineConstant(constant)) { |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
577 return constant; |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
578 } |
3825cf50cc5a
AbstractBytecodeParser: make ifNode abstract.
Josef Eisl <josef.eisl@jku.at>
parents:
14927
diff
changeset
|
579 return gen.emitMove(constant); |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
580 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
581 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
582 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
583 protected Value append(Value v) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
584 return v; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
585 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
586 |
15110
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
587 private void createTarget(BciBlock block) { |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
588 assert block != null && frameState != null; |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
589 assert !block.isExceptionEntry || frameState.stackSize() == 1; |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
590 |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
591 if (!blockVisited.get(block)) { |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
592 /* |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
593 * This is the first time we see this block as a branch target. Create and return a |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
594 * placeholder that later can be replaced with a MergeNode when we see this block again. |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
595 */ |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
596 blockVisited.set(block); |
15110
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
597 if (block.getPredecessorCount() > 1) { |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
598 /* |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
599 * If there are more than one predecessors we have to ensure that we are not passing |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
600 * constants to the new framestate otherwise we will get interfacing problems. |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
601 */ |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
602 moveConstantsToVariables(); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
603 } |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
604 block.entryState = frameState.copy(); |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
605 block.entryState.clearNonLiveLocals(block, liveness, true); |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
606 |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
607 Debug.log("createTarget %s: first visit", block); |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
608 return; |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
609 } |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
610 |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
611 // We already saw this block before, so we have to merge states. |
15110
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
612 if (!((LIRFrameStateBuilder) block.entryState).isCompatibleWith(frameState)) { |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
613 throw new BailoutException("stacks do not match; bytecodes would not verify"); |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
614 } |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
615 |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
616 if (block.isLoopHeader) { |
15112
257ec29335cf
BaselineCompiler: add basic loop support.
Josef Eisl <josef.eisl@jku.at>
parents:
15110
diff
changeset
|
617 assert currentBlock == null || currentBlock.getId() >= block.getId() : "must be backward branch"; |
15110
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
618 if (currentBlock != null && currentBlock.numNormalSuccessors() == 1) { |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
619 // this is the only successor of the current block so we can adjust |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
620 adaptFramestate((LIRFrameStateBuilder) block.entryState); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
621 return; |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
622 } |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
623 GraalInternalError.unimplemented("Loops not yet supported"); |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
624 } |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
625 assert currentBlock == null || currentBlock.getId() < block.getId() : "must not be backward branch"; |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
626 |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
627 /* |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
628 * This is the second time we see this block. Create the actual MergeNode and the End Node |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
629 * for the already existing edge. For simplicity, we leave the placeholder in the graph and |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
630 * just append the new nodes after the placeholder. |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
631 */ |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
632 if (currentBlock != null && currentBlock.numNormalSuccessors() == 1) { |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
633 // this is the only successor of the current block so we can adjust |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
634 adaptFramestate((LIRFrameStateBuilder) block.entryState); |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
635 return; |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
636 } |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
637 GraalInternalError.unimplemented("second block visit not yet implemented"); |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
638 |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
639 // merge frame states e.g. block.entryState.merge(mergeNode, target.state); |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
640 |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
641 Debug.log("createTarget %s: merging state", block); |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
642 } |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
643 |
15110
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
644 private void moveConstantsToVariables() { |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
645 Debug.log("moveConstantsToVariables: framestate before: %s", frameState); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
646 for (int i = 0; i < frameState.stackSize(); i++) { |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
647 Value src = frameState.stackAt(i); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
648 if (src instanceof Constant) { |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
649 AllocatableValue dst = gen.newVariable(src.getPlatformKind()); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
650 gen.emitMove(dst, src); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
651 frameState.storeStack(i, dst); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
652 Debug.log("introduce new variabe %s for stackslot %d (end of block %s", dst, i, currentBlock); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
653 } |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
654 } |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
655 for (int i = 0; i < frameState.localsSize(); i++) { |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
656 Value src = frameState.localAt(i); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
657 if (src instanceof Constant) { |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
658 AllocatableValue dst = gen.newVariable(src.getPlatformKind()); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
659 gen.emitMove(dst, src); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
660 frameState.storeLocal(i, dst); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
661 Debug.log("introduce new variabe %s for local %d (end of block %s", dst, i, currentBlock); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
662 } |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
663 } |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
664 Debug.log("moveConstantsToVariables: framestate after: %s", frameState); |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
665 } |
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
666 |
15127
dc774fe9d0e0
BaselineCompiler: use PhiResolver.
Josef Eisl <josef.eisl@jku.at>
parents:
15112
diff
changeset
|
667 private static void adaptValues(Value dst, Value src, PhiResolver resolver) { |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
668 if (dst == null) { |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
669 return; |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
670 } |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
671 assert src != null : "Source is null but Destination is not!"; |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
672 |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
673 if (!dst.equals(src)) { |
15127
dc774fe9d0e0
BaselineCompiler: use PhiResolver.
Josef Eisl <josef.eisl@jku.at>
parents:
15112
diff
changeset
|
674 resolver.move(dst, src); |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
675 } |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
676 } |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
677 |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
678 private void adaptFramestate(LIRFrameStateBuilder other) { |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
679 assert frameState.isCompatibleWith(other) : "framestates not compatible!"; |
15127
dc774fe9d0e0
BaselineCompiler: use PhiResolver.
Josef Eisl <josef.eisl@jku.at>
parents:
15112
diff
changeset
|
680 PhiResolver resolver = new PhiResolver(gen); |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
681 for (int i = 0; i < frameState.stackSize(); i++) { |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
682 Value src = frameState.stackAt(i); |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
683 Value dst = other.stackAt(i); |
15127
dc774fe9d0e0
BaselineCompiler: use PhiResolver.
Josef Eisl <josef.eisl@jku.at>
parents:
15112
diff
changeset
|
684 adaptValues(dst, src, resolver); |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
685 } |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
686 for (int i = 0; i < frameState.localsSize(); i++) { |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
687 Value src = frameState.localAt(i); |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
688 Value dst = other.localAt(i); |
15127
dc774fe9d0e0
BaselineCompiler: use PhiResolver.
Josef Eisl <josef.eisl@jku.at>
parents:
15112
diff
changeset
|
689 adaptValues(dst, src, resolver); |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
690 } |
15127
dc774fe9d0e0
BaselineCompiler: use PhiResolver.
Josef Eisl <josef.eisl@jku.at>
parents:
15112
diff
changeset
|
691 resolver.dispose(); |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
692 } |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
693 |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
694 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
695 protected void processBlock(BciBlock block) { |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
696 frameState = (LIRFrameStateBuilder) block.entryState; |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
697 setCurrentFrameState(frameState); |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
698 currentBlock = block; |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
699 iterateBytecodesForBlock(block); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
700 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
701 |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
702 private boolean isBlockEnd() { |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
703 List<LIRInstruction> l = gen.getResult().getLIR().getLIRforBlock(currentBlock); |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
704 if (l.isEmpty()) { |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
705 return false; |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
706 } |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
707 return l.get(l.size() - 1) instanceof BlockEndOp; |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
708 } |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
709 |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
710 @Override |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
711 protected void iterateBytecodesForBlock(BciBlock block) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
712 gen.doBlockStart(block); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
713 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
714 if (block == gen.getResult().getLIR().getControlFlowGraph().getStartBlock()) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
715 assert block.getPredecessorCount() == 0; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
716 lirBuilder.emitPrologue(method); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
717 } else { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
718 assert block.getPredecessorCount() > 0; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
719 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
720 |
15128
d0e2d565176f
BaselineCompiler: copy frame state builder at loop headers.
Josef Eisl <josef.eisl@jku.at>
parents:
15127
diff
changeset
|
721 if (block.isLoopHeader) { |
d0e2d565176f
BaselineCompiler: copy frame state builder at loop headers.
Josef Eisl <josef.eisl@jku.at>
parents:
15127
diff
changeset
|
722 /* |
d0e2d565176f
BaselineCompiler: copy frame state builder at loop headers.
Josef Eisl <josef.eisl@jku.at>
parents:
15127
diff
changeset
|
723 * We need to preserve the frame state builder of the loop header so that we can merge |
d0e2d565176f
BaselineCompiler: copy frame state builder at loop headers.
Josef Eisl <josef.eisl@jku.at>
parents:
15127
diff
changeset
|
724 * values for phi functions, so make a copy of it. |
d0e2d565176f
BaselineCompiler: copy frame state builder at loop headers.
Josef Eisl <josef.eisl@jku.at>
parents:
15127
diff
changeset
|
725 */ |
d0e2d565176f
BaselineCompiler: copy frame state builder at loop headers.
Josef Eisl <josef.eisl@jku.at>
parents:
15127
diff
changeset
|
726 block.entryState = frameState.copy(); |
d0e2d565176f
BaselineCompiler: copy frame state builder at loop headers.
Josef Eisl <josef.eisl@jku.at>
parents:
15127
diff
changeset
|
727 |
d0e2d565176f
BaselineCompiler: copy frame state builder at loop headers.
Josef Eisl <josef.eisl@jku.at>
parents:
15127
diff
changeset
|
728 } |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
729 int endBCI = stream.endBCI(); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
730 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
731 stream.setBCI(block.startBci); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
732 int bci = block.startBci; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
733 BytecodesParsed.add(block.endBci - bci); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
734 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
735 while (bci < endBCI) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
736 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
737 // read the opcode |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
738 int opcode = stream.currentBC(); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
739 // traceState(); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
740 traceInstruction(bci, opcode, bci == block.startBci); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
741 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
742 processBytecode(bci, opcode); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
743 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
744 stream.next(); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
745 bci = stream.currentBCI(); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
746 |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
747 if (isBlockEnd()) { |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
748 break; |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
749 } |
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
750 |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
751 if (bci < endBCI) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
752 if (bci > block.endBci) { |
15026 | 753 if (block.numNormalSuccessors() == 1) { |
754 assert !block.getSuccessor(0).isExceptionEntry; | |
755 // we fell through to the next block, add a goto and break | |
15030
e098038093d5
AbstractBytecodeParser: move createTarget to GraphBuilderPhase.
Josef Eisl <josef.eisl@jku.at>
parents:
15029
diff
changeset
|
756 genGoto(); |
15026 | 757 } |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
758 break; |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
759 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
760 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
761 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
762 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
763 assert LIR.verifyBlock(gen.getResult().getLIR(), block); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
764 gen.doBlockEnd(block); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
765 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
766 |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
767 public void storeLocal(int i, Value x) { |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
768 frameState.storeLocal(i, x); |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
769 } |
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
770 |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
771 LabelRef getSuccessor(int index) { |
15110
ca92d97bb0d6
BaselineCompiler: do not pass constants to blocks with multiple predecessors.
Josef Eisl <josef.eisl@jku.at>
parents:
15107
diff
changeset
|
772 createTarget(currentBlock.getSuccessor(index)); |
15034
136d1f3f1371
BaselineCompiler: implement framestate merge.
Josef Eisl <josef.eisl@jku.at>
parents:
15033
diff
changeset
|
773 return LabelRef.forSuccessor(lirGenRes.getLIR(), currentBlock, index); |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
774 } |
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
775 |
15030
e098038093d5
AbstractBytecodeParser: move createTarget to GraphBuilderPhase.
Josef Eisl <josef.eisl@jku.at>
parents:
15029
diff
changeset
|
776 @Override |
e098038093d5
AbstractBytecodeParser: move createTarget to GraphBuilderPhase.
Josef Eisl <josef.eisl@jku.at>
parents:
15029
diff
changeset
|
777 protected void genGoto() { |
15033
c6cf3474351c
BaselineBytecodeParser: add createTarget.
Josef Eisl <josef.eisl@jku.at>
parents:
15030
diff
changeset
|
778 gen.emitJump(getSuccessor(0)); |
15030
e098038093d5
AbstractBytecodeParser: move createTarget to GraphBuilderPhase.
Josef Eisl <josef.eisl@jku.at>
parents:
15029
diff
changeset
|
779 } |
e098038093d5
AbstractBytecodeParser: move createTarget to GraphBuilderPhase.
Josef Eisl <josef.eisl@jku.at>
parents:
15029
diff
changeset
|
780 |
14927
93de07975ea9
Create dedicated BaselineBytecodeParser, BytecodeLIRBuilder and amd64 specialization.
Josef Eisl <josef.eisl@jku.at>
parents:
diff
changeset
|
781 } |