hotspot/src/share/vm/opto/convertnode.hpp
author iveresov
Thu, 22 Jan 2015 11:25:23 -0800
changeset 28723 0a36120cb225
parent 23528 8f1a7f5e8066
child 35551 36ef3841fb34
permissions -rw-r--r--
8071302: assert(!_reg_node[reg_lo] || edge_from_to(_reg_node[reg_lo], def)) failed: after block local Summary: Add merge nodes to node to block mapping 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
/*
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
     2
 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
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_CONVERTNODE_HPP
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    26
#define SHARE_VM_OPTO_CONVERTNODE_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
//------------------------------Conv2BNode-------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    33
// Convert int/pointer to a Boolean.  Map zero to zero, all else to 1.
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    34
class Conv2BNode : public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    35
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    36
  Conv2BNode( Node *i ) : Node(0,i) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    37
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    38
  virtual const Type *bottom_type() const { return TypeInt::BOOL; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    39
  virtual Node *Identity( PhaseTransform *phase );
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    40
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    41
  virtual uint  ideal_reg() const { return Op_RegI; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    42
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    43
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    44
// The conversions operations are all Alpha sorted.  Please keep it that way!
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    45
//------------------------------ConvD2FNode------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    46
// Convert double to float
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    47
class ConvD2FNode : public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    48
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    49
  ConvD2FNode( Node *in1 ) : Node(0,in1) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    50
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    51
  virtual const Type *bottom_type() const { return Type::FLOAT; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    52
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    53
  virtual Node *Identity( PhaseTransform *phase );
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    54
  virtual uint  ideal_reg() const { return Op_RegF; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    55
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    56
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    57
//------------------------------ConvD2INode------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    58
// Convert Double to Integer
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    59
class ConvD2INode : public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    60
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    61
  ConvD2INode( Node *in1 ) : Node(0,in1) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    62
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    63
  virtual const Type *bottom_type() const { return TypeInt::INT; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    64
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    65
  virtual Node *Identity( PhaseTransform *phase );
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    66
  virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    67
  virtual uint  ideal_reg() const { return Op_RegI; }
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
//------------------------------ConvD2LNode------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    71
// Convert Double to Long
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    72
class ConvD2LNode : public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    73
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    74
  ConvD2LNode( Node *dbl ) : Node(0,dbl) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    75
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    76
  virtual const Type *bottom_type() const { return TypeLong::LONG; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    77
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    78
  virtual Node *Identity( PhaseTransform *phase );
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    79
  virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    80
  virtual uint ideal_reg() const { return Op_RegL; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    81
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    82
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    83
//------------------------------ConvF2DNode------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    84
// Convert Float to a Double.
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    85
class ConvF2DNode : public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    86
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    87
  ConvF2DNode( Node *in1 ) : Node(0,in1) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    88
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    89
  virtual const Type *bottom_type() const { return Type::DOUBLE; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    90
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    91
  virtual uint  ideal_reg() const { return Op_RegD; }
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
//------------------------------ConvF2INode------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    95
// Convert float to integer
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    96
class ConvF2INode : public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    97
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    98
  ConvF2INode( Node *in1 ) : Node(0,in1) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
    99
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   100
  virtual const Type *bottom_type() const { return TypeInt::INT; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   101
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   102
  virtual Node *Identity( PhaseTransform *phase );
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   103
  virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   104
  virtual uint  ideal_reg() const { return Op_RegI; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   105
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   106
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   107
//------------------------------ConvF2LNode------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   108
// Convert float to long
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   109
class ConvF2LNode : public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   110
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   111
  ConvF2LNode( Node *in1 ) : Node(0,in1) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   112
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   113
  virtual const Type *bottom_type() const { return TypeLong::LONG; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   114
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   115
  virtual Node *Identity( PhaseTransform *phase );
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   116
  virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   117
  virtual uint  ideal_reg() const { return Op_RegL; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   118
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   119
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   120
//------------------------------ConvI2DNode------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   121
// Convert Integer to Double
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   122
class ConvI2DNode : public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   123
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   124
  ConvI2DNode( Node *in1 ) : Node(0,in1) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   125
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   126
  virtual const Type *bottom_type() const { return Type::DOUBLE; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   127
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   128
  virtual uint  ideal_reg() const { return Op_RegD; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   129
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   130
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   131
//------------------------------ConvI2FNode------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   132
// Convert Integer to Float
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   133
class ConvI2FNode : public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   134
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   135
  ConvI2FNode( Node *in1 ) : Node(0,in1) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   136
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   137
  virtual const Type *bottom_type() const { return Type::FLOAT; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   138
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   139
  virtual Node *Identity( PhaseTransform *phase );
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   140
  virtual uint  ideal_reg() const { return Op_RegF; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   141
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   142
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   143
//------------------------------ConvI2LNode------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   144
// Convert integer to long
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   145
class ConvI2LNode : public TypeNode {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   146
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   147
  ConvI2LNode(Node *in1, const TypeLong* t = TypeLong::INT)
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   148
  : TypeNode(t, 2)
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   149
  { init_req(1, in1); }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   150
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   151
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   152
  virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   153
  virtual uint  ideal_reg() const { return Op_RegL; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   154
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   155
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   156
//------------------------------ConvL2DNode------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   157
// Convert Long to Double
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   158
class ConvL2DNode : public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   159
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   160
  ConvL2DNode( Node *in1 ) : Node(0,in1) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   161
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   162
  virtual const Type *bottom_type() const { return Type::DOUBLE; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   163
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   164
  virtual uint ideal_reg() const { return Op_RegD; }
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
//------------------------------ConvL2FNode------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   168
// Convert Long to Float
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   169
class ConvL2FNode : public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   170
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   171
  ConvL2FNode( Node *in1 ) : Node(0,in1) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   172
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   173
  virtual const Type *bottom_type() const { return Type::FLOAT; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   174
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   175
  virtual uint  ideal_reg() const { return Op_RegF; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   176
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   177
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   178
//------------------------------ConvL2INode------------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   179
// Convert long to integer
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   180
class ConvL2INode : public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   181
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   182
  ConvL2INode( Node *in1 ) : Node(0,in1) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   183
  virtual int Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   184
  virtual const Type *bottom_type() const { return TypeInt::INT; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   185
  virtual Node *Identity( PhaseTransform *phase );
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   186
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   187
  virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   188
  virtual uint  ideal_reg() const { return Op_RegI; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   189
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   190
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   191
//-----------------------------RoundFloatNode----------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   192
class RoundFloatNode: public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   193
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   194
  RoundFloatNode(Node* c, Node *in1): Node(c, in1) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   195
  virtual int   Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   196
  virtual const Type *bottom_type() const { return Type::FLOAT; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   197
  virtual uint  ideal_reg() const { return Op_RegF; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   198
  virtual Node *Identity( PhaseTransform *phase );
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   199
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   200
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   201
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   202
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   203
//-----------------------------RoundDoubleNode---------------------------------
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   204
class RoundDoubleNode: public Node {
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   205
  public:
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   206
  RoundDoubleNode(Node* c, Node *in1): Node(c, in1) {}
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   207
  virtual int   Opcode() const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   208
  virtual const Type *bottom_type() const { return Type::DOUBLE; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   209
  virtual uint  ideal_reg() const { return Op_RegD; }
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   210
  virtual Node *Identity( PhaseTransform *phase );
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   211
  virtual const Type *Value( PhaseTransform *phase ) const;
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   212
};
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   213
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   214
8f1a7f5e8066 8001532: C2 node files refactoring
morris
parents:
diff changeset
   215
#endif // SHARE_VM_OPTO_CONVERTNODE_HPP