Skip to content

Commit 9b39695

Browse files
committedOct 16, 2020
8254888: [lworld] Remove dead code from array property checking
1 parent 85f6d5b commit 9b39695

File tree

6 files changed

+0
-104
lines changed

6 files changed

+0
-104
lines changed
 

‎src/hotspot/cpu/aarch64/aarch64.ad

-31
Original file line numberDiff line numberDiff line change
@@ -8727,37 +8727,6 @@ instruct castP2X(iRegLNoSp dst, iRegP src) %{
87278727
ins_pipe(ialu_reg);
87288728
%}
87298729

8730-
instruct castN2I(iRegINoSp dst, iRegN src) %{
8731-
match(Set dst (CastN2I src));
8732-
8733-
ins_cost(INSN_COST);
8734-
format %{ "movw $dst, $src\t# compressed ptr -> int" %}
8735-
8736-
ins_encode %{
8737-
if ($dst$$reg != $src$$reg) {
8738-
__ movw(as_Register($dst$$reg), as_Register($src$$reg));
8739-
}
8740-
%}
8741-
8742-
ins_pipe(ialu_reg);
8743-
%}
8744-
8745-
instruct castI2N(iRegNNoSp dst, iRegI src) %{
8746-
match(Set dst (CastI2N src));
8747-
8748-
ins_cost(INSN_COST);
8749-
format %{ "movw $dst, $src\t# int -> compressed ptr" %}
8750-
8751-
ins_encode %{
8752-
if ($dst$$reg != $src$$reg) {
8753-
__ movw(as_Register($dst$$reg), as_Register($src$$reg));
8754-
}
8755-
%}
8756-
8757-
ins_pipe(ialu_reg);
8758-
%}
8759-
8760-
87618730
// Convert oop into int for vectors alignment masking
87628731
instruct convP2I(iRegINoSp dst, iRegP src) %{
87638732
match(Set dst (ConvL2I (CastP2X src)));

‎src/hotspot/cpu/x86/x86_64.ad

-49
Original file line numberDiff line numberDiff line change
@@ -6659,33 +6659,6 @@ instruct castP2X(rRegL dst, rRegP src)
66596659
ins_pipe(ialu_reg_reg); // XXX
66606660
%}
66616661

6662-
instruct castN2I(rRegI dst, rRegN src)
6663-
%{
6664-
match(Set dst (CastN2I src));
6665-
6666-
format %{ "movl $dst, $src\t# compressed ptr -> int" %}
6667-
ins_encode %{
6668-
if ($dst$$reg != $src$$reg) {
6669-
__ movl($dst$$Register, $src$$Register);
6670-
}
6671-
%}
6672-
ins_pipe(ialu_reg_reg); // XXX
6673-
%}
6674-
6675-
instruct castI2N(rRegN dst, rRegI src)
6676-
%{
6677-
match(Set dst (CastI2N src));
6678-
6679-
format %{ "movl $dst, $src\t# int -> compressed ptr" %}
6680-
ins_encode %{
6681-
if ($dst$$reg != $src$$reg) {
6682-
__ movl($dst$$Register, $src$$Register);
6683-
}
6684-
%}
6685-
ins_pipe(ialu_reg_reg); // XXX
6686-
%}
6687-
6688-
66896662
// Convert oop into int for vectors alignment masking
66906663
instruct convP2I(rRegI dst, rRegP src)
66916664
%{
@@ -11512,17 +11485,6 @@ instruct testI_reg_mem(rFlagsReg cr, rRegI src, memory mem, immI0 zero)
1151211485
ins_pipe(ialu_cr_reg_mem);
1151311486
%}
1151411487

11515-
// Fold array properties check
11516-
instruct testI_mem_imm(rFlagsReg cr, memory mem, immI con, immI0 zero)
11517-
%{
11518-
match(Set cr (CmpI (AndI (CastN2I (LoadNKlass mem)) con) zero));
11519-
11520-
format %{ "testl $mem, $con" %}
11521-
opcode(0xF7, 0x00);
11522-
ins_encode(REX_mem(mem), OpcP, RM_opc_mem(0x00, mem), Con32(con));
11523-
ins_pipe(ialu_mem_imm);
11524-
%}
11525-
1152611488
// Unsigned compare Instructions; really, same as signed except they
1152711489
// produce an rFlagsRegU instead of rFlagsReg.
1152811490
instruct compU_rReg(rFlagsRegU cr, rRegI op1, rRegI op2)
@@ -11835,17 +11797,6 @@ instruct testL_reg_mem2(rFlagsReg cr, rRegP src, memory mem, immL0 zero)
1183511797
ins_pipe(ialu_cr_reg_mem);
1183611798
%}
1183711799

11838-
// Fold array properties check
11839-
instruct testL_reg_mem3(rFlagsReg cr, memory mem, rRegL src, immL0 zero)
11840-
%{
11841-
match(Set cr (CmpL (AndL (CastP2X (LoadKlass mem)) src) zero));
11842-
11843-
format %{ "testq $src, $mem\t# test array properties" %}
11844-
opcode(0x85);
11845-
ins_encode(REX_reg_mem_wide(src, mem), OpcP, reg_mem(src, mem));
11846-
ins_pipe(ialu_cr_reg_mem);
11847-
%}
11848-
1184911800
// Manifest a CmpL result in an integer register. Very painful.
1185011801
// This is the test to avoid.
1185111802
instruct cmpL3_reg_reg(rRegI dst, rRegL src1, rRegL src2, rFlagsReg flags)

‎src/hotspot/share/adlc/formssel.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,6 @@ bool InstructForm::captures_bottom_type(FormDict &globals) const {
763763
if (_matrule && _matrule->_rChild &&
764764
(!strcmp(_matrule->_rChild->_opType,"CastPP") || // new result type
765765
!strcmp(_matrule->_rChild->_opType,"CastX2P") || // new result type
766-
!strcmp(_matrule->_rChild->_opType,"CastI2N") || // new result type
767766
!strcmp(_matrule->_rChild->_opType,"DecodeN") ||
768767
!strcmp(_matrule->_rChild->_opType,"EncodeP") ||
769768
!strcmp(_matrule->_rChild->_opType,"DecodeNKlass") ||

‎src/hotspot/share/opto/castnode.hpp

-19
Original file line numberDiff line numberDiff line change
@@ -149,23 +149,4 @@ class CastP2XNode : public Node {
149149
virtual bool depends_only_on_test() const { return false; }
150150
};
151151

152-
// convert between a 32 bit integer and a compressed pointer
153-
class CastI2NNode : public TypeNode {
154-
public:
155-
CastI2NNode(Node *n, const Type *t) : TypeNode(t, 2) {
156-
init_req(1, n);
157-
}
158-
virtual int Opcode() const;
159-
virtual uint ideal_reg() const { return Op_RegN; }
160-
};
161-
162-
class CastN2INode : public Node {
163-
public:
164-
CastN2INode(Node *n) : Node(NULL, n) {}
165-
virtual int Opcode() const;
166-
virtual uint ideal_reg() const { return Op_RegI; }
167-
virtual const Type *bottom_type() const { return TypeInt::INT; }
168-
};
169-
170-
171152
#endif // SHARE_OPTO_CASTNODE_HPP

‎src/hotspot/share/opto/classes.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ macro(CallStaticJava)
6363
macro(CastII)
6464
macro(CastX2P)
6565
macro(CastP2X)
66-
macro(CastI2N)
67-
macro(CastN2I)
6866
macro(CastPP)
6967
macro(Catch)
7068
macro(CatchProj)

‎src/hotspot/share/runtime/vmStructs.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -1576,11 +1576,9 @@ typedef HashtableEntry<InstanceKlass*, mtClass> KlassHashtableEntry;
15761576
declare_c2_type(ConvI2DNode, Node) \
15771577
declare_c2_type(ConvI2FNode, Node) \
15781578
declare_c2_type(ConvI2LNode, TypeNode) \
1579-
declare_c2_type(CastI2NNode, TypeNode) \
15801579
declare_c2_type(ConvL2DNode, Node) \
15811580
declare_c2_type(ConvL2FNode, Node) \
15821581
declare_c2_type(ConvL2INode, Node) \
1583-
declare_c2_type(CastN2INode, Node) \
15841582
declare_c2_type(CastX2PNode, Node) \
15851583
declare_c2_type(CastP2XNode, Node) \
15861584
declare_c2_type(SetVectMaskINode, Node) \

0 commit comments

Comments
 (0)
Please sign in to comment.