author | dlong |
Tue, 24 Sep 2019 12:47:15 -0400 | |
changeset 58299 | 6df94ce3ab2f |
parent 52910 | 583fd71c47d6 |
permissions | -rw-r--r-- |
43972 | 1 |
/* |
58299 | 2 |
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. |
43972 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
50858 | 23 |
|
24 |
||
43972 | 25 |
package org.graalvm.compiler.hotspot; |
26 |
||
49873 | 27 |
import jdk.internal.vm.compiler.collections.EconomicMap; |
28 |
import jdk.internal.vm.compiler.collections.Equivalence; |
|
43972 | 29 |
import org.graalvm.compiler.core.common.CompilationIdentifier; |
58299 | 30 |
import org.graalvm.compiler.core.common.alloc.RegisterAllocationConfig; |
43972 | 31 |
import org.graalvm.compiler.hotspot.stubs.Stub; |
32 |
import org.graalvm.compiler.lir.LIR; |
|
33 |
import org.graalvm.compiler.lir.LIRFrameState; |
|
34 |
import org.graalvm.compiler.lir.StandardOp.SaveRegistersOp; |
|
35 |
import org.graalvm.compiler.lir.framemap.FrameMapBuilder; |
|
36 |
import org.graalvm.compiler.lir.gen.LIRGenerationResult; |
|
37 |
||
38 |
import jdk.vm.ci.code.CallingConvention; |
|
39 |
import jdk.vm.ci.code.StackSlot; |
|
40 |
||
41 |
public class HotSpotLIRGenerationResult extends LIRGenerationResult { |
|
42 |
||
43 |
/** |
|
44 |
* The slot reserved for storing the original return address when a frame is marked for |
|
45 |
* deoptimization. The return address slot in the callee is overwritten with the address of a |
|
46 |
* deoptimization stub. |
|
47 |
*/ |
|
48 |
private StackSlot deoptimizationRescueSlot; |
|
49 |
protected final Object stub; |
|
51126
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
50 |
private final boolean requiresReservedStackAccessCheck; |
43972 | 51 |
|
52 |
private int maxInterpreterFrameSize; |
|
53 |
||
54 |
/** |
|
55 |
* Map from debug infos that need to be updated with callee save information to the operations |
|
56 |
* that provide the information. |
|
57 |
*/ |
|
46344 | 58 |
private EconomicMap<LIRFrameState, SaveRegistersOp> calleeSaveInfo = EconomicMap.create(Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE); |
43972 | 59 |
|
58299 | 60 |
public HotSpotLIRGenerationResult(CompilationIdentifier compilationId, LIR lir, FrameMapBuilder frameMapBuilder, RegisterAllocationConfig registerAllocationConfig, |
61 |
CallingConvention callingConvention, Object stub, boolean requiresReservedStackAccessCheck) { |
|
62 |
super(compilationId, lir, frameMapBuilder, registerAllocationConfig, callingConvention); |
|
43972 | 63 |
this.stub = stub; |
51126
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
64 |
this.requiresReservedStackAccessCheck = requiresReservedStackAccessCheck; |
43972 | 65 |
} |
66 |
||
46344 | 67 |
public EconomicMap<LIRFrameState, SaveRegistersOp> getCalleeSaveInfo() { |
43972 | 68 |
return calleeSaveInfo; |
69 |
} |
|
70 |
||
71 |
public Stub getStub() { |
|
72 |
return (Stub) stub; |
|
73 |
} |
|
74 |
||
75 |
public StackSlot getDeoptimizationRescueSlot() { |
|
76 |
return deoptimizationRescueSlot; |
|
77 |
} |
|
78 |
||
79 |
public final void setDeoptimizationRescueSlot(StackSlot stackSlot) { |
|
80 |
this.deoptimizationRescueSlot = stackSlot; |
|
81 |
} |
|
82 |
||
83 |
public void setMaxInterpreterFrameSize(int maxInterpreterFrameSize) { |
|
84 |
this.maxInterpreterFrameSize = maxInterpreterFrameSize; |
|
85 |
} |
|
86 |
||
87 |
public int getMaxInterpreterFrameSize() { |
|
88 |
return maxInterpreterFrameSize; |
|
89 |
} |
|
51126
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
90 |
|
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
91 |
public boolean requiresReservedStackAccessCheck() { |
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
92 |
return requiresReservedStackAccessCheck; |
a25c48c0a1ab
8181855: [Graal] runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
dlong
parents:
50858
diff
changeset
|
93 |
} |
43972 | 94 |
} |