Mercurial > hg > truffle
annotate src/share/vm/c1/c1_InstructionPrinter.hpp @ 11969:c65045599519
8021314: minimal1.make needs to force off components not supported by the minimal VM
Reviewed-by: coleenp, bpittore
author | dholmes |
---|---|
date | Thu, 25 Jul 2013 21:05:29 -0400 |
parents | acadb114c818 |
children | ce0cc25bc5e2 |
rev | line source |
---|---|
0 | 1 /* |
6842
b9a9ed0f8eeb
7197424: update copyright year to match last edit in jdk8 hotspot repository
mikael
parents:
6795
diff
changeset
|
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
0 | 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 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_C1_C1_INSTRUCTIONPRINTER_HPP |
26 #define SHARE_VM_C1_C1_INSTRUCTIONPRINTER_HPP | |
27 | |
28 #include "c1/c1_IR.hpp" | |
29 #include "c1/c1_Instruction.hpp" | |
30 #include "c1/c1_Runtime1.hpp" | |
31 | |
0 | 32 #ifndef PRODUCT |
33 class InstructionPrinter: public InstructionVisitor { | |
34 private: | |
35 outputStream* _output; | |
36 bool _print_phis; | |
37 | |
38 enum LayoutConstants { | |
39 bci_pos = 2, | |
40 use_pos = 7, | |
41 temp_pos = 12, | |
42 instr_pos = 19, | |
43 end_pos = 60 | |
44 }; | |
45 | |
46 bool is_illegal_phi(Value v); | |
47 | |
48 public: | |
49 InstructionPrinter(bool print_phis = true, outputStream* output = tty) | |
50 : _print_phis(print_phis) | |
51 , _output(output) | |
52 {} | |
53 | |
54 outputStream* output() { return _output; } | |
55 | |
56 // helpers | |
57 static const char* basic_type_name(BasicType type); | |
58 static const char* cond_name(If::Condition cond); | |
59 static const char* op_name(Bytecodes::Code op); | |
60 bool is_phi_of_block(Value v, BlockBegin* b); | |
61 | |
62 // type-specific print functions | |
63 void print_klass(ciKlass* klass); | |
64 void print_object(Value obj); | |
65 | |
66 // generic print functions | |
67 void print_temp(Value value); | |
68 void print_field(AccessField* field); | |
69 void print_indexed(AccessIndexed* indexed); | |
70 void print_monitor(AccessMonitor* monitor); | |
71 void print_op2(Op2* instr); | |
72 void print_value(Value value); | |
73 void print_instr(Instruction* instr); | |
74 void print_stack(ValueStack* stack); | |
75 void print_inline_level(BlockBegin* block); | |
76 void print_unsafe_op(UnsafeOp* op, const char* name); | |
77 void print_unsafe_raw_op(UnsafeRawOp* op, const char* name); | |
78 void print_unsafe_object_op(UnsafeObjectOp* op, const char* name); | |
79 void print_phi(int i, Value v, BlockBegin* b); | |
80 void print_alias(Value v); | |
81 | |
82 // line printing of instructions | |
83 void fill_to(int pos, char filler = ' '); | |
84 void print_head(); | |
85 void print_line(Instruction* instr); | |
86 | |
87 // visitor functionality | |
88 virtual void do_Phi (Phi* x); | |
89 virtual void do_Local (Local* x); | |
90 virtual void do_Constant (Constant* x); | |
91 virtual void do_LoadField (LoadField* x); | |
92 virtual void do_StoreField (StoreField* x); | |
93 virtual void do_ArrayLength (ArrayLength* x); | |
94 virtual void do_LoadIndexed (LoadIndexed* x); | |
95 virtual void do_StoreIndexed (StoreIndexed* x); | |
96 virtual void do_NegateOp (NegateOp* x); | |
97 virtual void do_ArithmeticOp (ArithmeticOp* x); | |
98 virtual void do_ShiftOp (ShiftOp* x); | |
99 virtual void do_LogicOp (LogicOp* x); | |
100 virtual void do_CompareOp (CompareOp* x); | |
101 virtual void do_IfOp (IfOp* x); | |
102 virtual void do_Convert (Convert* x); | |
103 virtual void do_NullCheck (NullCheck* x); | |
6266
1d7922586cf6
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
4966
diff
changeset
|
104 virtual void do_TypeCast (TypeCast* x); |
0 | 105 virtual void do_Invoke (Invoke* x); |
106 virtual void do_NewInstance (NewInstance* x); | |
107 virtual void do_NewTypeArray (NewTypeArray* x); | |
108 virtual void do_NewObjectArray (NewObjectArray* x); | |
109 virtual void do_NewMultiArray (NewMultiArray* x); | |
110 virtual void do_CheckCast (CheckCast* x); | |
111 virtual void do_InstanceOf (InstanceOf* x); | |
112 virtual void do_MonitorEnter (MonitorEnter* x); | |
113 virtual void do_MonitorExit (MonitorExit* x); | |
114 virtual void do_Intrinsic (Intrinsic* x); | |
115 virtual void do_BlockBegin (BlockBegin* x); | |
116 virtual void do_Goto (Goto* x); | |
117 virtual void do_If (If* x); | |
118 virtual void do_IfInstanceOf (IfInstanceOf* x); | |
119 virtual void do_TableSwitch (TableSwitch* x); | |
120 virtual void do_LookupSwitch (LookupSwitch* x); | |
121 virtual void do_Return (Return* x); | |
122 virtual void do_Throw (Throw* x); | |
123 virtual void do_Base (Base* x); | |
124 virtual void do_OsrEntry (OsrEntry* x); | |
125 virtual void do_ExceptionObject(ExceptionObject* x); | |
126 virtual void do_RoundFP (RoundFP* x); | |
127 virtual void do_UnsafeGetRaw (UnsafeGetRaw* x); | |
128 virtual void do_UnsafePutRaw (UnsafePutRaw* x); | |
129 virtual void do_UnsafeGetObject(UnsafeGetObject* x); | |
130 virtual void do_UnsafePutObject(UnsafePutObject* x); | |
6795
7eca5de9e0b6
7023898: Intrinsify AtomicLongFieldUpdater.getAndIncrement()
roland
parents:
6266
diff
changeset
|
131 virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x); |
0 | 132 virtual void do_UnsafePrefetchRead (UnsafePrefetchRead* x); |
133 virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x); | |
134 virtual void do_ProfileCall (ProfileCall* x); | |
1783 | 135 virtual void do_ProfileInvoke (ProfileInvoke* x); |
2166
403dc4c1d7f5
6809483: hotspot:::method_entry are not correctly generated for "method()V"
never
parents:
1972
diff
changeset
|
136 virtual void do_RuntimeCall (RuntimeCall* x); |
4966
701a83c86f28
7120481: storeStore barrier in constructor with final field
jiangli
parents:
2166
diff
changeset
|
137 virtual void do_MemBar (MemBar* x); |
8860 | 138 virtual void do_RangeCheckPredicate(RangeCheckPredicate* x); |
9156
acadb114c818
8011648: C1: optimized build is broken after 7153771
roland
parents:
8860
diff
changeset
|
139 #ifdef ASSERT |
8860 | 140 virtual void do_Assert (Assert* x); |
9156
acadb114c818
8011648: C1: optimized build is broken after 7153771
roland
parents:
8860
diff
changeset
|
141 #endif |
0 | 142 }; |
143 #endif // PRODUCT | |
1972 | 144 |
145 #endif // SHARE_VM_C1_C1_INSTRUCTIONPRINTER_HPP |