0N/A/*
1472N/A * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A *
0N/A */
0N/A
1879N/A#ifndef SHARE_VM_OPTO_SUBNODE_HPP
1879N/A#define SHARE_VM_OPTO_SUBNODE_HPP
1879N/A
1879N/A#include "opto/node.hpp"
1879N/A#include "opto/opcodes.hpp"
1879N/A#include "opto/type.hpp"
1879N/A
0N/A// Portions of code courtesy of Clifford Click
0N/A
0N/A//------------------------------SUBNode----------------------------------------
0N/A// Class SUBTRACTION functionality. This covers all the usual 'subtract'
0N/A// behaviors. Subtract-integer, -float, -double, binary xor, compare-integer,
0N/A// -float, and -double are all inherited from this class. The compare
0N/A// functions behave like subtract functions, except that all negative answers
0N/A// are compressed into -1, and all positive answers compressed to 1.
0N/Aclass SubNode : public Node {
0N/Apublic:
0N/A SubNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {
0N/A init_class_id(Class_Sub);
0N/A }
0N/A
0N/A // Handle algebraic identities here. If we have an identity, return the Node
0N/A // we are equivalent to. We look for "add of zero" as an identity.
0N/A virtual Node *Identity( PhaseTransform *phase );
0N/A
0N/A // Compute a new Type for this node. Basically we just do the pre-check,
0N/A // then call the virtual add() to set the type.
0N/A virtual const Type *Value( PhaseTransform *phase ) const;
0N/A
0N/A // Supplied function returns the subtractend of the inputs.
0N/A // This also type-checks the inputs for sanity. Guaranteed never to
0N/A // be passed a TOP or BOTTOM type, these are filtered out by a pre-check.
0N/A virtual const Type *sub( const Type *, const Type * ) const = 0;
0N/A
0N/A // Supplied function to return the additive identity type.
0N/A // This is returned whenever the subtracts inputs are the same.
0N/A virtual const Type *add_id() const = 0;
0N/A
0N/A};
0N/A
0N/A
0N/A// NOTE: SubINode should be taken away and replaced by add and negate
0N/A//------------------------------SubINode---------------------------------------
0N/A// Subtract 2 integers
0N/Aclass SubINode : public SubNode {
0N/Apublic:
0N/A SubINode( Node *in1, Node *in2 ) : SubNode(in1,in2) {}
0N/A virtual int Opcode() const;
0N/A virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
0N/A virtual const Type *sub( const Type *, const Type * ) const;
0N/A const Type *add_id() const { return TypeInt::ZERO; }
0N/A const Type *bottom_type() const { return TypeInt::INT; }
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A};
0N/A
0N/A//------------------------------SubLNode---------------------------------------
0N/A// Subtract 2 integers
0N/Aclass SubLNode : public SubNode {
0N/Apublic:
0N/A SubLNode( Node *in1, Node *in2 ) : SubNode(in1,in2) {}
0N/A virtual int Opcode() const;
0N/A virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
0N/A virtual const Type *sub( const Type *, const Type * ) const;
0N/A const Type *add_id() const { return TypeLong::ZERO; }
0N/A const Type *bottom_type() const { return TypeLong::LONG; }
0N/A virtual uint ideal_reg() const { return Op_RegL; }
0N/A};
0N/A
0N/A// NOTE: SubFPNode should be taken away and replaced by add and negate
0N/A//------------------------------SubFPNode--------------------------------------
0N/A// Subtract 2 floats or doubles
0N/Aclass SubFPNode : public SubNode {
0N/Aprotected:
0N/A SubFPNode( Node *in1, Node *in2 ) : SubNode(in1,in2) {}
0N/Apublic:
0N/A const Type *Value( PhaseTransform *phase ) const;
0N/A};
0N/A
0N/A// NOTE: SubFNode should be taken away and replaced by add and negate
0N/A//------------------------------SubFNode---------------------------------------
0N/A// Subtract 2 doubles
0N/Aclass SubFNode : public SubFPNode {
0N/Apublic:
0N/A SubFNode( Node *in1, Node *in2 ) : SubFPNode(in1,in2) {}
0N/A virtual int Opcode() const;
0N/A virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
0N/A virtual const Type *sub( const Type *, const Type * ) const;
0N/A const Type *add_id() const { return TypeF::ZERO; }
0N/A const Type *bottom_type() const { return Type::FLOAT; }
0N/A virtual uint ideal_reg() const { return Op_RegF; }
0N/A};
0N/A
0N/A// NOTE: SubDNode should be taken away and replaced by add and negate
0N/A//------------------------------SubDNode---------------------------------------
0N/A// Subtract 2 doubles
0N/Aclass SubDNode : public SubFPNode {
0N/Apublic:
0N/A SubDNode( Node *in1, Node *in2 ) : SubFPNode(in1,in2) {}
0N/A virtual int Opcode() const;
0N/A virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
0N/A virtual const Type *sub( const Type *, const Type * ) const;
0N/A const Type *add_id() const { return TypeD::ZERO; }
0N/A const Type *bottom_type() const { return Type::DOUBLE; }
0N/A virtual uint ideal_reg() const { return Op_RegD; }
0N/A};
0N/A
0N/A//------------------------------CmpNode---------------------------------------
0N/A// Compare 2 values, returning condition codes (-1, 0 or 1).
0N/Aclass CmpNode : public SubNode {
0N/Apublic:
0N/A CmpNode( Node *in1, Node *in2 ) : SubNode(in1,in2) {
0N/A init_class_id(Class_Cmp);
0N/A }
0N/A virtual Node *Identity( PhaseTransform *phase );
0N/A const Type *add_id() const { return TypeInt::ZERO; }
0N/A const Type *bottom_type() const { return TypeInt::CC; }
0N/A virtual uint ideal_reg() const { return Op_RegFlags; }
0N/A};
0N/A
0N/A//------------------------------CmpINode---------------------------------------
0N/A// Compare 2 signed values, returning condition codes (-1, 0 or 1).
0N/Aclass CmpINode : public CmpNode {
0N/Apublic:
0N/A CmpINode( Node *in1, Node *in2 ) : CmpNode(in1,in2) {}
0N/A virtual int Opcode() const;
0N/A virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
0N/A virtual const Type *sub( const Type *, const Type * ) const;
0N/A};
0N/A
0N/A//------------------------------CmpUNode---------------------------------------
0N/A// Compare 2 unsigned values (integer or pointer), returning condition codes (-1, 0 or 1).
0N/Aclass CmpUNode : public CmpNode {
0N/Apublic:
0N/A CmpUNode( Node *in1, Node *in2 ) : CmpNode(in1,in2) {}
0N/A virtual int Opcode() const;
0N/A virtual const Type *sub( const Type *, const Type * ) const;
3873N/A bool is_index_range_check() const;
0N/A};
0N/A
0N/A//------------------------------CmpPNode---------------------------------------
0N/A// Compare 2 pointer values, returning condition codes (-1, 0 or 1).
0N/Aclass CmpPNode : public CmpNode {
0N/Apublic:
0N/A CmpPNode( Node *in1, Node *in2 ) : CmpNode(in1,in2) {}
0N/A virtual int Opcode() const;
0N/A virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
0N/A virtual const Type *sub( const Type *, const Type * ) const;
0N/A};
0N/A
113N/A//------------------------------CmpNNode--------------------------------------
113N/A// Compare 2 narrow oop values, returning condition codes (-1, 0 or 1).
113N/Aclass CmpNNode : public CmpNode {
113N/Apublic:
113N/A CmpNNode( Node *in1, Node *in2 ) : CmpNode(in1,in2) {}
113N/A virtual int Opcode() const;
113N/A virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
113N/A virtual const Type *sub( const Type *, const Type * ) const;
113N/A};
113N/A
0N/A//------------------------------CmpLNode---------------------------------------
0N/A// Compare 2 long values, returning condition codes (-1, 0 or 1).
0N/Aclass CmpLNode : public CmpNode {
0N/Apublic:
0N/A CmpLNode( Node *in1, Node *in2 ) : CmpNode(in1,in2) {}
0N/A virtual int Opcode() const;
0N/A virtual const Type *sub( const Type *, const Type * ) const;
0N/A};
0N/A
0N/A//------------------------------CmpL3Node--------------------------------------
0N/A// Compare 2 long values, returning integer value (-1, 0 or 1).
0N/Aclass CmpL3Node : public CmpLNode {
0N/Apublic:
0N/A CmpL3Node( Node *in1, Node *in2 ) : CmpLNode(in1,in2) {
0N/A // Since it is not consumed by Bools, it is not really a Cmp.
0N/A init_class_id(Class_Sub);
0N/A }
0N/A virtual int Opcode() const;
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A};
0N/A
0N/A//------------------------------CmpFNode---------------------------------------
0N/A// Compare 2 float values, returning condition codes (-1, 0 or 1).
0N/A// This implements the Java bytecode fcmpl, so unordered returns -1.
0N/A// Operands may not commute.
0N/Aclass CmpFNode : public CmpNode {
0N/Apublic:
0N/A CmpFNode( Node *in1, Node *in2 ) : CmpNode(in1,in2) {}
0N/A virtual int Opcode() const;
0N/A virtual const Type *sub( const Type *, const Type * ) const { ShouldNotReachHere(); return NULL; }
0N/A const Type *Value( PhaseTransform *phase ) const;
0N/A};
0N/A
0N/A//------------------------------CmpF3Node--------------------------------------
0N/A// Compare 2 float values, returning integer value (-1, 0 or 1).
0N/A// This implements the Java bytecode fcmpl, so unordered returns -1.
0N/A// Operands may not commute.
0N/Aclass CmpF3Node : public CmpFNode {
0N/Apublic:
0N/A CmpF3Node( Node *in1, Node *in2 ) : CmpFNode(in1,in2) {
0N/A // Since it is not consumed by Bools, it is not really a Cmp.
0N/A init_class_id(Class_Sub);
0N/A }
0N/A virtual int Opcode() const;
0N/A // Since it is not consumed by Bools, it is not really a Cmp.
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A};
0N/A
0N/A
0N/A//------------------------------CmpDNode---------------------------------------
0N/A// Compare 2 double values, returning condition codes (-1, 0 or 1).
0N/A// This implements the Java bytecode dcmpl, so unordered returns -1.
0N/A// Operands may not commute.
0N/Aclass CmpDNode : public CmpNode {
0N/Apublic:
0N/A CmpDNode( Node *in1, Node *in2 ) : CmpNode(in1,in2) {}
0N/A virtual int Opcode() const;
0N/A virtual const Type *sub( const Type *, const Type * ) const { ShouldNotReachHere(); return NULL; }
0N/A const Type *Value( PhaseTransform *phase ) const;
0N/A virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
0N/A};
0N/A
0N/A//------------------------------CmpD3Node--------------------------------------
0N/A// Compare 2 double values, returning integer value (-1, 0 or 1).
0N/A// This implements the Java bytecode dcmpl, so unordered returns -1.
0N/A// Operands may not commute.
0N/Aclass CmpD3Node : public CmpDNode {
0N/Apublic:
0N/A CmpD3Node( Node *in1, Node *in2 ) : CmpDNode(in1,in2) {
0N/A // Since it is not consumed by Bools, it is not really a Cmp.
0N/A init_class_id(Class_Sub);
0N/A }
0N/A virtual int Opcode() const;
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A};
0N/A
0N/A
0N/A//------------------------------BoolTest---------------------------------------
0N/A// Convert condition codes to a boolean test value (0 or -1).
0N/A// We pick the values as 3 bits; the low order 2 bits we compare against the
0N/A// condition codes, the high bit flips the sense of the result.
0N/Astruct BoolTest VALUE_OBJ_CLASS_SPEC {
0N/A enum mask { eq = 0, ne = 4, le = 5, ge = 7, lt = 3, gt = 1, illegal = 8 };
0N/A mask _test;
0N/A BoolTest( mask btm ) : _test(btm) {}
0N/A const Type *cc2logical( const Type *CC ) const;
0N/A // Commute the test. I use a small table lookup. The table is created as
0N/A // a simple char array where each element is the ASCII version of a 'mask'
0N/A // enum from above.
0N/A mask commute( ) const { return mask("038147858"[_test]-'0'); }
0N/A mask negate( ) const { return mask(_test^4); }
0N/A bool is_canonical( ) const { return (_test == BoolTest::ne || _test == BoolTest::lt || _test == BoolTest::le); }
0N/A#ifndef PRODUCT
0N/A void dump_on(outputStream *st) const;
0N/A#endif
0N/A};
0N/A
0N/A//------------------------------BoolNode---------------------------------------
0N/A// A Node to convert a Condition Codes to a Logical result.
0N/Aclass BoolNode : public Node {
0N/A virtual uint hash() const;
0N/A virtual uint cmp( const Node &n ) const;
0N/A virtual uint size_of() const;
0N/Apublic:
0N/A const BoolTest _test;
0N/A BoolNode( Node *cc, BoolTest::mask t): _test(t), Node(0,cc) {
0N/A init_class_id(Class_Bool);
0N/A }
0N/A // Convert an arbitrary int value to a Bool or other suitable predicate.
0N/A static Node* make_predicate(Node* test_value, PhaseGVN* phase);
0N/A // Convert self back to an integer value.
0N/A Node* as_int_value(PhaseGVN* phase);
0N/A // Invert sense of self, returning new Bool.
0N/A BoolNode* negate(PhaseGVN* phase);
0N/A virtual int Opcode() const;
0N/A virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
0N/A virtual const Type *Value( PhaseTransform *phase ) const;
0N/A virtual const Type *bottom_type() const { return TypeInt::BOOL; }
0N/A uint match_edge(uint idx) const { return 0; }
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A
0N/A bool is_counted_loop_exit_test();
0N/A#ifndef PRODUCT
0N/A virtual void dump_spec(outputStream *st) const;
0N/A#endif
0N/A};
0N/A
0N/A//------------------------------AbsNode----------------------------------------
0N/A// Abstract class for absolute value. Mostly used to get a handy wrapper
0N/A// for finding this pattern in the graph.
0N/Aclass AbsNode : public Node {
0N/Apublic:
0N/A AbsNode( Node *value ) : Node(0,value) {}
0N/A};
0N/A
0N/A//------------------------------AbsINode---------------------------------------
0N/A// Absolute value an integer. Since a naive graph involves control flow, we
0N/A// "match" it in the ideal world (so the control flow can be removed).
0N/Aclass AbsINode : public AbsNode {
0N/Apublic:
0N/A AbsINode( Node *in1 ) : AbsNode(in1) {}
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return TypeInt::INT; }
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A};
0N/A
0N/A//------------------------------AbsFNode---------------------------------------
0N/A// Absolute value a float, a common float-point idiom with a cheap hardware
0N/A// implemention on most chips. Since a naive graph involves control flow, we
0N/A// "match" it in the ideal world (so the control flow can be removed).
0N/Aclass AbsFNode : public AbsNode {
0N/Apublic:
0N/A AbsFNode( Node *in1 ) : AbsNode(in1) {}
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return Type::FLOAT; }
0N/A virtual uint ideal_reg() const { return Op_RegF; }
0N/A};
0N/A
0N/A//------------------------------AbsDNode---------------------------------------
0N/A// Absolute value a double, a common float-point idiom with a cheap hardware
0N/A// implemention on most chips. Since a naive graph involves control flow, we
0N/A// "match" it in the ideal world (so the control flow can be removed).
0N/Aclass AbsDNode : public AbsNode {
0N/Apublic:
0N/A AbsDNode( Node *in1 ) : AbsNode(in1) {}
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return Type::DOUBLE; }
0N/A virtual uint ideal_reg() const { return Op_RegD; }
0N/A};
0N/A
0N/A
0N/A//------------------------------CmpLTMaskNode----------------------------------
0N/A// If p < q, return -1 else return 0. Nice for flow-free idioms.
0N/Aclass CmpLTMaskNode : public Node {
0N/Apublic:
0N/A CmpLTMaskNode( Node *p, Node *q ) : Node(0, p, q) {}
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return TypeInt::INT; }
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A};
0N/A
0N/A
0N/A//------------------------------NegNode----------------------------------------
0N/Aclass NegNode : public Node {
0N/Apublic:
0N/A NegNode( Node *in1 ) : Node(0,in1) {}
0N/A};
0N/A
0N/A//------------------------------NegFNode---------------------------------------
0N/A// Negate value a float. Negating 0.0 returns -0.0, but subtracting from
0N/A// zero returns +0.0 (per JVM spec on 'fneg' bytecode). As subtraction
0N/A// cannot be used to replace negation we have to implement negation as ideal
0N/A// node; note that negation and addition can replace subtraction.
0N/Aclass NegFNode : public NegNode {
0N/Apublic:
0N/A NegFNode( Node *in1 ) : NegNode(in1) {}
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return Type::FLOAT; }
0N/A virtual uint ideal_reg() const { return Op_RegF; }
0N/A};
0N/A
0N/A//------------------------------NegDNode---------------------------------------
0N/A// Negate value a double. Negating 0.0 returns -0.0, but subtracting from
0N/A// zero returns +0.0 (per JVM spec on 'dneg' bytecode). As subtraction
0N/A// cannot be used to replace negation we have to implement negation as ideal
0N/A// node; note that negation and addition can replace subtraction.
0N/Aclass NegDNode : public NegNode {
0N/Apublic:
0N/A NegDNode( Node *in1 ) : NegNode(in1) {}
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return Type::DOUBLE; }
0N/A virtual uint ideal_reg() const { return Op_RegD; }
0N/A};
0N/A
0N/A//------------------------------CosDNode---------------------------------------
0N/A// Cosinus of a double
0N/Aclass CosDNode : public Node {
0N/Apublic:
4323N/A CosDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
4323N/A init_flags(Flag_is_expensive);
4323N/A C->add_expensive_node(this);
4323N/A }
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return Type::DOUBLE; }
0N/A virtual uint ideal_reg() const { return Op_RegD; }
0N/A virtual const Type *Value( PhaseTransform *phase ) const;
0N/A};
0N/A
0N/A//------------------------------CosDNode---------------------------------------
0N/A// Sinus of a double
0N/Aclass SinDNode : public Node {
0N/Apublic:
4323N/A SinDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
4323N/A init_flags(Flag_is_expensive);
4323N/A C->add_expensive_node(this);
4323N/A }
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return Type::DOUBLE; }
0N/A virtual uint ideal_reg() const { return Op_RegD; }
0N/A virtual const Type *Value( PhaseTransform *phase ) const;
0N/A};
0N/A
0N/A
0N/A//------------------------------TanDNode---------------------------------------
0N/A// tangens of a double
0N/Aclass TanDNode : public Node {
0N/Apublic:
4323N/A TanDNode(Compile* C, Node *c,Node *in1) : Node(c, in1) {
4323N/A init_flags(Flag_is_expensive);
4323N/A C->add_expensive_node(this);
4323N/A }
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return Type::DOUBLE; }
0N/A virtual uint ideal_reg() const { return Op_RegD; }
0N/A virtual const Type *Value( PhaseTransform *phase ) const;
0N/A};
0N/A
0N/A
0N/A//------------------------------AtanDNode--------------------------------------
0N/A// arcus tangens of a double
0N/Aclass AtanDNode : public Node {
0N/Apublic:
0N/A AtanDNode(Node *c, Node *in1, Node *in2 ) : Node(c, in1, in2) {}
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return Type::DOUBLE; }
0N/A virtual uint ideal_reg() const { return Op_RegD; }
0N/A};
0N/A
0N/A
0N/A//------------------------------SqrtDNode--------------------------------------
0N/A// square root a double
0N/Aclass SqrtDNode : public Node {
0N/Apublic:
4323N/A SqrtDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
4323N/A init_flags(Flag_is_expensive);
4323N/A C->add_expensive_node(this);
4323N/A }
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return Type::DOUBLE; }
0N/A virtual uint ideal_reg() const { return Op_RegD; }
0N/A virtual const Type *Value( PhaseTransform *phase ) const;
0N/A};
0N/A
0N/A//------------------------------ExpDNode---------------------------------------
0N/A// Exponentiate a double
0N/Aclass ExpDNode : public Node {
0N/Apublic:
4321N/A ExpDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
4321N/A init_flags(Flag_is_expensive);
4321N/A C->add_expensive_node(this);
4321N/A }
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return Type::DOUBLE; }
0N/A virtual uint ideal_reg() const { return Op_RegD; }
0N/A virtual const Type *Value( PhaseTransform *phase ) const;
0N/A};
0N/A
0N/A//------------------------------LogDNode---------------------------------------
0N/A// Log_e of a double
0N/Aclass LogDNode : public Node {
0N/Apublic:
4323N/A LogDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
4323N/A init_flags(Flag_is_expensive);
4323N/A C->add_expensive_node(this);
4323N/A }
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return Type::DOUBLE; }
0N/A virtual uint ideal_reg() const { return Op_RegD; }
0N/A virtual const Type *Value( PhaseTransform *phase ) const;
0N/A};
0N/A
0N/A//------------------------------Log10DNode---------------------------------------
0N/A// Log_10 of a double
0N/Aclass Log10DNode : public Node {
0N/Apublic:
4323N/A Log10DNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
4323N/A init_flags(Flag_is_expensive);
4323N/A C->add_expensive_node(this);
4323N/A }
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return Type::DOUBLE; }
0N/A virtual uint ideal_reg() const { return Op_RegD; }
0N/A virtual const Type *Value( PhaseTransform *phase ) const;
0N/A};
0N/A
0N/A//------------------------------PowDNode---------------------------------------
0N/A// Raise a double to a double power
0N/Aclass PowDNode : public Node {
0N/Apublic:
4321N/A PowDNode(Compile* C, Node *c, Node *in1, Node *in2 ) : Node(c, in1, in2) {
4321N/A init_flags(Flag_is_expensive);
4321N/A C->add_expensive_node(this);
4321N/A }
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return Type::DOUBLE; }
0N/A virtual uint ideal_reg() const { return Op_RegD; }
0N/A virtual const Type *Value( PhaseTransform *phase ) const;
0N/A};
0N/A
0N/A//-------------------------------ReverseBytesINode--------------------------------
0N/A// reverse bytes of an integer
0N/Aclass ReverseBytesINode : public Node {
0N/Apublic:
0N/A ReverseBytesINode(Node *c, Node *in1) : Node(c, in1) {}
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return TypeInt::INT; }
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A};
0N/A
0N/A//-------------------------------ReverseBytesLNode--------------------------------
0N/A// reverse bytes of a long
0N/Aclass ReverseBytesLNode : public Node {
0N/Apublic:
0N/A ReverseBytesLNode(Node *c, Node *in1) : Node(c, in1) {}
0N/A virtual int Opcode() const;
0N/A const Type *bottom_type() const { return TypeLong::LONG; }
0N/A virtual uint ideal_reg() const { return Op_RegL; }
0N/A};
1396N/A
1396N/A//-------------------------------ReverseBytesUSNode--------------------------------
1396N/A// reverse bytes of an unsigned short / char
1396N/Aclass ReverseBytesUSNode : public Node {
1396N/Apublic:
1396N/A ReverseBytesUSNode(Node *c, Node *in1) : Node(c, in1) {}
1396N/A virtual int Opcode() const;
1396N/A const Type *bottom_type() const { return TypeInt::CHAR; }
1396N/A virtual uint ideal_reg() const { return Op_RegI; }
1396N/A};
1396N/A
1396N/A//-------------------------------ReverseBytesSNode--------------------------------
1396N/A// reverse bytes of a short
1396N/Aclass ReverseBytesSNode : public Node {
1396N/Apublic:
1396N/A ReverseBytesSNode(Node *c, Node *in1) : Node(c, in1) {}
1396N/A virtual int Opcode() const;
1396N/A const Type *bottom_type() const { return TypeInt::SHORT; }
1396N/A virtual uint ideal_reg() const { return Op_RegI; }
1396N/A};
1879N/A
1879N/A#endif // SHARE_VM_OPTO_SUBNODE_HPP