src/share/vm/opto/mathexactnode.hpp

Fri, 11 Jul 2014 19:51:36 -0400

author
drchase
date
Fri, 11 Jul 2014 19:51:36 -0400
changeset 7161
fc2c88ea11a9
parent 6375
085b304a1cc5
child 6876
710a3c8b516e
permissions
-rw-r--r--

8036588: VerifyFieldClosure fails instanceKlass:3133
Summary: Changed deopt live-pointer test to use returns-object instead of live-and-returns-object
Reviewed-by: iveresov, kvn, jrose

     1 /*
     2  * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     8  *
     9  * This code is distributed in the hope that it will be useful, but WITHOUT
    10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    12  * version 2 for more details (a copy is included in the LICENSE file that
    13  * accompanied this code).
    14  *
    15  * You should have received a copy of the GNU General Public License version
    16  * 2 along with this work; if not, write to the Free Software Foundation,
    17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    18  *
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    20  * or visit www.oracle.com if you need additional information or have any
    21  * questions.
    22  *
    23  */
    25 #ifndef SHARE_VM_OPTO_MATHEXACTNODE_HPP
    26 #define SHARE_VM_OPTO_MATHEXACTNODE_HPP
    28 #include "opto/multnode.hpp"
    29 #include "opto/node.hpp"
    30 #include "opto/addnode.hpp"
    31 #include "opto/subnode.hpp"
    32 #include "opto/type.hpp"
    34 class PhaseGVN;
    35 class PhaseTransform;
    37 class OverflowNode : public CmpNode {
    38 public:
    39   OverflowNode(Node* in1, Node* in2) : CmpNode(in1, in2) {}
    41   virtual uint ideal_reg() const { return Op_RegFlags; }
    42   virtual const Type* sub(const Type* t1, const Type* t2) const;
    43 };
    45 class OverflowINode : public OverflowNode {
    46 public:
    47   typedef TypeInt TypeClass;
    49   OverflowINode(Node* in1, Node* in2) : OverflowNode(in1, in2) {}
    50   virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
    51   virtual const Type* Value(PhaseTransform* phase) const;
    53   virtual bool will_overflow(jint v1, jint v2) const = 0;
    54   virtual bool can_overflow(const Type* t1, const Type* t2) const = 0;
    55 };
    58 class OverflowLNode : public OverflowNode {
    59 public:
    60   typedef TypeLong TypeClass;
    62   OverflowLNode(Node* in1, Node* in2) : OverflowNode(in1, in2) {}
    63   virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
    64   virtual const Type* Value(PhaseTransform* phase) const;
    66   virtual bool will_overflow(jlong v1, jlong v2) const = 0;
    67   virtual bool can_overflow(const Type* t1, const Type* t2) const = 0;
    68 };
    70 class OverflowAddINode : public OverflowINode {
    71 public:
    72   typedef AddINode MathOp;
    74   OverflowAddINode(Node* in1, Node* in2) : OverflowINode(in1, in2) {}
    75   virtual int Opcode() const;
    77   virtual bool will_overflow(jint v1, jint v2) const;
    78   virtual bool can_overflow(const Type* t1, const Type* t2) const;
    79 };
    81 class OverflowSubINode : public OverflowINode {
    82 public:
    83   typedef SubINode MathOp;
    85   OverflowSubINode(Node* in1, Node* in2) : OverflowINode(in1, in2) {}
    86   virtual int Opcode() const;
    88   virtual bool will_overflow(jint v1, jint v2) const;
    89   virtual bool can_overflow(const Type* t1, const Type* t2) const;
    90 };
    92 class OverflowMulINode : public OverflowINode {
    93 public:
    94   typedef MulINode MathOp;
    96   OverflowMulINode(Node* in1, Node* in2) : OverflowINode(in1, in2) {}
    97   virtual int Opcode() const;
    99   virtual bool will_overflow(jint v1, jint v2) const;
   100   virtual bool can_overflow(const Type* t1, const Type* t2) const;
   101 };
   103 class OverflowAddLNode : public OverflowLNode {
   104 public:
   105   typedef AddLNode MathOp;
   107   OverflowAddLNode(Node* in1, Node* in2) : OverflowLNode(in1, in2) {}
   108   virtual int Opcode() const;
   110   virtual bool will_overflow(jlong v1, jlong v2) const;
   111   virtual bool can_overflow(const Type* t1, const Type* t2) const;
   112 };
   114 class OverflowSubLNode : public OverflowLNode {
   115 public:
   116   typedef SubLNode MathOp;
   118   OverflowSubLNode(Node* in1, Node* in2) : OverflowLNode(in1, in2) {}
   119   virtual int Opcode() const;
   121   virtual bool will_overflow(jlong v1, jlong v2) const;
   122   virtual bool can_overflow(const Type* t1, const Type* t2) const;
   123 };
   125 class OverflowMulLNode : public OverflowLNode {
   126 public:
   127   typedef MulLNode MathOp;
   129   OverflowMulLNode(Node* in1, Node* in2) : OverflowLNode(in1, in2) {}
   130   virtual int Opcode() const;
   132   virtual bool will_overflow(jlong v1, jlong v2) const;
   133   virtual bool can_overflow(const Type* t1, const Type* t2) const;
   134 };
   136 #endif

mercurial