annotate src/hotspot/share/opto/intrinsicnode.hpp @ 54048:744dc9c33676

8217417: Decorator name typo: C2_TIGHLY_COUPLED_ALLOC Summary: Fixed typo in decorator name, variables, and comments. Reviewed-by: tschatzl
author kbarrett
date Mon, 11 Mar 2019 02:05:07 -0400
parents 7384e00d5860
children
rev   line source
morris@23528 1 /*
coleenp@53244 2 * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
morris@23528 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
morris@23528 4 *
morris@23528 5 * This code is free software; you can redistribute it and/or modify it
morris@23528 6 * under the terms of the GNU General Public License version 2 only, as
morris@23528 7 * published by the Free Software Foundation.
morris@23528 8 *
morris@23528 9 * This code is distributed in the hope that it will be useful, but WITHOUT
morris@23528 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
morris@23528 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
morris@23528 12 * version 2 for more details (a copy is included in the LICENSE file that
morris@23528 13 * accompanied this code).
morris@23528 14 *
morris@23528 15 * You should have received a copy of the GNU General Public License version
morris@23528 16 * 2 along with this work; if not, write to the Free Software Foundation,
morris@23528 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
morris@23528 18 *
morris@23528 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
morris@23528 20 * or visit www.oracle.com if you need additional information or have any
morris@23528 21 * questions.
morris@23528 22 *
morris@23528 23 */
morris@23528 24
coleenp@53244 25 #ifndef SHARE_OPTO_INTRINSICNODE_HPP
coleenp@53244 26 #define SHARE_OPTO_INTRINSICNODE_HPP
morris@23528 27
morris@23528 28 #include "opto/node.hpp"
morris@23528 29 #include "opto/opcodes.hpp"
morris@23528 30
morris@23528 31
morris@23528 32 //----------------------PartialSubtypeCheckNode--------------------------------
morris@23528 33 // The 2nd slow-half of a subtype check. Scan the subklass's 2ndary superklass
morris@23528 34 // array for an instance of the superklass. Set a hidden internal cache on a
morris@23528 35 // hit (cache is checked with exposed code in gen_subtype_check()). Return
morris@23528 36 // not zero for a miss or zero for a hit.
morris@23528 37 class PartialSubtypeCheckNode : public Node {
thartmann@33628 38 public:
morris@23528 39 PartialSubtypeCheckNode(Node* c, Node* sub, Node* super) : Node(c,sub,super) {}
morris@23528 40 virtual int Opcode() const;
thartmann@33628 41 virtual const Type* bottom_type() const { return TypeRawPtr::BOTTOM; }
morris@23528 42 virtual uint ideal_reg() const { return Op_RegP; }
morris@23528 43 };
morris@23528 44
morris@23528 45 //------------------------------StrIntrinsic-------------------------------
thartmann@33628 46 // Base class for Ideal nodes used in String intrinsic code.
morris@23528 47 class StrIntrinsicNode: public Node {
thartmann@33628 48 public:
thartmann@33628 49 // Possible encodings of the two parameters passed to the string intrinsic.
thartmann@33628 50 // 'L' stands for Latin1 and 'U' stands for UTF16. For example, 'LU' means that
thartmann@33628 51 // the first string is Latin1 encoded and the second string is UTF16 encoded.
thartmann@33628 52 typedef enum ArgEncoding { LL, LU, UL, UU, none } ArgEnc;
thartmann@33628 53
thartmann@33628 54 protected:
thartmann@33628 55 // Encoding of strings. Used to select the right version of the intrinsic.
thartmann@33628 56 const ArgEncoding _encoding;
thartmann@33628 57 virtual uint size_of() const;
thartmann@33628 58
thartmann@33628 59 public:
morris@23528 60 StrIntrinsicNode(Node* control, Node* char_array_mem,
thartmann@33628 61 Node* s1, Node* c1, Node* s2, Node* c2, ArgEncoding encoding):
thartmann@33628 62 Node(control, char_array_mem, s1, c1, s2, c2), _encoding(encoding) {
morris@23528 63 }
morris@23528 64
morris@23528 65 StrIntrinsicNode(Node* control, Node* char_array_mem,
thartmann@33628 66 Node* s1, Node* s2, Node* c, ArgEncoding encoding):
thartmann@33628 67 Node(control, char_array_mem, s1, s2, c), _encoding(encoding) {
morris@23528 68 }
morris@23528 69
morris@23528 70 StrIntrinsicNode(Node* control, Node* char_array_mem,
thartmann@33628 71 Node* s1, Node* s2, ArgEncoding encoding):
thartmann@33628 72 Node(control, char_array_mem, s1, s2), _encoding(encoding) {
morris@23528 73 }
morris@23528 74
morris@23528 75 virtual bool depends_only_on_test() const { return false; }
thartmann@33628 76 virtual const TypePtr* adr_type() const { return TypeAryPtr::BYTES; }
morris@23528 77 virtual uint match_edge(uint idx) const;
morris@23528 78 virtual uint ideal_reg() const { return Op_RegI; }
thartmann@33628 79 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
thartmann@35551 80 virtual const Type* Value(PhaseGVN* phase) const;
thartmann@33628 81 ArgEncoding encoding() const { return _encoding; }
morris@23528 82 };
morris@23528 83
morris@23528 84 //------------------------------StrComp-------------------------------------
morris@23528 85 class StrCompNode: public StrIntrinsicNode {
thartmann@33628 86 public:
morris@23528 87 StrCompNode(Node* control, Node* char_array_mem,
thartmann@33628 88 Node* s1, Node* c1, Node* s2, Node* c2, ArgEncoding encoding):
thartmann@33628 89 StrIntrinsicNode(control, char_array_mem, s1, c1, s2, c2, encoding) {};
morris@23528 90 virtual int Opcode() const;
morris@23528 91 virtual const Type* bottom_type() const { return TypeInt::INT; }
morris@23528 92 };
morris@23528 93
morris@23528 94 //------------------------------StrEquals-------------------------------------
morris@23528 95 class StrEqualsNode: public StrIntrinsicNode {
thartmann@33628 96 public:
morris@23528 97 StrEqualsNode(Node* control, Node* char_array_mem,
thartmann@33628 98 Node* s1, Node* s2, Node* c, ArgEncoding encoding):
thartmann@33628 99 StrIntrinsicNode(control, char_array_mem, s1, s2, c, encoding) {};
morris@23528 100 virtual int Opcode() const;
morris@23528 101 virtual const Type* bottom_type() const { return TypeInt::BOOL; }
morris@23528 102 };
morris@23528 103
morris@23528 104 //------------------------------StrIndexOf-------------------------------------
morris@23528 105 class StrIndexOfNode: public StrIntrinsicNode {
thartmann@33628 106 public:
morris@23528 107 StrIndexOfNode(Node* control, Node* char_array_mem,
thartmann@33628 108 Node* s1, Node* c1, Node* s2, Node* c2, ArgEncoding encoding):
thartmann@33628 109 StrIntrinsicNode(control, char_array_mem, s1, c1, s2, c2, encoding) {};
morris@23528 110 virtual int Opcode() const;
morris@23528 111 virtual const Type* bottom_type() const { return TypeInt::INT; }
morris@23528 112 };
morris@23528 113
thartmann@33628 114 //------------------------------StrIndexOfChar-------------------------------------
thartmann@33628 115 class StrIndexOfCharNode: public StrIntrinsicNode {
thartmann@33628 116 public:
thartmann@33628 117 StrIndexOfCharNode(Node* control, Node* char_array_mem,
thartmann@33628 118 Node* s1, Node* c1, Node* c, ArgEncoding encoding):
thartmann@33628 119 StrIntrinsicNode(control, char_array_mem, s1, c1, c, encoding) {};
thartmann@33628 120 virtual int Opcode() const;
thartmann@33628 121 virtual const Type* bottom_type() const { return TypeInt::INT; }
thartmann@33628 122 };
thartmann@33628 123
thartmann@33628 124 //--------------------------StrCompressedCopy-------------------------------
thartmann@33628 125 class StrCompressedCopyNode: public StrIntrinsicNode {
thartmann@33628 126 public:
thartmann@33628 127 StrCompressedCopyNode(Node* control, Node* arymem,
thartmann@33628 128 Node* s1, Node* s2, Node* c):
thartmann@33628 129 StrIntrinsicNode(control, arymem, s1, s2, c, none) {};
thartmann@33628 130 virtual int Opcode() const;
thartmann@33628 131 virtual const Type* bottom_type() const { return TypeInt::INT; }
thartmann@33628 132 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
thartmann@33628 133 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
thartmann@33628 134 };
thartmann@33628 135
thartmann@33628 136 //--------------------------StrInflatedCopy---------------------------------
thartmann@33628 137 class StrInflatedCopyNode: public StrIntrinsicNode {
thartmann@33628 138 public:
thartmann@33628 139 StrInflatedCopyNode(Node* control, Node* arymem,
thartmann@33628 140 Node* s1, Node* s2, Node* c):
thartmann@33628 141 StrIntrinsicNode(control, arymem, s1, s2, c, none) {};
thartmann@33628 142 virtual int Opcode() const;
thartmann@33628 143 virtual const Type* bottom_type() const { return Type::MEMORY; }
thartmann@33628 144 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
thartmann@33628 145 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
thartmann@33628 146 };
thartmann@33628 147
morris@23528 148 //------------------------------AryEq---------------------------------------
morris@23528 149 class AryEqNode: public StrIntrinsicNode {
thartmann@33628 150 public:
thartmann@33628 151 AryEqNode(Node* control, Node* char_array_mem,
thartmann@33628 152 Node* s1, Node* s2, ArgEncoding encoding):
thartmann@33628 153 StrIntrinsicNode(control, char_array_mem, s1, s2, encoding) {};
morris@23528 154 virtual int Opcode() const;
morris@23528 155 virtual const Type* bottom_type() const { return TypeInt::BOOL; }
morris@23528 156 };
morris@23528 157
thartmann@33628 158 //------------------------------HasNegatives---------------------------------
thartmann@33628 159 class HasNegativesNode: public StrIntrinsicNode {
thartmann@33628 160 public:
thartmann@33628 161 HasNegativesNode(Node* control, Node* char_array_mem, Node* s1, Node* c1):
thartmann@33628 162 StrIntrinsicNode(control, char_array_mem, s1, c1, none) {};
thartmann@33628 163 virtual int Opcode() const;
thartmann@33628 164 virtual const Type* bottom_type() const { return TypeInt::BOOL; }
thartmann@33628 165 };
thartmann@33628 166
morris@23528 167
morris@23528 168 //------------------------------EncodeISOArray--------------------------------
morris@23528 169 // encode char[] to byte[] in ISO_8859_1
morris@23528 170 class EncodeISOArrayNode: public Node {
thartmann@33628 171 public:
thartmann@33628 172 EncodeISOArrayNode(Node* control, Node* arymem, Node* s1, Node* s2, Node* c): Node(control, arymem, s1, s2, c) {};
morris@23528 173 virtual int Opcode() const;
morris@23528 174 virtual bool depends_only_on_test() const { return false; }
morris@23528 175 virtual const Type* bottom_type() const { return TypeInt::INT; }
morris@23528 176 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
morris@23528 177 virtual uint match_edge(uint idx) const;
morris@23528 178 virtual uint ideal_reg() const { return Op_RegI; }
thartmann@33628 179 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
thartmann@35551 180 virtual const Type* Value(PhaseGVN* phase) const;
morris@23528 181 };
morris@23528 182
mhorie@52979 183 //-------------------------------DigitNode----------------------------------------
mhorie@52979 184 class DigitNode : public Node {
mhorie@52979 185 public:
mhorie@52979 186 DigitNode(Node* control, Node *in1) : Node(control, in1) {}
mhorie@52979 187 virtual int Opcode() const;
mhorie@52979 188 const Type* bottom_type() const { return TypeInt::BOOL; }
mhorie@52979 189 virtual uint ideal_reg() const { return Op_RegI; }
mhorie@52979 190 };
mhorie@52979 191
mhorie@52979 192 //------------------------------LowerCaseNode------------------------------------
mhorie@52979 193 class LowerCaseNode : public Node {
mhorie@52979 194 public:
mhorie@52979 195 LowerCaseNode(Node* control, Node *in1) : Node(control, in1) {}
mhorie@52979 196 virtual int Opcode() const;
mhorie@52979 197 const Type* bottom_type() const { return TypeInt::BOOL; }
mhorie@52979 198 virtual uint ideal_reg() const { return Op_RegI; }
mhorie@52979 199 };
mhorie@52979 200
mhorie@52979 201 //------------------------------UpperCaseNode------------------------------------
mhorie@52979 202 class UpperCaseNode : public Node {
mhorie@52979 203 public:
mhorie@52979 204 UpperCaseNode(Node* control, Node *in1) : Node(control, in1) {}
mhorie@52979 205 virtual int Opcode() const;
mhorie@52979 206 const Type* bottom_type() const { return TypeInt::BOOL; }
mhorie@52979 207 virtual uint ideal_reg() const { return Op_RegI; }
mhorie@52979 208 };
mhorie@52979 209
mhorie@52979 210 //------------------------------WhitespaceCode-----------------------------------
mhorie@52979 211 class WhitespaceNode : public Node {
mhorie@52979 212 public:
mhorie@52979 213 WhitespaceNode(Node* control, Node *in1) : Node(control, in1) {}
mhorie@52979 214 virtual int Opcode() const;
mhorie@52979 215 const Type* bottom_type() const { return TypeInt::BOOL; }
mhorie@52979 216 virtual uint ideal_reg() const { return Op_RegI; }
mhorie@52979 217 };
mhorie@52979 218
coleenp@53244 219 #endif // SHARE_OPTO_INTRINSICNODE_HPP