src/hotspot/share/opto/connode.hpp
author erikj
Tue, 12 Sep 2017 19:03:39 +0200
changeset 47216 71c04702a3d5
parent 25930 hotspot/src/share/vm/opto/connode.hpp@eae8b7490d2c
child 53244 9807daeb47c4
permissions -rw-r--r--
8187443: Forest Consolidation: Move files to unified layout Reviewed-by: darcy, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 24923
diff changeset
     2
 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 2862
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 2862
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 2862
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    25
#ifndef SHARE_VM_OPTO_CONNODE_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
#define SHARE_VM_OPTO_CONNODE_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    28
#include "opto/node.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    29
#include "opto/opcodes.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#include "opto/type.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    31
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
class PhaseTransform;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
class MachNode;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
//------------------------------ConNode----------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
// Simple constants
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
class ConNode : public TypeNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
public:
22799
83e58bac7980 8027422: assert(_gvn.type(obj)->higher_equal(tjp)) failed: cast_up is no longer needed
roland
parents: 13974
diff changeset
    39
  ConNode( const Type *t ) : TypeNode(t->remove_speculative(),1) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
    init_req(0, (Node*)Compile::current()->root());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
    init_flags(Flag_is_Con);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
  virtual int  Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
  virtual uint hash() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  virtual const RegMask &out_RegMask() const { return RegMask::Empty; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
  virtual const RegMask &in_RegMask(uint) const { return RegMask::Empty; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
  // Polymorphic factory method:
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 24923
diff changeset
    49
  static ConNode* make(const Type *t);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
//------------------------------ConINode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
// Simple integer constants
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
class ConINode : public ConNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
  ConINode( const TypeInt *t ) : ConNode(t) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  // Factory method:
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 24923
diff changeset
    60
  static ConINode* make(int con) {
24923
9631f7d691dc 8034812: remove IDX_INIT macro hack in Node class
thartmann
parents: 23528
diff changeset
    61
    return new ConINode( TypeInt::make(con) );
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
//------------------------------ConPNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
// Simple pointer constants
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
class ConPNode : public ConNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  ConPNode( const TypePtr *t ) : ConNode(t) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  // Factory methods:
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 24923
diff changeset
    74
  static ConPNode* make(address con) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
    if (con == NULL)
24923
9631f7d691dc 8034812: remove IDX_INIT macro hack in Node class
thartmann
parents: 23528
diff changeset
    76
      return new ConPNode( TypePtr::NULL_PTR ) ;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
    else
24923
9631f7d691dc 8034812: remove IDX_INIT macro hack in Node class
thartmann
parents: 23528
diff changeset
    78
      return new ConPNode( TypeRawPtr::make(con) );
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    83
//------------------------------ConNNode--------------------------------------
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    84
// Simple narrow oop constants
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    85
class ConNNode : public ConNode {
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    86
public:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    87
  ConNNode( const TypeNarrowOop *t ) : ConNode(t) {}
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    88
  virtual int Opcode() const;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    89
};
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    90
13969
d2a189b83b87 7054512: Compress class pointers after perm gen removal
roland
parents: 13895
diff changeset
    91
//------------------------------ConNKlassNode---------------------------------
d2a189b83b87 7054512: Compress class pointers after perm gen removal
roland
parents: 13895
diff changeset
    92
// Simple narrow klass constants
d2a189b83b87 7054512: Compress class pointers after perm gen removal
roland
parents: 13895
diff changeset
    93
class ConNKlassNode : public ConNode {
d2a189b83b87 7054512: Compress class pointers after perm gen removal
roland
parents: 13895
diff changeset
    94
public:
d2a189b83b87 7054512: Compress class pointers after perm gen removal
roland
parents: 13895
diff changeset
    95
  ConNKlassNode( const TypeNarrowKlass *t ) : ConNode(t) {}
d2a189b83b87 7054512: Compress class pointers after perm gen removal
roland
parents: 13895
diff changeset
    96
  virtual int Opcode() const;
d2a189b83b87 7054512: Compress class pointers after perm gen removal
roland
parents: 13895
diff changeset
    97
};
d2a189b83b87 7054512: Compress class pointers after perm gen removal
roland
parents: 13895
diff changeset
    98
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    99
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
//------------------------------ConLNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
// Simple long constants
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
class ConLNode : public ConNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
  ConLNode( const TypeLong *t ) : ConNode(t) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  // Factory method:
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 24923
diff changeset
   108
  static ConLNode* make(jlong con) {
24923
9631f7d691dc 8034812: remove IDX_INIT macro hack in Node class
thartmann
parents: 23528
diff changeset
   109
    return new ConLNode( TypeLong::make(con) );
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
//------------------------------ConFNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
// Simple float constants
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
class ConFNode : public ConNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  ConFNode( const TypeF *t ) : ConNode(t) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  // Factory method:
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 24923
diff changeset
   122
  static ConFNode* make(float con) {
24923
9631f7d691dc 8034812: remove IDX_INIT macro hack in Node class
thartmann
parents: 23528
diff changeset
   123
    return new ConFNode( TypeF::make(con) );
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
//------------------------------ConDNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
// Simple double constants
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
class ConDNode : public ConNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
  ConDNode( const TypeD *t ) : ConNode(t) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
  // Factory method:
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 24923
diff changeset
   136
  static ConDNode* make(double con) {
24923
9631f7d691dc 8034812: remove IDX_INIT macro hack in Node class
thartmann
parents: 23528
diff changeset
   137
    return new ConDNode( TypeD::make(con) );
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
//------------------------------ThreadLocalNode--------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
// Ideal Node which returns the base of ThreadLocalStorage.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
class ThreadLocalNode : public Node {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
public:
23528
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents: 23491
diff changeset
   146
    ThreadLocalNode( ) : Node((Node*)Compile::current()->root()) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents: 23491
diff changeset
   147
    virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents: 23491
diff changeset
   148
    virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM;}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents: 23491
diff changeset
   149
    virtual uint ideal_reg() const { return Op_RegP; }
23491
f690330b10b9 8031320: Use Intel RTM instructions for locks
kvn
parents: 22799
diff changeset
   150
};
f690330b10b9 8031320: Use Intel RTM instructions for locks
kvn
parents: 22799
diff changeset
   151
f690330b10b9 8031320: Use Intel RTM instructions for locks
kvn
parents: 22799
diff changeset
   152
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   153
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   154
#endif // SHARE_VM_OPTO_CONNODE_HPP