1879N/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 * 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 * 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 * 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. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// Portions of code courtesy of Clifford Click 0N/A//------------------------------AddNode---------------------------------------- 0N/A// Classic Add functionality. This covers all the usual 'add' behaviors for 0N/A// an algebraic ring. Add-integer, add-float, add-double, and binary-or are 0N/A// all inherited from this class. The various identity values are supplied 0N/A// by virtual functions. 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 // We also canonicalize the Node, moving constants to the right input, 0N/A // and flatten expressions (so that 1+x+2 becomes x+3). 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 // Check if this addition involves the additive identity 0N/A // Supplied function returns the sum 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 // Supplied function to return the additive identity type 0N/A//------------------------------AddINode--------------------------------------- 0N/A//------------------------------AddLNode--------------------------------------- 0N/A//------------------------------AddFNode--------------------------------------- 0N/A//------------------------------AddDNode--------------------------------------- 0N/A//------------------------------AddPNode--------------------------------------- 0N/A// Add pointer plus integer to get pointer. NOT commutative, really. 0N/A// So not really an AddNode. Lives here, because people associate it with 0N/A enum {
Control,
// When is it safe to do this add? 0N/A // second return value: 17N/A // Collect the AddP offset values into the elements array, giving up 17N/A // if there are more than length. 0N/A // Do not match base-ptr edge 0N/A//------------------------------OrINode---------------------------------------- 0N/A// Logically OR 2 integers. Included with the ADD nodes because it inherits 0N/A// all the behavior of addition on a ring. 0N/A//------------------------------OrLNode---------------------------------------- 0N/A// Logically OR 2 longs. Included with the ADD nodes because it inherits 0N/A// all the behavior of addition on a ring. 0N/A//------------------------------XorINode--------------------------------------- 0N/A// XOR'ing 2 integers 0N/A//------------------------------XorINode--------------------------------------- 0N/A//------------------------------MaxNode---------------------------------------- 0N/A// Max (or min) of 2 values. Included with the ADD nodes because it inherits 0N/A// all the behavior of addition on a ring. Only new thing is that we allow 0N/A// 2 equal inputs to be equal. 0N/A//------------------------------MaxINode--------------------------------------- 0N/A// Maximum of 2 integers. Included with the ADD nodes because it inherits 0N/A// all the behavior of addition on a ring. 0N/A//------------------------------MinINode--------------------------------------- 0N/A// MINimum of 2 integers. Included with the ADD nodes because it inherits 0N/A// all the behavior of addition on a ring. 1879N/A#
endif // SHARE_VM_OPTO_ADDNODE_HPP