| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 check, | 368 check, |
| 369 bb_data_list, | 369 bb_data_list, |
| 370 NULL); | 370 NULL); |
| 371 *data_p = bb_data_list; | 371 *data_p = bb_data_list; |
| 372 } else if (data->OffsetIsCovered(offset)) { | 372 } else if (data->OffsetIsCovered(offset)) { |
| 373 bb->graph()->isolate()->counters()-> | 373 bb->graph()->isolate()->counters()-> |
| 374 bounds_checks_eliminated()->Increment(); | 374 bounds_checks_eliminated()->Increment(); |
| 375 check->DeleteAndReplaceWith(check->ActualValue()); | 375 check->DeleteAndReplaceWith(check->ActualValue()); |
| 376 } else if (data->BasicBlock() == bb) { | 376 } else if (data->BasicBlock() == bb) { |
| 377 data->CoverCheck(check, offset); | 377 data->CoverCheck(check, offset); |
| 378 } else { | 378 } else if (graph()->use_optimistic_licm() || |
| 379 bb->IsLoopSuccessorDominator()) { |
| 379 int32_t new_lower_offset = offset < data->LowerOffset() | 380 int32_t new_lower_offset = offset < data->LowerOffset() |
| 380 ? offset | 381 ? offset |
| 381 : data->LowerOffset(); | 382 : data->LowerOffset(); |
| 382 int32_t new_upper_offset = offset > data->UpperOffset() | 383 int32_t new_upper_offset = offset > data->UpperOffset() |
| 383 ? offset | 384 ? offset |
| 384 : data->UpperOffset(); | 385 : data->UpperOffset(); |
| 385 bb_data_list = new(zone()) BoundsCheckBbData(key, | 386 bb_data_list = new(zone()) BoundsCheckBbData(key, |
| 386 new_lower_offset, | 387 new_lower_offset, |
| 387 new_upper_offset, | 388 new_upper_offset, |
| 388 bb, | 389 bb, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 404 if (data->FatherInDominatorTree()) { | 405 if (data->FatherInDominatorTree()) { |
| 405 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); | 406 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); |
| 406 } else { | 407 } else { |
| 407 table_.Delete(data->Key()); | 408 table_.Delete(data->Key()); |
| 408 } | 409 } |
| 409 data = data->NextInBasicBlock(); | 410 data = data->NextInBasicBlock(); |
| 410 } | 411 } |
| 411 } | 412 } |
| 412 | 413 |
| 413 } } // namespace v8::internal | 414 } } // namespace v8::internal |
| OLD | NEW |