Fix two bugs the LAllocator::FindOptimalSplitPos.
authorvegorov@chromium.org <vegorov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 2 May 2011 07:47:10 +0000 (07:47 +0000)
committervegorov@chromium.org <vegorov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 2 May 2011 07:47:10 +0000 (07:47 +0000)
commitcf239c4ea8b57e059c70127773ab930be777eef4
tree10dbd7e6eb746a6e10d3444f8011d4ed7d22c507
parent7088aea3ebbf0f0ce0ca904b248b5f751b3def6e
Fix two bugs the LAllocator::FindOptimalSplitPos.

- It was calculating start_block and end_block incorrectly.

- It was not considering the case when end_block is a loop header itself when searching for the header of the outermost loop.

These bugs do not affect correctness of the allocation but can severely degrade it's quality (cause spills in loop bodies).

Review URL: http://codereview.chromium.org/6901148

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/lithium-allocator.cc