Mercurial > hg > truffle
comparison src/share/vm/c1/c1_RangeCheckElimination.cpp @ 10408:836a62f43af9
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 19 Jun 2013 10:45:56 +0200 |
parents | 6a3629cf7075 |
children | de6a9e811145 |
comparison
equal
deleted
inserted
replaced
10086:e0fb8a213650 | 10408:836a62f43af9 |
---|---|
457 } | 457 } |
458 } | 458 } |
459 | 459 |
460 // Iterate over all different indices | 460 // Iterate over all different indices |
461 if (_optimistic) { | 461 if (_optimistic) { |
462 for (int i=0; i<indices.length(); i++) { | 462 for (int i = 0; i < indices.length(); i++) { |
463 Instruction *index_instruction = indices.at(i); | 463 Instruction *index_instruction = indices.at(i); |
464 AccessIndexedInfo *info = _access_indexed_info[index_instruction->id()]; | 464 AccessIndexedInfo *info = _access_indexed_info[index_instruction->id()]; |
465 assert(info != NULL, "Info must not be null"); | 465 assert(info != NULL, "Info must not be null"); |
466 | 466 |
467 // if idx < 0, max > 0, max + idx may fall between 0 and | 467 // if idx < 0, max > 0, max + idx may fall between 0 and |
529 for (int j = 0; j<info->_list->length(); j++) { | 529 for (int j = 0; j<info->_list->length(); j++) { |
530 AccessIndexed *ai = info->_list->at(j); | 530 AccessIndexed *ai = info->_list->at(j); |
531 remove_range_check(ai); | 531 remove_range_check(ai); |
532 } | 532 } |
533 } | 533 } |
534 _access_indexed_info[index_instruction->id()] = NULL; | 534 } |
535 } | |
536 indices.clear(); | |
537 | 535 |
538 if (list_constant.length() > 1) { | 536 if (list_constant.length() > 1) { |
539 AccessIndexed *first = list_constant.at(0); | 537 AccessIndexed *first = list_constant.at(0); |
540 Instruction *insert_position = first->prev(); | 538 Instruction *insert_position = first->prev(); |
541 ValueStack *state = first->state_before(); | 539 ValueStack *state = first->state_before(); |
558 AccessIndexed *ai = list_constant.at(j); | 556 AccessIndexed *ai = list_constant.at(j); |
559 remove_range_check(ai); | 557 remove_range_check(ai); |
560 } | 558 } |
561 } | 559 } |
562 } | 560 } |
561 | |
562 // Clear data structures for next array | |
563 for (int i = 0; i < indices.length(); i++) { | |
564 Instruction *index_instruction = indices.at(i); | |
565 _access_indexed_info[index_instruction->id()] = NULL; | |
566 } | |
567 indices.clear(); | |
563 } | 568 } |
564 } | 569 } |
565 | 570 |
566 bool RangeCheckEliminator::set_process_block_flags(BlockBegin *block) { | 571 bool RangeCheckEliminator::set_process_block_flags(BlockBegin *block) { |
567 Instruction *cur = block; | 572 Instruction *cur = block; |