Mercurial > hg > graal-compiler
comparison src/share/vm/adlc/formssel.cpp @ 17810:62c54fcc0a35
Merge
author | kvn |
---|---|
date | Tue, 25 Mar 2014 17:07:36 -0700 |
parents | a9becfeecd1b 8a8ff6b577ed |
children | 78bbf4d43a14 |
comparison
equal
deleted
inserted
replaced
17809:a433eb716ce1 | 17810:62c54fcc0a35 |
---|---|
658 // Machine independent loads must be checked for anti-dependences | 658 // Machine independent loads must be checked for anti-dependences |
659 // Check if instruction has a USE of a memory operand class, or a def. | 659 // Check if instruction has a USE of a memory operand class, or a def. |
660 int USE_of_memory = 0; | 660 int USE_of_memory = 0; |
661 int DEF_of_memory = 0; | 661 int DEF_of_memory = 0; |
662 const char* last_memory_DEF = NULL; // to test DEF/USE pairing in asserts | 662 const char* last_memory_DEF = NULL; // to test DEF/USE pairing in asserts |
663 const char* last_memory_USE = NULL; | |
663 Component *unique = NULL; | 664 Component *unique = NULL; |
664 Component *comp = NULL; | 665 Component *comp = NULL; |
665 ComponentList &components = (ComponentList &)_components; | 666 ComponentList &components = (ComponentList &)_components; |
666 | 667 |
667 components.reset(); | 668 components.reset(); |
679 } else if( comp->isa(Component::USE) ) { | 680 } else if( comp->isa(Component::USE) ) { |
680 if( last_memory_DEF != NULL ) { | 681 if( last_memory_DEF != NULL ) { |
681 assert(0 == strcmp(last_memory_DEF, comp->_name), "every memory DEF is followed by a USE of the same name"); | 682 assert(0 == strcmp(last_memory_DEF, comp->_name), "every memory DEF is followed by a USE of the same name"); |
682 last_memory_DEF = NULL; | 683 last_memory_DEF = NULL; |
683 } | 684 } |
684 USE_of_memory++; | 685 // Handles same memory being used multiple times in the case of BMI1 instructions. |
686 if (last_memory_USE != NULL) { | |
687 if (strcmp(comp->_name, last_memory_USE) != 0) { | |
688 USE_of_memory++; | |
689 } | |
690 } else { | |
691 USE_of_memory++; | |
692 } | |
693 last_memory_USE = comp->_name; | |
694 | |
685 if (DEF_of_memory == 0) // defs take precedence | 695 if (DEF_of_memory == 0) // defs take precedence |
686 unique = comp; | 696 unique = comp; |
687 } else { | 697 } else { |
688 assert(last_memory_DEF == NULL, "unpaired memory DEF"); | 698 assert(last_memory_DEF == NULL, "unpaired memory DEF"); |
689 } | 699 } |