As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 740563 - IonMonkey: Disentangle virtual registers from instruction id's
: IonMonkey: Disentangle virtual registers from instruction id's
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Jan de Mooij [:jandem]
: Jason Orendorff [:jorendorff]
Depends on:
Blocks: IonSpeed
  Show dependency treegraph
Reported: 2012-03-29 13:04 PDT by Jan de Mooij [:jandem]
Modified: 2012-03-30 12:52 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (28.50 KB, patch)
2012-03-30 06:36 PDT, Jan de Mooij [:jandem]
dvander: review+
Details | Diff | Splinter Review

Description User image Jan de Mooij [:jandem] 2012-03-29 13:04:10 PDT
Currently we assign a (new) virtual register to instructions without any defs, it's used as instruction id. This can be convenient sometimes, but the problem is that regalloc has to iterate over all virtual registers a number of times (and it allocates some memory for each virtual register).

We should try changing this so that virtual registers are only used for actual defs or temps, and see if it helps 3d-cube and audio-beat-detection.
Comment 1 User image Jan de Mooij [:jandem] 2012-03-30 06:36:51 PDT
Created attachment 610867 [details] [diff] [review]

The patch moves the LSRA movegroups from VirtualRegister to a new class, InstructionData. This was necessary and it simplifies LSRA a bit: an instruction can have multiple virtual registers so associating movegroups with instructions is more natural. It also allows us to remove one of the three movegroups.

Number of virtual registers for the same function, before/after:


3d-cube       : 2032 -> 1318
beat-detection: 3806 -> 2089


3d-cube       : 1710 ->  996
beat-detection: 3207 -> 1494

Small performance win and should use less memory.
Comment 2 User image Jan de Mooij [:jandem] 2012-03-30 12:52:45 PDT

Thanks for the quick review!

Note You need to log in before you can comment on or make changes to this bug.