annotate src/os/bsd/dtrace/generateJvmOffsets.h @ 15388:769fc3629f59

Add phase FlowSensitiveReductionPhase. It is possible to remove GuardingPiNodes, CheckCastNodes, and FixedGuards during HighTier under certain conditions (control-flow sensitive conditions). The phase added in this commit (FlowSensitiveReductionPhase) does that, and in addition replaces usages with "downcasting" PiNodes when possible thus resulting in more precise object stamps (e.g., non-null). Finally, usages of floating, side-effects free, expressions are also simplified (as per control-flow sensitive conditions). The newly added phase runs only during HighTier and can be deactivated using Graal option FlowSensitiveReduction (it is active by default).
author Miguel Garcia <miguel.m.garcia@oracle.com>
date Fri, 25 Apr 2014 16:50:52 +0200
parents 436b4a3231bf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
1 /*
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
4 *
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
7 * published by the Free Software Foundation.
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
8 *
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
13 * accompanied this code).
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
14 *
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
18 *
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
21 * questions.
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
22 *
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
23 */
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
24
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
25 #ifndef OS_SOLARIS_DTRACE_GENERATEJVMOFFSETS_H
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
26 #define OS_SOLARIS_DTRACE_GENERATEJVMOFFSETS_H
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
27
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
28 #include <stdio.h>
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
29 #include <strings.h>
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
30
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
31 typedef enum GEN_variant {
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
32 GEN_OFFSET = 0,
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
33 GEN_INDEX = 1,
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
34 GEN_TABLE = 2
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
35 } GEN_variant;
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
36
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
37 extern "C" {
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
38 int generateJvmOffsets(GEN_variant gen_var);
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
39 void gen_prologue(GEN_variant gen_var);
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
40 void gen_epilogue(GEN_variant gen_var);
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
41 }
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
42
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents:
diff changeset
43 #endif // OS_SOLARIS_DTRACE_GENERATEJVMOFFSETS_H