# HG changeset patch # User thartmann # Date 1567497793 -7200 # Node ID caca9fa8d83355b7271c8d71b4281e69e901057d # Parent 7785c3ba2985d7bcd45dee5fccc610e5c8264000 8230428: Cleanup dead CastIP node code in formssel.cpp Summary: Removed dead code. Reviewed-by: roland diff -r 7785c3ba2985 -r caca9fa8d833 src/share/vm/adlc/formssel.cpp --- a/src/share/vm/adlc/formssel.cpp Wed Feb 05 21:24:29 2014 -0800 +++ b/src/share/vm/adlc/formssel.cpp Tue Sep 03 10:03:13 2019 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -3969,40 +3969,13 @@ } int MatchRule::is_ideal_copy() const { - if( _rChild ) { - const char *opType = _rChild->_opType; -#if 1 - if( strcmp(opType,"CastIP")==0 ) - return 1; -#else - if( strcmp(opType,"CastII")==0 ) - return 1; - // Do not treat *CastPP this way, because it - // may transfer a raw pointer to an oop. - // If the register allocator were to coalesce this - // into a single LRG, the GC maps would be incorrect. - //if( strcmp(opType,"CastPP")==0 ) - // return 1; - //if( strcmp(opType,"CheckCastPP")==0 ) - // return 1; - // - // Do not treat CastX2P or CastP2X this way, because - // raw pointers and int types are treated differently - // when saving local & stack info for safepoints in - // Output(). - //if( strcmp(opType,"CastX2P")==0 ) - // return 1; - //if( strcmp(opType,"CastP2X")==0 ) - // return 1; -#endif + if (is_chain_rule(_AD.globalNames()) && + _lChild && strncmp(_lChild->_opType, "stackSlot", 9) == 0) { + return 1; } - if( is_chain_rule(_AD.globalNames()) && - _lChild && strncmp(_lChild->_opType,"stackSlot",9)==0 ) - return 1; return 0; } - int MatchRule::is_expensive() const { if( _rChild ) { const char *opType = _rChild->_opType;