/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_VM_OPTO_CONNODE_HPP
#define SHARE_VM_OPTO_CONNODE_HPP
#include "opto/opcodes.hpp"
class PhaseTransform;
class MachNode;
//------------------------------ConNode----------------------------------------
// Simple constants
public:
}
virtual int Opcode() const;
// Polymorphic factory method:
};
//------------------------------ConINode---------------------------------------
// Simple integer constants
public:
virtual int Opcode() const;
// Factory method:
}
};
//------------------------------ConPNode---------------------------------------
// Simple pointer constants
public:
virtual int Opcode() const;
// Factory methods:
else
}
};
//------------------------------ConNNode--------------------------------------
// Simple narrow oop constants
public:
virtual int Opcode() const;
};
//------------------------------ConLNode---------------------------------------
// Simple long constants
public:
virtual int Opcode() const;
// Factory method:
}
};
//------------------------------ConFNode---------------------------------------
// Simple float constants
public:
virtual int Opcode() const;
// Factory method:
}
};
//------------------------------ConDNode---------------------------------------
// Simple double constants
public:
virtual int Opcode() const;
// Factory method:
}
};
//------------------------------BinaryNode-------------------------------------
// Place holder for the 2 conditional inputs to a CMove. CMove needs 4
// compare), and the 2 values to select between. The Matcher requires a
// binary tree so we break it down like this:
// (CMove (Binary bol cmp) (Binary src1 src2))
public:
virtual int Opcode() const;
};
//------------------------------CMoveNode--------------------------------------
// Conditional move
public:
{
// all inputs are nullified in Node::Node(int)
// init_req(Control,NULL);
}
// Helper function to spot cmove graph shapes
};
//------------------------------CMoveDNode-------------------------------------
public:
virtual int Opcode() const;
};
//------------------------------CMoveFNode-------------------------------------
public:
virtual int Opcode() const;
};
//------------------------------CMoveINode-------------------------------------
public:
CMoveINode( Node *bol, Node *left, Node *right, const TypeInt *ti ) : CMoveNode(bol,left,right,ti){}
virtual int Opcode() const;
};
//------------------------------CMoveLNode-------------------------------------
public:
CMoveLNode(Node *bol, Node *left, Node *right, const TypeLong *tl ) : CMoveNode(bol,left,right,tl){}
virtual int Opcode() const;
};
//------------------------------CMovePNode-------------------------------------
public:
CMovePNode( Node *c, Node *bol, Node *left, Node *right, const TypePtr* t ) : CMoveNode(bol,left,right,t) { init_req(Control,c); }
virtual int Opcode() const;
};
//------------------------------CMoveNNode-------------------------------------
public:
CMoveNNode( Node *c, Node *bol, Node *left, Node *right, const Type* t ) : CMoveNode(bol,left,right,t) { init_req(Control,c); }
virtual int Opcode() const;
};
//------------------------------ConstraintCastNode-----------------------------
// cast to a different range
public:
init_req(1, n);
}
virtual int Opcode() const;
};
//------------------------------CastIINode-------------------------------------
// cast integer to integer (different range)
public:
virtual int Opcode() const;
};
//------------------------------CastPPNode-------------------------------------
// cast pointer to pointer (different type)
public:
virtual int Opcode() const;
};
//------------------------------CheckCastPPNode--------------------------------
// for _checkcast, cast pointer to pointer (different type), without JOIN,
public:
init_req(0, c);
init_req(1, n);
}
virtual int Opcode() const;
// No longer remove CheckCast after CCP as it gives me a place to hang
// the proper address type - which is required to compute anti-deps.
//virtual Node *Ideal_DU_postCCP( PhaseCCP * );
};
//------------------------------EncodeP--------------------------------
// Encodes an oop pointers into its compressed form
// Takes an extra argument which is the real heap base as a long which
// may be useful for code generation in the backend.
public:
}
virtual int Opcode() const;
};
//------------------------------DecodeN--------------------------------
// Converts a narrow oop into a real oop ptr.
// Takes an extra argument which is the real heap base as a long which
// may be useful for code generation in the backend.
public:
}
virtual int Opcode() const;
};
//------------------------------Conv2BNode-------------------------------------
public:
virtual int Opcode() const;
};
// The conversions operations are all Alpha sorted. Please keep it that way!
//------------------------------ConvD2FNode------------------------------------
// Convert double to float
public:
virtual int Opcode() const;
};
//------------------------------ConvD2INode------------------------------------
// Convert Double to Integer
public:
virtual int Opcode() const;
};
//------------------------------ConvD2LNode------------------------------------
// Convert Double to Long
public:
virtual int Opcode() const;
};
//------------------------------ConvF2DNode------------------------------------
// Convert Float to a Double.
public:
virtual int Opcode() const;
};
//------------------------------ConvF2INode------------------------------------
// Convert float to integer
public:
virtual int Opcode() const;
};
//------------------------------ConvF2LNode------------------------------------
// Convert float to long
public:
virtual int Opcode() const;
};
//------------------------------ConvI2DNode------------------------------------
// Convert Integer to Double
public:
virtual int Opcode() const;
};
//------------------------------ConvI2FNode------------------------------------
// Convert Integer to Float
public:
virtual int Opcode() const;
};
//------------------------------ConvI2LNode------------------------------------
// Convert integer to long
public:
: TypeNode(t, 2)
virtual int Opcode() const;
};
//------------------------------ConvL2DNode------------------------------------
// Convert Long to Double
public:
virtual int Opcode() const;
};
//------------------------------ConvL2FNode------------------------------------
// Convert Long to Float
public:
virtual int Opcode() const;
};
//------------------------------ConvL2INode------------------------------------
// Convert long to integer
public:
virtual int Opcode() const;
};
//------------------------------CastX2PNode-------------------------------------
// convert a machine-pointer-sized integer to a raw pointer
public:
virtual int Opcode() const;
};
//------------------------------CastP2XNode-------------------------------------
// Used in both 32-bit and 64-bit land.
// Used for card-marks and unsafe pointer math.
public:
virtual int Opcode() const;
// Return false to keep node from moving away from an associated card mark.
virtual bool depends_only_on_test() const { return false; }
};
//------------------------------ThreadLocalNode--------------------------------
// Ideal Node which returns the base of ThreadLocalStorage.
public:
virtual int Opcode() const;
};
//------------------------------LoadReturnPCNode-------------------------------
public:
virtual int Opcode() const;
};
//-----------------------------RoundFloatNode----------------------------------
public:
virtual int Opcode() const;
};
//-----------------------------RoundDoubleNode---------------------------------
public:
virtual int Opcode() const;
};
//------------------------------Opaque1Node------------------------------------
// A node to prevent unwanted optimizations. Allows constant folding.
// Stops value-numbering, Ideal calls or Identity functions.
public:
// Put it on the Macro nodes list to removed during macro nodes expansion.
C->add_macro_node(this);
}
// Special version for the pre-loop to hold the original loop limit
// which is consumed by range check elimination.
// Put it on the Macro nodes list to removed during macro nodes expansion.
C->add_macro_node(this);
}
virtual int Opcode() const;
};
//------------------------------Opaque2Node------------------------------------
// A node to prevent unwanted optimizations. Allows constant folding. Stops
// value-numbering, most Ideal calls or Identity functions. This Node is
// specifically designed to prevent the pre-increment value of a loop trip
// counter from being live out of the bottom of the loop (hence causing the
// pre- and post-increment values both being live and thus requiring an extra
// temp register and an extra move). If we "accidentally" optimize through
// this kind of a Node, we'll get slightly pessimal, but correct, code. Thus
// it's OK to be slightly sloppy on optimizations here.
public:
// Put it on the Macro nodes list to removed during macro nodes expansion.
C->add_macro_node(this);
}
virtual int Opcode() const;
};
//----------------------PartialSubtypeCheckNode--------------------------------
// The 2nd slow-half of a subtype check. Scan the subklass's 2ndary superklass
// array for an instance of the superklass. Set a hidden internal cache on a
// hit (cache is checked with exposed code in gen_subtype_check()). Return
// not zero for a miss or zero for a hit.
public:
virtual int Opcode() const;
};
//
public:
virtual int Opcode() const;
};
public:
virtual int Opcode() const;
};
public:
virtual int Opcode() const;
};
public:
virtual int Opcode() const;
};
//---------- CountBitsNode -----------------------------------------------------
public:
};
//---------- CountLeadingZerosINode --------------------------------------------
// Count leading zeros (0-bit count starting from MSB) of an integer.
public:
virtual int Opcode() const;
};
//---------- CountLeadingZerosLNode --------------------------------------------
// Count leading zeros (0-bit count starting from MSB) of a long.
public:
virtual int Opcode() const;
};
//---------- CountTrailingZerosINode -------------------------------------------
// Count trailing zeros (0-bit count starting from LSB) of an integer.
public:
virtual int Opcode() const;
};
//---------- CountTrailingZerosLNode -------------------------------------------
// Count trailing zeros (0-bit count starting from LSB) of a long.
public:
virtual int Opcode() const;
};
//---------- PopCountINode -----------------------------------------------------
// Population count (bit count) of an integer.
public:
virtual int Opcode() const;
};
//---------- PopCountLNode -----------------------------------------------------
// Population count (bit count) of a long.
public:
virtual int Opcode() const;
};
#endif // SHARE_VM_OPTO_CONNODE_HPP