Fri, 18 Oct 2013 10:50:17 +0200
8022783: Nashorn test fails with: assert(!def_outside->member(r))
Summary: Enables private copies of inputs for recent spill copies as well
Reviewed-by: kvn, twisti
rbackman@5791 | 1 | /* |
rbackman@5791 | 2 | * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
rbackman@5791 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
rbackman@5791 | 4 | * |
rbackman@5791 | 5 | * This code is free software; you can redistribute it and/or modify it |
rbackman@5791 | 6 | * under the terms of the GNU General Public License version 2 only, as |
rbackman@5791 | 7 | * published by the Free Software Foundation. |
rbackman@5791 | 8 | * |
rbackman@5791 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
rbackman@5791 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
rbackman@5791 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
rbackman@5791 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
rbackman@5791 | 13 | * accompanied this code). |
rbackman@5791 | 14 | * |
rbackman@5791 | 15 | * You should have received a copy of the GNU General Public License version |
rbackman@5791 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
rbackman@5791 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
rbackman@5791 | 18 | * |
rbackman@5791 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
rbackman@5791 | 20 | * or visit www.oracle.com if you need additional information or have any |
rbackman@5791 | 21 | * questions. |
rbackman@5791 | 22 | * |
rbackman@5791 | 23 | */ |
rbackman@5791 | 24 | |
rbackman@5791 | 25 | #ifndef SHARE_VM_OPTO_MATHEXACTNODE_HPP |
rbackman@5791 | 26 | #define SHARE_VM_OPTO_MATHEXACTNODE_HPP |
rbackman@5791 | 27 | |
rbackman@5791 | 28 | #include "opto/multnode.hpp" |
rbackman@5791 | 29 | #include "opto/node.hpp" |
rbackman@5927 | 30 | #include "opto/subnode.hpp" |
rbackman@5791 | 31 | #include "opto/type.hpp" |
rbackman@5791 | 32 | |
rbackman@5927 | 33 | class BoolNode; |
rbackman@5927 | 34 | class IfNode; |
rbackman@5791 | 35 | class Node; |
rbackman@5791 | 36 | |
rbackman@5791 | 37 | class PhaseGVN; |
rbackman@5791 | 38 | class PhaseTransform; |
rbackman@5791 | 39 | |
rbackman@5791 | 40 | class MathExactNode : public MultiNode { |
rbackman@5791 | 41 | public: |
rbackman@5791 | 42 | MathExactNode(Node* ctrl, Node* in1, Node* in2); |
rbackman@5791 | 43 | enum { |
rbackman@5791 | 44 | result_proj_node = 0, |
rbackman@5791 | 45 | flags_proj_node = 1 |
rbackman@5791 | 46 | }; |
rbackman@5791 | 47 | virtual int Opcode() const; |
rbackman@5791 | 48 | virtual Node* Identity(PhaseTransform* phase) { return this; } |
rbackman@5791 | 49 | virtual Node* Ideal(PhaseGVN* phase, bool can_reshape) { return NULL; } |
rbackman@5791 | 50 | virtual const Type* Value(PhaseTransform* phase) const { return bottom_type(); } |
rbackman@5791 | 51 | virtual uint hash() const { return Node::hash(); } |
rbackman@5791 | 52 | virtual bool is_CFG() const { return false; } |
rbackman@5791 | 53 | virtual uint ideal_reg() const { return NotAMachineReg; } |
rbackman@5791 | 54 | |
rbackman@5927 | 55 | ProjNode* result_node() const { return proj_out(result_proj_node); } |
rbackman@5927 | 56 | ProjNode* flags_node() const { return proj_out(flags_proj_node); } |
rbackman@5927 | 57 | Node* control_node() const; |
rbackman@5927 | 58 | Node* non_throwing_branch() const; |
rbackman@5791 | 59 | protected: |
rbackman@5927 | 60 | IfNode* if_node() const; |
rbackman@5927 | 61 | BoolNode* bool_node() const; |
rbackman@5791 | 62 | Node* no_overflow(PhaseGVN *phase, Node* new_result); |
rbackman@5791 | 63 | }; |
rbackman@5791 | 64 | |
rbackman@5791 | 65 | class AddExactINode : public MathExactNode { |
rbackman@5791 | 66 | public: |
rbackman@5791 | 67 | AddExactINode(Node* ctrl, Node* in1, Node* in2) : MathExactNode(ctrl, in1, in2) {} |
rbackman@5791 | 68 | virtual int Opcode() const; |
rbackman@5791 | 69 | virtual const Type* bottom_type() const { return TypeTuple::INT_CC_PAIR; } |
rbackman@5791 | 70 | virtual Node* match(const ProjNode* proj, const Matcher* m); |
rbackman@5791 | 71 | virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
rbackman@5791 | 72 | }; |
rbackman@5791 | 73 | |
rbackman@5791 | 74 | class FlagsProjNode : public ProjNode { |
rbackman@5791 | 75 | public: |
rbackman@5791 | 76 | FlagsProjNode(Node* src, uint con) : ProjNode(src, con) { |
rbackman@5791 | 77 | init_class_id(Class_FlagsProj); |
rbackman@5791 | 78 | } |
rbackman@5791 | 79 | |
rbackman@5791 | 80 | virtual int Opcode() const; |
rbackman@5791 | 81 | virtual bool is_CFG() const { return false; } |
rbackman@5791 | 82 | virtual const Type* bottom_type() const { return TypeInt::CC; } |
rbackman@5791 | 83 | virtual uint ideal_reg() const { return Op_RegFlags; } |
rbackman@5791 | 84 | }; |
rbackman@5791 | 85 | |
rbackman@5791 | 86 | |
rbackman@5791 | 87 | #endif |
rbackman@5791 | 88 |