hotspot/src/share/vm/opto/intrinsicnode.hpp
author goetz
Mon, 02 Nov 2015 15:52:37 +0100
changeset 34194 213af0859e7e
parent 33628 09241459a8b8
child 35551 36ef3841fb34
permissions -rw-r--r--
8141137: C2 fails rematerializing nodes using flag registers. Summary: Don't rem. if input stretches several live ranges. If rem., don't add SpillCopy on RegFlags edge. Reviewed-by: kvn, vlivanov
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
     1
/*
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
     4
 *
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
     7
 * published by the Free Software Foundation.
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
     8
 *
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    13
 * accompanied this code).
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    14
 *
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    18
 *
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    21
 * questions.
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    22
 *
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    23
 */
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    24
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    25
#ifndef SHARE_VM_OPTO_INTRINSICNODE_HPP
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    26
#define SHARE_VM_OPTO_INTRINSICNODE_HPP
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    27
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    28
#include "opto/node.hpp"
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    29
#include "opto/opcodes.hpp"
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    30
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    31
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    32
//----------------------PartialSubtypeCheckNode--------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    33
// The 2nd slow-half of a subtype check.  Scan the subklass's 2ndary superklass
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    34
// array for an instance of the superklass.  Set a hidden internal cache on a
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    35
// hit (cache is checked with exposed code in gen_subtype_check()).  Return
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    36
// not zero for a miss or zero for a hit.
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    37
class PartialSubtypeCheckNode : public Node {
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    38
 public:
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    39
  PartialSubtypeCheckNode(Node* c, Node* sub, Node* super) : Node(c,sub,super) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    40
  virtual int Opcode() const;
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    41
  virtual const Type* bottom_type() const { return TypeRawPtr::BOTTOM; }
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    42
  virtual uint ideal_reg() const { return Op_RegP; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    43
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    44
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    45
//------------------------------StrIntrinsic-------------------------------
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    46
// Base class for Ideal nodes used in String intrinsic code.
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    47
class StrIntrinsicNode: public Node {
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    48
 public:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    49
  // Possible encodings of the two parameters passed to the string intrinsic.
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    50
  // 'L' stands for Latin1 and 'U' stands for UTF16. For example, 'LU' means that
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    51
  // the first string is Latin1 encoded and the second string is UTF16 encoded.
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    52
  typedef enum ArgEncoding { LL, LU, UL, UU, none } ArgEnc;
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    53
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    54
 protected:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    55
  // Encoding of strings. Used to select the right version of the intrinsic.
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    56
  const ArgEncoding _encoding;
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    57
  virtual uint size_of() const;
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    58
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    59
 public:
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    60
  StrIntrinsicNode(Node* control, Node* char_array_mem,
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    61
                   Node* s1, Node* c1, Node* s2, Node* c2, ArgEncoding encoding):
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    62
  Node(control, char_array_mem, s1, c1, s2, c2), _encoding(encoding) {
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    63
  }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    64
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    65
  StrIntrinsicNode(Node* control, Node* char_array_mem,
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    66
                   Node* s1, Node* s2, Node* c, ArgEncoding encoding):
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    67
  Node(control, char_array_mem, s1, s2, c), _encoding(encoding) {
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    68
  }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    69
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    70
  StrIntrinsicNode(Node* control, Node* char_array_mem,
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    71
                   Node* s1, Node* s2, ArgEncoding encoding):
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    72
  Node(control, char_array_mem, s1, s2), _encoding(encoding) {
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    73
  }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    74
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    75
  virtual bool depends_only_on_test() const { return false; }
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    76
  virtual const TypePtr* adr_type() const { return TypeAryPtr::BYTES; }
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    77
  virtual uint match_edge(uint idx) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    78
  virtual uint ideal_reg() const { return Op_RegI; }
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    79
  virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    80
  virtual const Type* Value(PhaseTransform* phase) const;
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    81
  ArgEncoding encoding() const { return _encoding; }
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    82
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    83
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    84
//------------------------------StrComp-------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    85
class StrCompNode: public StrIntrinsicNode {
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    86
 public:
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    87
  StrCompNode(Node* control, Node* char_array_mem,
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    88
              Node* s1, Node* c1, Node* s2, Node* c2, ArgEncoding encoding):
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    89
  StrIntrinsicNode(control, char_array_mem, s1, c1, s2, c2, encoding) {};
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    90
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    91
  virtual const Type* bottom_type() const { return TypeInt::INT; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    92
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    93
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    94
//------------------------------StrEquals-------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    95
class StrEqualsNode: public StrIntrinsicNode {
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    96
 public:
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    97
  StrEqualsNode(Node* control, Node* char_array_mem,
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    98
                Node* s1, Node* s2, Node* c, ArgEncoding encoding):
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
    99
  StrIntrinsicNode(control, char_array_mem, s1, s2, c, encoding) {};
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   100
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   101
  virtual const Type* bottom_type() const { return TypeInt::BOOL; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   102
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   103
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   104
//------------------------------StrIndexOf-------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   105
class StrIndexOfNode: public StrIntrinsicNode {
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   106
 public:
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   107
  StrIndexOfNode(Node* control, Node* char_array_mem,
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   108
                 Node* s1, Node* c1, Node* s2, Node* c2, ArgEncoding encoding):
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   109
  StrIntrinsicNode(control, char_array_mem, s1, c1, s2, c2, encoding) {};
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   110
  virtual int Opcode() const;
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   111
  virtual const Type* bottom_type() const { return TypeInt::INT; }
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   112
};
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   113
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   114
//------------------------------StrIndexOfChar-------------------------------------
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   115
class StrIndexOfCharNode: public StrIntrinsicNode {
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   116
 public:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   117
  StrIndexOfCharNode(Node* control, Node* char_array_mem,
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   118
                     Node* s1, Node* c1, Node* c, ArgEncoding encoding):
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   119
  StrIntrinsicNode(control, char_array_mem, s1, c1, c, encoding) {};
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   120
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   121
  virtual const Type* bottom_type() const { return TypeInt::INT; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   122
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   123
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   124
//--------------------------StrCompressedCopy-------------------------------
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   125
class StrCompressedCopyNode: public StrIntrinsicNode {
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   126
 public:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   127
  StrCompressedCopyNode(Node* control, Node* arymem,
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   128
                        Node* s1, Node* s2, Node* c):
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   129
  StrIntrinsicNode(control, arymem, s1, s2, c, none) {};
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   130
  virtual int Opcode() const;
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   131
  virtual const Type* bottom_type() const { return TypeInt::INT; }
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   132
  virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   133
  virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   134
};
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   135
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   136
//--------------------------StrInflatedCopy---------------------------------
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   137
class StrInflatedCopyNode: public StrIntrinsicNode {
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   138
 public:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   139
  StrInflatedCopyNode(Node* control, Node* arymem,
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   140
                      Node* s1, Node* s2, Node* c):
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   141
  StrIntrinsicNode(control, arymem, s1, s2, c, none) {};
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   142
  virtual int Opcode() const;
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   143
  virtual const Type* bottom_type() const { return Type::MEMORY; }
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   144
  virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   145
  virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   146
};
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   147
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   148
//------------------------------AryEq---------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   149
class AryEqNode: public StrIntrinsicNode {
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   150
 public:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   151
  AryEqNode(Node* control, Node* char_array_mem,
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   152
            Node* s1, Node* s2, ArgEncoding encoding):
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   153
  StrIntrinsicNode(control, char_array_mem, s1, s2, encoding) {};
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   154
  virtual int Opcode() const;
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   155
  virtual const Type* bottom_type() const { return TypeInt::BOOL; }
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   156
};
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   157
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   158
//------------------------------HasNegatives---------------------------------
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   159
class HasNegativesNode: public StrIntrinsicNode {
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   160
 public:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   161
  HasNegativesNode(Node* control, Node* char_array_mem, Node* s1, Node* c1):
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   162
  StrIntrinsicNode(control, char_array_mem, s1, c1, none) {};
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   163
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   164
  virtual const Type* bottom_type() const { return TypeInt::BOOL; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   165
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   166
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   167
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   168
//------------------------------EncodeISOArray--------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   169
// encode char[] to byte[] in ISO_8859_1
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   170
class EncodeISOArrayNode: public Node {
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   171
 public:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   172
  EncodeISOArrayNode(Node* control, Node* arymem, Node* s1, Node* s2, Node* c): Node(control, arymem, s1, s2, c) {};
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   173
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   174
  virtual bool depends_only_on_test() const { return false; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   175
  virtual const Type* bottom_type() const { return TypeInt::INT; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   176
  virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   177
  virtual uint match_edge(uint idx) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   178
  virtual uint ideal_reg() const { return Op_RegI; }
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   179
  virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 23528
diff changeset
   180
  virtual const Type* Value(PhaseTransform* phase) const;
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   181
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   182
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   183
#endif // SHARE_VM_OPTO_INTRINSICNODE_HPP