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 */
23 package org.graalvm.compiler.lir.gen;
24
25 import org.graalvm.compiler.core.common.CompressEncoding;
26 import org.graalvm.compiler.core.common.LIRKind;
27 import org.graalvm.compiler.core.common.calc.Condition;
28 import org.graalvm.compiler.core.common.cfg.AbstractBlockBase;
29 import org.graalvm.compiler.core.common.spi.CodeGenProviders;
30 import org.graalvm.compiler.core.common.spi.ForeignCallLinkage;
31 import org.graalvm.compiler.core.common.spi.ForeignCallsProvider;
32 import org.graalvm.compiler.core.common.type.Stamp;
33 import org.graalvm.compiler.debug.GraalError;
34 import org.graalvm.compiler.graph.NodeSourcePosition;
35 import org.graalvm.compiler.lir.LIRFrameState;
36 import org.graalvm.compiler.lir.LIRInstruction;
37 import org.graalvm.compiler.lir.LabelRef;
38 import org.graalvm.compiler.lir.SwitchStrategy;
39 import org.graalvm.compiler.lir.Variable;
40
41 import jdk.vm.ci.code.CodeCacheProvider;
42 import jdk.vm.ci.code.Register;
43 import jdk.vm.ci.code.RegisterAttributes;
44 import jdk.vm.ci.code.TargetDescription;
91 @Override
92 public abstract void close();
93
94 }
95
96 ArithmeticLIRGeneratorTool getArithmetic();
97
98 CodeGenProviders getProviders();
99
100 TargetDescription target();
101
102 MetaAccessProvider getMetaAccess();
103
104 CodeCacheProvider getCodeCache();
105
106 ForeignCallsProvider getForeignCalls();
107
108 AbstractBlockBase<?> getCurrentBlock();
109
110 LIRGenerationResult getResult();
111
112 boolean hasBlockEnd(AbstractBlockBase<?> block);
113
114 MoveFactory getMoveFactory();
115
116 /**
117 * Get a special {@link MoveFactory} for spill moves.
118 *
119 * The instructions returned by this factory must only depend on the input values. References to
120 * values that require interaction with register allocation are strictly forbidden.
121 */
122 MoveFactory getSpillMoveFactory();
123
124 BlockScope getBlockScope(AbstractBlockBase<?> block);
125
126 Value emitConstant(LIRKind kind, Constant constant);
127
128 Value emitJavaConstant(JavaConstant constant);
129
130 /**
|
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 */
23 package org.graalvm.compiler.lir.gen;
24
25 import jdk.vm.ci.code.RegisterConfig;
26 import org.graalvm.compiler.core.common.CompressEncoding;
27 import org.graalvm.compiler.core.common.LIRKind;
28 import org.graalvm.compiler.core.common.calc.Condition;
29 import org.graalvm.compiler.core.common.cfg.AbstractBlockBase;
30 import org.graalvm.compiler.core.common.spi.CodeGenProviders;
31 import org.graalvm.compiler.core.common.spi.ForeignCallLinkage;
32 import org.graalvm.compiler.core.common.spi.ForeignCallsProvider;
33 import org.graalvm.compiler.core.common.type.Stamp;
34 import org.graalvm.compiler.debug.GraalError;
35 import org.graalvm.compiler.graph.NodeSourcePosition;
36 import org.graalvm.compiler.lir.LIRFrameState;
37 import org.graalvm.compiler.lir.LIRInstruction;
38 import org.graalvm.compiler.lir.LabelRef;
39 import org.graalvm.compiler.lir.SwitchStrategy;
40 import org.graalvm.compiler.lir.Variable;
41
42 import jdk.vm.ci.code.CodeCacheProvider;
43 import jdk.vm.ci.code.Register;
44 import jdk.vm.ci.code.RegisterAttributes;
45 import jdk.vm.ci.code.TargetDescription;
92 @Override
93 public abstract void close();
94
95 }
96
97 ArithmeticLIRGeneratorTool getArithmetic();
98
99 CodeGenProviders getProviders();
100
101 TargetDescription target();
102
103 MetaAccessProvider getMetaAccess();
104
105 CodeCacheProvider getCodeCache();
106
107 ForeignCallsProvider getForeignCalls();
108
109 AbstractBlockBase<?> getCurrentBlock();
110
111 LIRGenerationResult getResult();
112
113 RegisterConfig getRegisterConfig();
114
115 boolean hasBlockEnd(AbstractBlockBase<?> block);
116
117 MoveFactory getMoveFactory();
118
119 /**
120 * Get a special {@link MoveFactory} for spill moves.
121 *
122 * The instructions returned by this factory must only depend on the input values. References to
123 * values that require interaction with register allocation are strictly forbidden.
124 */
125 MoveFactory getSpillMoveFactory();
126
127 BlockScope getBlockScope(AbstractBlockBase<?> block);
128
129 Value emitConstant(LIRKind kind, Constant constant);
130
131 Value emitJavaConstant(JavaConstant constant);
132
133 /**
|