Improve register allocation on large interpreter loops.
Categories
(Core :: JavaScript Engine: JIT, defect, P3)
Tracking
()
People
(Reporter: mbx, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
application/x-gzip
|
Details |
Reporter | ||
Comment 1•9 years ago
|
||
Comment 2•8 years ago
|
||
Comment 3•6 years ago
|
||
I'm interested in having a look at this because this affects an interpreter I'm writing in WebAssembly. I could use some help though.
It seems the info at https://wiki.mozilla.org/IonMonkey/Overview isn't really up to date w.r.t. register allocators since GreedyAllocator and LinearScan no longer exist. I have found js/src/jit/{StupidAllocator,BacktrackingAllocator}; are these all and should I then be looking at the BacktrackingAllocator or are there cases in which it bails out and the StupidAllocator is still used? I'm asking because the code generated for my interpreter is really inefficient (it does not reserve registers for program counter and heap and stack pointers, for instance).
Or is it not really worth the effort at the moment considering IonMonkey will be replaced by cranelift eventually (I don't know the timepath)?
I'm also wondering about the priority assigned here by jonco. I would expect at least P3/P4, especially since WebAssembly is also affected and the code going through the JIT becomes increasingly complex.
Comment 4•6 years ago
|
||
(In reply to Camil Staps from comment #3)
Jan will be able to answer your question about register allocation. Yes, our documentation is probably out of date.
I'm also wondering about the priority assigned here by jonco.
I don't remember what criteria I was using to determine this but we can change it if necessary. Again, Jan would be a better judge of this though.
Comment 5•6 years ago
|
||
Ion uses the BacktrackingAllocator for all code nowadays.
It's probably worth downloading the latest Nightly and testing with Cranelift (go to about:config, search for cranelift, toggle the pref, restart). The plan is to use Cranelift as WebAssembly backend and eventually for all Ion code.
Comment 6•6 years ago
|
||
Thanks for the quick responses, both. Cranelift produces similar code, I'll have a look at what I can do there then.
Comment 7•6 years ago
|
||
If you plan to do any regalloc work on cranelift pls try to sync with me, since I'll be doing that as well. Bug 1539399 is the root of the bug tree that will eventually be evolving for this and related work.
Updated•2 years ago
|
Description
•