Mercurial > hg > truffle
annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/debug/OpaqueNode.java @ 19403:61d3cb8e1280
Add generic parameter to NodeClass. Change Graph#getNodes(Class) to Graph#getNodes(NodeClass).
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 16 Feb 2015 17:47:43 +0100 |
parents | 7e2c87dae93e |
children | 8fc336a04d77 |
rev | line source |
---|---|
19045
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
1 /* |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved. |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
4 * |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
8 * |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
14 * |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
18 * |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
21 * questions. |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
22 */ |
19128
04a07ceab00d
GraphBuilderPlugins for GraalDirectives.
Roland Schatz <roland.schatz@oracle.com>
parents:
19045
diff
changeset
|
23 package com.oracle.graal.nodes.debug; |
19045
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
24 |
19396
7e2c87dae93e
Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19128
diff
changeset
|
25 import com.oracle.graal.graph.*; |
19045
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
26 import com.oracle.graal.nodeinfo.*; |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
27 import com.oracle.graal.nodes.*; |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
28 import com.oracle.graal.nodes.calc.*; |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
29 import com.oracle.graal.nodes.spi.*; |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
30 |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
31 @NodeInfo |
19396
7e2c87dae93e
Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19128
diff
changeset
|
32 public final class OpaqueNode extends FloatingNode implements LIRLowerable { |
19045
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
33 |
19403
61d3cb8e1280
Add generic parameter to NodeClass. Change Graph#getNodes(Class) to Graph#getNodes(NodeClass).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19396
diff
changeset
|
34 public static final NodeClass<OpaqueNode> TYPE = NodeClass.get(OpaqueNode.class); |
19045
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
35 @Input ValueNode value; |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
36 |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
37 public OpaqueNode(ValueNode value) { |
19396
7e2c87dae93e
Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19128
diff
changeset
|
38 super(TYPE, value.stamp().unrestricted()); |
19045
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
39 this.value = value; |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
40 } |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
41 |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
42 @Override |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
43 public void generate(NodeLIRBuilderTool gen) { |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
44 gen.setResult(this, gen.operand(value)); |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
45 } |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
46 |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
47 @NodeIntrinsic |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
48 public static native boolean opaque(boolean v); |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
49 |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
50 @NodeIntrinsic |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
51 public static native byte opaque(byte v); |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
52 |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
53 @NodeIntrinsic |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
54 public static native short opaque(short v); |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
55 |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
56 @NodeIntrinsic |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
57 public static native char opaque(char v); |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
58 |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
59 @NodeIntrinsic |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
60 public static native int opaque(int v); |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
61 |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
62 @NodeIntrinsic |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
63 public static native long opaque(long v); |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
64 |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
65 @NodeIntrinsic |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
66 public static native float opaque(float v); |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
67 |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
68 @NodeIntrinsic |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
69 public static native double opaque(double v); |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
70 |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
71 @NodeIntrinsic |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
72 public static native <T> T opaque(T v); |
862997951c0a
Add GraalDirectives API to influence compiler behavior.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
73 } |