Closed Bug 678377 Opened 13 years ago Closed 11 years ago

IonMonkey: LICM makes recursive calls

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: rpearl, Assigned: h4writer)

References

(Blocks 1 open bug)

Details

(Whiteboard: [ion:t])

Attachments

(2 files)

Loop::iterateLoopBlocks() makes non-tailcalls to Loop::iterateLoopBlocks() when this can be done without recursive calls. At the very least, an explicit stack should be used (to manage memory in a way that is OOM-safe), but it is possible that simply iterating over the blocks in the loop may be sufficient?
It was determined that you can't iterate over blocks in the loop because there's no guarantee on the range of block ids contained in the loop.  You have to follow pred pointers.  It would be easy to change this to an explicit stack though...
This removes the iterative way LICM worked. In the progress I also found a small fault, where we could iterate blocks multiple times and have the same instructions multiple times in the worklist.
Assignee: general → hv1989
Comment on attachment 742355 [details] [diff] [review]
Transform to use stack

s/iterative/recursief/
Attachment #742355 - Flags: review?(bhackett1024)
Attachment #742355 - Flags: review?(bhackett1024) → review+
Attached patch Fix regressionSplinter Review
Very stupid bug in this patch (i++ != i--).
In my quest I did find 2 extra fixes for wrong behavior of the original code.
Attachment #743029 - Flags: review?(bhackett1024)
Attachment #743029 - Flags: review?(bhackett1024) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: