Mercurial > hg > truffle
comparison src/share/vm/adlc/formssel.cpp @ 681:fbde8ec322d0
6761600: Use sse 4.2 in intrinsics
Summary: Use SSE 4.2 in intrinsics for String.{compareTo/equals/indexOf} and Arrays.equals.
Reviewed-by: kvn, never, jrose
author | cfang |
---|---|
date | Tue, 31 Mar 2009 14:07:08 -0700 |
parents | 7bb995fbd3c0 |
children | f9094a5e1c8a |
comparison
equal
deleted
inserted
replaced
676:d3676b4cb78c | 681:fbde8ec322d0 |
---|---|
572 | 572 |
573 // !!!!! !!!!! !!!!! | 573 // !!!!! !!!!! !!!!! |
574 // TEMPORARY | 574 // TEMPORARY |
575 // if( is_simple_chain_rule(globals) ) return false; | 575 // if( is_simple_chain_rule(globals) ) return false; |
576 | 576 |
577 // String-compare uses many memorys edges, but writes none | 577 // String.(compareTo/equals/indexOf) and Arrays.equals use many memorys edges, |
578 // but writes none | |
578 if( _matrule && _matrule->_rChild && | 579 if( _matrule && _matrule->_rChild && |
579 strcmp(_matrule->_rChild->_opType,"StrComp")==0 ) | 580 ( strcmp(_matrule->_rChild->_opType,"StrComp" )==0 || |
581 strcmp(_matrule->_rChild->_opType,"StrEquals" )==0 || | |
582 strcmp(_matrule->_rChild->_opType,"StrIndexOf" )==0 || | |
583 strcmp(_matrule->_rChild->_opType,"AryEq" )==0 )) | |
580 return true; | 584 return true; |
581 | 585 |
582 // Check if instruction has a USE of a memory operand class, but no defs | 586 // Check if instruction has a USE of a memory operand class, but no defs |
583 bool USE_of_memory = false; | 587 bool USE_of_memory = false; |
584 bool DEF_of_memory = false; | 588 bool DEF_of_memory = false; |
813 strcmp(_matrule->_opType,"SafePoint" )==0 || | 817 strcmp(_matrule->_opType,"SafePoint" )==0 || |
814 strcmp(_matrule->_opType,"Halt" )==0 ) | 818 strcmp(_matrule->_opType,"Halt" )==0 ) |
815 return AdlcVMDeps::Parms; // Skip the machine-state edges | 819 return AdlcVMDeps::Parms; // Skip the machine-state edges |
816 | 820 |
817 if( _matrule->_rChild && | 821 if( _matrule->_rChild && |
818 strcmp(_matrule->_rChild->_opType,"StrComp")==0 ) { | 822 ( strcmp(_matrule->_rChild->_opType,"StrComp" )==0 || |
819 // String compare takes 1 control and 4 memory edges. | 823 strcmp(_matrule->_rChild->_opType,"StrEquals" )==0 || |
824 strcmp(_matrule->_rChild->_opType,"StrIndexOf")==0 )) { | |
825 // String.(compareTo/equals/indexOf) take 1 control and 4 memory edges. | |
820 return 5; | 826 return 5; |
821 } | 827 } |
822 | 828 |
823 // Check for handling of 'Memory' input/edge in the ideal world. | 829 // Check for handling of 'Memory' input/edge in the ideal world. |
824 // The AD file writer is shielded from knowledge of these edges. | 830 // The AD file writer is shielded from knowledge of these edges. |