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 */ 24 25 #include "precompiled.hpp" 26 #include "memory/allocation.inline.hpp" 27 #include "opto/block.hpp" 28 #include "opto/c2compiler.hpp" 29 #include "opto/callnode.hpp" 30 #include "opto/cfgnode.hpp" 31 #include "opto/machnode.hpp" 32 #include "opto/runtime.hpp" 33 #ifdef TARGET_ARCH_MODEL_x86_32 34 # include "adfiles/ad_x86_32.hpp" 35 #endif 36 #ifdef TARGET_ARCH_MODEL_x86_64 37 # include "adfiles/ad_x86_64.hpp" 38 #endif 39 #ifdef TARGET_ARCH_MODEL_sparc 40 # include "adfiles/ad_sparc.hpp" 41 #endif 42 #ifdef TARGET_ARCH_MODEL_zero 43 # include "adfiles/ad_zero.hpp" 44 #endif 45 #ifdef TARGET_ARCH_MODEL_arm 46 # include "adfiles/ad_arm.hpp" 47 #endif 48 #ifdef TARGET_ARCH_MODEL_ppc_32 49 # include "adfiles/ad_ppc_32.hpp" 50 #endif 51 #ifdef TARGET_ARCH_MODEL_ppc_64 52 # include "adfiles/ad_ppc_64.hpp" 53 #endif 54 55 // Optimization - Graph Style 56 57 // Check whether val is not-null-decoded compressed oop, 58 // i.e. will grab into the base of the heap if it represents NULL. 59 static bool accesses_heap_base_zone(Node *val) { 60 if (Universe::narrow_oop_base() > 0) { // Implies UseCompressedOops. 61 if (val && val->is_Mach()) { 62 if (val->as_Mach()->ideal_Opcode() == Op_DecodeN) { 63 // This assumes all Decodes with TypePtr::NotNull are matched to nodes that 64 // decode NULL to point to the heap base (Decode_NN). 65 if (val->bottom_type()->is_oopptr()->ptr() == TypePtr::NotNull) { 66 return true; 67 } 68 } 69 // Must recognize load operation with Decode matched in memory operand. 70 // We should not reach here exept for PPC/AIX, as os::zero_page_read_protected() 71 // returns true everywhere else. On PPC, no such memory operands | 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 */ 24 25 #include "precompiled.hpp" 26 #include "memory/allocation.inline.hpp" 27 #include "opto/block.hpp" 28 #include "opto/c2compiler.hpp" 29 #include "opto/callnode.hpp" 30 #include "opto/cfgnode.hpp" 31 #include "opto/machnode.hpp" 32 #include "opto/runtime.hpp" 33 #if defined AD_MD_HPP 34 # include AD_MD_HPP 35 #elif defined TARGET_ARCH_MODEL_x86_32 36 # include "adfiles/ad_x86_32.hpp" 37 #elif defined TARGET_ARCH_MODEL_x86_64 38 # include "adfiles/ad_x86_64.hpp" 39 #elif defined TARGET_ARCH_MODEL_sparc 40 # include "adfiles/ad_sparc.hpp" 41 #elif defined TARGET_ARCH_MODEL_zero 42 # include "adfiles/ad_zero.hpp" 43 #elif defined TARGET_ARCH_MODEL_ppc_64 44 # include "adfiles/ad_ppc_64.hpp" 45 #endif 46 47 // Optimization - Graph Style 48 49 // Check whether val is not-null-decoded compressed oop, 50 // i.e. will grab into the base of the heap if it represents NULL. 51 static bool accesses_heap_base_zone(Node *val) { 52 if (Universe::narrow_oop_base() > 0) { // Implies UseCompressedOops. 53 if (val && val->is_Mach()) { 54 if (val->as_Mach()->ideal_Opcode() == Op_DecodeN) { 55 // This assumes all Decodes with TypePtr::NotNull are matched to nodes that 56 // decode NULL to point to the heap base (Decode_NN). 57 if (val->bottom_type()->is_oopptr()->ptr() == TypePtr::NotNull) { 58 return true; 59 } 60 } 61 // Must recognize load operation with Decode matched in memory operand. 62 // We should not reach here exept for PPC/AIX, as os::zero_page_read_protected() 63 // returns true everywhere else. On PPC, no such memory operands |