Fix worst-case behavior of MergeRemovableSimulates().
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 8 Apr 2013 17:37:22 +0000 (17:37 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 8 Apr 2013 17:37:22 +0000 (17:37 +0000)
commit9559181b0e12a55a10ce31f278c4c634d2099ebc
tree2626279a25f60908c04070ae65c67413d4a7381b
parent3b65ecccf0a04390135d5bbb0e1c3cc98a5be9c4
Fix worst-case behavior of MergeRemovableSimulates().

Currently, when a long series of removable simulates are merged, we do
this by merging them one by one as we find them.  As we merge the value
value lists of the simulates, those lists snowball so that we get a
quadratic complexity wrt runtime and memory consumption.

Instead, we gather simulates that need to be merged, and merge them
backwards starting from the last simulate.

R=jkummerow@chromium.org
BUG=v8:2612

Review URL: https://chromiumcodereview.appspot.com/13649003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14169 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/hydrogen-instructions.cc
src/hydrogen-instructions.h
src/hydrogen.cc
test/mjsunit/mjsunit.status
test/mjsunit/regress/regress-2612.js [new file with mode: 0644]